/* MANACA v3: the close of the page, all on the dark ground: the Khar store, straight answers, about, then the footer.
   Colours come only from the tone tokens defined in css/chapter.css (--ground, --panel, --well, --ink, --mute, --line)
   and --led, so each section also works on the light ground. */

.store h2, .answers h2, .about h2 {
  font-family: var(--display); font-weight: 820; font-stretch: 62%; letter-spacing: -.025em; word-spacing: .05em; line-height: .86; text-transform: none; text-wrap: balance; }
.store :focus-visible, .answers :focus-visible, .about :focus-visible { outline: 2px solid rgb(var(--led)); outline-offset: 3px; }

/* Motion contract for the sections below: foot.js adds .foot-fx to <html> (never under reduced motion) and writes one
   scroll value, --p (0 → 1), on a few elements while they are on screen. Without the class every rule here rests at
   --p: 1, the finished state. Only transform and opacity move. */

/* ================= the store: one screen. Photo one side, everything you need to get there on the other ================= */
.store { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 1440px; margin: 0 auto; padding: var(--sec) var(--gut) 0; }
.store-img { position: relative; margin: 0; overflow: hidden; aspect-ratio: 16 / 11; border-radius: 10px; background: var(--well); }
.store-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.store-copy { display: grid; align-content: start; gap: 14px; min-width: 0; }
.store-copy h2 { font-size: var(--h2); }
.store-lede { font-size: 18px; line-height: 1.4; color: var(--ink); }

/* the facts: plain rows, label then value, a hairline between */
.facts { display: grid; margin-top: 4px; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 500 12px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.facts dd { margin: 0; font: 600 17px/1.4 var(--body); font-variant-numeric: tabular-nums; text-wrap: pretty; }
.facts a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -10px; color: var(--ink); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.store-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.store-ctas .btn { min-height: 52px; padding: 0 14px; white-space: nowrap; }
.store-ctas svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.store-go { background: var(--ink); color: var(--ground); }
.store-go:hover { box-shadow: 0 0 0 4px rgb(var(--led) / .55); }
.store-call { color: var(--ink); box-shadow: inset 0 0 0 1px var(--mute); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 38%, transparent); }
.store-call:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.store-quote { margin: 8px 0 0; display: grid; gap: 6px; }
.store-quote p { font: 500 16px/1.45 var(--body); color: var(--mute); max-width: 44ch; text-wrap: pretty; }
.store-quote footer { font: 500 12px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }

@media (max-width: 380px) { .store-ctas { grid-template-columns: 1fr; } }
@media (min-width: 900px) {
  .store { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(32px, 4.4vw, 72px); align-items: center; }
  .store-img { aspect-ratio: 4 / 5; max-height: calc(100vh - var(--trust) - var(--hdr) - 110px); max-height: calc(100svh - var(--trust) - var(--hdr) - 110px); min-height: 420px; width: 100%; }
  .store-img img { object-position: 50% 56%; }
  .store-copy { gap: 16px; }
  .store-lede { font-size: 19px; }
  .facts div { grid-template-columns: 132px minmax(0, 1fr); padding: 13px 0; }
  .facts dd { font-size: 18px; }
  .store-ctas { grid-template-columns: repeat(2, minmax(0, 240px)); }
}
@media (min-width: 900px) and (max-height: 760px) { .store-copy h2 { font-size: clamp(48px, 5vw, 72px); } .facts div { padding: 9px 0; } .store-quote { display: none; } }

/* ================= straight answers: every row is a recess in the wall; pressing one lights it ================= */
.answers { display: grid; gap: 24px; max-width: 1440px; margin: 0 auto; padding: var(--sec) var(--gut); }
.answers-head { display: grid; gap: 14px; align-content: start; }
.answers-head h2 { font-size: var(--h2); }
.answers-head > p:last-child { color: var(--mute); max-width: 36ch; }
.answers-sum { font-size: 17px; line-height: 1.45; max-width: 40ch; color: var(--ink); font-weight: 600; }
.answers-head a { color: var(--ink); font-weight: 650; text-underline-offset: 4px; }

.qa { --pad: 12px; border-top: 1px solid var(--ink); margin-inline: calc(var(--pad) * -1); }
.qa-row { position: relative; isolation: isolate; padding-inline: var(--pad); }
/* the recess: a shade of the ground with its own LED lip, there the moment the row opens */
.qa-row::before { content: ""; position: absolute; z-index: -1; inset: 6px 0; border-radius: 12px; pointer-events: none; opacity: 0; background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line); transition: opacity .16s linear; }
.qa-row::after { content: ""; position: absolute; left: var(--pad); right: var(--pad); bottom: 0; height: 1px; background: var(--line); }
.qa-lip { position: absolute; z-index: -1; left: 30%; right: 30%; top: 6px; height: 2px; border-radius: 0 0 2px 2px; pointer-events: none; opacity: 0; transform: scaleX(.2);
  background: rgb(var(--led)); box-shadow: 0 0 10px 1px rgb(var(--led) / .9), 0 0 30px 6px rgb(var(--led) / .4); transition: transform .32s var(--ease), opacity .12s linear; }
.qa-row[open]::before { opacity: 1; }
.qa-row[open] .qa-lip { opacity: 1; transform: none; }
.qa-row summary { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 12px; min-height: 68px; padding: 12px 6px; cursor: pointer; list-style: none; border-radius: 12px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: transform .12s var(--ease); }
.qa-row summary:active { transform: scale(.985); }
.qa-row summary::-webkit-details-marker, .about-more summary::-webkit-details-marker { display: none; }
.qa-q { font: 750 clamp(23px, 2.3vw, 32px)/1.02 var(--display); font-stretch: 70%; letter-spacing: -.01em; word-spacing: .06em; }
/* the key: a round button with two strokes; it sinks when pressed and the upright stroke folds flat when open */
.qa-x { position: relative; justify-self: end; width: 40px; height: 40px; border-radius: 50%; background: var(--panel); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--mute); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent); transition: transform .12s var(--ease); }
.qa-x::before, .qa-x::after { content: ""; position: absolute; left: 13px; right: 13px; top: 19px; height: 2px; border-radius: 1px; background: currentColor; transition: transform .22s var(--ease); }
.qa-x::after { transform: rotate(90deg); }
summary:active .qa-x { transform: translateY(2px) scale(.94); }
details[open] > summary .qa-x::after { transform: rotate(0deg); }
details[open] > summary .qa-x { background: rgb(var(--led)); color: #0e0e0d; box-shadow: 0 0 18px 2px rgb(var(--led) / .45); transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) {
  .qa-row summary:hover .qa-x, .about-more summary:hover .qa-x, .popular > summary:hover .qa-x { box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 3px rgb(var(--led) / .5); }
  .qa-row:not([open]) summary:hover .qa-q { transform: translateX(8px); }
  .qa-q { transition: transform .25s var(--ease); }
}
.qa-body { display: grid; gap: 12px; padding: 2px 6px 26px; color: var(--ink); max-width: 65ch; transform-origin: 0 0; }
.qa-body > p:not(.qa-key) { max-width: 60ch; color: color-mix(in srgb, var(--ink) 86%, var(--ground)); }
.qa-key { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 26px; color: var(--mute); font-size: 15px; }
.qa-key span { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.qa-key b { color: var(--ink); font: 820 clamp(34px, 3.4vw, 50px)/.95 var(--display); font-stretch: 64%; letter-spacing: -.015em; white-space: nowrap; }
.qa-body a { color: var(--ink); font-weight: 650; text-underline-offset: 4px; }
.qa-policy, .about-story { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; width: fit-content; font-weight: 700; text-underline-offset: 5px; color: var(--ink); }

/* opening is instant in layout; the answer drops out from under the lip (clip-path + transform), and foot.js slides
   the rows below into place with a transform so nothing jumps */
@keyframes qa-in { from { clip-path: inset(0 0 100% 0); opacity: 0; transform: translateY(-10px); } to { clip-path: inset(0 0 0 0); opacity: 1; transform: none; } }
details[open] > .qa-body, details[open] > .about-text, details[open] > .popular-groups { animation: qa-in .3s var(--ease) both; }

@media (min-width: 1000px) {
  .answers { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 5vw, 90px); align-items: start; }
  .answers-head { position: sticky; top: calc(var(--trust) + var(--hdr) + 30px); }
  .qa { --pad: 20px; }
  .qa-row summary { grid-template-columns: minmax(0, 1fr) 46px; min-height: 84px; }
  .qa-x { width: 44px; height: 44px; } .qa-x::before, .qa-x::after { left: 14px; right: 14px; top: 21px; }
  .qa-body { padding: 0 60px 32px 6px; }
}

/* ================= about + popular searches: the claim at full width, lit as it is read ================= */
.about { max-width: 1440px; margin: 0 auto; padding: 0 var(--gut) var(--sec); display: grid; gap: 32px; }
.about-intro { display: grid; justify-items: start; gap: 12px; border-top: 1px solid var(--ink); padding-top: 24px; min-width: 0; }
.about h2 { font-size: clamp(50px, 13.4vw, 196px); line-height: .82; letter-spacing: -.035em; margin: 6px 0 12px; max-width: none; text-wrap: balance; }
.about h2 .nw, .answers-sum .nw { white-space: nowrap; }
/* words go from a trace to full strength as the line climbs the screen; full strength when --p is not being driven */
.foot-fx .ink .w { opacity: clamp(.16, calc(var(--p, 1) * (var(--n) + 3) - var(--i)), 1); }
.about-more { width: 100%; }
.about-more summary { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; list-style: none; font-weight: 700; border-radius: 6px; -webkit-tap-highlight-color: transparent; }
.about-more summary .qa-x, .popular > summary .qa-x { width: 36px; height: 36px; }
.about-more summary .qa-x::before, .about-more summary .qa-x::after, .popular > summary .qa-x::before, .popular > summary .qa-x::after { left: 11px; right: 11px; top: 17px; }
.about-more .more-close, .about-more[open] .more-open { display: none; }
.about-more[open] .more-close { display: inline; }
.about-text { max-width: 30em; display: grid; gap: .7em; padding: 14px 0 16px; color: var(--ink); font: 560 clamp(21px, 1.9vw, 27px)/1.24 var(--body); letter-spacing: -.012em; }

.popular { min-width: 0; border-top: 1px solid var(--line); }
.popular h3 { margin: 0; font: 500 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--mute); }
.popular > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; cursor: pointer; list-style: none; border-radius: 6px; -webkit-tap-highlight-color: transparent; }
.popular > summary::-webkit-details-marker { display: none; }
.popular-groups { display: grid; gap: 18px; margin-top: 6px; }
.popular nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.popular h4 { margin: 0; font: 780 26px/1 var(--display); font-stretch: 66%; letter-spacing: -.01em; }
/* the searches are plain links in a run, not chips */
.chips { display: flex; flex-wrap: wrap; gap: 0 22px; }
.chips a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; font-size: 16px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 6px; }
@media (hover: hover) and (pointer: fine) { .chips a:hover { text-decoration-color: rgb(var(--led)); color: rgb(var(--led)); } }

@media (min-width: 700px) { .popular nav { grid-template-columns: 130px minmax(0, 1fr); align-items: start; } .popular h4 { padding-top: 10px; } }
@media (min-width: 1000px) {
  .about { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(40px, 5vw, 90px); row-gap: 0; border-top: 1px solid var(--ink); padding-top: 24px; align-items: start; }
  .about-intro { display: contents; }
  .about h2 { grid-column: 1 / -1; margin: 10px 0 clamp(32px, 4vw, 60px); }
  .about-more { grid-column: 1; grid-row: 2; }
  .about-story { grid-column: 1; grid-row: 3; margin-top: 10px; }
  .popular { grid-column: 2; grid-row: 2 / span 3; border-top: 0; }
  .popular > summary { min-height: 48px; }
}

/* ================= footer: the slab lifts, the wordmark is underneath in chrome =================
   .foot-body (links) is an ordinary scrolling slab, one shade up from the ground. .foot-stage is stuck to the bottom of
   the screen underneath it, so the slab slides up off the stage as the page ends. CSS sticky only; --p just moves the
   light across the metal. */
.foot { position: relative; isolation: isolate; overflow: clip; background: var(--ground); color: var(--ink); }
.foot-body { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 4vw, 52px);
  padding: clamp(48px, 6vw, 84px) var(--gut) clamp(28px, 3.4vw, 44px);
  background: var(--panel); border-radius: clamp(20px, 2.6vw, 36px);
  box-shadow: inset 0 1px 0 var(--line), 0 34px 60px -10px #000; }
.foot-lip { position: absolute; z-index: -1; left: 32%; right: 32%; top: 0; height: 2px; border-radius: 0 0 2px 2px; pointer-events: none;
  background: rgb(var(--led)); box-shadow: 0 0 12px 1px rgb(var(--led) / .9), 0 0 40px 6px rgb(var(--led) / .4); }
.foot-lip::after { content: ""; position: absolute; left: -25%; right: -25%; top: 2px; height: 260px; background: radial-gradient(55% 100% at 50% 0%, rgb(var(--led) / .1), transparent 70%); }
/* the strip under the slab's lower lip: it is what lights the metal below */
.foot-under { position: absolute; left: 22%; right: 22%; bottom: -2px; height: 2px; border-radius: 2px; pointer-events: none;
  background: rgb(var(--led)); box-shadow: 0 0 12px 1px rgb(var(--led) / .95), 0 6px 46px 10px rgb(var(--led) / .42); }
.foot-top { display: grid; gap: 34px; min-width: 0; }
.foot-line { font: 820 clamp(44px, 4.6vw, 72px)/.86 var(--display); font-stretch: 62%; letter-spacing: -.03em; word-spacing: .08em; color: var(--ink); }
.foot-line span { color: rgb(var(--led)); text-shadow: 0 0 28px rgb(var(--led) / .45); }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; min-width: 0; }
.foot-shop { grid-column: 1 / -1; }
.foot-shop { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.foot-shop .foot-h { grid-column: 1 / -1; }
.foot nav { display: grid; align-content: start; min-width: 0; }
.foot-h { font: 500 12px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin: 0 0 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.foot nav a { display: flex; align-items: center; min-height: 44px; padding: 6px 8px 6px 0; font-size: 16px; line-height: 1.25; text-decoration: none; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .foot nav a:hover, .foot-top-link:hover { color: rgb(var(--led)); text-decoration: underline; text-underline-offset: 5px; } }
.foot-mid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.foot .foot-social { display: flex; flex-wrap: wrap; gap: 4px 26px; }
.foot .foot-social a { gap: 9px; padding: 0; min-height: 46px; font-size: 15px; }
.foot-social svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.foot-top-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); text-decoration: none; }

.foot-stage { position: sticky; bottom: 0; z-index: 0; display: grid; grid-template-rows: 1fr auto; align-items: end; gap: 18px; overflow: hidden;
  min-height: min(48vh, 420px); min-height: min(48svh, 420px); padding: 96px var(--gut) max(22px, env(safe-area-inset-bottom));
  background: radial-gradient(90% 60% at 50% 0%, #1b1c17 0%, #0a0a09 46%, #050505 100%); }
.foot-word { position: relative; justify-self: center; align-self: end; width: 100%; max-width: calc((100vh - 215px) * 1.88); max-width: calc((100svh - 215px) * 1.88); padding-bottom: 12.5%; }
.foot-fx .foot-word { transform: translateY(calc((1 - var(--p, 1)) * 16%)) scale(calc(1.05 - var(--p, 1) * .05)); transform-origin: 50% 100%; }
.foot-mark { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 1252 / 513; object-fit: contain; }
.foot-chrome, .foot-mirror { display: none; }
@supports ((mask-image: url("")) or (-webkit-mask-image: url(""))) {
  .foot-mark { opacity: 0; }
  .foot-chrome, .foot-mirror { display: block; position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1252 / 513; overflow: hidden; pointer-events: none;
    -webkit-mask: url(../assets/final_svg_manaca.svg) center / 100% 100% no-repeat; mask: url(../assets/final_svg_manaca.svg) center / 100% 100% no-repeat; }
  /* polished metal: bright sky, a hard dark horizon, warm floor bounce */
  .foot-chrome { background: linear-gradient(180deg, #f6f7f4 0%, #b9bdbe 20%, #6c7074 39%, #e4e6df 48.5%, #17181a 52%, #3a3d41 66%, #a3a6a4 86%, #e3e6d8 100%); }
  /* the travelling reflection: three wide diagonal bands, moved by transform only */
  .foot-chrome::after { content: ""; position: absolute; top: -10%; bottom: -10%; left: -200%; width: 300%; opacity: .92;
    background: linear-gradient(104deg, transparent 30%, rgb(10 10 10 / .5) 37%, transparent 43%, rgb(255 255 255 / .95) 48%, rgb(var(--led)) 50.5%, transparent 55%, rgb(10 10 10 / .42) 62%, transparent 69%);
    transform: translateX(calc(var(--p, 1) * 46%)); }
  /* the same metal on the floor, upside down and fading out */
  .foot-mirror { top: auto; bottom: 12.5%; transform: scaleY(-.3); transform-origin: 50% 100%;
    background: linear-gradient(180deg, transparent 45%, rgb(150 154 150 / .1) 72%, rgb(226 230 212 / .42) 100%); opacity: var(--p, 1); }
}
.foot-legal { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #a9a99f; }
.foot :focus-visible { outline: 2px solid rgb(var(--led)); outline-offset: 3px; border-radius: 4px; }
@media (min-width: 600px) { .foot-cols { grid-template-columns: 1.4fr 1fr 1.2fr; } .foot-shop { grid-column: auto; } }
@media (min-width: 1000px) {
  .foot-top { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 5vw, 90px); align-items: start; }
  .foot-stage { min-height: 100vh; min-height: 100svh; padding-top: calc(var(--trust) + var(--hdr) + 40px); }
}

@media (prefers-reduced-motion: reduce) {
  .qa-body, .about-text, .popular-groups, .qa-x, .qa-x::before, .qa-x::after, .qa-lip, .qa-row::before, .qa-row summary, .qa-q { transition: none; animation: none !important; }
  .foot-stage { position: relative; }
}

/* card titles are links too: give them a 44px tap band without moving the text */
.card-t { padding-block: 14px; margin-block: -14px; }
/* reduced motion: the trust strip stands still, so let it be swiped to read every line, and drop the marquee duplicates */
@media (prefers-reduced-motion: reduce) {
  .trust { overflow-x: auto; scrollbar-width: none; }
  .trust::-webkit-scrollbar { display: none; }
  .trust-track { padding-right: 32px; }
  .trust-track span[aria-hidden="true"] { display: none; }
}
