/* Sapaiya landing: production styles.
   Implements HANDOFF.md (approved concept: dark Espresso theme, A+B storytelling, Sapaiya-star awards).
   All colours, fonts and spacing come from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body { margin: 0; background: var(--espresso); color: var(--on-brand); font: 400 var(--fs-body-section)/1.65 var(--font-sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, dl, dd, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Focus: lime on dark, olive-deep on light (§7) */
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 2px; }
.on-light :focus-visible { outline-color: var(--olive-deep); }

/* Layout (§4) */
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--space-24); }
.wrap-wide { max-width: 1280px; }
.section { padding-block: 112px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: var(--space-64); align-items: center; }

/* Type helpers */
.eyebrow { color: var(--lime); }
.on-light .eyebrow { color: var(--olive-deep); }
h2.section-title { text-wrap: balance; }
.on-light h2.section-title { color: var(--bark); }
.body { font-size: var(--fs-body-section); line-height: 1.65; color: var(--on-dark-secondary); }
.on-light .body { color: var(--charcoal); }
.section-head { display: grid; gap: var(--space-20); max-width: 760px; }

/* Placeholder content awaiting confirmation from the spa: dashed underline, easy to find (search "tbc") */
.tbc { text-decoration: underline dashed currentColor; text-underline-offset: 4px; text-decoration-thickness: 1px; opacity: .9; }

/* Buttons (§6, §7) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8); min-height: 52px; padding: 0 28px; border-radius: var(--radius-md); font: 600 16px/1 var(--font-sans); text-decoration: none; cursor: pointer; border: 0; transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary-dark { background: var(--lime); color: var(--espresso); }
.btn-primary-dark:hover { background: var(--on-brand); color: var(--espresso); }
.btn-secondary-dark { color: var(--on-brand); box-shadow: inset 0 0 0 1.5px var(--on-dark-border); background: transparent; }
.btn-secondary-dark:hover { box-shadow: inset 0 0 0 1.5px var(--on-brand); background: rgba(255, 255, 255, .08); }
.btn-primary-light { background: var(--olive-deep); color: var(--on-brand); }
.btn-primary-light:hover { background: var(--espresso); }
.btn-promo { min-height: 44px; padding: 0 var(--space-20); background: var(--cocoa); color: var(--on-brand); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.btn-promo:hover { background: var(--espresso); }
.btn-sm { min-height: 44px; padding: 0 var(--space-20); }

/* Header: sticky (§4 mobile #5) */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(57, 44, 44, .96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--hairline-on-dark); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-24); min-height: 88px; }
.logo img { width: 64px; height: 64px; }
.nav-desktop { display: none; align-items: center; gap: var(--space-32); }
.nav-desktop a, .nav-mobile a { font: 600 14px/1 var(--font-sans); color: rgba(255, 255, 255, .85); text-decoration: none; padding-block: var(--space-12); transition: color .15s ease; }
.nav-desktop a:hover, .nav-mobile a:hover { color: var(--lime); }
.header-actions { display: flex; align-items: center; gap: var(--space-12); }
.nav-mobile { position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; min-height: 44px; min-width: 44px; display: grid; place-items: center; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1.5px var(--on-dark-border); }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary svg { width: 20px; height: 20px; }
.nav-mobile[open] summary { box-shadow: inset 0 0 0 1.5px var(--on-brand); }
.nav-mobile .panel { position: absolute; right: 0; top: calc(100% + var(--space-8)); min-width: 220px; background: var(--espresso); border: 1px solid var(--hairline-on-dark); border-radius: var(--radius-lg); padding: var(--space-8) var(--space-20); display: grid; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.nav-mobile .panel a { padding-block: var(--space-16); border-bottom: 1px solid var(--hairline-on-dark); }
.nav-mobile .panel a:last-child { border-bottom: 0; }
@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .nav-mobile { display: none; }
  .logo img { width: 72px; height: 72px; }
}

/* 1. Hero */
.hero { position: relative; overflow: hidden; padding-block: 72px 96px; }
.hero-star { position: absolute; right: -80px; top: -60px; width: 560px; height: 560px; color: var(--lime); opacity: .14; pointer-events: none; }
.hero .grid-2 { position: relative; gap: 56px; }
.hero-copy { display: grid; gap: var(--space-24); }
.hero h1 { font-family: var(--font-brand); font-size: var(--fs-display-hero); line-height: 1; font-weight: 400; text-wrap: balance; }
.hero .lead { color: var(--on-dark-secondary); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); }

/* Award star badge (§6) */
.stars-row { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }
.star-badge { position: relative; width: 104px; height: 104px; display: grid; place-items: center; }
.star-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.star-badge img { position: relative; max-width: 58px; max-height: 58px; width: auto; height: auto; object-fit: contain; }
@media (max-width: 600px) {
  .stars-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: var(--space-4); margin-inline: calc(var(--space-24) * -1); padding-inline: var(--space-24); }
  .stars-row::-webkit-scrollbar { display: none; }
  .star-badge { width: 84px; height: 84px; flex: none; }
  .star-badge img { max-width: 46px; max-height: 46px; }
}

.hero-media { position: relative; width: min(100%, 580px); justify-self: end; align-self: center; } /* wide crop (500×298) from the spa's own photo: face, hands and product, never the back */
.hero-photo { aspect-ratio: 500 / 298; border-radius: var(--radius-lg); overflow: hidden; background: var(--bark); max-width: 100%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.offer { position: relative; margin: -28px 0 0 -40px; width: min(300px, 80%); background: var(--lime); color: var(--espresso); border-radius: var(--radius-lg); padding: var(--space-20) 22px; display: grid; gap: 10px; justify-items: start; }
.offer .promo-title { font: 700 30px/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.offer .promo-price { font: 600 22px/1.1 var(--font-display); }
.offer p { font-size: 14px; line-height: 1.45; }
@media (max-width: 990px) {
  .offer { position: static; width: 100%; margin: var(--space-16) 0 0; }
}

/* 2. Pai photo band */
.pai { position: relative; background: var(--bark); }
.pai > img { width: 100%; height: 640px; object-fit: cover; }
.pai .wrap { position: absolute; left: 0; right: 0; bottom: 56px; }
.pai-box { max-width: 500px; background: var(--espresso); border-radius: var(--radius-lg); padding: 36px; display: grid; gap: var(--space-16); }
@media (max-width: 760px) {
  .pai > img { height: 360px; }
  .pai .wrap { position: static; padding-block: var(--space-24) 0; }
  .pai { background: var(--espresso); padding-bottom: var(--space-24); }
  .pai-box { padding: var(--space-24) 0; max-width: none; background: transparent; }
}

/* 3. The Sapaiya Method */
.method { padding-block: 128px; }
.method h2.section-title { font-size: var(--fs-section-title-lg); }
.method-body { margin-top: var(--space-64); }
@media (min-width: 900px) {
  .steps-method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 var(--space-32); }
  .steps-method li:last-child { border-bottom: 0; }
}
.steps-method li { display: grid; grid-template-columns: 48px 1fr; gap: var(--space-4) var(--space-20); padding-block: 28px; border-top: 1px solid var(--hairline-on-dark); }
.steps-method li:last-child { border-bottom: 1px solid var(--hairline-on-dark); }
.steps-method .num { grid-row: 1 / span 2; font: 700 36px/1 var(--font-display); color: var(--lime); }
.steps-method strong { font-size: 19px; font-weight: 600; }
.steps-method span.d { font-size: 15px; line-height: 1.55; color: var(--on-dark-secondary); }

.diagram { background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); padding: 36px; }
.diagram .row { display: grid; gap: var(--space-8); }
.diagram .row + .row { margin-top: var(--space-24); }
.diagram .row > span { font-size: 14px; font-weight: 600; }
.bar { display: flex; height: 36px; border-radius: var(--radius-md); overflow: hidden; }
.bar .reach { background: var(--hairline); }
.bar .work { background: var(--olive-deep); }
.diagram .axis { display: flex; justify-content: space-between; margin-top: var(--space-12); font-size: 12px; color: var(--ink-secondary); }
.diagram figcaption { margin-top: var(--space-20); padding-top: var(--space-16); border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-20); font-size: 13px; color: var(--ink-secondary); }
.diagram .key { display: inline-flex; align-items: center; gap: var(--space-8); }
.diagram .key i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--hairline); }
.diagram .note { flex-basis: 100%; }

.research { margin-top: var(--space-64); padding-top: var(--space-32); border-top: 1px solid var(--hairline-on-dark); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-24) var(--space-48); }
.research .eyebrow { margin-right: var(--space-8); }
.research-badge { display: flex; align-items: center; gap: var(--space-12); font-size: 14px; font-weight: 600; line-height: 1.35; }
.research-badge .logo-tile { height: 44px; padding: 6px 12px; border-radius: var(--radius-md); background: var(--surface); display: grid; place-items: center; flex: none; } /* wide partner wordmarks: a tile instead of the 44px circle */
.research-badge .logo-tile img { height: 30px; width: auto; }
.research-badge .logo-slot { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--ink-secondary); display: grid; place-items: center; font-size: 9px; font-weight: 600; letter-spacing: .06em; flex: none; }

/* 4. Premium ritual (light) */
.ritual { background: var(--surface); color: var(--ink); }
.ritual-photo { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; background: var(--olive-wash); max-width: 100%; }
.ritual-photo img { width: 100%; height: 100%; object-fit: cover; }
.ritual .section-head { gap: var(--space-16); }
.steps-ritual { margin-top: var(--space-32); }
.steps-ritual li { display: grid; grid-template-columns: 36px 1fr; gap: var(--space-4) var(--space-16); padding-block: 18px; border-top: 1px solid var(--hairline); }
.steps-ritual .num { grid-row: 1 / span 2; font: 700 22px/1.1 var(--font-display); color: var(--olive-deep); }
.steps-ritual strong { font-size: 16px; }
.steps-ritual span.d { font-size: 14px; line-height: 1.5; color: var(--ink-secondary); }

/* 5. Treatments */

/* 6. Proof (olive-wash) */
.proof { background: var(--olive-wash); color: var(--ink); }
.proof .section-head { margin-bottom: var(--space-48); }
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--space-20); }
.review { background: var(--surface); border-radius: var(--radius-lg); padding: 28px; display: grid; gap: var(--space-16); align-content: start; }
.review svg { width: 104px; height: 18px; color: var(--olive-deep); }
.review blockquote { font-size: 16px; line-height: 1.6; color: var(--ink); }
.review figcaption { font-size: 13px; color: var(--ink-secondary); }
.proof .more { margin-top: var(--space-32); font-size: 15px; }
.proof .more a { color: var(--olive-deep); font-weight: 600; text-underline-offset: 4px; }

/* 7. FAQ (light; added to resolve nav "FAQ", §14.4) */
.faq { background: var(--surface); color: var(--ink); }
.faq .grid-2 { align-items: start; }
.faq-list { border-top: 1px solid var(--hairline); }
.faq-list details { border-bottom: 1px solid var(--hairline); }
.faq-list summary { cursor: pointer; list-style: none; padding: var(--space-20) var(--space-48) var(--space-20) 0; font-weight: 600; font-size: 16px; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-52%); font: 600 24px/1 var(--font-display); color: var(--olive-deep); transition: transform .2s ease; }
.faq-list details[open] summary::after { transform: translateY(-52%) rotate(45deg); }
.faq-list .ans { padding-bottom: var(--space-20); display: grid; gap: var(--space-8); font-size: 15px; line-height: 1.6; color: var(--charcoal); max-width: 40rem; }

/* 8. Visit & book */
.visit .grid-2 { align-items: stretch; }
.visit-copy { display: grid; gap: var(--space-24); align-content: center; }
.info { display: grid; grid-template-columns: auto 1fr; gap: var(--space-12) var(--space-24); font-size: 15px; }
.info dt { color: rgba(255, 255, 255, .6); }
.info dd a { color: var(--on-brand); text-underline-offset: 3px; }
.pay-logos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-8); }
.pay-logos li { width: 60px; height: 38px; border-radius: var(--radius-sm); background: var(--surface); display: grid; place-items: center; padding: 6px 8px; }
.pay-logos img { width: auto; height: auto; max-width: 100%; max-height: 24px; object-fit: contain; }
.visit-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.map-card { position: relative; min-height: 380px; border-radius: var(--radius-lg); overflow: hidden; background: var(--bark); display: block; color: var(--on-brand); text-decoration: none; }
.map-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity .3s ease; }
.map-card:hover img { opacity: .7; }
.map-card .pin { position: absolute; left: var(--space-24); bottom: var(--space-24); right: var(--space-24); display: grid; gap: var(--space-4); }
.map-card .pin b { font: 400 28px/1.1 var(--font-brand); }
.map-card .pin span { font-size: 14px; font-weight: 600; color: var(--lime); }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline-on-dark); padding-block: var(--space-48); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-16) var(--space-32); }
.site-footer .tagline { font: 400 22px/1.2 var(--font-brand); }
.site-footer small { font-size: 13px; color: var(--on-dark-tertiary); }
.site-footer .policy { flex-basis: 100%; max-width: 46rem; font-size: 13px; line-height: 1.6; color: var(--on-dark-tertiary); }

/* ===================== Motion: "subtle & calm" =====================
   Opacity and transform only; soft ease-out, no bounce; everything off under prefers-reduced-motion
   (see the global rule at the top). Content is never hidden: reveals start partly visible. */
:root { --ease-calm: cubic-bezier(.22, .61, .36, 1); }

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance: staged once on load */
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }
  @keyframes turn { to { transform: rotate(360deg); } }
  .hero-copy > * { animation: rise .8s var(--ease-calm) both; }
  .hero-copy > :nth-child(1) { animation-delay: .05s; }
  .hero-copy > :nth-child(2) { animation-delay: .15s; }
  .hero-copy > :nth-child(3) { animation-delay: .3s; }
  .hero-copy > :nth-child(4) { animation-delay: .42s; }
  .stars-row .star-badge { animation: rise .7s var(--ease-calm) both; }
  .stars-row .star-badge:nth-child(1) { animation-delay: .55s; }
  .stars-row .star-badge:nth-child(2) { animation-delay: .62s; }
  .stars-row .star-badge:nth-child(3) { animation-delay: .69s; }
  .stars-row .star-badge:nth-child(4) { animation-delay: .76s; }
  .stars-row .star-badge:nth-child(5) { animation-delay: .83s; }
  .hero-copy > .stars-row { animation: none; }
  .hero-photo { animation: rise 1s var(--ease-calm) .1s both; }
  .hero-photo img { animation: settle 8s var(--ease-calm) both; }
  .offer { animation: rise .8s var(--ease-calm) .95s both; }
  /* Ambient star: one slow turn every 2 minutes */
  .hero-star { animation: turn 120s linear infinite; }

  /* Scroll reveals (classes added by JS only for content below the fold) */
  .reveal { opacity: .5; transform: translateY(14px); transition: opacity .8s var(--ease-calm), transform .8s var(--ease-calm); transition-delay: calc(var(--i, 0) * 90ms); }
  .reveal.in { opacity: 1; transform: none; }

  /* Diagram: bars grow from the left when seen */
  .diagram.reveal .bar { transform: scaleX(.08); transform-origin: left center; transition: transform 1.1s var(--ease-calm) .25s; }
  .diagram.reveal .row + .row .bar { transition-delay: .5s; }
  .diagram.reveal.in .bar { transform: none; }

  /* Header: slims down once you scroll */
  .site-header .wrap, .logo img { transition: min-height .35s var(--ease-calm), width .35s var(--ease-calm), height .35s var(--ease-calm); }
  .site-header.scrolled .wrap { min-height: 68px; }
  .site-header.scrolled .logo img { width: 52px; height: 52px; }

  /* Award star: a gentle quarter-twist on hover (two squares at 0° and 45°, so 22.5° reads as a turn) */
  .star-badge svg { transition: transform .7s var(--ease-calm); }
  .star-badge:hover svg { transform: rotate(22.5deg); }

  /* Treatment card: underline slides in under the CTA */

  /* Pai photo: light parallax (desktop, driven by JS) */
  .pai { overflow: hidden; }
  .pai > img.parallax { transform: translateY(var(--py, 0)) scale(1.12); will-change: transform; }
}

/* Spa Buffets (surface): the spa's own promo banners, tap to enlarge */
.buffets { background: var(--surface); color: var(--ink); }
.buffets .section-head { margin-bottom: var(--space-48); }
.banner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--space-24); align-items: start; }
.banner { display: grid; gap: var(--space-16); }
.banner .zoom { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--hairline); background: var(--olive-wash); cursor: zoom-in; }
.banner .zoom img { width: 100%; height: auto; transition: transform .4s var(--ease-calm, ease-out); }
.banner .zoom:hover img { transform: scale(1.02); }
.zoom-hint { position: absolute; right: var(--space-12); bottom: var(--space-12); background: rgba(57, 44, 44, .85); color: var(--on-brand); font: 600 12px/1 var(--font-sans); padding: 7px 10px; border-radius: var(--radius-pill); }
.banner .btn { justify-self: start; }
@media (min-width: 900px) { .zoom-hint { opacity: 0; transition: opacity .2s ease; } .banner .zoom:hover .zoom-hint, .banner .zoom:focus-visible .zoom-hint { opacity: 1; } }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1292px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(20, 15, 15, .88); }
.lightbox img { display: block; width: 100%; height: auto; max-height: 92vh; object-fit: contain; border-radius: var(--radius-md); }
.lightbox .close { position: absolute; top: -48px; right: 0; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--on-brand); color: var(--espresso); font: 400 28px/1 var(--font-sans); cursor: pointer; }

/* Price list (espresso) */
.prices .section-head { margin-bottom: var(--space-48); }
.price-grid { display: grid; gap: var(--space-48); grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
@media (min-width: 1100px) { .price-grid { grid-template-columns: 1.55fr 1fr; } }
.price-block { display: grid; gap: var(--space-20); min-width: 0; }
.price-title { font: 400 28px/1.15 var(--font-brand); }
.price-title span { display: inline-block; margin-left: var(--space-8); font: 600 12px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--espresso); background: var(--lime); padding: 5px 8px; border-radius: var(--radius-sm); vertical-align: middle; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.price-table { width: 100%; min-width: 420px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-table th, .price-table td { padding: 14px 12px; text-align: right; border-bottom: 1px solid var(--hairline-on-dark); }
.price-table th:first-child, .price-table td:first-child { text-align: left; padding-left: 0; }
.price-table thead th { font: 600 11px/1.2 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-tertiary); }
.price-table tbody th { font: 600 15px/1.35 var(--font-sans); color: var(--on-brand); }
.price-table td { font: 600 17px/1.2 var(--font-display); color: var(--lime); white-space: nowrap; }
.price-table td small { display: block; font: 400 12px/1.3 var(--font-sans); color: var(--on-dark-tertiary); margin-top: 2px; }
.price-block .btn { justify-self: start; }
/* placeholder prices awaiting the spa's final list */
.method-cta { margin-top: var(--space-32); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12) var(--space-20); }
.method-cta .price { font: 600 20px/1.2 var(--font-display); color: var(--lime); }
.ritual-video { aspect-ratio: 16 / 9; align-self: center; background: var(--espresso); }
.video { position: relative; display: block; width: 100%; height: 100%; }
.video .play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(20, 15, 15, .3); transition: transform .2s ease-out; }
.video .play svg { width: 34px; height: 34px; fill: var(--espresso); margin-left: 4px; }
.video:hover .play, .video:focus-visible .play { transform: scale(1.06); }
.ritual-video iframe { width: 100%; height: 100%; border: 0; display: block; }
