/* ============================================================================
   QARYA site layer. Sits on top of scrollcraft.css (the engine floor).
   Shared by every page: tokens, chrome, buttons, reels, ledger, FAQ, form,
   footer, inner-page layout. Home-only choreography lives in index.html.
   ========================================================================== */

:root {
  --sc-canvas:     #0B0B0C;
  --sc-surface:    #151513;
  --sc-ink:        #F3EFE6;
  --sc-ink-soft:   #ABA494;
  --sc-accent:     #C6A15B;
  --sc-accent-ink: #0B0B0C;
  --q-gold-hi:     #E8C87E;
  --q-gold-lo:     #765823;
  --q-cream:       #F3EFE6;
  --q-cream-ink:   #17140F;
  --q-cream-soft:  #5A5446;

  --sc-font-display: "Archivo", system-ui, sans-serif;
  --sc-font-text:    "Manrope", system-ui, sans-serif;
  --sc-font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --sc-shadow-color: 40 30% 2%;
  --sc-r-sm: 8px; --sc-r-md: 16px; --sc-r-lg: 28px;
  --q-bar-h: 72px;
}

body { font-weight: 450; letter-spacing: 0.002em; line-height: 1.66; }
.sc-grain { opacity: 0.05; }

/* Display: Archivo at its widest, heavy. Wide + heavy + uppercase is the
   brand's existing voice; we push the width axis for the wow. */
.q-wide, .sc-display {
  font-family: var(--sc-font-display);
  font-weight: 800;
  font-stretch: 118%;
  font-variation-settings: "wdth" 118;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.92;
}
.sc-display em, .q-wide em { font-style: normal; color: var(--sc-accent); }
.q-gold { color: var(--sc-accent); }
.sc-label { font-weight: 500; letter-spacing: 0.14em; }
.sc-body { line-height: 1.7; }
.q-lede { font-size: var(--sc-t-lg); line-height: 1.5; color: var(--sc-ink); max-width: 44ch; text-wrap: pretty; margin: 0; }
h1, h2, h3 { text-wrap: balance; }

/* ------------------------------------------------------------ the bar -- */
.q-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 70;
  height: var(--q-bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sc-5);
  padding-inline: var(--sc-gutter);
  transition: background-color 240ms var(--sc-ease-out), border-color 240ms var(--sc-ease-out);
  border-bottom: 1px solid transparent;
}
.q-bar.is-scrolled {
  background: color-mix(in oklab, var(--sc-canvas) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--sc-hairline);
}
.q-bar__mark { display: block; width: 116px; }
.q-bar__mark img { width: 100%; height: auto; }
.q-bar__nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.25rem); }
.q-bar__nav a:not(.q-btn) {
  font-size: var(--sc-t-sm); font-weight: 600; text-decoration: none;
  color: var(--sc-ink-soft); transition: color 160ms var(--sc-ease-out);
}
.q-bar__nav a:not(.q-btn):hover, .q-bar__nav a[aria-current="page"] { color: var(--sc-ink); }
.q-bar__menu { display: none; }

@media (max-width: 960px) {
  .q-bar__nav { display: none; }
  .q-bar__menu {
    display: inline-flex; align-items: center; gap: 10px;
    background: none; border: 1px solid var(--sc-hairline-strong); color: var(--sc-ink);
    border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: var(--sc-t-sm);
    cursor: pointer; min-height: 44px;
  }
  .q-bar.is-open .q-bar__nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: fixed; inset: var(--q-bar-h) 0 auto 0;
    background: var(--sc-canvas); border-bottom: 1px solid var(--sc-hairline);
    padding: var(--sc-4) var(--sc-gutter) var(--sc-6);
  }
  .q-bar.is-open .q-bar__nav a:not(.q-btn) {
    font-size: var(--sc-t-lg); padding: 14px 0; border-bottom: 1px solid var(--sc-hairline); color: var(--sc-ink);
  }
  .q-bar.is-open .q-bar__nav .q-btn { margin-top: var(--sc-5); justify-content: center; }
  .q-bar.is-open { background: var(--sc-canvas); }
}

/* --------------------------------------------------------------- buttons -- */
.q-btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  min-height: 48px; padding: 0 1.5em;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--sc-font-text); font-weight: 800; font-size: var(--sc-t-sm);
  letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: transform 140ms var(--sc-ease-out), background-color 160ms var(--sc-ease-out), color 160ms var(--sc-ease-out), border-color 160ms var(--sc-ease-out);
}
.q-btn--gold { background: var(--sc-accent); color: var(--sc-accent-ink); box-shadow: var(--sc-e2), inset 0 1px 0 color-mix(in oklab, white 35%, transparent); }
.q-btn--gold:hover { background: var(--q-gold-hi); }
.q-btn--ghost { border-color: var(--sc-hairline-strong); color: var(--sc-ink); background: transparent; }
.q-btn--ghost:hover { border-color: var(--sc-accent); color: var(--q-gold-hi); }
.q-btn:active { transform: scale(0.97); }
.q-btn:disabled, .q-btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.q-btn svg { width: 1.05em; height: 1.05em; flex: none; }
.q-bar .q-btn { min-height: 42px; }

/* ------------------------------------------------------------ the reel --
   A vertical 9:16 frame that autoplays a YouTube Short (muted, looped) or a
   local MP4 while it is on screen, and pauses when it leaves. site.js owns it. */
.q-reel {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: var(--sc-r-lg);
  background: #000 var(--poster, none) center / cover no-repeat;
  box-shadow: var(--sc-e3), inset 0 0 0 1px color-mix(in oklab, var(--sc-ink) 14%, transparent);
  isolation: isolate;
}
.q-reel > img.q-reel__poster, .q-reel > video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.q-reel iframe {
  position: absolute; border: 0;
  /* overscan hides YouTube's own edge chrome */
  top: -6%; left: -6%; width: 112%; height: 112%;
  opacity: 0; transition: opacity 600ms var(--sc-ease-out);
  pointer-events: none;
}
.q-reel.is-live iframe { opacity: 1; }
/* top + bottom shade so YouTube's title flash and our caption both sit on a ground */
.q-reel::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(to bottom, rgb(0 0 0 / .55), transparent 18%),
    linear-gradient(to top, rgb(0 0 0 / .78), transparent 38%);
}
.q-reel__cap {
  position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 14px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
}
.q-reel__cap b { display: block; font-family: var(--sc-font-display); font-stretch: 112%; font-variation-settings: "wdth" 112; font-weight: 800; text-transform: uppercase; font-size: 0.95rem; letter-spacing: -0.01em; line-height: 1.05; }
.q-reel__cap span { display: block; font-size: 0.72rem; color: color-mix(in oklab, var(--sc-ink) 72%, transparent); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 4px; }
.q-reel__sound {
  flex: none; width: 40px; height: 40px; border-radius: 999px; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: color-mix(in oklab, #000 45%, transparent); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22);
  transition: background-color 160ms var(--sc-ease-out), transform 140ms var(--sc-ease-out);
}
.q-reel__sound:hover { background: var(--sc-accent); color: var(--sc-accent-ink); }
.q-reel__sound:active { transform: scale(0.94); }
.q-reel__sound svg { width: 18px; height: 18px; }
.q-reel__sound .on { display: none; }
.q-reel.is-unmuted .q-reel__sound .on { display: block; }
.q-reel.is-unmuted .q-reel__sound .off { display: none; }
.q-reel__play {
  position: absolute; z-index: 3; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 999px;
  border: 0; background: var(--sc-accent); color: var(--sc-accent-ink); cursor: pointer; display: none; place-items: center;
}
.q-reel.is-manual .q-reel__play { display: grid; }
.q-reel.is-live .q-reel__play { display: none; }

/* --------------------------------------------------------------- ledger --
   Services as a priced menu, not a card grid. */
.q-ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sc-hairline); }
.q-ledger__row {
  display: grid; grid-template-columns: 3.2rem 1fr auto; gap: var(--sc-5); align-items: baseline;
  padding: var(--sc-5) 0; border-bottom: 1px solid var(--sc-hairline);
  position: relative;
}
.q-ledger__row::before {
  content: ""; position: absolute; inset: 0 calc(var(--sc-4) * -1); z-index: -1; border-radius: var(--sc-r-sm);
  background: color-mix(in oklab, var(--sc-accent) 9%, transparent);
  opacity: 0; transition: opacity 160ms var(--sc-ease-out);
}
@media (hover: hover) and (pointer: fine) { .q-ledger__row:hover::before { opacity: 1; } }
.q-ledger__n { font-family: var(--sc-font-mono); font-size: var(--sc-t-xs); color: var(--sc-accent); letter-spacing: 0.1em; }
.q-ledger__name { font-family: var(--sc-font-display); font-weight: 800; font-stretch: 112%; font-variation-settings: "wdth" 112; text-transform: uppercase; font-size: clamp(1.15rem, 0.7rem + 1.15vw, 1.9rem); letter-spacing: -0.015em; line-height: 1.02; margin: 0; }
.q-ledger__what { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); margin: 0.55em 0 0; max-width: 60ch; }
.q-ledger__price { font-family: var(--sc-font-mono); font-size: var(--sc-t-sm); white-space: nowrap; text-align: right; color: var(--sc-ink); }
.q-ledger__price small { display: block; font-size: 0.72em; color: var(--sc-ink-soft); letter-spacing: 0.08em; text-transform: uppercase; }
@media (max-width: 640px) {
  .q-ledger__row { grid-template-columns: 2.2rem 1fr; }
  .q-ledger__price { grid-column: 2; text-align: left; }
}

/* ------------------------------------------------------------------ FAQ -- */
.q-faq { border-top: 1px solid var(--sc-hairline); }
.q-faq details { border-bottom: 1px solid var(--sc-hairline); }
.q-faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--sc-5); align-items: center;
  padding: var(--sc-5) 0; font-weight: 700; font-size: var(--sc-t-lg); line-height: 1.35;
}
.q-faq summary::-webkit-details-marker { display: none; }
.q-faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(var(--sc-accent),var(--sc-accent)) center/100% 2px no-repeat, linear-gradient(var(--sc-accent),var(--sc-accent)) center/2px 100% no-repeat;
  transition: transform 220ms var(--sc-ease-out);
}
.q-faq details[open] summary::after { transform: rotate(45deg); }
.q-faq summary:hover { color: var(--q-gold-hi); }
.q-faq .q-faq__a { padding: 0 0 var(--sc-6); color: var(--sc-ink-soft); max-width: 70ch; }
.q-faq .q-faq__a p { margin: 0 0 0.8em; }

/* --------------------------------------------------------------- form ---- */
.q-form {
  border-radius: var(--sc-r-lg); overflow: hidden; background: #000;
  border: 1px solid color-mix(in oklab, var(--sc-accent) 30%, transparent);
  box-shadow: var(--sc-e3); min-height: 640px;
}
.q-form iframe { display: block; width: 100%; min-height: 640px; border: 0; }

/* ------------------------------------------------------------ cream ground */
.q-cream {
  --sc-canvas: var(--q-cream); --sc-ink: var(--q-cream-ink); --sc-ink-soft: var(--q-cream-soft);
  --sc-accent: var(--q-gold-lo); --sc-accent-ink: var(--q-cream);
  background: var(--q-cream); color: var(--sc-ink);
}

/* ------------------------------------------------------------- footer ---- */
.q-foot { border-top: 1px solid var(--sc-hairline); padding: var(--sc-8) 0 var(--sc-7); font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
.q-foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--sc-7); }
.q-foot h3 { font-family: var(--sc-font-mono); font-size: var(--sc-t-xs); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sc-ink); margin: 0 0 var(--sc-4); }
.q-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.q-foot a { text-decoration: none; color: var(--sc-ink-soft); transition: color 160ms var(--sc-ease-out); }
.q-foot a:hover { color: var(--q-gold-hi); }
.q-foot__mark { width: 140px; height: auto; margin-bottom: var(--sc-4); }
.q-foot__base { margin-top: var(--sc-8); padding-top: var(--sc-5); border-top: 1px solid var(--sc-hairline); display: flex; justify-content: space-between; gap: var(--sc-4); flex-wrap: wrap; font-size: var(--sc-t-xs); }
@media (max-width: 860px) { .q-foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .q-foot__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------ inner pages ------
   Inner pages are document pages, not scroll films: an intro band, then
   flow sections. They reuse every component above. */
.q-page-hero { padding: calc(var(--q-bar-h) + var(--sc-9)) 0 var(--sc-8); position: relative; overflow: clip; }
.q-page-hero h1 { font-size: clamp(2.6rem, 1.4rem + 6vw, 7rem); margin: 0; max-width: 16ch; }
.q-page-hero .q-lede { margin-top: var(--sc-6); }
.q-crumbs { font-family: var(--sc-font-mono); font-size: var(--sc-t-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sc-ink-soft); margin-bottom: var(--sc-6); }
.q-crumbs a { text-decoration: none; color: var(--sc-ink-soft); }
.q-crumbs a:hover { color: var(--q-gold-hi); }
.q-page-hero__glow { position: absolute; z-index: -1; right: -10vw; top: -20vw; width: 60vw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--sc-accent) 26%, transparent), transparent); filter: blur(10px); pointer-events: none; }
.q-h2 { font-size: var(--sc-t-3xl); margin: 0 0 var(--sc-6); }
.q-h3 { font-family: var(--sc-font-display); font-weight: 800; font-stretch: 112%; font-variation-settings: "wdth" 112; text-transform: uppercase; font-size: var(--sc-t-xl); line-height: 1; letter-spacing: -0.01em; margin: 0 0 var(--sc-3); }
.q-prose { max-width: 68ch; color: var(--sc-ink-soft); }
.q-prose p { margin: 0 0 1em; }
.q-prose strong { color: var(--sc-ink); }
.q-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
@media (max-width: 860px) { .q-split { grid-template-columns: 1fr; } }
.q-stat { font-family: var(--sc-font-display); font-weight: 800; font-stretch: 118%; font-variation-settings: "wdth" 118; font-size: var(--sc-t-2xl); line-height: 1; color: var(--sc-accent); letter-spacing: -0.02em; }
.q-cta-band { padding: var(--sc-10) 0; text-align: left; }
.q-cta-band h2 { font-size: var(--sc-t-3xl); margin: 0 0 var(--sc-6); max-width: 18ch; }
.q-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--sc-accent); color: var(--sc-accent-ink); padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.q-skip:focus { left: 12px; }

@media (prefers-reduced-motion: reduce) {
  .q-reel iframe { transition: none; }
}
