/* PLOK — design tokens and styles. Source of truth: DESIGN.md */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens: light theme (default) ---------- */
:root {
  --graphite: #0E0F0F;
  --graphite-2: #1C1D1D;
  --bone: #EDEAE3;
  --stone: #8C8A84;
  --lime: #CDEB3F;

  --bg: var(--bone);
  --surface: #E5E2DB;          /* bone + 8% stone */
  --ink: var(--graphite);
  --muted: #5A5955;            /* stone + 40% graphite: 5.8:1 on bone, 5.4:1 on surface */
  --line: rgb(14 15 15 / .12);
  --band: var(--graphite);
  --band-ink: var(--bone);
  --band-muted: var(--stone);
  --band-surface: var(--graphite-2);
  --lime-hover: color-mix(in srgb, var(--lime) 82%, var(--bone));
  --on-lime: var(--graphite);
  --focus: var(--graphite);

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-xl: 32px;
  --r-l: 24px;
  --r-m: 16px;
  --r-pill: 999px;

  --wrap: 1240px;
  --gutter: 20px;
  --section-y: clamp(96px, 12vw, 168px);
  --head-gap: clamp(40px, 5vw, 64px);
  --header-h: 72px;

  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

/* ---------- Dark theme ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--graphite);
    --surface: var(--graphite-2);
    --ink: var(--bone);
    --muted: var(--stone);
    --line: rgb(237 234 227 / .12);
    --band: var(--graphite-2);
    --band-surface: color-mix(in srgb, var(--graphite-2) 94%, var(--bone));
    --focus: var(--lime);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--graphite);
  --surface: var(--graphite-2);
  --ink: var(--bone);
  --muted: var(--stone);
  --line: rgb(237 234 227 / .12);
  --band: var(--graphite-2);
  --band-surface: color-mix(in srgb, var(--graphite-2) 94%, var(--bone));
  --focus: var(--lime);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);                 /* overscroll / rubber-band area matches the page */
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

h1 { font-size: clamp(44px, 7.2vw, 104px); line-height: .98; letter-spacing: -.035em; }
h2 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -.03em; }
h3 { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.2; letter-spacing: -.01em; font-weight: 600; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto;
  /* landscape iPhone: keep content out of the notch / Dynamic Island */
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
}

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--lime); color: var(--on-lime); padding: 12px 20px; border-radius: var(--r-pill);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--muted); max-width: 34ch; }
.nw { white-space: nowrap; }
.byn { display: inline-block; width: .6em; height: .74em; vertical-align: -.01em; fill: currentColor; overflow: visible; }
.price { font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 28px;
  border-radius: var(--r-pill); border: 1.5px solid transparent;
  font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--lime); color: var(--on-lime); }
.btn-primary:hover { background: var(--lime-hover); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.link-arrow {
  display: inline-block; padding: 10px 0;
  font-weight: 600; text-decoration: underline 1.5px;
  text-decoration-color: transparent; text-underline-offset: 6px;
  transition: text-decoration-color .25s var(--ease);
}
.link-arrow::after { content: "→"; display: inline-block; margin-left: 8px; transition: transform .2s var(--ease); }
.link-arrow:hover { text-decoration-color: currentColor; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.logo svg { display: block; }
.header-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: var(--r-pill);
  background: transparent; border: 0; cursor: pointer; color: var(--ink); text-decoration: none;
  transition: background-color .2s;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
.cart-count {
  position: absolute; top: 4px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--lime); color: var(--on-lime);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* mobile nav: full-screen panel */
.main-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 40;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 32px max(var(--gutter), env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  overscroll-behavior: contain;
  background: var(--bg);
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
}
.main-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.main-nav ul { display: grid; gap: 4px; }
.main-nav ul a {
  display: block; padding: 10px 0; font-size: 32px; font-weight: 700; letter-spacing: -.02em;
  text-decoration: none;
}
.nav-cta { width: 100%; }
.burger .i-close { display: none; }
.burger[aria-expanded="true"] .i-open { display: none; }
.burger[aria-expanded="true"] .i-close { display: block; }
body.nav-open { overflow: hidden; }

@media (min-width: 1000px) {
  .burger { display: none; }
  .main-nav {
    position: static; flex-direction: row; align-items: center; padding: 0; gap: 0;
    background: none; visibility: visible; opacity: 1; transform: none; transition: none;
    margin-left: 32px;
  }
  .main-nav ul { display: flex; gap: 4px; }
  .main-nav ul a {
    padding: 10px 14px; font-size: 15px; font-weight: 600; letter-spacing: 0;
    border-radius: var(--r-pill); transition: background-color .2s;
  }
  .main-nav ul a:hover { background: var(--surface); }
  .nav-cta { display: none; }
  .header-tools { order: 3; }
}

/* ---------- Media slots (Flow renders → real photos) ---------- */
.media {
  position: relative; overflow: hidden;
  aspect-ratio: var(--ar, 4 / 3);
  border-radius: var(--r-l);
  background: var(--surface);
  isolation: isolate;
}
.media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
/* placeholder while the file is not there yet: shows the expected file name */
.media.is-missing img { visibility: hidden; }
.media.is-missing::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: clamp(28px, 12%, 72px); aspect-ratio: 1;
  transform: translate(-50%, -60%); border-radius: 50%;
  border: 2px solid var(--muted); opacity: .45;
}
.media.is-missing::after {
  content: attr(data-file);
  position: absolute; left: 0; right: 0; bottom: 14px; padding: 0 14px;
  font-size: 12px; font-weight: 600; color: var(--muted); text-align: center;
  overflow-wrap: anywhere;
}
.media-xl, .media-hero { border-radius: var(--r-xl); }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-tight { padding-top: calc(var(--section-y) * .6); }
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: var(--head-gap); }
.section > .wrap > h2 { margin-bottom: var(--head-gap); }
@media (min-width: 900px) {
  .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 40px; }
  .section-head h2 { max-width: 16ch; }
  .section-head .link-arrow { max-width: 32ch; flex-shrink: 0; }
}

/* ---------- Hero ---------- */
.hero { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 64px); padding: clamp(24px, 4vw, 56px) 0 calc(var(--section-y) * .6); }
.hero-grid { display: grid; gap: 24px; grid-template-areas: "head" "media" "copy"; }
.hero-head { grid-area: head; display: grid; gap: 16px; }
.media-hero { grid-area: media; }
.hero-copy { grid-area: copy; display: grid; gap: 24px; justify-items: start; }
.hero h1 { hyphens: manual; max-width: 12ch; }
.hero .lead { max-width: 40ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; }
.hero .actions .btn { flex: 1 1 100%; }
.preorder {
  max-width: 46ch; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 15px; line-height: 1.5; color: var(--muted);
}
.preorder b { display: block; margin-bottom: 2px; color: var(--ink); font-weight: 600; }

/* assortment line under the hero */
.hero-cats ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; border-top: 1px solid var(--line); }
.hero-cats li { border-bottom: 1px solid var(--line); }
.hero-cats a {
  display: flex; align-items: center; min-height: 52px;
  font-size: clamp(16px, 1.35vw, 19px); font-weight: 600; letter-spacing: -.01em;
  color: var(--ink); text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: 6px; text-decoration-thickness: 2px;
  transition: text-decoration-color .2s var(--ease);
}
.hero-cats a:hover { text-decoration-color: var(--lime); }
@media (min-width: 640px) {
  .hero-cats ul { display: flex; flex-wrap: wrap; column-gap: 32px; padding-top: 8px; }
  .hero-cats li { border-bottom: 0; }
  .hero-cats a { min-height: 44px; }
}
@media (min-width: 640px) {
  .hero .actions .btn { flex: 0 0 auto; }
}
@media (min-width: 1000px) {
  .hero { min-height: calc(100svh - var(--header-h)); gap: clamp(24px, 4svh, 56px); padding: clamp(16px, 4svh, 56px) 0 clamp(16px, 3svh, 40px); }
  .hero-copy { gap: clamp(16px, 2.6svh, 24px); }
  .hero-grid {
    flex: 1; align-content: center;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-rows: auto auto;
    grid-template-areas: "head media" "copy media";
    column-gap: clamp(40px, 5vw, 96px); row-gap: clamp(16px, 3svh, 28px);
  }
  .hero-head { align-self: end; }
  .hero-copy { align-self: start; }
  .media-hero { align-self: center; max-height: calc(100svh - var(--header-h) - 160px); min-height: 320px; }
  .hero .preorder { padding-top: 14px; }
  .hero h1 { font-size: clamp(56px, min(6.4vw, 11svh), 104px); }
  .hero-cats ul { justify-content: space-between; column-gap: 24px; }
}

/* ---------- Cards ---------- */
.cards { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: 1fr; }
.grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) and (max-width: 999px) {
  .grid-3 .card-link { display: grid; grid-template-columns: 5fr 6fr; }
  .grid-3 .card .media { aspect-ratio: auto; min-height: 100%; }
}
@media (min-width: 1000px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
/* 5 accessories without orphans: 2+2+1 wide on phones, 3+2 on tablets, 5 in a row on desktop */
@media (max-width: 767px) {
  .grid-5 > li:last-child { grid-column: 1 / -1; }
  .grid-5 > li:last-child .card-link { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .grid-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
  .grid-5 > li { grid-column: span 2; }
  .grid-5 > li:nth-child(n+4) { grid-column: span 3; }
  .grid-5 > li:nth-child(n+4) .media { aspect-ratio: 3 / 2; }
}
@media (min-width: 1100px) {
  .grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
}
/* 6 accessories: 2x3 on phones, 3x2 on tablets, 6 in a row on desktop */
.grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.card { background: var(--surface); border-radius: var(--r-l); overflow: hidden; transition: transform .25s var(--ease); }
.card:hover { transform: translateY(-2px); }
.card:hover .media img { transform: scale(1.03); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card .media { border-radius: 0; }
.card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 24px; }
.card-sm .card-body { padding: 16px 18px 20px; gap: 4px; }
.card-sm h3 { font-size: 17px; }
.card-sm .price { font-size: 16px; color: var(--muted); font-weight: 600; }
.card-text { color: var(--muted); }
.tag { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.more { font-weight: 600; font-size: 15px; white-space: nowrap; }
.price { white-space: nowrap; }
.more::after { content: " →"; display: inline-block; transition: transform .2s var(--ease); }
.card:hover .more::after { transform: translateX(4px); }

/* ---------- Dark band sections ---------- */
.section-band { padding: calc(var(--section-y) * .5) 0; }
.band {
  background: var(--band); color: var(--band-ink);
  border-radius: var(--r-l);
  padding: clamp(56px, 8vw, 120px) clamp(24px, 6vw, 96px);
  --ink: var(--band-ink); --muted: var(--band-muted); --surface: var(--band-surface);
  --focus: var(--lime);
  --line: rgb(237 234 227 / .14);
}
@media (min-width: 768px) { .band { border-radius: var(--r-xl); } }
.why-grid { display: grid; gap: 40px; margin-top: var(--head-gap); }
.why-grid li { display: grid; gap: 12px; align-content: start; padding-top: 24px; border-top: 1px solid var(--line); }
.why-num { font-size: 14px; font-weight: 700; color: var(--lime); letter-spacing: .08em; }
.why-grid p { color: var(--muted); max-width: 46ch; }
@media (min-width: 768px) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 48px; } }

/* ---------- Starter set ---------- */
.set-grid { display: grid; gap: 32px; align-items: center; }
.set-copy { display: grid; gap: 20px; justify-items: start; }
.set-copy > p:first-of-type { color: var(--muted); font-size: 18px; max-width: 40ch; }
.set-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.price-big { font-size: clamp(32px, 3.4vw, 44px); letter-spacing: -.02em; }
.old { color: var(--muted); }
@media (min-width: 1000px) { .set-grid { grid-template-columns: 7fr 5fr; gap: clamp(40px, 5vw, 80px); } }
@media (max-width: 639px) { .set-copy .btn { width: 100%; } }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 16px; counter-reset: none; }
.steps li { display: grid; gap: 12px; align-content: start; padding: 32px 28px; background: var(--surface); border-radius: var(--r-l); }
.step-num {
  display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px;
  border-radius: 50%; background: var(--lime); color: var(--on-lime); font-weight: 700; font-size: 18px;
}
.steps p { color: var(--muted); }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: var(--head-gap); }
.faq-grid > h2 { margin-bottom: 0; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  min-height: 72px; padding: 20px 0; cursor: pointer; list-style: none;
  font-size: clamp(17px, 1.4vw, 20px); font-weight: 600; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 14px no-repeat,
    var(--surface);
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 56px 28px 0; color: var(--muted); max-width: 62ch; }
@media (min-width: 1000px) {
  .faq-grid { grid-template-columns: 4fr 8fr; gap: 80px; align-items: start; }
}

/* ---------- Form ---------- */
.form-grid { display: grid; gap: 40px; }
.form-copy { display: grid; gap: 16px; align-content: start; }
.form-copy p { color: var(--muted); font-size: 18px; max-width: 34ch; }
.alt-contact a { display: inline-block; padding: 10px 0; color: var(--lime); font-weight: 600; }
.lead-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.field input[type="text"], .field textarea {
  width: 100%; min-height: 56px; padding: 14px 18px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1.5px solid transparent; border-radius: var(--r-m);
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field textarea:hover { border-color: var(--line); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--lime); }
.field [aria-invalid="true"] { border-color: var(--ink); }
.field-error { font-size: 14px; font-weight: 600; color: var(--ink); }
.field-error::before { content: "! "; }
.field-check { grid-template-columns: 24px 1fr; align-items: start; column-gap: 12px; }
.field-check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--lime); }
.field-check label { font-weight: 400; color: var(--muted); }
.field-check label a { color: var(--ink); padding: 4px 0; }
.field-check .field-error { grid-column: 2; }
.lead-form .btn { width: 100%; }
.form-status { font-size: 15px; min-height: 1.6em; }
@media (min-width: 1000px) {
  .form-grid { grid-template-columns: 5fr 6fr; gap: 80px; }
  .lead-form .btn { width: auto; justify-self: start; }
}

/* ---------- Footer ---------- */
.site-footer { padding: clamp(72px, 9vw, 120px) 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; display: grid; gap: 16px; justify-items: start; }
.footer-note { color: var(--muted); }
.footer-title { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.site-footer ul a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 500; }
.site-footer ul a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; }
  .footer-brand { grid-column: auto; }
}

/* ---------- Hero entrance (once, on load) ---------- */
@keyframes enter { from { opacity: 0; transform: translateY(16px); } }
[data-enter] > * { animation: enter .7s var(--ease) both; }
[data-enter] > *:nth-child(2) { animation-delay: .12s; }
[data-enter] > *:nth-child(3) { animation-delay: .2s; }

/* ---------- Tablet / desktop spacing ---------- */
@media (min-width: 768px) {
  :root { --gutter: 40px; --header-h: 80px; }
  body { font-size: 17px; }
}


/* =========================================================
   Inner pages
   ========================================================= */

/* ---------- Breadcrumbs + page head ---------- */
.crumbs { padding-top: clamp(16px, 3vw, 28px); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 14px; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; opacity: .6; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.crumbs [aria-current] { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.page-head { display: grid; gap: 20px; justify-items: start; padding-block: clamp(16px, 3vw, 40px) clamp(56px, 7vw, 96px); }
.page-head h1 { font-size: clamp(40px, 6vw, 88px); max-width: 16ch; }
.page-head .lead { max-width: 52ch; }
.section-first { padding-top: 0; }

/* ---------- Text blocks ---------- */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(28px, 3vw, 40px); margin-top: 2.2em; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { display: grid; gap: .55em; padding-left: 1.2em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--muted); }
.prose a { text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.prose a:hover { text-decoration-color: transparent; }
.prose strong { font-weight: 600; }
.prose .table-wrap { margin-top: 1.6em; }
.tip { padding: 24px 28px; border-radius: var(--r-m); background: var(--surface); }
.tip b { display: block; margin-bottom: 4px; }
.split { display: grid; gap: 40px; }
@media (min-width: 1000px) { .split { grid-template-columns: 4fr 8fr; gap: 80px; align-items: start; } }
.split > h2 { margin: 0; }

/* grid children must be allowed to shrink below wide tables */
.article > *, .split > *, .product > *, .cart > *, .faq-grid > *, .simple > *, .page-head > *, .article-head > *, .buybox > * { min-width: 0; max-width: 100%; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-l); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 560px; }
.table th, .table td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table tr:last-child > * { border-bottom: 0; }
.table thead th { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.table tbody th { font-weight: 600; color: var(--muted); }
.table-spec { min-width: 0; }
.table-spec th { width: 42%; }
.table .total > * { font-weight: 700; color: var(--ink); }

/* ---------- Catalog cards with actions ---------- */
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.card-actions .price { margin-right: auto; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.card h3 a { text-decoration: none; }
.has-actions h3 a::after { content: ""; position: absolute; inset: 0; }
.card.has-actions { position: relative; }
.card.has-actions .card-actions { position: relative; z-index: 1; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card.has-actions { display: flex; flex-direction: column; }


.grid-2 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .grid-with { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-with .media { aspect-ratio: 4 / 3; } }

/* ---------- Product page ---------- */
.product { display: grid; gap: 32px; padding-bottom: var(--section-y); }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start; }
.gallery .media { border-radius: var(--r-m); }
.gallery .media:first-child { grid-column: 1 / -1; border-radius: var(--r-l); }
.gallery-2 { grid-template-columns: 1fr; }
.gallery .media.is-missing::after { font-size: 11px; bottom: 8px; padding: 0 8px; }
.gallery .media:first-child.is-missing::after { font-size: 12px; bottom: 14px; }
.buybox { display: grid; gap: 20px; align-content: start; justify-items: start; }
.buybox h1 { font-size: clamp(36px, 4.4vw, 60px); }
.buybox .price-big { font-size: clamp(32px, 3vw, 40px); }
.buybox .for-whom { font-size: 18px; color: var(--muted); max-width: 46ch; }
.buy-form { display: grid; gap: 20px; width: 100%; justify-items: start; }
.buy-actions { display: grid; gap: 12px; width: 100%; max-width: 420px; }
.buy-actions .btn { width: 100%; }
.buy-notes { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.buy-notes li::before { content: "— "; }
.add-status { font-size: 15px; min-height: 1.5em; }
.add-status a { font-weight: 600; }
.variants { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.variants legend { width: 100%; margin-bottom: 10px; padding: 0; font-size: 14px; font-weight: 600; }
.variants label { position: relative; }
.variants input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.variants span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
  border: 1.5px solid var(--line); border-radius: var(--r-pill); font-weight: 600; font-size: 15px;
  transition: border-color .2s, background-color .2s, color .2s;
}
.variants label:hover span { border-color: var(--ink); }
.variants input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.variants input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (min-width: 1000px) {
  .product { grid-template-columns: 7fr 5fr; gap: clamp(40px, 5vw, 80px); align-items: start; }
  .buybox { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- Feature (recommended model) ---------- */
.feature { display: grid; background: var(--surface); border-radius: var(--r-l); overflow: hidden; }
.feature .media { border-radius: 0; }
.feature-body { display: grid; gap: 16px; align-content: center; justify-items: start; padding: clamp(24px, 4vw, 56px); }
.feature-body > p { color: var(--muted); }
.feature-body .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) { .feature { grid-template-columns: 6fr 5fr; } }

/* ---------- Numbered points (light) ---------- */
.points { display: grid; gap: 32px; }
.points li { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 1px solid var(--line); }
.points p { color: var(--muted); }
@media (min-width: 768px) { .points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; } }
@media (min-width: 1100px) { .points-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Promo (starter set teaser) ---------- */
.promo { display: grid; gap: 24px; align-items: center; padding: clamp(28px, 4vw, 56px); border-radius: var(--r-l); background: var(--surface); }
.promo h2 { font-size: clamp(26px, 3vw, 40px); }
.promo p { color: var(--muted); max-width: 52ch; margin-top: 8px; }
@media (min-width: 900px) { .promo { grid-template-columns: 1fr auto; gap: 48px; } }

.link-row { display: flex; flex-wrap: wrap; gap: 4px 32px; }

/* ---------- Blog ---------- */
.grid-blog { display: grid; gap: 16px; }
@media (min-width: 768px) {
  .grid-blog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .grid-blog > li:first-child { grid-column: 1 / -1; }
  .grid-blog > li:first-child .card-link { display: grid; grid-template-columns: 7fr 5fr; }
  .grid-blog > li:first-child .card-body { justify-content: center; padding: clamp(24px, 4vw, 56px); }
  .grid-blog > li:first-child h3 { font-size: clamp(24px, 2.4vw, 34px); }
}
.article-head { display: grid; gap: 20px; justify-items: start; padding-block: clamp(16px, 3vw, 40px) clamp(40px, 5vw, 64px); }
.article-head h1 { font-size: clamp(36px, 5.2vw, 76px); max-width: 18ch; }
.article-head .lead { max-width: 56ch; }
.byline { font-size: 15px; color: var(--muted); }
.article-cover { margin-bottom: clamp(48px, 6vw, 88px); }
.article { display: grid; gap: 40px; padding-bottom: var(--section-y); }
.toc { font-size: 15px; }
.toc p { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc a { display: flex; align-items: center; min-height: 44px; padding: 4px 0; text-decoration: none; color: var(--muted); border-bottom: 1px solid var(--line); }
.toc a:hover { color: var(--ink); }
.article .prose > h2:first-child { margin-top: 0; }
.product-inline { display: grid; gap: 12px; padding: 28px; border-radius: var(--r-l); background: var(--surface); }
.product-inline p { color: var(--muted); }
.product-inline .link-row a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
@media (min-width: 1000px) {
  .article { grid-template-columns: 3fr 8fr; gap: 80px; align-items: start; }
  .toc { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- Contacts ---------- */
.contact-cards { display: grid; gap: 16px; }
.contact-card {
  display: grid; gap: 6px; padding: 32px; border-radius: var(--r-l); background: var(--surface);
  text-decoration: none; transition: transform .25s var(--ease);
}
.contact-card:hover { transform: translateY(-2px); }
.contact-card span { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact-card strong { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.02em; }
@media (min-width: 768px) { .contact-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }

/* ---------- Cart ---------- */
.cart { display: grid; gap: 40px; padding-bottom: var(--section-y); }
.cart-line { display: grid; grid-template-columns: 88px 1fr; gap: 8px 16px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-line:first-child { border-top: 1px solid var(--line); }
.cart-line .media { border-radius: var(--r-m); grid-row: span 2; }
.cart-line .media.is-missing::after { content: none; }
.cart-line h2 { font-size: 18px; letter-spacing: -.01em; font-weight: 600; }
.cart-line h2 a { text-decoration: none; }
.cart-line-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-pill); }
.qty button { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; font-size: 20px; border-radius: var(--r-pill); }
.qty button:hover { background: var(--surface); }
.qty output { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.remove { min-height: 44px; border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; font-size: 15px; }
.remove:hover { color: var(--ink); }
.cart-line .price { margin-left: auto; }
.cart-sum { display: grid; gap: 8px; padding: 24px 0; }
.cart-sum p { display: flex; justify-content: space-between; gap: 16px; }
.cart-sum .muted { color: var(--muted); font-size: 15px; }
.cart-sum .total { font-size: 22px; font-weight: 700; padding-top: 12px; border-top: 1px solid var(--line); }
.cart-empty { display: grid; gap: 20px; justify-items: start; padding: 24px 0; }
.cart-empty p { color: var(--muted); font-size: 18px; }
.cart-empty .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.order-box { padding: clamp(24px, 4vw, 48px); border-radius: var(--r-l); background: var(--surface); display: grid; gap: 20px; align-content: start; }
.order-box .field input[type="text"], .order-box .field textarea { background: var(--bg); }
.order-box > p { color: var(--muted); }
.order-box h2 { font-size: clamp(28px, 2.6vw, 36px); }
.radio-row { display: grid; gap: 4px; }
.radio-row label { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 500; font-size: 16px; cursor: pointer; }
.radio-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { font-size: 14px; font-weight: 600; margin-bottom: 4px; padding: 0; }
.cart-empty[hidden], .cart-body[hidden], .order-box[hidden] { display: none; }
@media (min-width: 1000px) {
  .cart { grid-template-columns: 7fr 5fr; gap: 80px; align-items: start; }
  .order-box { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- Simple pages (thanks, 404, stubs) ---------- */
.simple { min-height: 60svh; display: grid; align-content: center; gap: 24px; justify-items: start; padding-block: var(--section-y); }
.simple h1 { font-size: clamp(26px, 8vw, 80px); max-width: 16ch; }
.simple p { color: var(--muted); font-size: 18px; max-width: 46ch; }
.simple .actions { display: flex; flex-wrap: wrap; gap: 12px; }

.main-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Infographics (blog) ---------- */
.fig { margin-top: 2em; padding: clamp(16px, 4vw, 40px); background: var(--surface); border-radius: var(--r-l); }
.prose .fig + * { margin-top: 1.6em; }
.prose > h2 + .fig { margin-top: 1.1em; }
.fig-title { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.fig svg { display: block; width: 100%; height: auto; max-width: var(--fig-w, 100%); margin-inline: auto; }
.fig figcaption { margin-top: 20px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.ig text { font-family: var(--font); font-weight: 500; fill: var(--ink); }
.ig .t-muted { fill: var(--muted); }
.ig .t-b { font-weight: 700; }
.ig .on-lime { fill: var(--on-lime); }
.ig .f-ink { fill: var(--ink); }
.ig .f-bg { fill: var(--bg); }
.ig .f-surface { fill: var(--surface); }
.ig .f-lime { fill: var(--lime); }
.ig .f-lime-soft { fill: color-mix(in srgb, var(--lime) 55%, var(--bg)); }
.ig .s-ink { stroke: var(--ink); fill: none; }
.ig .f-lime.s-ink { fill: var(--lime); }
.ig .s-muted { stroke: var(--muted); fill: none; }
.ig .f-lime.s-ink { stroke: var(--graphite); }

.prose .fig-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.fig-legend li { display: flex; align-items: center; gap: 10px; }
.key { width: 24px; border-top: 5px solid var(--ink); }
.key-dash { border-top: 2px dashed var(--ink); }
.key-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--lime); border: 1.5px solid var(--graphite); }
.key-dot.key-ink { background: var(--ink); border-color: var(--ink); }
.key-tri { width: 0; height: 0; border-block: 6px solid transparent; border-right: 10px solid var(--ink); }

.prose .fig-steps { display: grid; gap: 12px; margin-top: 24px; padding: 0; list-style: none; font-size: 15px; }
.fig-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.fig-steps span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: var(--on-lime); font-weight: 700; font-size: 14px; }

.fig-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; text-align: center; }
.fig-cols dt { font-weight: 700; font-size: 16px; }
.fig-cols dd { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); hyphens: auto; }
@media (max-width: 479px) { .fig-cols { gap: 8px; } .fig-cols dt { font-size: 14px; white-space: nowrap; } .fig-cols dd { font-size: 13px; } }

.wscale-ticks { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.wscale-ticks span:last-child { position: absolute; right: 0; top: 0; }
.wscale-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; height: 16px; }
.wscale-bar span { border-radius: 4px; }
.wscale-bar span:nth-child(1) { background: var(--lime); box-shadow: inset 0 0 0 1.5px var(--graphite); }
.wscale-bar span:nth-child(2) { background: var(--stone); }
.wscale-bar span:nth-child(3) { background: var(--ink); }

.prose .fig-path { display: grid; gap: 12px; padding: 0; list-style: none; }
.fig-path li { display: grid; grid-template-columns: 36px 1fr; gap: 4px 14px; align-content: start; padding: 18px; border-radius: var(--r-m); background: var(--bg); }
.fig-path li > * { grid-column: 2; }
.fig-path li > .step-num { grid-column: 1; grid-row: 1 / span 2; }
.fig-path .step-num { width: 36px; height: 36px; font-size: 15px; margin: 0; }
.fig-path .step-num-muted { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--muted); }
.fig-path p { font-size: 15px; line-height: 1.5; color: var(--muted); }
@media (min-width: 560px) { .prose .fig-path { grid-template-columns: 1fr 1fr; } }

.bars { display: grid; gap: 20px; }
.bar-row p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-size: 15px; margin-bottom: 8px; }
.bar-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { position: relative; height: 20px; }
.bar > span { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; }
.bar-rent { background: var(--stone); }
.bar-range { border-radius: 0 4px 4px 0 !important; margin-left: 2px; background: repeating-linear-gradient(135deg, var(--stone) 0 2px, transparent 2px 7px); box-shadow: inset 0 0 0 1.5px var(--stone); }
.bar-own { background: var(--lime); box-shadow: inset 0 0 0 1.5px var(--graphite); }
