/* Brickify My Home: landing page. Tokens mirror the Brickify My Home design system. */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("../fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("../fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("../fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --surface: #F4EFE6; --surface-raised: #FFFFFF; --surface-sunk: #EAE3D6;
  --ink: #1F2B45; --ink-muted: #5F6877; --line: #DAD4C8; --line-strong: #8E8778;
  --brand: #C4502B; --on-brand: #FFFFFF; --brand-text: #A8401F; --brand-soft: #F6DCCF;
  --focus-ring: #1F2B45; --success: #3A734D; --danger: #B3261E;
  --brick-terracotta: #C4502B; --brick-ochre: #E3A73A; --brick-garden: #5E9A6E; --brick-sky: #4C8CC4;
  --brick-coral: #EC7A5B; --brick-plum: #7C4F8C; --brick-blueprint: #1F2B45; --brick-sand: #E6C88E;
  --shadow-brick: 0 3px 0 rgba(31, 43, 69, .16);
  --shadow-lift: 0 3px 0 rgba(31, 43, 69, .16), 0 12px 24px -12px rgba(31, 43, 69, .25);
  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 16px;
  --wrap: 1180px; --gutter: clamp(16px, 4vw, 40px);
  --logo: url("../img/logo.svg");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #141A2A; --surface-raised: #1C2332; --surface-sunk: #0F1420;
    --ink: #F4EFE6; --ink-muted: #AEB5C2; --line: #2E3850; --line-strong: #7A849A;
    --brand: #E27552; --on-brand: #141A2A; --brand-text: #E27552; --brand-soft: #3A2320;
    --focus-ring: #F4EFE6; --success: #7FC49A; --danger: #F28B82; --brick-blueprint: #5B6F9E;
    --shadow-brick: 0 3px 0 rgba(0, 0, 0, .35); --shadow-lift: 0 3px 0 rgba(0,0,0,.35), 0 16px 32px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --surface: #141A2A; --surface-raised: #1C2332; --surface-sunk: #0F1420;
  --ink: #F4EFE6; --ink-muted: #AEB5C2; --line: #2E3850; --line-strong: #7A849A;
  --brand: #E27552; --on-brand: #141A2A; --brand-text: #E27552; --brand-soft: #3A2320;
  --focus-ring: #F4EFE6; --success: #7FC49A; --danger: #F28B82; --brick-blueprint: #5B6F9E;
  --shadow-brick: 0 3px 0 rgba(0, 0, 0, .35); --shadow-lift: 0 3px 0 rgba(0,0,0,.35), 0 16px 32px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 16px/24px var(--font-sans); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--brand-text); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface-raised); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.eyebrow { font: 700 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.lead { font-size: 18px; line-height: 28px; color: var(--ink-muted); max-width: 34em; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.section { padding-block: clamp(48px, 8vw, 96px); }
.section-head { display: grid; gap: 12px; max-width: 640px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.04; font-weight: 800; letter-spacing: -.025em; }

/* ---------- buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 12px 24px; border-radius: var(--radius-md); border: 2px solid transparent; font: 700 16px/24px var(--font-sans);
  text-decoration: none; cursor: pointer; transition: transform .08s ease, box-shadow .08s ease; white-space: nowrap; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-brick); }
.btn-secondary { background: var(--surface-raised); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-brick); }
.btn-quiet { background: transparent; color: var(--ink); padding-inline: 12px; }
.btn-quiet:hover { color: var(--brand-text); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-1px); }
.btn-primary:active, .btn-secondary:active { transform: translateY(2px); box-shadow: none; }
.btn .studs { position: absolute; top: -6px; left: 16px; display: flex; gap: 6px; }
.btn .studs i { width: 12px; height: 6px; border-radius: 2px 2px 0 0; background: var(--brand); }

/* ---------- header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand-link { display: flex; align-items: center; flex: none; }
.brand-link img { height: 34px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; } :root[data-theme="dark"] .logo-dark { display: block; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: var(--radius-md); }
.main-nav a:hover { background: var(--surface-sunk); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); }
@media (max-width: 920px) {
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; padding: 8px var(--gutter) 16px; background: var(--surface); border-bottom: 1px solid var(--line); margin: 0; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px; }
  .menu-btn { display: inline-grid; place-items: center; }
  .header-actions .btn-quiet { display: none; }
}
@media (max-width: 420px) { .brand-link img { height: 28px; } .header-actions .btn-primary { padding-inline: 12px; } }

/* ---------- hero */
.hero { padding-block: clamp(32px, 6vw, 72px) clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { font-size: clamp(48px, 7.4vw, 88px); line-height: .94; font-weight: 800; letter-spacing: -.035em; margin: 14px 0 20px; }
.hero h1 .accent { color: var(--brand-text); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: 6px 16px; }
.hero-note span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--brick-garden); margin-right: 8px; vertical-align: 1px; }

/* before / after slider */
.compare { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-sunk); box-shadow: var(--shadow-lift);
  aspect-ratio: 2 / 1; max-width: 100%; user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare .divider { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 4px; margin-left: -2px; background: #FFFFFF; box-shadow: 0 0 0 1px rgba(31,43,69,.25); pointer-events: none; }
.compare .handle { position: absolute; top: 50%; left: var(--pos, 50%); width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-brick); pointer-events: none; }
.compare .tag { position: absolute; top: 14px; padding: 4px 10px; border-radius: var(--radius-sm); font: 700 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,255,255,.9); color: #1F2B45; pointer-events: none; }
.compare .tag.l { left: 14px; } .compare .tag.r { right: 14px; }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare:focus-within .handle { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.compare-caption { margin-top: 12px; font-size: 14px; color: var(--ink-muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* brick strip divider */
.brick-strip { display: block; width: 100%; height: 40px; }

/* ---------- stats band */
.stats { background: var(--ink); color: var(--surface); }
:root[data-theme="dark"] .stats { background: var(--surface-raised); color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stats { background: var(--surface-raised); color: var(--ink); } }
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-block: 36px; align-items: end; }
@media (max-width: 720px) { .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat b { display: block; font: 800 clamp(30px, 4vw, 44px)/1 var(--font-display); letter-spacing: -.02em; }
.stat span { display: block; margin-top: 6px; font-size: 14px; opacity: .78; }
.stats-note { font-size: 13px; opacity: .72; padding-bottom: 28px; }

/* ---------- steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step { background: var(--surface-raised); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-brick); position: relative; display: grid; gap: 10px; align-content: start; }
.step .num { width: 40px; height: 32px; border-radius: 6px; display: grid; place-items: center; font: 800 18px/1 var(--font-display); color: #fff; position: relative; margin-top: 6px; }
.step .num::before { content: ""; position: absolute; top: -6px; left: 6px; width: 10px; height: 6px; border-radius: 2px 2px 0 0; background: inherit; box-shadow: 18px 0 0 0 currentColor; color: inherit; }
.step:nth-child(1) .num { background: var(--brick-terracotta); } .step:nth-child(1) .num::before { box-shadow: 18px 0 0 0 var(--brick-terracotta); }
.step:nth-child(2) .num { background: var(--brick-sky); } .step:nth-child(2) .num::before { box-shadow: 18px 0 0 0 var(--brick-sky); }
.step:nth-child(3) .num { background: var(--brick-garden); } .step:nth-child(3) .num::before { box-shadow: 18px 0 0 0 var(--brick-garden); }
.step:nth-child(4) .num { background: var(--brick-plum); } .step:nth-child(4) .num::before { box-shadow: 18px 0 0 0 var(--brick-plum); }
.step h3 { font-size: 20px; line-height: 26px; font-weight: 700; }
.step p { color: var(--ink-muted); font-size: 15px; line-height: 22px; }

/* ---------- upload */
.upload { background: var(--surface-sunk); }
.upload-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start; }
@media (max-width: 880px) { .upload-grid { grid-template-columns: minmax(0, 1fr); } }
.dropzone { background: var(--surface-raised); border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px);
  display: grid; justify-items: center; text-align: center; gap: 14px; transition: border-color .15s, background .15s; }
.dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone h3 { font-size: 26px; line-height: 32px; font-weight: 800; }
.dropzone p { color: var(--ink-muted); max-width: 30em; }
.dz-icon { width: 76px; height: auto; }
.file-list { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; display: grid; gap: 8px; text-align: left; }
.file-list li { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; }
.file-list .kind { font: 700 11px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: var(--brand-soft); color: var(--ink); flex: none; }
.file-list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.file-list .size { font: 500 12px/16px var(--font-mono); color: var(--ink-muted); }
.file-list button { border: 0; background: transparent; color: var(--ink-muted); width: 32px; height: 32px; border-radius: 4px; cursor: pointer; }
.file-list button:hover { color: var(--danger); }
.accepts { display: grid; gap: 12px; }
.accept { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; background: var(--surface-raised); border-radius: var(--radius-md); padding: 16px; }
.accept .ic { width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; color: #fff; }
.accept h3 { font: 700 16px/22px var(--font-sans); }
.accept p { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.accept .fmt { font: 500 12px/16px var(--font-mono); color: var(--ink-muted); margin-top: 4px; }

/* ---------- features */
.features { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.feature { background: var(--surface-raised); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-brick); display: flex; flex-direction: column; }
.feature.wide { grid-column: span 3; } .feature.third { grid-column: span 2; }
@media (max-width: 900px) { .feature.wide, .feature.third { grid-column: span 6; } }
.feature figure { margin: 0; aspect-ratio: 16 / 10; background: var(--surface-sunk); overflow: hidden; }
.feature figure img { width: 100%; height: 100%; object-fit: cover; }
.feature .body { padding: 20px 22px 24px; display: grid; gap: 8px; }
.feature h3 { font-size: 22px; line-height: 28px; font-weight: 700; }
.feature p { color: var(--ink-muted); font-size: 15px; line-height: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font: 600 13px/18px var(--font-sans); padding: 4px 10px; border-radius: 999px; background: var(--surface-sunk); color: var(--ink); }
.parts-mock { padding: 18px; display: grid; gap: 8px; background: var(--surface-sunk); }
.part { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.part .sw { flex: none; display: flex; flex-direction: column; width: 36px; }
.part .sw .s { display: flex; gap: 2px; padding-left: 3px; } .part .sw .s i { width: 6px; height: 3px; border-radius: 1px 1px 0 0; background: var(--c); }
.part .sw .b { height: 14px; border-radius: 2px; background: var(--c); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.part .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.part .t b { font-size: 14px; line-height: 20px; }
.part .t span { font: 500 12px/16px var(--font-mono); color: var(--ink-muted); }
.part .q { font: 500 14px/20px var(--font-mono); }

/* ---------- box */
.box-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
@media (max-width: 880px) { .box-grid { grid-template-columns: minmax(0, 1fr); } }
.box-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.box-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.box-list .dot { width: 22px; height: 14px; border-radius: 3px; margin-top: 6px; position: relative; }
.box-list .dot::before { content: ""; position: absolute; top: -4px; left: 4px; width: 5px; height: 4px; border-radius: 1px 1px 0 0; background: inherit; box-shadow: 8px 0 0 0 var(--dc); }
.box-list b { display: block; } .box-list span { color: var(--ink-muted); font-size: 15px; }
.stack-imgs { position: relative; }
.stack-imgs img { border-radius: var(--radius-md); box-shadow: var(--shadow-lift); }
.stack-imgs img + img { position: absolute; width: 58%; right: -8px; bottom: -32px; transform: rotate(2deg); }
@media (max-width: 560px) { .stack-imgs img + img { position: static; width: 100%; transform: none; margin-top: 16px; } }

/* ---------- pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; } }
.plan { background: var(--surface-raised); border-radius: var(--radius-lg); padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-brick); border: 2px solid transparent; }
.plan.featured { border-color: var(--brand); }
.plan h3 { font-size: 24px; line-height: 30px; font-weight: 800; }
.plan .price { font: 800 40px/1 var(--font-display); letter-spacing: -.02em; }
.plan .price small { font: 400 14px/20px var(--font-sans); color: var(--ink-muted); letter-spacing: 0; margin-left: 4px; }
.plan .fit { font-size: 15px; color: var(--ink-muted); }
.plan ul { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.plan li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; }
.plan li svg { margin-top: 3px; color: var(--success); }
.plan .btn { margin-top: auto; }
.plan .badge { align-self: flex-start; font: 700 11px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--ink); }
.placeholder { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--brand) 18%, transparent) 6px 8px); border-radius: 4px; padding: 0 4px; }
.fine { font-size: 13px; line-height: 20px; color: var(--ink-muted); margin-top: 16px; }

/* ---------- gift */
.gift { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: center; background: var(--brand-soft); border-radius: var(--radius-lg); padding: clamp(24px, 5vw, 56px); }
@media (max-width: 820px) { .gift { grid-template-columns: minmax(0, 1fr); } }
.gift h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.gift p { margin-top: 12px; color: var(--ink); max-width: 32em; }
.gift .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.gift-card { aspect-ratio: 1.6; border-radius: 14px; background: var(--brick-blueprint); color: #F4EFE6; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow-lift); transform: rotate(-3deg); position: relative; overflow: hidden; }
.gift-card img { height: 30px; width: auto; }
.gift-card b { font: 800 30px/1 var(--font-display); }
.gift-card span { font: 500 13px/18px var(--font-mono); opacity: .8; }
.gift-card .gc-bricks { position: absolute; right: -10px; bottom: 18px; display: grid; gap: 4px; }
.gift-card .gc-bricks i { display: block; height: 14px; border-radius: 3px; }

/* ---------- faq */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface-raised); border-radius: var(--radius-md); padding: 0 20px; border: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 32px 18px 0; font: 700 17px/24px var(--font-sans); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 26px; width: 10px; height: 10px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(225deg); top: 30px; }
.faq details p { padding: 0 0 18px; color: var(--ink-muted); max-width: 62ch; }

/* ---------- final cta + footer */
.final { text-align: left; }
.final-inner { display: grid; gap: 20px; justify-items: start; }
.final h2 { font-size: clamp(40px, 6vw, 72px); line-height: .96; font-weight: 800; letter-spacing: -.03em; max-width: 12em; }
.site-footer { background: var(--ink); color: #D9D4CA; padding-block: 48px 32px; }
:root[data-theme="dark"] .site-footer { background: #0F1420; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #0F1420; } }
.site-footer a { color: #F4EFE6; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
.foot-brand img { height: 34px; width: auto; }
.foot-brand p { margin-top: 12px; font-size: 14px; max-width: 30em; color: #B9BFCB; }
.site-footer h4 { margin: 0 0 12px; font: 700 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: #B9BFCB; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid #36405A; font-size: 13px; line-height: 20px; color: #AEB5C2; display: grid; gap: 6px; }
.theme-toggle { background: transparent; border: 1px solid #56617A; color: #F4EFE6; border-radius: var(--radius-md); padding: 6px 10px; font: 600 13px/18px var(--font-sans); cursor: pointer; justify-self: start; }

/* ---------- modal + toast */
.modal { border: 0; padding: 0; border-radius: var(--radius-lg); background: var(--surface-raised); color: var(--ink); width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-lift); }
.modal::backdrop { background: rgba(20, 26, 42, .55); }
.modal form { padding: 28px; display: grid; gap: 14px; }
.modal h2 { font-size: 26px; line-height: 32px; font-weight: 800; }
.modal p { color: var(--ink-muted); font-size: 15px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field input { font: 400 16px/24px var(--font-sans); padding: 10px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.field input:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.modal .alt { display: grid; gap: 8px; }
.modal .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.modal .x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-muted); cursor: pointer; font-size: 22px; }
.sep { display: flex; align-items: center; gap: 12px; color: var(--ink-muted); font-size: 13px; }
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  background: var(--ink); color: var(--surface); padding: 12px 18px; border-radius: var(--radius-md); font-weight: 600; box-shadow: var(--shadow-lift); transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* fixes: [hidden] must beat component display rules; narrow-phone header; long footer links */
[hidden] { display: none !important; }
@media (max-width: 480px) {
  .header-row { gap: 10px; }
  .brand-link img { height: 26px; }
  .header-actions { gap: 6px; }
  .header-actions .btn-primary { padding: 8px 12px; font-size: 14px; min-height: 40px; }
  .menu-btn { width: 40px; height: 40px; }
}
.site-footer li { overflow-wrap: anywhere; }
