/* ============================================================
   HomeNest Building Materials — design system
   Preview build · 5U Website Vancouver
   Type scale, line-height tokens and CJK rules follow the
   preview-design-guide; contrast targets WCAG 2.2 AA.
   ============================================================ */

:root {
  /* color */
  --paper: #F4F3EC;
  --surface: #FFFFFF;
  --ink: #171B18;
  --ink-2: #4C544E;
  --line: #E5E4DC;
  --line-strong: #767E76;      /* form borders — ≥3:1 on white */
  --green: #3BD603;            /* brand vivid (logo) — large/UI + dark bg only */
  --green-ink: #1E7F02;        /* AA text green on paper/white */
  --green-soft: #EAF7E2;
  --sage: #E9EEE2;             /* section tone — whisper of the brand green */
  --stone: #EFEBDF;            /* section tone — warm greige */
  --dark: #141812;
  --dark-2: #1D231C;
  --dark-text: #C9CFC4;
  --dark-head: #F2F4EE;
  --error: #B3261E;

  /* line-height tokens (guide §1) */
  --lh-h1-single: 1.1;
  --lh-h1-wrap: 1.25;
  --lh-h2: 1.15;
  --lh-h3: 1.25;
  --lh-h4: 1.3;
  --lh-h5: 1.35;
  --lh-body: 1.7;
  --lh-lead: 1.5;
  --lh-ui: 1;

  /* misc */
  --radius: 6px;
  --radius-lg: 10px;
  --header-h: 72px;
  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.125rem;            /* 18px body */
  line-height: var(--lh-body);    /* 1.7 */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
a { color: var(--green-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
strong, b { font-weight: 600; }

/* ---------- headings (guide §1 heading map) ---------- */
h1, h2, h3, h4, h5 {
  margin: 0 0 0.5em;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: 3.5rem;   line-height: var(--lh-h1-wrap); }  /* 56 */
h2 { font-size: 2.25rem;  line-height: var(--lh-h2); }        /* 36 */
h3 { font-size: 1.5rem;   line-height: var(--lh-h3); }        /* 24 */
h4 { font-size: 1.125rem; line-height: var(--lh-h4); }        /* 18 */
h5 { font-size: 1rem;     line-height: var(--lh-h5); }        /* 16 */
@media (max-width: 760px) {
  h1 { font-size: 2.25rem; }   /* 36 — stays on scale */
  h2 { font-size: 1.5rem; }    /* 24 */
  h3 { font-size: 1.25rem; }   /* 20 */
}

.lead { font-size: 1.25rem; line-height: var(--lh-lead); color: var(--ink-2); }
.caption, figcaption, small { font-size: 0.875rem; line-height: 1.5; }
.muted { color: var(--ink-2); }
.mono { font-family: var(--font-mono); }

/* ---------- CJK typography (guide §4) ---------- */
/* Latin keeps Archivo; CJK glyphs fall through to Noto Sans SC. */
:lang(zh) {
  font-family: "Archivo", "Noto Sans SC", system-ui, sans-serif;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  font-synthesis: none;
}
:lang(zh) p, :lang(zh) .prose {
  text-align: justify;
  text-justify: inter-character;
  word-break: normal;
}
:lang(zh) :is(h1, h2, h3, h4, h5),
:lang(zh) .btn, :lang(zh) nav, :lang(zh) .label,
:lang(zh) .eyebrow, :lang(zh) .chip {
  word-break: keep-all;
  letter-spacing: 0;
}
:lang(zh) strong, :lang(zh) b { font-weight: 600; }
:lang(zh) em, :lang(zh) i { font-style: normal; font-weight: 600; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(zh) h4, :lang(zh) h5 { font-weight: 600; }

/* ---------- a11y helpers ---------- */
:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; border-radius: 2px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--green); }
.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: var(--radius); font-size: 1rem; line-height: var(--lh-ui);
  transition: top 0.15s;
}
.skip-link:focus { top: 12px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- layout ---------- */
.container { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.container-wide { max-width: 1360px; margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(72px, 9vw, 112px); }
.section-tight { padding-block: clamp(48px, 6vw, 72px); }
/* Subtle section tones to vary the paper flow. All are low-saturation and
   high-value, so dark ink text keeps its contrast and a white card still
   floats on each. Pick per section in the markup. */
.section-sage  { background: var(--sage); }
.section-stone { background: var(--stone); }
.section-white { background: var(--surface); }
/* Tinted sections float as inset rounded panels so paper shows around them —
   the tone reads as a distinct band with clear gaps, not a full-bleed stripe. */
.section-sage, .section-stone {
  margin: clamp(10px, 1.6vw, 22px) clamp(16px, 3.5vw, 44px);
  border-radius: 28px;
  padding-block: clamp(52px, 6vw, 80px);
}
@media (max-width: 560px) {
  .section-sage, .section-stone { border-radius: 20px; margin-inline: 12px; }
}
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .lead { margin-top: 12px; }
.split-head {
  display: flex; flex-wrap: wrap; gap: 16px 32px;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.split-head .section-head { margin-bottom: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.875rem; line-height: 1.5;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: ""; width: 10px; height: 10px;
  background: var(--green); border-radius: 2px; flex: none;
}
:lang(zh) .eyebrow { letter-spacing: 0; }  /* guide §4 — never track CJK */

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  font-family: inherit; font-size: 1rem; line-height: var(--lh-ui); font-weight: 600;
  border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { color: initial; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; }
.btn-green { background: var(--green); color: #0C1503; }
.btn-green:hover { background: #33BC02; color: #0C1503; }
.btn-ghost { background: transparent; color: var(--ink); border-color: #7C837B; }  /* ≥3:1 on paper/white/tints (1.4.11) */
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 18px; }
.btn-block { width: 100%; }
.btn .arr { font-family: var(--font-mono); }
.on-dark .btn-ghost { color: var(--dark-head); border-color: #4A524A; }
.on-dark .btn-ghost:hover { border-color: var(--dark-head); color: var(--dark-head); }
button { font-family: inherit; }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-block; padding: 4px 10px;
  font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.5;
  background: #EFF1EA; color: var(--ink);
  border-radius: 4px;
}
.badge {
  display: inline-block; padding: 3px 10px;
  font-size: 0.75rem; line-height: 1.5; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--green); color: #0C1503; border-radius: 4px;
}
:lang(zh) .badge { letter-spacing: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 243, 236, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-in {
  height: var(--header-h);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 32px; flex: none; }
.brand-word {
  font-weight: 800; font-size: 1.25rem; line-height: var(--lh-ui);
  letter-spacing: 0.01em; color: var(--ink);
}
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 14px;
  font-size: 1rem; line-height: var(--lh-ui); font-weight: 500;
  color: var(--ink); text-decoration: none; border-radius: 6px;
}
.main-nav a:hover { background: #EFF1EA; }
.main-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--green);
  border-radius: 6px 6px 0 0;
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch {
  display: inline-flex; align-items: center; white-space: nowrap;
  min-height: 44px; padding: 0 12px;
  font-family: var(--font-mono); font-size: 0.875rem; line-height: var(--lh-ui);
  color: var(--ink); text-decoration: none; border: 1px solid var(--line);
  border-radius: 6px; background: var(--surface);
}
.lang-switch:hover { border-color: var(--ink); color: var(--ink); }
.cart-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  font-size: 1rem; line-height: var(--lh-ui); font-weight: 600;
  color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
}
.cart-link:hover { border-color: var(--ink); color: var(--ink); }
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green); color: #0C1503;
  font-family: var(--font-mono); font-size: 0.75rem; line-height: var(--lh-ui); font-weight: 600;
  border-radius: 11px;
}
.nav-toggle {
  display: none;
  min-width: 44px; min-height: 44px;
  background: none; border: 1px solid var(--line); border-radius: 6px;
  align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
@media (max-width: 920px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 560px) {
  .header-in { gap: 12px; }
  .cart-link { padding: 0 10px; }
  .cart-link .cart-word { display: none; }
  .lang-switch, .cart-link { min-height: 40px; }
}
@media (max-width: 480px) {
  .site-header .brand-word { display: none; }  /* mark-only; full name lives in the drawer */
  .header-in { gap: 10px; }
}

/* mobile drawer */
.drawer { border: 0; padding: 0; margin: 0; max-width: none; max-height: none; }
.drawer::backdrop { background: rgba(20, 24, 18, 0.5); }
.drawer[open] {
  position: fixed; inset: 0 0 0 auto; width: min(360px, 92vw); height: 100dvh; height: 100vh;
  background: var(--paper); display: flex; flex-direction: column;
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.drawer-close {
  min-width: 44px; min-height: 44px; border: 1px solid var(--line);
  background: none; border-radius: 6px; cursor: pointer; font-size: 1rem; color: var(--ink);
}
.drawer nav { padding: 12px; overflow-y: auto; }
.drawer nav ul { list-style: none; margin: 0; padding: 0; }
.drawer nav a {
  display: block; padding: 14px 12px;
  font-size: 1.25rem; line-height: var(--lh-lead); font-weight: 600;
  color: var(--ink); text-decoration: none; border-radius: 6px;
}
.drawer nav a:hover { background: #EFF1EA; }
.drawer-foot { margin-top: auto; padding: 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; }

/* ---------- hero ---------- */
/* Deep forest-green text panel on the left dissolving into the full-brightness
   photo on the right. Veil stays ≥0.90 across the text column so light text
   clears AA; it reaches 0 by 70% to let the photo show in full colour.
   The h1 carries a soft shadow (below) so the headline holds its margin where
   its right edge crosses into the bright zone. */
.hero { position: relative; background: #0F3A16; }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(15, 58, 22, 0.95) 0%,
    rgba(15, 58, 22, 0.90) 36%,
    rgba(15, 58, 22, 0.62) 50%,
    rgba(15, 58, 22, 0) 70%);
}
.hero h1 { color: var(--dark-head); text-shadow: 0 1px 14px rgba(6, 20, 8, 0.55), 0 1px 2px rgba(6, 20, 8, 0.4); }
.hero .eyebrow { color: #E2E6DD; }
.hero .lead { color: #E2E6DD; }
.hero-checks li { color: #E2E6DD; }
.hero-checks svg { color: var(--green); }
.hero .btn-ghost { color: var(--dark-head); border-color: rgba(242, 244, 238, 0.42); }
.hero .btn-ghost:hover { border-color: var(--dark-head); color: var(--dark-head); }
.hero :focus-visible { outline-color: var(--green); }

.hero-in {
  position: relative; z-index: 1;
  min-height: clamp(540px, 74vh, 780px);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 64px;
}
.hero-copy { max-width: 620px; }
.hero-copy .lead { max-width: 480px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-checks {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  margin: 28px 0 0; padding: 0; list-style: none;
}
.hero-checks li {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 1rem; line-height: var(--lh-lead);
}
.hero-checks svg { flex: none; }
@media (max-width: 760px) {
  .hero { display: flex; flex-direction: column; }
  .hero-media { position: relative; height: 240px; order: 2; }
  .hero-media img { filter: none; }
  .hero-scrim { display: none; }
  .hero-in { min-height: 0; padding-block: 48px 40px; }
}
/* spec strip */
.specstrip { border-block: 1px solid #1C4423; background: #0D2F12; }
.specstrip-in {
  display: flex; flex-wrap: wrap;
  padding-block: 0;
}
.specstrip-item {
  flex: 1 1 auto;
  display: flex; flex-direction: column; gap: 2px;
  padding: 18px 24px;
  border-right: 1px solid #1C4423;
}
.specstrip-item:last-child { border-right: 0; }
.specstrip-item .k {
  font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.5; color: #8FE55C;
}
.specstrip-item .v { font-size: 1rem; line-height: var(--lh-lead); font-weight: 600; color: var(--dark-head); }
@media (max-width: 920px) {
  .specstrip-item { flex: 1 1 40%; border-bottom: 1px solid #1C4423; }
}

/* ---------- cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-cats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.grid-products { grid-template-columns: repeat(auto-fill, minmax(min(100%, 264px), 1fr)); gap: 28px 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 32px; }

.cat-card {
  position: relative; display: block;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); overflow: hidden;
  text-decoration: none; color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}
.cat-card:hover { border-color: var(--ink); transform: translateY(-2px); color: var(--ink); }
.cat-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-bottom: 1px solid var(--line); }  /* keep a visible edge under white-background product shots */
.cat-card-body { padding: 16px 18px 18px; }
.cat-card h3 { font-size: 1.25rem; line-height: var(--lh-h3); margin: 0 0 2px; }
.cat-card .caption { color: var(--ink-2); }
.cat-card .cat-n {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.5;
  background: rgba(250, 250, 247, 0.92); color: var(--ink);
  padding: 2px 8px; border-radius: 4px;
}

.product-card {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.product-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.product-card .media { position: relative; background: #fff; border-bottom: 1px solid var(--line); }  /* edge under white-background product shots */
.product-card .media img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.product-card .size-tag {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.5;
  background: var(--ink); color: #fff; padding: 2px 8px; border-radius: 4px;
}
.product-card .badge { position: absolute; top: 12px; right: 12px; }
.product-card .body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.product-card h3 { font-size: 1.25rem; line-height: var(--lh-h3); margin: 0; }
.product-card h3 a { color: var(--ink); text-decoration: none; }
.product-card h3 a::after { content: ""; position: absolute; inset: 0; }
.product-card h3 a:hover { color: var(--green-ink); }
.product-card .meta { color: var(--ink-2); font-size: 0.875rem; line-height: 1.5; }
.product-card .price-row {
  margin-top: auto; padding-top: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.product-card .price { display: flex; flex-direction: column; font-family: var(--font-mono); font-size: 1.125rem; font-weight: 500; line-height: var(--lh-lead); }
.product-card .price .caption { color: var(--ink-2); font-family: var(--font-sans); font-weight: 400; }
.product-card .add-btn { position: relative; z-index: 1; }

/* ---------- materials index table ---------- */
.mat-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
table { border-collapse: collapse; width: 100%; }
.mat-table th, .mat-table td { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.mat-table tbody tr:last-child td { border-bottom: 0; }
.mat-table th {
  font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.5;
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-2); background: #F4F5F0;
}
:lang(zh) .mat-table th { letter-spacing: 0; }
.mat-table td { font-size: 1rem; line-height: var(--lh-lead); }
.mat-table .mono { white-space: nowrap; }
.mat-table a { font-weight: 600; }
.mat-table tbody tr:hover { background: #FBFCF8; }

/* Materials index → stacked cards on phones (5 columns can't fit; this avoids
   the squished body + horizontal scroll). Each row is a labelled card. */
@media (max-width: 640px) {
  .section-sage .mat-table-wrap { overflow: visible; border: 0; background: transparent; border-radius: 0; }
  .section-sage .mat-table thead {
    position: absolute; width: 1px; height: 1px; margin: -1px;
    clip-path: inset(50%); overflow: hidden;
  }
  .section-sage .mat-table,
  .section-sage .mat-table tbody,
  .section-sage .mat-table tr,
  .section-sage .mat-table td { display: block; width: auto; }
  .section-sage .mat-table tr {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 14px;
  }
  .section-sage .mat-table td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
    padding: 11px 16px; border-bottom: 1px solid var(--line);
    text-align: right; white-space: normal;
  }
  .section-sage .mat-table td:last-child { border-bottom: 0; }
  .section-sage .mat-table td::before {
    content: attr(data-label);
    font-family: var(--font-mono); font-size: 0.875rem; font-weight: 400;
    color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em;
    text-align: left; flex: none; white-space: nowrap;
  }
}

/* comparison table */
/* size to its own rows and top-align — don't stretch to match the taller
   feature column beside it (that left dead space under the last row). */
.grid-2 > .mat-table-wrap { align-self: start; }
.cmp-table th, .cmp-table td { padding: 14px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp-table thead th { font-size: 1rem; line-height: var(--lh-lead); }
.cmp-table thead th:nth-child(2) { color: var(--green-ink); }
.cmp-table td:nth-child(2) { color: var(--green-ink); }  /* highlight the HomeNest column (colour only, not bold) */
.cmp-table td { font-size: 1rem; line-height: var(--lh-lead); }
.cmp-table td:first-child { font-weight: 600; white-space: nowrap; }
.cmp-table tbody tr:last-child td { border-bottom: 0; }

/* Feature stack — divided rows so the points read as one structured block,
   balancing the comparison table beside it. */
.feature-stack > h4 {
  margin: 20px 0 6px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.feature-stack > h4:first-of-type { margin-top: 24px; padding-top: 0; border-top: 0; }
.feature-stack > p { margin: 0; color: var(--ink-2); }

/* ---------- feature band ---------- */
.band { position: relative; overflow: hidden; border-radius: var(--radius-lg); }
.band img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.band-in {
  position: relative; z-index: 1;
  min-height: 420px; display: flex; align-items: flex-end;
  padding: 32px;
  background: linear-gradient(180deg, rgba(20, 24, 18, 0) 24%, rgba(20, 24, 18, 0.88) 78%);
}
.band-card { max-width: 520px; color: var(--dark-head); }
.band-card h3 { color: var(--dark-head); }
.band-card p { color: var(--dark-text); }

/* ---------- projects ---------- */
.proj-grid { columns: 3 300px; column-gap: 24px; }
.proj-item { break-inside: avoid; margin-bottom: 24px; }
.proj-item button {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius-lg); overflow: hidden;
}
.proj-item img { width: 100%; transition: transform 0.2s; border-radius: var(--radius-lg); }
.proj-item button:hover img { transform: scale(1.02); }
.proj-item figcaption { padding: 10px 4px 0; color: var(--ink-2); }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter-btn {
  min-height: 44px; padding: 0 18px;
  font-size: 1rem; line-height: var(--lh-ui); font-weight: 500;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 22px; cursor: pointer;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* lightbox */
.lightbox { border: 0; padding: 0; background: #0F120E; max-width: none; max-height: none; }
.lightbox::backdrop { background: rgba(12, 14, 11, 0.92); }
.lightbox[open] { position: fixed; inset: 0; width: 100vw; height: 100dvh; height: 100vh; display: flex; align-items: center; justify-content: center; }
.lightbox figure { max-width: min(1100px, 92vw); }
.lightbox img { max-height: 78vh; width: auto; max-width: 100%; margin-inline: auto; border-radius: var(--radius); }
.lightbox figcaption { color: var(--dark-text); text-align: center; padding-top: 14px; }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next {
  position: absolute; min-width: 48px; min-height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(250, 250, 247, 0.12); color: var(--dark-head);
  border: 1px solid rgba(250, 250, 247, 0.3); border-radius: 8px;
  font-size: 1.25rem; line-height: var(--lh-ui); cursor: pointer;
}
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 20px; top: 50%; translate: 0 -50%; }
.lightbox .lb-next { right: 20px; top: 50%; translate: 0 -50%; }
.lightbox :is(.lb-close, .lb-prev, .lb-next):hover { background: rgba(250, 250, 247, 0.24); }

/* ---------- split retail / wholesale ---------- */
.duo { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.duo-panel {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); padding: clamp(24px, 4vw, 40px);
  display: flex; flex-direction: column; gap: 8px;
}
.duo-panel.alt { background: var(--dark); border-color: var(--dark); }
.duo-panel.alt :is(h3, h4) { color: var(--dark-head); }
.duo-panel.alt p, .duo-panel.alt li { color: var(--dark-text); }
.duo-panel ul { margin: 8px 0 20px; padding: 0; list-style: none; display: grid; gap: 8px; }
.duo-panel li { display: flex; gap: 10px; align-items: baseline; font-size: 1rem; line-height: var(--lh-lead); }
.duo-panel li::before { content: "—"; font-family: var(--font-mono); color: var(--green-ink); flex: none; }
.duo-panel.alt li::before { color: var(--green); }
.duo-panel .btn { align-self: flex-start; margin-top: auto; }

/* ---------- stats ---------- */
/* About: widen the gutter between the copy and the stat blocks so the long
   paragraph lines don't crowd the numbers. */
.grid-2.about-grid { column-gap: clamp(44px, 6vw, 80px); }
.about-copy p:not(.eyebrow) { max-width: 52ch; }

.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; }
.stat { border-top: 1px solid var(--line); padding-top: 16px; }
.stat .n { display: block; font-family: var(--font-mono); font-size: 2.5rem; line-height: 1.15; font-weight: 500; letter-spacing: -0.02em; }
.stat .k { display: block; color: var(--ink-2); font-size: 0.875rem; line-height: 1.5; margin-top: 4px; }
@media (max-width: 400px) { .stat-row { gap: 24px 24px; } .stat .n { font-size: 2.25rem; } }

/* ---------- CTA band / ordering & support ---------- */
.on-dark { background: var(--dark); color: var(--dark-text); }
.on-dark :is(h1, h2, h3, h4, h5) { color: var(--dark-head); }
/* Links only — never buttons (a.btn keeps its own text colour). Use the vivid
   brand green; it clears AA (~9.5:1) on the dark background. */
.on-dark a:not(.btn) { color: var(--green); }
.on-dark a:not(.btn):hover { color: var(--dark-head); }
.support-grid { display: grid; gap: 40px 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.support-grid h3 { font-size: 1.25rem; }
.support-grid h4 { margin-top: 20px; }
.support-grid h5 { color: #A8B0A4; margin: 14px 0 4px; text-transform: uppercase; letter-spacing: 0.06em; }
:lang(zh) .support-grid h5 { letter-spacing: 0; }
.support-grid ul { list-style: none; padding: 0; margin: 0; }
.support-grid li { font-size: 1rem; line-height: var(--lh-lead); padding-block: 2px; }

/* ---------- footer ---------- */
.site-footer { background: var(--dark); color: var(--dark-text); }
.footer-in { padding-block: 64px 0; }
.footer-grid { display: grid; gap: 40px 32px; grid-template-columns: 2fr 1fr 1fr 1.4fr; padding-bottom: 48px; }
@media (max-width: 920px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 {
  font-size: 0.875rem; line-height: 1.5; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #A8B0A4; margin-bottom: 14px;
}
:lang(zh) .site-footer h2 { letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--dark-text); text-decoration: none; font-size: 1rem; line-height: var(--lh-lead); }
.site-footer a:hover { color: var(--dark-head); text-decoration: underline; text-underline-offset: 3px; }
.footer-brand .brand-word { color: var(--dark-head); }
.footer-brand p { font-size: 1rem; line-height: var(--lh-body); color: var(--dark-text); max-width: 300px; margin-top: 14px; }
.footer-contact li { font-size: 1rem; line-height: var(--lh-lead); }
.footer-bottom {
  border-top: 1px solid rgba(250, 250, 247, 0.14);
  padding-block: 22px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between;
}
.footer-bottom p { margin: 0; font-size: 0.875rem; line-height: 1.5; color: #A8B0A4; }
.footer-credit a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; font-size: 0.875rem; }
.footer-credit a:hover { color: var(--dark-head); }

/* ---------- product detail ---------- */
.breadcrumb { padding-top: 24px; font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumb a { color: var(--ink-2); }
.breadcrumb a:hover { color: var(--ink); }

.pdp { display: grid; gap: clamp(32px, 5vw, 64px); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; padding-block: 32px 0; }
@media (max-width: 920px) { .pdp { grid-template-columns: 1fr; } }
.pdp-gallery { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 920px) { .pdp-gallery { position: static; } }
.pdp-main { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; }
.pdp-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pdp-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; }
.pdp-thumbs button {
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; background: #fff;
}
.pdp-thumbs button[aria-current="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pdp-thumbs img { aspect-ratio: 1 / 1; object-fit: cover; }

.pdp-info h1 { font-size: 2.25rem; line-height: var(--lh-h2); }  /* detail h1 sized as h2 slot — stays on scale */
.pdp-sku { font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); margin-bottom: 8px; }
.pdp-blurb { color: var(--ink-2); }
.pdp-price { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 4px; }
.pdp-price .n { font-family: var(--font-mono); font-size: 2.5rem; line-height: var(--lh-lead); font-weight: 500; }
.pdp-price .u { color: var(--ink-2); font-size: 1rem; }
.pdp-vat { font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }

.qty-row { display: flex; gap: 12px; align-items: stretch; margin: 24px 0 12px; flex-wrap: wrap; }
.qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
}
.qty button {
  min-width: 48px; min-height: 48px; border: 0; background: none;
  font-size: 1.25rem; line-height: var(--lh-ui); cursor: pointer; color: var(--ink);
}
.qty button:hover { background: #EFF1EA; }
.qty input {
  width: 56px; text-align: center; border: 0;
  font-family: var(--font-mono); font-size: 1.125rem; line-height: var(--lh-ui);
  background: none; color: var(--ink);
  -moz-appearance: textfield; appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.tier-box { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); margin-top: 28px; overflow: hidden; }
.tier-box .tier-head { padding: 14px 20px; border-bottom: 1px solid var(--line); background: #F4F5F0; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tier-box h2, .tier-box h3 { font-size: 1.125rem; line-height: var(--lh-h4); margin: 0; }
.tier-table td, .tier-table th { padding: 12px 20px; font-size: 1rem; line-height: var(--lh-lead); border-bottom: 1px solid var(--line); text-align: left; }
.tier-table tbody tr:last-child :is(td, th) { border-bottom: 0; }
.tier-table td:last-child { font-family: var(--font-mono); }
.tier-note { padding: 12px 20px; font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); background: #FBFCF8; }

.spec-list { margin: 28px 0 0; }
.spec-list dl { margin: 0; display: grid; grid-template-columns: minmax(140px, auto) 1fr; }
.spec-list dt, .spec-list dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: 1rem; line-height: var(--lh-lead); }
.spec-list dt { color: var(--ink-2); padding-right: 24px; }
.spec-list :is(dt, dd):nth-last-child(-n+2) { border-bottom: 0; }
.feature-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.feature-list li { display: flex; gap: 10px; font-size: 1rem; line-height: var(--lh-lead); }
.feature-list svg { flex: none; color: var(--green-ink); margin-top: 3px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(23, 27, 24, 0.25); }

.video-block { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #000; }
.video-block video { width: 100%; display: block; }

/* ---------- cart ---------- */
.cart-layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: start; }
@media (max-width: 920px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-lines { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.cart-line { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line:last-child { border-bottom: 0; }
.cart-line img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.cart-line h3 { font-size: 1.125rem; line-height: var(--lh-h4); margin: 0 0 2px; }
.cart-line .meta { font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }
.cart-line .line-end { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-line .line-total { font-family: var(--font-mono); font-size: 1.125rem; }
.cart-line .tier-flag { font-size: 0.75rem; line-height: 1.5; font-weight: 600; color: var(--green-ink); }
.link-btn {
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  color: var(--ink-2); font-size: 0.875rem; line-height: 1.5; text-decoration: underline; text-underline-offset: 3px;
  min-height: 24px;
}
.link-btn:hover { color: var(--error); }
@media (max-width: 560px) {
  .cart-line { grid-template-columns: 72px 1fr; }
  .cart-line img { width: 72px; height: 72px; }
  .cart-line .line-end { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}
.summary { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 24px; }
.summary h2 { font-size: 1.5rem; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; font-size: 1rem; line-height: var(--lh-lead); }
.sum-row .mono { font-family: var(--font-mono); }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; font-weight: 600; font-size: 1.125rem; }
.empty-state { text-align: center; padding: clamp(48px, 8vw, 96px) 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 1rem; line-height: var(--lh-lead); font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); margin: -2px 0 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; min-height: 48px;
  font: inherit; font-size: 1rem; line-height: var(--lh-lead);
  color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 8px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--green-ink); outline-offset: 1px;
}
.field .err { display: none; color: var(--error); font-size: 0.875rem; line-height: 1.5; margin-top: 6px; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.form-note { font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }
.form-success {
  border: 1px solid var(--green-ink); background: var(--green-soft);
  border-radius: var(--radius-lg); padding: 24px;
}
.form-success h3 { margin-bottom: 4px; }

/* ---------- toast ---------- */
.toast-region { position: fixed; bottom: 20px; left: 50%; translate: -50% 0; z-index: 90; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast {
  background: var(--ink); color: #fff;
  padding: 14px 18px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 1rem; line-height: var(--lh-lead);
  box-shadow: 0 8px 24px rgba(16, 20, 14, 0.25);
}
.toast a { color: #A9EC7F; }

/* ---------- checkout dialog ---------- */
.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(480px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(20, 24, 18, 0.5); }
.modal-in { padding: 28px; }
.modal h2 { font-size: 1.5rem; }
.modal .modal-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.step { border-top: 2px solid var(--ink); padding-top: 16px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.5; color: var(--green-ink);
  display: block; margin-bottom: 8px;
}
.step h3 { font-size: 1.25rem; }
.step p { font-size: 1rem; line-height: var(--lh-body); color: var(--ink-2); margin: 0; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 4px; font-size: 1.125rem; line-height: var(--lh-h4); font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.25rem; color: var(--ink-2); }
.faq details[open] summary::after { content: "−"; }
.faq .faq-body { padding: 0 4px 20px; color: var(--ink-2); max-width: 720px; }

/* ---------- downloads ---------- */
.dl-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.dl-card {
  display: flex; gap: 16px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  padding: 18px 20px; text-decoration: none; color: var(--ink);
}
.dl-card:hover { border-color: var(--ink); color: var(--ink); }
.dl-card .ico {
  flex: none; width: 44px; height: 44px; border-radius: 8px;
  background: var(--green-soft); color: var(--green-ink);
  display: flex; align-items: center; justify-content: center;
}
.dl-card .t { font-weight: 600; font-size: 1rem; line-height: var(--lh-lead); }
.dl-card .s { font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }

/* page hero (inner pages) */
.page-head { padding-block: clamp(48px, 7vw, 80px) 0; }
.page-head .lead { max-width: 640px; }

/* wholesale banner */
.ws-banner { border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.ws-banner img { width: 100%; aspect-ratio: 16 / 5; object-fit: cover; }
@media (max-width: 760px) { .ws-banner img { aspect-ratio: 16 / 9; } }

/* heading-size utilities — on-scale sizes for headings in narrow contexts */
.h3-style { font-size: 1.5rem; line-height: var(--lh-h3); }
.h4-style { font-size: 1.125rem; line-height: var(--lh-h4); }

/* utility */
.pt-0 { padding-top: 0; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
