/* Quiet Money runway storefront. Brand tokens only. Light cream theme. */
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2"); }

:root {
  --cream: #f2ece1;
  --cream-deep: #e8decd;
  --camel: #b8936a;
  --navy: #1d2a45;
  --navy-hover: #2a3a5e;
  --gold: #a9843f;
  --ink: #1b2233;
  --brown: #5b4636;
  --muted: #6a5a4a;
  --line: rgba(29, 42, 69, 0.14);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 2px;
  --nav-h: 64px;
  --focus: 2px solid var(--gold);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--cream); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 400;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; color: inherit; }
a { color: var(--navy); }
a:hover { color: var(--navy-hover); }

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 200;
  background: var(--navy); color: var(--cream); padding: 8px 14px;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: var(--focus); outline-offset: 3px; }

/* Nav: small wordmark + one persistent button */
.nav {
  position: sticky; top: 0; z-index: 80;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  color: var(--navy);
  text-decoration: none;
  line-height: 1;
}
.wordmark:hover { color: var(--navy); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid var(--navy);
  background: var(--navy); color: var(--cream);
  text-decoration: none; font-weight: 600; font-size: 0.875rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
}
.btn:hover { background: var(--navy-hover); color: var(--cream); border-color: var(--navy-hover); }
.btn-ghost {
  background: transparent; color: var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--cream); }
.btn[aria-disabled="true"], .btn.is-soon {
  background: transparent; color: var(--muted); border-color: var(--line);
  pointer-events: none;
}

/* Hero runway */
.hero {
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  grid-template-columns: minmax(240px, 28vw) minmax(0, 1fr) minmax(240px, 300px);
  gap: 8px 16px;
  padding: 8px 28px 28px;
  align-items: stretch;
}
.hero-copy {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px 8px 48px;
  z-index: 2;
}
.kicker {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  color: var(--brown);
  letter-spacing: 0.02em;
}
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 5vw, 4.75rem);
  line-height: 0.98;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic; font-weight: 500; color: var(--brown);
}
.walk-hint {
  margin: 28px 0 0;
  font-size: 0.9375rem;
  color: var(--ink);
}
.fibre-rule {
  margin: 14px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 28ch;
}
.walk-controls {
  display: flex; gap: 8px; margin-top: 22px;
}
.walk-btn {
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--navy); border-radius: var(--radius);
  background: transparent; color: var(--navy);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 300ms var(--ease), color 300ms var(--ease);
}
.walk-btn:hover { background: var(--navy); color: var(--cream); }
.walk-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* Stage */
.runway-wrap {
  position: relative;
  min-height: 560px;
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
  overflow: hidden;
}
.runway-wrap:focus-visible { outline: var(--focus); outline-offset: -4px; }
.runway {
  position: absolute;
  inset: 0;
}
.model {
  position: absolute;
  bottom: 4%;
  left: var(--x, 50%);
  height: var(--h, 86%);
  width: auto;
  transform: translateX(-50%) scale(var(--s, 1));
  transform-origin: 50% 100%;
  filter: blur(var(--b, 0px));
  opacity: var(--o, 1);
  z-index: var(--z, 1);
  pointer-events: none;
  transition:
    left 700ms var(--ease),
    transform 700ms var(--ease),
    filter 700ms var(--ease),
    opacity 500ms var(--ease),
    height 700ms var(--ease);
  will-change: left, transform, filter, opacity;
}
.model.is-leaving {
  opacity: 0;
  transform: translateX(-20%) scale(1.02);
  filter: blur(0);
}
.model img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  border-radius: var(--radius);
  background: #f3ebe0;
  box-shadow: 0 18px 40px rgba(29, 42, 69, 0.14);
}
/* Slot positions: back at left, front at right. Scale x0.8 and blur +2px each step. */
.model[data-slot="0"] { --x: 16%; --s: 0.4096; --b: 8px; --z: 1; --h: 90%; --o: 0.92; }
.model[data-slot="1"] { --x: 28%; --s: 0.512;  --b: 6px; --z: 2; --h: 90%; --o: 0.95; }
.model[data-slot="2"] { --x: 42%; --s: 0.64;   --b: 4px; --z: 3; --h: 90%; --o: 0.98; }
.model[data-slot="3"] { --x: 58%; --s: 0.8;    --b: 2px; --z: 4; --h: 90%; --o: 1; }
.model[data-slot="4"] { --x: 76%; --s: 1;      --b: 0px; --z: 5; --h: 90%; --o: 1; }

/* Shop column follows the front look */
.shop-col {
  display: flex; flex-direction: column;
  padding: 20px 4px 28px 8px;
  border-left: 1px solid var(--line);
  min-height: 0;
}
.shop-col h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--navy);
}
.shop-look-name {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.piece-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: auto;
}
.piece {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.piece:last-child { border-bottom: 1px solid var(--line); }
.piece img, .piece .swatch-fallback {
  width: 56px; height: 72px; object-fit: cover; background: var(--cream-deep);
  border-radius: var(--radius);
}
.piece .swatch-fallback { display: block; }
.piece h3 {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}
.piece p { margin: 0; font-size: 0.75rem; color: var(--muted); }
.piece .price { display: block; margin-top: 2px; color: var(--ink); font-size: 0.8125rem; }
.piece .actions { grid-column: 2; margin-top: 8px; }
.piece .btn { min-height: 36px; padding: 0 12px; font-size: 0.75rem; width: fit-content; }

/* Sections shared */
.section {
  padding: 88px 28px;
  border-top: 1px solid var(--line);
}
.section-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 48px 64px;
  align-items: center;
}
.cloth-grid {
  grid-template-areas: "intro photo" "detail photo";
  align-items: start;
}
.cloth-intro { grid-area: intro; }
.cloth-photo { grid-area: photo; }
.cloth-detail { grid-area: detail; align-self: start; }
.section h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  line-height: 1.02;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.section h2 em { font-style: italic; font-weight: 500; color: var(--brown); }
.lede { margin: 0 0 28px; max-width: 38ch; color: var(--ink); font-size: 1.0625rem; }

/* Fabric picker */
.swatches {
  display: flex; flex-wrap: wrap; gap: 14px 16px;
  margin: 0 0 28px; padding: 0; list-style: none;
}
.swatch {
  appearance: none; border: 0; background: none; padding: 0;
  cursor: pointer; width: 72px; text-align: left; color: var(--muted);
}
.swatch .dot {
  width: 56px; height: 56px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(29,42,69,0.18);
  margin-bottom: 8px;
  transition: box-shadow 300ms var(--ease), transform 300ms var(--ease);
}
.swatch[aria-pressed="true"] .dot,
.swatch:hover .dot {
  box-shadow: inset 0 0 0 1px rgba(29,42,69,0.18), 0 0 0 2px var(--cream), 0 0 0 3px var(--navy);
}
.swatch[aria-pressed="true"] { color: var(--navy); }
.swatch span { display: block; font-size: 0.6875rem; line-height: 1.3; }

.cloth-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--navy);
}
.cloth-lead { margin: 0 0 16px; max-width: 46ch; }
.specs { margin: 0; padding: 0; list-style: none; }
.specs li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.specs li:last-child { border-bottom: 1px solid var(--line); }
.specs strong { font-weight: 600; color: var(--navy); }

.fabric-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 50% 50% 2px 2px / 18% 18% 2px 2px;
  overflow: hidden;
  background: var(--cream-deep);
  cursor: none;
  touch-action: none;
}
.fabric-stage img {
  width: 100%; height: 100%; object-fit: cover;
}
.loupe {
  position: absolute;
  width: 168px; height: 168px;
  border-radius: 50%;
  pointer-events: none;
  border: 2px solid var(--cream);
  box-shadow: 0 8px 24px rgba(27, 34, 51, 0.28);
  background-repeat: no-repeat;
  background-size: 250%;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  z-index: 3;
}
.fabric-stage.is-magnifying .loupe { opacity: 1; transform: scale(1); }
.fabric-hint {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* Journey */
.counter {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin: 0 0 18px;
  font-variant-numeric: tabular-nums;
}
.steps { list-style: none; margin: 0; padding: 0; }
.step-btn {
  appearance: none; display: block; width: 100%;
  background: none; border: 0; border-top: 1px solid var(--line);
  padding: 16px 0; text-align: left; cursor: pointer; color: var(--muted);
}
.steps li:last-child .step-btn { border-bottom: 1px solid var(--line); }
.step-btn[aria-pressed="true"] { color: var(--navy); }
.step-btn .n {
  font-family: var(--serif);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
}
.step-btn h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}
.step-body { margin: 20px 0 0; max-width: 42ch; color: var(--ink); }
.journey-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--cream-deep);
}

.placeholder-token {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
  background: rgba(184, 147, 106, 0.22);
  padding: 0 4px;
  border-radius: var(--radius);
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 28px 36px;
  color: var(--brown);
}
.footer-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}
.footer .wordmark { font-size: 1.25rem; }
.footer h2 {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brown);
  font-family: var(--sans);
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 0 0 8px; }
.footer a { color: var(--navy); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.legal {
  max-width: 1280px; margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}
.legal p { margin: 0 0 8px; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 8px 16px 24px;
  }
  .hero-copy { padding: 16px 0 8px; justify-content: flex-start; }
  .hero h1 { font-size: 2.75rem; }
  .runway-wrap { min-height: 46vh; height: 46vh; order: 0; }
  .hero-copy { order: 1; }
  .shop-col { order: 2; border-left: 0; border-top: 1px solid var(--line); padding: 24px 0; }
  .model[data-slot="0"] { --x: 10%; }
  .model[data-slot="1"] { --x: 22%; }
  .model[data-slot="2"] { --x: 38%; }
  .model[data-slot="3"] { --x: 56%; }
  .model[data-slot="4"] { --x: 78%; }
  .section { padding: 64px 16px; }
  .section-grid { grid-template-columns: 1fr; gap: 28px; }
  .cloth-grid { grid-template-areas: "intro" "photo" "detail"; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav { padding: 0 16px; }
  .fabric-stage { cursor: auto; }
  .loupe { width: 132px; height: 132px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .model {
    transition: opacity 200ms linear;
    filter: none !important;
  }
  .model[data-slot="0"],
  .model[data-slot="1"],
  .model[data-slot="2"],
  .model[data-slot="3"],
  .model[data-slot="4"] { --b: 0px; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .loupe { transition: none; }
}


/* Standalone document pages (returns, etc.) */
.page-doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 28px 96px;
}
.page-doc h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  line-height: 1.02;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.page-doc .lede { margin: 0 0 36px; }
.page-doc h2 {
  margin: 32px 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--navy);
}
.page-doc p { margin: 0 0 8px; max-width: 60ch; color: var(--ink); }
.page-doc .back { margin-top: 40px; }
.final-sale, .tag-imported, .tag-exchange {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--brown);
  font-weight: 600;
}
.page-product {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 28px 96px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 40px 56px;
  align-items: start;
}
.page-product .photo {
  margin: 0;
}
.page-product .photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: #f3ebe0;
  box-shadow: 0 12px 32px rgba(29, 42, 69, 0.08);
}
.page-product .caption {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.page-product h1 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.page-product .price-lg {
  margin: 0 0 16px;
  font-size: 1.125rem;
  color: var(--ink);
}
.page-product h2 {
  margin: 24px 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--navy);
}
.page-product .body {
  margin: 0 0 12px;
  max-width: 52ch;
  color: var(--ink);
}
.page-product .buy {
  margin: 24px 0 8px;
}
.page-product .back { margin-top: 32px; }
@media (max-width: 980px) {
  .page-product {
    grid-template-columns: 1fr;
    padding: 32px 16px 72px;
    gap: 24px;
  }
}

@media (max-width: 980px) {
  .page-doc { padding: 32px 16px 72px; }
}
