/* ==========================================================================
   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;
  padding-top: calc(var(--navbar-height) + var(--space-20));
  padding-bottom: var(--space-24);
  border-bottom: 1px solid var(--color-border);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-10); align-items: center; }
.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 -------------------------------------------------------- */
.section-trust { padding: var(--space-16) 0; border-bottom: 1px solid var(--color-border); }

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

/* --- 07 Why ByteNana — centered heading ---------------------------------- */
#why .section-label { text-align: center; }
#why h2 { text-align: center; max-width: 820px; margin-left: auto; margin-right: auto; }
#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 ---------------------------------------------------------- */
.chooser-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-6); margin-top: var(--space-10); }
.chooser-card {
  display: flex; flex-direction: column; gap: var(--space-3);
  background-color: rgba(15, 17, 18, 0.05); border: 1px solid var(--on-light-border);
  border-radius: var(--radius-lg); padding: var(--space-6);
  transition: border-color var(--t-base) ease, transform var(--t-base) ease, box-shadow var(--t-base) ease;
}
.chooser-card:hover { border-color: var(--color-primary); transform: none; box-shadow: none; }
/* Unselected tabs read as deactivated: dimmed eyebrow + muted heading */
.chooser-eyebrow { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-light-dim); }
.chooser-card h3 { font-size: var(--text-2xl); color: var(--on-light-muted); }
.chooser-card p { color: var(--on-light-muted); font-size: var(--text-base); line-height: 1.6; }
/* Chooser cards double as the engagement tabs */
.chooser-card { cursor: pointer; -webkit-user-select: none; user-select: none; }
.chooser-card:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
/* Active (selected) tab: turns yellow with a lighter shadow */
.chooser-card.is-active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: none;
  transform: none;
}
.chooser-card.is-active:hover { transform: none; box-shadow: none; }
.chooser-card.is-active .chooser-eyebrow,
.chooser-card.is-active h3 { color: var(--color-bg); }

/* --- 04 Engagement detail panels (switched by the chooser-card tabs) ----- */
.engage { margin-top: var(--space-10); }
.engage-panel { display: none; }
.engage-panel.is-active { display: block; animation: stack-fade-in 0.4s ease both; }
/* Two-column body: four cards stacked on the left, photo on the right */
.engage-body { display: grid; grid-template-columns: 1fr; gap: var(--space-8); margin: var(--space-8) 0; }
.engage-col { display: flex; flex-direction: column; }   /* left column: grey cards, then the yellow card */
.engage-points { display: flex; flex-direction: column; gap: var(--space-4); margin: 0; }
.engage-media img { width: 100%; height: auto; max-height: 380px; object-fit: cover; border-radius: var(--radius-lg); display: block; }
.engage-points .card h4 { font-size: var(--text-base); margin-bottom: var(--space-2); color: var(--on-light-text); }
.engage-points .card p { font-size: var(--text-sm); }
/* Point list styled like the section-06 talent list, but on a light bg */
.engage-col .engage-title { font-size: var(--text-2xl); color: var(--on-light-text); margin-bottom: var(--space-5); }
.engage-list { margin: 0; max-width: none; gap: var(--space-4); }
.section--light .engage-list li { font-size: var(--text-base); color: var(--on-light-muted); }
.section--light .engage-list li strong { color: var(--on-light-text); }
/* How it works / Pricing / CTA sit in a dark bar.
   Text block on the left, the CTA button on the same line to the right. */
.engage-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5) var(--space-8);
  margin-top: var(--space-8);
  padding: var(--space-6) var(--space-8);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.engage-foot__text { flex: 1 1 320px; display: flex; flex-direction: column; gap: var(--space-3); }
.engage-foot .engage-how, .engage-foot .engage-price { font-size: var(--text-base); color: var(--color-text-muted); }
.engage-foot .engage-how strong, .engage-foot .engage-price strong { color: var(--color-text); }
.engage-foot .btn { flex: 0 0 auto; margin-left: auto; background-color: var(--color-primary); color: var(--color-bg); border-color: var(--color-primary); }
.engage-foot .btn:hover { background-color: var(--color-primary-dark); border-color: var(--color-primary-dark); }

/* --- 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-closer { font-size: var(--text-lg); color: var(--color-text-muted); max-width: 660px; line-height: 1.7; }
.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(--on-light-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(--on-light-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 ------- */
.section-proof .testimonial-stars { color: var(--color-primary); font-size: var(--text-lg); letter-spacing: 2px; line-height: 1; margin-bottom: var(--space-4); }
#reviews-carousel .step:nth-child(odd) .testimonial-stars { color: var(--color-primary); }
#reviews-carousel .step:nth-child(even) .testimonial-stars { color: var(--color-bg); }
#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); }
#reviews-carousel .step:nth-child(odd) footer { color: rgba(252, 252, 252, 0.7); }
#reviews-carousel .step:nth-child(even) footer { color: rgba(15, 17, 18, 0.75); }
.trust-link { cursor: pointer; }

/* --- 12 How we work ------------------------------------------------------ */
.section-howwework .steps-carousel { margin-top: var(--space-10); }

/* --- 13 Final CTA -------------------------------------------------------- */
.section-cta { position: relative; overflow: hidden; border-top: 1px solid var(--on-light-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; }
.cta-grid .contact-form { max-width: 560px; }
.section-cta .form-group label { color: var(--on-light-text); }
.section-cta .form-group input, .section-cta .form-group textarea { background-color: #FFFFFF; border-color: rgba(15, 17, 18, 0.15); color: var(--on-light-text); }
.section-cta .form-group input::placeholder, .section-cta .form-group textarea::placeholder { color: rgba(15, 17, 18, 0.4); }
.section-cta .form-microcopy { color: rgba(15, 17, 18, 0.5); }

/* --- 14 Footer columns --------------------------------------------------- */
#footer .section-label { color: var(--on-light-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(--on-light-muted); transition: color var(--t-fast) ease; }
.footer-nav a:hover { color: var(--on-light-text); }
.footer-social { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-social a:hover { color: var(--color-primary); }
.footer-legal { flex-basis: 100%; margin-top: var(--space-4); }

/* ==========================================================================
   PAGE BREAKPOINTS
   ========================================================================== */
@media (max-width: 767px) {
  /* Hero (mobile): flatten the grid so the animation can sit between the subhead
     and the CTAs. display:contents lets .hero-content's children reorder alongside
     the hub as siblings; align-items:stretch keeps text/buttons full-width. */
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-6); }
  .hero-content { display: contents; }
  .hero-title  { order: 1; margin-top: 0; }
  .hero-subhead { order: 2; margin-top: 0; }
  .hero-hub    { order: 3; min-height: 340px; }
  .hero-ctas   { order: 4; margin-top: 0; flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .trust-strip { order: 5; margin-top: 0; justify-content: center; }
}
@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; }
  .chooser-grid { grid-template-columns: repeat(2, 1fr); }
  .engage-body { grid-template-columns: 1fr 1fr; align-items: stretch; }
  /* Photo fills the column height set by the cards (which hug their content),
     cropping via object-fit instead of dictating the row height. */
  .engage-media { position: relative; min-height: 340px; }
  .engage-media img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; }
  .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; }
  .hero-hub { min-height: 640px; }
}

/* --- 09A Value / pricing comparison ------------------------------------- */
.section-value h2 { margin-top: var(--space-2); }
.section-value .section-intro { margin-top: var(--space-4); margin-bottom: var(--space-12); }

/* Two price cards, side by side — larger, with an icon + title */
.value-prices {
  display: grid; grid-template-columns: 1fr; gap: var(--space-6);
  max-width: 1040px; margin: 0 auto var(--space-8);
}
.value-price { text-align: center; padding: var(--space-10) var(--space-8); }
.value-price .card-icon { margin: 0 auto var(--space-4); font-size: 2.4rem; }
.value-price__title {
  font-family: var(--font-heading); font-weight: 700; font-size: var(--text-lg);
  color: var(--color-text); margin-bottom: var(--space-3);
}
.value-price__amount {
  font-family: var(--font-heading); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(2.6rem, 7vw, 3.6rem); line-height: 1; color: var(--color-text);
}
.value-price__amount span { font-size: var(--text-base); font-weight: 600; letter-spacing: 0; color: var(--color-text-muted); margin-left: var(--space-1); }
.value-price__note { margin-top: var(--space-4); font-size: var(--text-sm); color: var(--color-text-muted); }
/* ByteNana card: white background with a subtle drifting dotted mesh, dark text */
.value-price--win {
  background-color: #FCFCFC; border-color: #FCFCFC;
  background-image:
    radial-gradient(circle, rgba(15, 17, 18, 0.08) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(15, 17, 18, 0.08) 1px, transparent 1.5px);
  background-size: 22px 22px, 22px 22px;
  background-position: 0 0, 11px 11px;
  animation: value-mesh-drift 12.6s ease-in-out infinite;
  will-change: background-position;
}
@keyframes value-mesh-drift {
  0%, 100% { background-position: 0 0, 11px 11px; }
  50%      { background-position: 14px -12px, 25px -1px; }
}
@media (prefers-reduced-motion: reduce) {
  .value-price--win { animation: none; }
}
.value-price--win .value-price__title,
.value-price--win .value-price__amount { color: var(--on-light-text); }
.value-price--win .value-price__amount span,
.value-price--win .value-price__note { color: var(--on-light-muted); }

/* Yellow strip below the cards: inline on desktop, stacked+centered on mobile */
.value-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: var(--space-6) var(--space-8);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  max-width: 1040px; margin: 0 auto;
}
.value-strip .value-item { flex: 1 1 190px; min-width: 0; text-align: left; }
.value-item__head { font-family: var(--font-heading); font-weight: 800; letter-spacing: -0.02em; font-size: var(--text-lg); color: var(--color-text); }
.value-item__sub { margin-top: var(--space-2); font-size: var(--text-sm); line-height: 1.5; color: var(--color-text-muted); }
/* yellow button so it pops against the dark strip */
.value-strip__btn { flex: 0 0 auto; background-color: var(--color-primary); color: var(--color-bg); border-color: var(--color-primary); }
.value-strip__btn:hover { background-color: var(--color-primary-dark); border-color: var(--color-primary-dark); }

@media (min-width: 768px) {
  .value-prices { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .value-strip { flex-direction: column; align-items: center; text-align: center; gap: var(--space-6); }
  .value-strip .value-item { flex: none; text-align: center; }
}
