/* ==========================================================================
   PAGE-SPECIFIC LAYOUT — ByteNana homepage
   Built on the design-kit tokens/components. Only page-level composition lives
   here; every color/space value still comes from tokens.css.
   ========================================================================== */

/* --- 01 Hero ------------------------------------------------------------- */
.section-hero {
  position: relative; overflow: hidden;
  min-height: 75vh;
  min-height: 75svh;             /* avoids mobile browser-chrome jump */
  display: flex; flex-direction: column;
  padding-top: var(--space-6);
  padding-bottom: var(--space-12);
}
/* Logo pinned at the top of the hero (navbar removed) */
/* width:100% stops this .container from shrink-wrapping the logo and getting
   centered by its own margin:0 auto — keeps the logo flush top-left. */
.hero-topbar { flex: 0 0 auto; width: 100%; padding-top: var(--space-2); padding-bottom: var(--space-6); }
/* Content centers in the space left below the logo */
.hero-grid { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-10); align-items: center; align-content: center; }
.hero-logo { font-size: var(--text-xl); }
.hero-logo:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: var(--radius); }
.hero-title__static { display: block; }
.rotator { display: block; max-width: 100%; height: 1.1em; line-height: 1.1; overflow: hidden; color: var(--color-primary); }
.rotator__list { display: flex; flex-direction: column; }
.rotator__item { line-height: 1.1; white-space: normal; }
.section-hero h1 { font-size: clamp(1.9rem, 6vw, 2.75rem); letter-spacing: -0.03em; line-height: 1.08; margin-top: var(--space-2); }
.hero-subhead { font-size: var(--text-lg); color: var(--color-text-muted); max-width: 620px; margin-top: var(--space-6); line-height: 1.75; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }
.trust-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-8); font-size: var(--text-sm); color: var(--color-text-muted); }
.trust-strip .sep { opacity: 0.3; }
/* Hero molecular hub (same component as section 13, yellow on the dark hero) */
.hero-hub { min-height: 440px; animation: hero-hub-pulse 7s ease-in-out infinite; }
/* Broader pulse than the default .cta-hub (1.045) — bigger expand/contract */
@keyframes hero-hub-pulse {
  0%, 100% { transform: scale(0.94); }
  50%      { transform: scale(1.14); }
}
@media (prefers-reduced-motion: reduce) { .hero-hub { animation: none; } }

/* --- 02 Trust bar -------------------------------------------------------- */
/* No panel fill and no divider — the band sits straight on the page background. */
.section-trust { padding: var(--space-16) 0; }

/* Sections 05 and 06 are opaque dark panels, on the same footing as
   .section-cta / #footer. (The trust band above no longer fills — it sits
   straight on the page background.) */
.section-talent, .section-proof { background-color: var(--color-surface); }

/* --- 03 What we do — centered heading ------------------------------------ */
#what-we-do .section-label, #what-we-do h2 { text-align: center; }

/* Joined sections (03+08, 05+07) hold two blocks inside a single padding box.
   Before the join, two sets of section padding separated them; without this
   they butt straight together. General sibling, not adjacent: #tech-stack has
   an SVG sprite block sitting between its two containers. */
#tech-stack > .container ~ .container,
#talent > .container ~ .container { margin-top: var(--space-20); }
/* The talent CTA belongs to the block above it, so it keeps the tighter
   .engage-cta rhythm instead of the 80px gap between joined blocks. Same
   specificity as the rule above, so it has to come after it. */
#talent > .container.talent-cta { margin-top: var(--space-10); }
/* (The #services-carousel overrides that used to live here went away with the
   carousel itself — section 03 is a static .card-grid now.) */

/* --- Tech stack + reviews — centered headings ---------------------------- */
#tech-stack h2 { text-align: center; max-width: 900px; margin-left: auto; margin-right: auto; }
#reviews .section-label, #reviews h2 { text-align: center; }
#reviews h2 { max-width: 820px; margin-left: auto; margin-right: auto; }
#reviews .section-intro { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
#tech-stack .section-intro { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }

/* --- 04 Chooser ---------------------------------------------------------- */
/* --- 02 Engagement cards (Staff Augmentation / Product teams) ------------ */
.engage-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-8); }
/* One card at a time (dots + swipe, same component as sections 08/11). The slide
   variant's alternating dark/yellow cards don't suit these two — both keep the
   plain .card surface so neither model reads as the "featured" one. */
#engage-carousel .step:nth-child(odd),
#engage-carousel .step:nth-child(even) {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
}
#engage-carousel .step:nth-child(odd) h3,
#engage-carousel .step:nth-child(even) h3 { color: var(--color-text); }
#engage-carousel .step:nth-child(odd) p,
#engage-carousel .step:nth-child(even) p { color: var(--color-text-muted); }
.card-eyebrow { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-dim); }
.engage-card h3 { font-size: var(--text-2xl); margin-bottom: 0; }
/* Bullet list inside the cards — same treatment as the section-05 talent list */
.engage-list { margin: var(--space-2) 0 0; max-width: none; gap: var(--space-3); }
.engage-list li { font-size: var(--text-sm); color: var(--color-text-muted); }
.engage-list li strong { color: var(--color-text); }
/* Single section-level CTA, replacing the per-panel engage-foot bars */
.engage-cta { margin-top: var(--space-10); }

/* --- 07 Talent ----------------------------------------------------------- */
.talent-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-10); align-items: center; }
.talent-list { display: grid; gap: var(--space-4); margin: var(--space-8) 0; max-width: 660px; }
.talent-list li { display: flex; align-items: flex-start; gap: var(--space-3); font-size: var(--text-lg); line-height: 1.5; color: var(--color-text); }
.talent-check { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; border-radius: 50%; background-color: var(--color-primary); color: var(--color-bg); font-size: 0.8em; font-weight: 800; margin-top: 0.1em; }
.talent-aside { display: grid; gap: var(--space-4); }
.talent-badge { background-color: var(--color-surface); border: 1px solid var(--color-border); border-left: 3px solid var(--color-primary); border-radius: var(--radius-lg); padding: var(--space-6) var(--space-8); }
.talent-badge__num { display: block; font-family: var(--font-heading); font-weight: 800; font-size: var(--text-3xl); color: var(--color-primary); line-height: 1; letter-spacing: -0.02em; }
.talent-badge__cap { display: block; margin-top: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }

/* --- 10 Selected work ---------------------------------------------------- */
.work-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-6); margin-top: var(--space-10); }
.work-card { display: flex; flex-direction: column; gap: var(--space-3); }
.work-card h3 { font-size: var(--text-xl); }
.work-blurb { font-size: var(--text-sm); }
.work-quote { font-size: var(--text-sm); font-style: italic; color: var(--color-text-muted); border-left: 3px solid var(--color-primary); padding-left: var(--space-4); margin-top: var(--space-2); line-height: 1.6; }
.work-quote cite { display: block; margin-top: var(--space-2); font-style: normal; font-weight: 600; color: var(--color-text); }
.work-link { margin-top: auto; font-weight: 700; color: var(--color-primary); padding-top: var(--space-3); }

/* --- 11 Reviews: keep proof testimonial styling on the slide cards ------- */
/* The h2 above this carousel was removed, so .steps-carousel--slide's top
   margin (which existed to clear it) would just stack on the section padding. */
#reviews-carousel { margin-top: 0; }
.section-proof .testimonial-stars { color: var(--color-primary); font-size: var(--text-lg); letter-spacing: 2px; line-height: 1; margin-bottom: var(--space-4); }
/* Every card in this block is dark, so the slide variant's alternating
   dark/yellow nth-child fill is overridden on both branches and one set of
   colours covers all six reviews. (Other carousels keep the alternation.) */
#reviews-carousel .step:nth-child(odd),
#reviews-carousel .step:nth-child(even) { background-color: var(--color-bg); }
#reviews-carousel .step .testimonial-stars { color: var(--color-primary); }
#reviews-carousel .step h3,
#reviews-carousel .step-content > p { color: #FCFCFC; }
#reviews-carousel .step-content > p { font-size: var(--text-xl); font-style: italic; line-height: 1.6; }
#reviews-carousel .step-content footer { margin-top: var(--space-4); font-size: var(--text-sm); color: rgba(252, 252, 252, 0.7); }
.trust-link { cursor: pointer; }

/* --- 12 How we work ------------------------------------------------------ */
/* No top padding — it sits directly under the tech-stack section's own
   bottom padding, which already separates them. */
#how-we-work { padding-top: 0; }
.section-howwework .steps-carousel { margin-top: var(--space-10); }

/* --- 13 Final CTA -------------------------------------------------------- */
/* Opaque dark panel — the page-wide dot mesh stops here, same as .section-trust. */
.section-cta { position: relative; overflow: hidden; background-color: var(--color-surface); border-top: 1px solid var(--color-border); }
.cta-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-10); align-items: center; }
.cta-content { min-width: 0; }
.cta-hub { order: 2; }
.cta-content { order: 1; }
/* The section's form was replaced by a single popup CTA; .cta-actions carries the
   top margin the form used to bring with it, on the same 560px measure. */
.cta-actions { margin-top: var(--space-10); max-width: 560px; }
.section-cta .form-microcopy { color: var(--color-text-dim); margin-top: var(--space-3); }

/* --- 14 Footer columns --------------------------------------------------- */
#footer .section-label { color: var(--color-text-dim); margin-bottom: var(--space-3); }
.footer-col { min-width: 140px; }
.footer-nav { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-nav a, .footer-social a { font-size: var(--text-sm); color: var(--color-text-muted); transition: color var(--t-fast) ease; }
.footer-social { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-legal { flex-basis: 100%; margin-top: var(--space-4); }
/* Icon-only variant: sits in a row, 24px glyphs with a 44px tap target. */
.footer-social--icons { flex-direction: row; align-items: center; gap: var(--space-4); }
.footer-social--icons a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; font-size: 24px;
}
@media (hover: hover) and (pointer: fine) {
  .footer-nav a:hover { color: var(--color-text); }
  .footer-social a:hover { color: var(--color-primary); }
}

/* ==========================================================================
   PAGE BREAKPOINTS
   ========================================================================== */
@media (max-width: 767px) {
  /* Hero (mobile): flatten the grid. display:contents lets .hero-content's children
     reorder as siblings; align-items:stretch keeps text/buttons full-width. */
  /* text-align (not align-items) keeps the CTA full-width while the copy centers. */
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-6); text-align: center; }
  .hero-content { display: contents; }
  .hero-title  { order: 1; margin-top: 0; }
  .hero-subhead { order: 2; margin-top: 0; margin-left: auto; margin-right: auto; }
  .hero-ctas   { order: 3; margin-top: 0; flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; min-height: 48px; }
  .trust-strip { order: 4; margin-top: 0; justify-content: center; }
  /* No hero animation on mobile. */
  .hero-hub { display: none; }

  /* Every CTA matches the hero's full-width buttons. (#book and the modal submit
     already carry .btn-full, so these are the ones still auto-width.) */
  .engage-cta .btn,
  .talent-cta .btn { width: 100%; min-height: 48px; }

  /* Trust band: drop the yellow stats bar, run the client logos a little larger. */
  #trust .trust-bar { display: none; }
  .logo-belt img { height: 44px; }

  /* Section 05: no globe. */
  .talent-globe { display: none; }

  /* Section 08 cards: icon on top, text below. column-reverse because .step-icon
     is the second child in the markup — it has to come out first visually. */
  #how-carousel .step { flex-direction: column-reverse; align-items: flex-start; justify-content: flex-start; gap: var(--space-4); }
  #how-carousel .step-icon { margin-right: 0; }

  /* Section 09: no molecular animation. */
  #book .cta-hub { display: none; }
}
@media (min-width: 768px) {
  .section-hero h1 { font-size: clamp(2.4rem, 4.5vw, 3.2rem); }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-globe { min-height: 440px; }
  .hero-hub { min-height: 560px; }
  .hero-ctas .btn { flex: 0 0 auto; }
  .talent-grid { grid-template-columns: 1fr 1fr; }
  .talent-globe { min-height: 420px; }
  .work-grid { grid-template-columns: repeat(3, 1fr); }
  .cta-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cta-hub { order: 1; min-height: 520px; }
  .cta-content { order: 2; }
}
@media (min-width: 1024px) {
  .hero-globe { min-height: 520px; }
  /* Track the hero's 75vh instead of pinning it: 144px is the section's fixed
     chrome (24 pad-top + 72 topbar + 48 pad-bottom), so the globe absorbs the
     rest. Caps at 640px on tall screens, floors at 360px on short ones. */
  .hero-hub { min-height: clamp(360px, calc(75vh - 144px), 640px); }
}

/* #how-we-work centres its h2 with an inline style, so its number needs a
   matching rule here. */
