/* ==========================================================================
   Yarn UP — website design system ("Loop" language)
   Static, framework-free. Light + dark via CSS variables.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  --bg: #F7F1E8;            /* warm cream */
  --surface-dim: #F1E9DC;
  --surface: #FFFFFF;
  --ink: #2A241D;
  --ink-soft: rgba(42, 36, 29, 0.70);   /* 4.9:1 on cream */
  --ink-faint: rgba(42, 36, 29, 0.48);  /* decoration only */
  --line: rgba(42, 36, 29, 0.10);
  --line-strong: rgba(42, 36, 29, 0.18);
  --accent: #C56A4A;        /* terracotta — art, icons, fills */
  --accent-dark: #AE5739;   /* text + buttons (6.9:1 with white) */
  --wheat: #E5B788;
  --sage: #8FA482;
  --warn: #D9A441;

  --hero-ink: #2A241D;      /* dark CTA surfaces */
  --on-dark: #FFF6EC;
  --on-dark-soft: rgba(255, 246, 236, 0.74);

  --placeholder: #EFE5D6;
  --stitch: rgba(42, 36, 29, 0.07);
  --shadow-sm: 0 1px 2px rgba(42, 36, 29, 0.05), 0 6px 18px rgba(42, 36, 29, 0.06);
  --shadow-md: 0 2px 6px rgba(42, 36, 29, 0.06), 0 22px 44px -12px rgba(42, 36, 29, 0.20);
  --shadow-lg: 0 40px 80px -24px rgba(42, 36, 29, 0.35);

  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-ui: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --gutter: 16px;
  --max: 1240px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.3, 1.35, .45, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130F;
    --surface-dim: #211B16;
    --surface: #251F19;
    --ink: #F4EBDF;
    --ink-soft: rgba(244, 235, 223, 0.72);
    --ink-faint: rgba(244, 235, 223, 0.45);
    --line: rgba(244, 235, 223, 0.10);
    --line-strong: rgba(244, 235, 223, 0.18);
    --accent: #D9805F;
    --accent-dark: #E08F6E;   /* lighter so text keeps contrast on dark */
    --hero-ink: #0F0C09;
    --placeholder: #2A231C;
    --stitch: rgba(244, 235, 223, 0.06);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 18px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35), 0 22px 44px -12px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 40px 80px -24px rgba(0, 0, 0, 0.7);
  }
}

@media (min-width: 720px) { :root { --gutter: 28px; } }
@media (min-width: 1100px) { :root { --gutter: 40px; } }

/* ---------- 2. Base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* paper grain over everything (very faint, no image request) */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { body::before { mix-blend-mode: screen; opacity: .03; } }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent-dark); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--gutter); top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- 3. Type ------------------------------------------------------ */
.display, h1, h2, h3 { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -0.01em; margin: 0; }
.display-xl { font-size: clamp(3rem, 9.5vw, 6.6rem); line-height: .92; letter-spacing: -0.025em; }
.display-lg { font-size: clamp(2.5rem, 6.4vw, 4.4rem); line-height: .95; letter-spacing: -0.02em; }
.display-md { font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1; }
.accent-word { color: var(--accent-dark); }
.eyebrow {
  font-family: var(--font-ui); font-style: normal; font-weight: 600;
  font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-dark);
  display: inline-flex; align-items: center; gap: .55em;
}
.eyebrow::before { content: ""; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px; }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.2rem); line-height: 1.55; color: var(--ink-soft); max-width: 34em; margin: 0; }

/* ---------- 4. Buttons --------------------------------------------------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: var(--h); padding: 0 1.5em; border-radius: 999px; border: 0;
  font-family: var(--font-ui); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease-spring), box-shadow .25s var(--ease-out), background .2s;
}
.btn svg { flex: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent-dark); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 12px 26px -10px rgba(174, 87, 57, .65); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 18px 34px -12px rgba(174, 87, 57, .75); }
@media (prefers-color-scheme: dark) { .btn-primary { background: #C56A4A; } }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: var(--surface); }
.btn-light { background: var(--on-dark); color: #2A241D; }
.btn-light:hover { transform: translateY(-2px); }
.btn-lg { --h: 58px; font-size: 1.06rem; padding: 0 1.7em; }
.btn-sm { --h: 40px; font-size: .9rem; padding: 0 1.1em; }
.btn .sub { font-weight: 500; opacity: .78; }

/* ---------- 5. Header ---------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 0.5px solid transparent; transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; line-height: 1; letter-spacing: -0.01em; }
.brand-name b { font-family: var(--font-ui); font-style: normal; font-weight: 700; font-size: .72em; letter-spacing: .04em; margin-left: .12em; color: var(--accent-dark); }
.nav { display: none; gap: 26px; }
.nav a { text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--ink-soft); transition: color .2s; }
.nav a:hover { color: var(--ink); }
@media (min-width: 860px) { .nav { display: flex; } }

/* ---------- 6. Stitch texture + decorative bits ------------------------- */
.texture-stitch {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='20'%3E%3Cpath d='M3 4 L11 15 L19 4' fill='none' stroke='%232A241D' stroke-opacity='.06' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  .texture-stitch { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='20'%3E%3Cpath d='M3 4 L11 15 L19 4' fill='none' stroke='%23F4EBDF' stroke-opacity='.05' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}
.stitch-rule { height: 10px; border: 0; margin: 0; background: radial-gradient(circle, var(--line-strong) 1.4px, transparent 1.6px) 0 50% / 12px 10px repeat-x; }

/* ---------- 7. Hero (gallery) ------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.hero::before { /* warm glows */
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 183, 136, .45), rgba(229, 183, 136, 0) 62%); pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; left: -20vw; bottom: -30vw; width: 60vw; height: 60vw; max-width: 700px; max-height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 164, 130, .28), rgba(143, 164, 130, 0) 62%); pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 44px; align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1.05fr .95fr; gap: 56px; } }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-title em { color: var(--accent-dark); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 6px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 0; padding: 0; list-style: none; font-size: .9rem; color: var(--ink-soft); }
.hero-proof li { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof svg { color: var(--sage); }

/* collage */
.collage { position: relative; aspect-ratio: 1 / .92; width: min(100%, 560px); justify-self: center; }
.collage .polaroid {
  position: absolute; margin: 0; background: var(--surface); padding: 10px 10px 14px; border-radius: 18px;
  box-shadow: var(--shadow-lg); border: 0.5px solid var(--line);
  transition: transform .6s var(--ease-spring);
}
.collage .polaroid figcaption { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; padding: 10px 4px 0; line-height: 1.1; }
.collage .p1 { width: 52%; left: 0; top: 10%; transform: rotate(-7deg); z-index: 2; }
.collage .p2 { width: 50%; right: 2%; top: 0; transform: rotate(5deg); z-index: 1; }
.collage .p3 { width: 46%; left: 30%; bottom: 0; transform: rotate(-1.5deg); z-index: 3; }
.collage:hover .p1 { transform: rotate(-9deg) translate(-8px, -4px); }
.collage:hover .p2 { transform: rotate(7deg) translate(8px, -6px); }
.collage:hover .p3 { transform: rotate(0deg) translateY(-6px); }
.collage .sticker {
  position: absolute; z-index: 4; right: -2%; bottom: 14%; transform: rotate(6deg);
  display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 18px;
  background: var(--hero-ink); color: var(--on-dark); box-shadow: var(--shadow-lg);
}
.sticker .ring { width: 46px; height: 46px; flex: none; }
.sticker .k { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wheat); font-weight: 600; }
.sticker .v { font-family: var(--font-display); font-style: italic; font-size: 1.45rem; line-height: 1; }
.collage .badge-float {
  position: absolute; z-index: 4; left: -3%; top: 2%; transform: rotate(-6deg);
  background: var(--sage); color: #1E261A; font-weight: 600; font-size: .85rem; padding: 9px 14px; border-radius: 999px; box-shadow: var(--shadow-md);
}
@media (max-width: 520px) { .collage .sticker { right: 0; bottom: 6%; } .collage .badge-float { left: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .collage .sticker { animation: bob 6s ease-in-out infinite; }
  .collage .badge-float { animation: bob 7s ease-in-out -2s infinite; }
}
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

/* ---------- 8. Image frame (shared by cards + detail) ------------------- */
.frame {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--r-md);
  background-color: var(--placeholder);
}
/* stitched placeholder shows while loading / if the photo is missing */
.frame::before {
  content: ""; position: absolute; inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='20' fill='none' stroke='%23C56A4A' stroke-opacity='.45' stroke-width='2'/%3E%3Cpath d='M15 26c11 6 23 6 34 0M14 37c12 7 24 7 36 0M27 13c-6 12-5 26 3 38' fill='none' stroke='%23C56A4A' stroke-opacity='.35' stroke-width='1.6'/%3E%3C/svg%3E") center / 56px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='20'%3E%3Cpath d='M3 4 L11 15 L19 4' fill='none' stroke='%23C56A4A' stroke-opacity='.10' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out), opacity .5s; }
.frame img.is-missing { opacity: 0; }

/* ---------- 9. Filter bar ------------------------------------------------ */
.gallery { padding: 8px 0 72px; }
.gallery-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; margin-bottom: 18px; }
.gallery-head p { margin: 0; color: var(--ink-soft); }
.filterbar {
  position: sticky; top: 64px; z-index: 40; margin: 0 calc(var(--gutter) * -1) 26px; padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.chips {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 40px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 40px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 1100px) { .chips { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; } }
.chip {
  flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 0.5px solid var(--line-strong);
  font-size: .93rem; font-weight: 500; color: var(--ink);
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease-spring);
}
.chip:hover { border-color: var(--ink-faint); }
.chip:active { transform: scale(.96); }
.chip .n { font-size: .78rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] .n { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.chip .ico { width: 18px; height: 18px; }
.chip-seasonal { background: color-mix(in srgb, var(--wheat) 26%, var(--surface)); }

/* ---------- 10. Pattern cards ------------------------------------------- */
.grid {
  display: grid; gap: 22px 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 22px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 26px; } }

.card { position: relative; content-visibility: auto; contain-intrinsic-size: 300px 400px; }
.card[hidden] { display: none; }
.card-link { display: block; text-decoration: none; color: inherit; border-radius: var(--r-lg); }
.card .frame { border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: box-shadow .35s var(--ease-out), transform .45s var(--ease-spring); }
.card-link:hover .frame, .card-link:focus-visible .frame { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-link:hover .frame img { transform: scale(1.055); }
.card .tag {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 999px;
  background: rgba(255, 252, 247, .92); color: #2A241D; font-size: .74rem; font-weight: 600; letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(42, 36, 29, .12);
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.lvl-beginner .dot, .dot.lvl-beginner { background: var(--sage); }
.lvl-intermediate .dot, .dot.lvl-intermediate { background: var(--warn); }
.lvl-advanced .dot, .dot.lvl-advanced { background: var(--accent); }
.card .peek {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: var(--accent-dark); color: #fff; font-size: .78rem; font-weight: 600;
  opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .35s var(--ease-spring);
}
.card-link:hover .peek, .card-link:focus-visible .peek { opacity: 1; transform: none; }
@media (hover: none) { .card .peek { display: none; } }
.card-body { padding: 12px 4px 0; }
.card-title { font-family: var(--font-display); font-style: italic; font-size: clamp(1.2rem, 2.2vw, 1.45rem); line-height: 1.08; margin: 0; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: .84rem; color: var(--ink-soft); }
.card-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }
.card-meta svg { width: 14px; height: 14px; margin-right: 3px; vertical-align: -2px; }

/* in-grid promo card */
.promo {
  grid-column: 1 / -1; position: relative; overflow: hidden; border-radius: var(--r-xl);
  background: var(--hero-ink); color: var(--on-dark); padding: clamp(26px, 4vw, 44px);
  display: grid; gap: 22px; align-items: center;
}
@media (min-width: 720px) { .promo { grid-template-columns: 1fr auto; } }
.promo::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 92% 0%, rgba(197,106,74,.55), transparent 50%), radial-gradient(circle at 0% 110%, rgba(143,164,130,.35), transparent 45%); pointer-events: none; }
.promo > * { position: relative; }
.promo .eyebrow { color: var(--wheat); }
.promo .promo-head { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -0.01em; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; margin: 10px 0 0; color: var(--on-dark); max-width: none; }
.promo p { margin: 10px 0 0; color: var(--on-dark-soft); max-width: 36em; }

.empty { text-align: center; padding: 50px 20px; color: var(--ink-soft); }
.empty .display-md { color: var(--ink); margin-bottom: 8px; }

/* ---------- 11. Ticker --------------------------------------------------- */
.ticker { border-block: 0.5px solid var(--line); background: var(--surface-dim); overflow: hidden; }
.ticker-track { display: flex; width: max-content; gap: 0; }
.ticker-track span { display: inline-flex; align-items: center; gap: 22px; padding: 16px 22px 16px 0; font-family: var(--font-display); font-style: italic; font-size: 1.35rem; white-space: nowrap; }
.ticker-track span::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .ticker-track { animation: ticker 38s linear infinite; } }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- 12. How it works --------------------------------------------- */
.steps-section { padding: clamp(56px, 8vw, 100px) 0; }
.steps-head { display: grid; gap: 14px; max-width: 720px; margin-bottom: 36px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.step { background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r-lg); padding: 26px 24px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.step::before { counter-increment: step; content: counter(step); position: absolute; right: 14px; top: -14px; font-family: var(--font-display); font-style: italic; font-size: 7rem; line-height: 1; color: var(--surface-dim); }
.step > * { position: relative; }
.step .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent-dark); margin-bottom: 16px; }
.step h3 { font-size: 1.6rem; line-height: 1.05; }
.step p { margin: 8px 0 0; color: var(--ink-soft); }

/* ---------- 13. Final CTA band ------------------------------------------- */
.cta-band { padding: 0 0 clamp(56px, 8vw, 96px); }
.cta-card {
  position: relative; overflow: hidden; border-radius: clamp(24px, 4vw, 36px);
  background: linear-gradient(150deg, #CF7553, #A9533A); color: #FFF6EC;
  padding: clamp(36px, 7vw, 80px) clamp(24px, 6vw, 72px); text-align: center; display: grid; justify-items: center; gap: 18px;
}
.cta-card::before { content: ""; position: absolute; inset: 0; opacity: .5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='22'%3E%3Cpath d='M3 4 L13 17 L23 4' fill='none' stroke='%23FFF6EC' stroke-opacity='.10' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.cta-card > * { position: relative; }
.cta-card h2 { font-size: clamp(2.3rem, 6vw, 4.2rem); line-height: .95; max-width: 14ch; }
.cta-card p { margin: 0; color: rgba(255, 246, 236, .86); max-width: 32em; }
.cta-card .eyebrow { color: #FCE0BF; }

/* ---------- 14. Footer --------------------------------------------------- */
.site-footer { border-top: 0.5px solid var(--line); padding: 36px 0 110px; font-size: .9rem; color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 860px) { .site-footer { padding-bottom: 40px; } }

/* ---------- 15. Sticky mobile CTA --------------------------------------- */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 22px;
  background: color-mix(in srgb, var(--hero-ink) 94%, transparent); color: var(--on-dark);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .45);
  transform: translateY(140%); transition: transform .45s var(--ease-spring);
}
.sticky-cta.is-visible { transform: none; }
.sticky-cta .app-ico { width: 42px; height: 42px; flex: none; border-radius: 11px; }
.sticky-cta .t { flex: 1; min-width: 0; line-height: 1.2; }
.sticky-cta .t b { display: block; font-size: .95rem; }
.sticky-cta .t span { font-size: .8rem; color: var(--on-dark-soft); }
.sticky-cta .btn { --h: 44px; padding: 0 1.1em; font-size: .92rem; }
@media (min-width: 860px) { .sticky-cta { display: none; } }

/* ---------- 16. Detail page --------------------------------------------- */
.crumbs { padding: 18px 0 6px; font-size: .88rem; color: var(--ink-soft); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ink-faint); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.detail { padding: 10px 0 64px; }
.detail .wrap { display: grid; gap: 30px; }
@media (min-width: 960px) { .detail .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: start; } }
.detail-media { position: relative; }
@media (min-width: 960px) { .detail-media { position: sticky; top: 88px; } }
.detail-media .frame { border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.detail-media .stamp {
  position: absolute; z-index: 2; right: 14px; top: 14px; width: 92px; height: 92px; transform: rotate(10deg);
  filter: drop-shadow(0 10px 16px rgba(42, 36, 29, .25));
}
.media-note { display: flex; align-items: center; gap: 8px; margin: 14px 4px 0; font-size: .86rem; color: var(--ink-soft); }

.detail-copy { display: grid; gap: 18px; align-content: start; }
.detail-copy h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: .95; letter-spacing: -0.02em; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 13px; border-radius: 999px; background: var(--surface); border: 0.5px solid var(--line-strong); font-size: .88rem; font-weight: 500; }
.pill svg { width: 15px; height: 15px; color: var(--accent-dark); }
.detail-copy .lede { max-width: none; }

.facts { margin: 4px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
@media (min-width: 560px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fact { padding: 14px 16px 15px; border-top: 0.5px solid var(--line); border-left: 0.5px solid var(--line); margin: -0.5px 0 0 -0.5px; }
.fact:last-child:nth-child(odd) { grid-column: span 2; }
@media (min-width: 560px) {
  .fact:last-child:nth-child(odd) { grid-column: auto; }
  .fact:last-child:nth-child(3n+1) { grid-column: span 3; }
  .fact:last-child:nth-child(3n+2) { grid-column: span 2; }
}
.fact dt { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.fact dd { margin: 5px 0 0; font-family: var(--font-display); font-style: italic; font-size: 1.32rem; line-height: 1.1; display: flex; align-items: center; gap: 7px; }

.app-card {
  position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--hero-ink); color: var(--on-dark);
  padding: clamp(24px, 4vw, 32px); display: grid; gap: 16px; box-shadow: var(--shadow-lg);
}
.app-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 100% 0%, rgba(197,106,74,.55), transparent 52%), radial-gradient(circle at 0% 100%, rgba(143,164,130,.30), transparent 48%); }
.app-card > * { position: relative; }
.app-card .eyebrow { color: var(--wheat); }
.app-card h2 { font-size: clamp(1.8rem, 3.6vw, 2.3rem); line-height: 1.02; }
.app-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 560px) { .app-card ul { grid-template-columns: 1fr 1fr; } }
.app-card li { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.app-card li .ck { width: 26px; height: 26px; flex: none; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 246, 236, .10); border: 0.5px solid rgba(255, 246, 236, .16); color: var(--wheat); }
.app-card .btn { width: 100%; }
.app-card .fine { margin: 0; text-align: center; font-size: .82rem; color: var(--on-dark-soft); }

/* locked preview teaser */
.locked { position: relative; border-radius: var(--r-lg); background: var(--surface); border: 0.5px solid var(--line); overflow: hidden; }
.locked .rows { padding: 18px 20px; display: grid; gap: 12px; filter: blur(5px); user-select: none; }
.locked .row { display: flex; gap: 14px; align-items: center; }
.locked .row b { font-size: .8rem; color: var(--accent-dark); width: 34px; }
.locked .bar { height: 10px; border-radius: 6px; background: var(--surface-dim); }
.locked .lock { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 30%, transparent), color-mix(in srgb, var(--surface) 88%, transparent)); }
.locked .lock span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; background: var(--surface); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow-sm); border: 0.5px solid var(--line); }

.related { padding: 0 0 72px; }
.related .grid { margin-top: 22px; }

/* ---------- 17. Reveal on scroll (progressive enhancement) --------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0ms); }
  .js .reveal.in { opacity: 1; transform: none; }
}
