/* Breedmap website styles.
   Tokens mirror breedmap-app lib/ui/app_theme.dart ("navy night" dark default, light theme).
   Flat bars, hairline borders, 6px control radius, 8px card radius, 30px controls, 14px body text. */

@font-face {
  font-family: "BreedmapMono";
  src: url("../assets/fonts/BreedmapMono.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BreedmapMono";
  src: url("../assets/fonts/BreedmapMono-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --site: #0B141E;
  --bg: #0F1A26;
  --panel: #122030;
  --card: #162433;
  --fg: #E4EBF2;
  --muted: #93A5B7;
  --line: #263A4E;
  --accent: #5AA2DC;
  --btn: #7EAED7;
  --btn-fg: #0F2F4B;
  --chip: #1D2F42;
  --sel: #1F3A55;
  --ok: #4FC48D;
  --warn: #E0A84A;
  --err: #F07167;
  --on-warn: #1B1200;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --glow: rgba(90, 162, 220, 0.16);
  --grid-dot: rgba(147, 165, 183, 0.10);
}

[data-theme="light"] {
  color-scheme: light;
  --site: #FFFFFF;
  --bg: #F3F6F9;
  --panel: #E9EFF5;
  --card: #FFFFFF;
  --fg: #17212B;
  --muted: #5B6B7B;
  --line: #CFD9E3;
  --accent: #2F7BBF;
  --btn: #7EAED7;
  --btn-fg: #0F2F4B;
  --chip: #DCE8F3;
  --sel: #CFE2F3;
  --ok: #1E8E5E;
  --warn: #B7791F;
  --err: #C53030;
  --on-warn: #FFFFFF;
  --shadow: 0 16px 40px rgba(23, 33, 43, 0.14);
  --glow: rgba(47, 123, 191, 0.12);
  --grid-dot: rgba(91, 107, 123, 0.12);
}

/* No-JS fallback: follow the OS when the script could not set a theme. */
@media (prefers-color-scheme: light) {
  html:not([data-theme]) {
    color-scheme: light;
    --site: #FFFFFF; --bg: #F3F6F9; --panel: #E9EFF5; --card: #FFFFFF; --fg: #17212B;
    --muted: #5B6B7B; --line: #CFD9E3; --accent: #2F7BBF; --chip: #DCE8F3; --sel: #CFE2F3;
    --ok: #1E8E5E; --warn: #B7791F; --err: #C53030; --on-warn: #FFFFFF;
    --shadow: 0 16px 40px rgba(23, 33, 43, 0.14); --glow: rgba(47, 123, 191, 0.12);
    --grid-dot: rgba(91, 107, 123, 0.12);
  }
}

:root {
  --r-control: 6px;
  --r-card: 8px;
  --control-h: 30px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "BreedmapMono", "DejaVu Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1160px;
  --header-h: 52px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, .mono { font-family: var(--mono); letter-spacing: 0.02em; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 0.9em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-control);
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--btn); color: var(--btn-fg); padding: 6px 12px; border-radius: var(--r-control);
  font-weight: 600; transition: top 0.15s ease;
}
.skip-link:focus { top: 10px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

/* Theme-dependent images */
[data-theme="dark"] .only-light, [data-theme="light"] .only-dark { display: none !important; }
html:not([data-theme]) .only-light { display: none; }

/* ---------- Site header (flat bar, hairline) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--site);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header::after { /* 3px accent band, as in the app header */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
.site-header.is-scrolled::after { opacity: 0.55; }
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand-word { font-size: 15px; letter-spacing: 0.14em; color: var(--accent); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav a {
  display: inline-flex; align-items: center; height: var(--control-h); padding: 0 10px;
  border-radius: var(--r-control); color: var(--muted); font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav a:hover { color: var(--fg); background: var(--chip); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--control-h); padding: 0 14px;
  border-radius: var(--r-control); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s var(--ease), box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--btn); color: var(--btn-fg); }
.btn-primary:hover { box-shadow: 0 6px 18px var(--glow); filter: brightness(1.05); }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--sel); }
.btn-ghost { color: var(--fg); background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: var(--chip); }
.btn-lg { height: 38px; padding: 0 18px; font-size: 14px; }
.icon-btn {
  display: inline-grid; place-items: center; width: var(--control-h); height: var(--control-h);
  border-radius: var(--r-control); border: 1px solid var(--line); background: transparent; color: var(--fg);
  cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: var(--chip); border-color: var(--accent); }
.icon-btn svg { width: 16px; height: 16px; }
[data-theme="dark"] .icon-sun, [data-theme="light"] .icon-moon { display: none; }
html:not([data-theme]) .icon-sun { display: none; }

.menu-toggle { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px;
  border-radius: 999px; background: var(--chip); color: var(--fg); font-size: 12px; font-weight: 600;
  border: 1px solid var(--line);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.badge-draft {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px;
  background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--fg);
  border: 1px solid color-mix(in srgb, var(--warn) 70%, transparent); font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; vertical-align: middle;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { /* dotted grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 30%, transparent 75%);
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px;
  padding: clamp(48px, 9vh, 96px) 20px clamp(48px, 8vh, 88px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
.hero h1 { font-size: clamp(30px, 4.6vw, 50px); font-weight: 700; margin-bottom: 18px; }
.hero h1 .accent { color: var(--accent); }
.lead { font-size: clamp(15px, 1.5vw, 17px); color: var(--muted); max-width: 36em; margin-bottom: 26px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.hero-art { position: relative; display: grid; place-items: center; min-height: 320px; }
.hero-art .halo {
  position: absolute; width: min(420px, 90%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 65%);
  animation: breathe 6s ease-in-out infinite;
}
.hero-art .logo-big { position: relative; width: min(300px, 70%); filter: drop-shadow(0 12px 30px rgba(0,0,0,0.25)); animation: float 8s ease-in-out infinite; }
.code-tag {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
  font-size: 12px; color: var(--muted); white-space: nowrap;
  animation: float 9s ease-in-out infinite;
}
.code-tag b { font-family: var(--mono); color: var(--fg); letter-spacing: 0.06em; }
.code-tag .gen { font-family: var(--mono); font-size: 11px; padding: 0 5px; border-radius: 4px; background: var(--sel); color: var(--fg); }
.code-tag.t1 { top: 12%; left: 0; animation-delay: -2s; }
.code-tag.t2 { bottom: 16%; right: 0; animation-delay: -5s; }
.code-tag.t3 { bottom: 2%; left: 10%; animation-delay: -7s; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.07); opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vh, 96px) 0; }
.section-alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 32px; }
.section-head .kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; display: block; }
.section-head h2 { font-size: clamp(22px, 3vw, 32px); margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 15px; }

.grid { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px 18px 16px;
  transition: border-color 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { font-size: 15px; margin: 12px 0 6px; }
.card p { color: var(--muted); margin: 0; }
.card .icon {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-control);
  background: var(--sel); color: var(--accent);
}
.card .icon svg { width: 18px; height: 18px; }

/* How it works steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step { position: relative; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--mono); font-size: 12px; color: var(--accent); display: block; margin-bottom: 8px; letter-spacing: 0.1em;
}
.step h3 { font-size: 15px; margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; }

/* Lineage mini illustration */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; color: var(--fg); }
.ticks li::before { content: ""; width: 14px; height: 14px; margin-top: 4px; border-radius: 4px; border: 1.5px solid var(--accent); background: linear-gradient(var(--accent), var(--accent)) center/6px 6px no-repeat; }
.ticks li span { color: var(--muted); }
.pedigree { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; }
.pedigree svg { width: 100%; height: auto; display: block; }
.pedigree .node rect { fill: var(--panel); stroke: var(--line); }
.pedigree .node.current rect { fill: var(--sel); stroke: var(--accent); }
.pedigree .node text { fill: var(--fg); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; }
.pedigree .node .g { fill: var(--muted); font-size: 10px; }
.pedigree .edge { stroke: var(--accent); stroke-width: 1.4; fill: none; opacity: 0.7; stroke-dasharray: 220; stroke-dashoffset: 220; }
.is-visible .pedigree .edge, .pedigree.is-visible .edge { animation: draw 1.4s var(--ease) forwards; }
.pedigree .status { r: 3.5; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.shot {
  grid-column: span 2; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--card); overflow: hidden; cursor: zoom-in; text-align: left; color: inherit; font: inherit;
  display: flex; flex-direction: column;
  transition: border-color 0.2s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}
.shot.wide { grid-column: span 3; }
.shot:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }

.shot .frame { display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--site); border-bottom: 1px solid var(--line); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 0.6s var(--ease); }
.shot.contain img { object-fit: contain; object-position: center; }
.shot:hover img { transform: scale(1.035); }
.shot .cap { display: block; padding: 10px 12px; }
.shot .cap b { display: block; font-size: 13px; }
.shot .cap span { color: var(--muted); font-size: 12px; }

/* Lightbox */
.lightbox {
  width: min(1280px, 96vw); max-width: none; max-height: 94vh; padding: 0; border: 1px solid var(--line);
  border-radius: var(--r-card); background: var(--card); color: var(--fg); box-shadow: var(--shadow);
}
.lightbox::backdrop { background: rgba(5, 10, 16, 0.78); backdrop-filter: blur(3px); }
.lightbox[open] { animation: pop 0.22s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); background: var(--site); }
.lb-title { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.lb-body { position: relative; background: var(--bg); display: grid; place-items: center; }
.lb-body img { max-height: calc(94vh - 110px); width: auto; max-width: 100%; }
.lb-desc { padding: 10px 14px; color: var(--muted); border-top: 1px solid var(--line); margin: 0; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: var(--card); }
.lb-prev { left: 10px; } .lb-next { right: 10px; }

/* ---------- CTA band ---------- */
.cta-band {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  padding: 26px; border: 1px solid var(--line); border-radius: var(--r-card);
  background: linear-gradient(120deg, var(--card), var(--panel)); position: relative; overflow: hidden;
}
.cta-band img { width: 56px; height: 56px; }
.cta-band h2 { font-size: 20px; margin-bottom: 4px; }
.cta-band p { color: var(--muted); margin: 0; }
.cta-band .cta-row { margin: 0; }

/* ---------- Page heads (FAQ, contact) ---------- */
.page-head { padding: clamp(40px, 7vh, 72px) 0 28px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-head h1 { font-size: clamp(26px, 4vw, 40px); margin-bottom: 10px; }
.page-head p { color: var(--muted); max-width: 46em; font-size: 15px; }
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-top: 18px;
  border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); border-left: 3px solid var(--warn);
  border-radius: var(--r-card); background: color-mix(in srgb, var(--warn) 8%, var(--card));
}
.notice p { margin: 0; color: var(--fg); }
.notice .muted { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 20px); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); padding: 10px; }
.toc b { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 4px 8px 6px; }
.toc a { display: block; padding: 5px 8px; border-radius: var(--r-control); color: var(--fg); font-size: 13px; }
.toc a:hover { background: var(--chip); text-decoration: none; }
.toc a.is-active { background: var(--sel); color: var(--fg); box-shadow: inset 2px 0 0 var(--accent); }
.faq-group { margin-bottom: 40px; }
.faq-group > h2 { font-size: 20px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.faq-group > .group-note { color: var(--muted); margin-bottom: 14px; }
.faq-group h2 a.anchor { color: var(--muted); font-weight: 400; opacity: 0; transition: opacity 0.15s ease; font-size: 16px; }
.faq-group h2:hover a.anchor, .faq-group h2 a.anchor:focus-visible { opacity: 1; }
details.qa { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); margin-bottom: 8px; transition: border-color 0.2s ease, background-color 0.2s ease; }
details.qa:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
details.qa[open] { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
details.qa summary {
  list-style: none; cursor: pointer; padding: 12px 44px 12px 16px; position: relative; font-weight: 600; border-radius: var(--r-card);
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform 0.2s var(--ease), border-color 0.2s ease;
}
details.qa[open] summary::after { transform: rotate(225deg); margin-top: -2px; border-color: var(--accent); }
details.qa .answer { padding: 0 16px 14px; color: var(--muted); }
details.qa .answer p, details.qa .answer ul { margin: 0 0 0.7em; }
details.qa .answer ul { padding-left: 1.2em; }
details.qa .answer li { margin-bottom: 4px; }
details.qa .answer strong { color: var(--fg); }
details.qa .src { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 4px; }
details.qa[open] .answer { animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.faq-tools { display: flex; gap: 8px; margin: 0 0 18px; flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 760px; }
.contact-card { display: flex; gap: 14px; align-items: flex-start; }
.contact-card .icon { flex: none; margin-top: 2px; }
.contact-card h2 { font-size: 15px; margin-bottom: 4px; }
.contact-card a.big { font-size: 16px; font-weight: 600; word-break: break-all; }

/* ---------- Footer ---------- */
.site-footer { background: var(--site); border-top: 1px solid var(--line); padding: 40px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 28px; }
.site-footer h2 { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--fg); }
.site-footer a:hover { color: var(--accent); }
.site-footer .small { color: var(--muted); font-size: 12px; }
.site-footer .raw { font-size: 12px; color: var(--muted); }
.site-footer .raw a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* Toast for placeholder links */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 120;
  background: var(--card); color: var(--fg); border: 1px solid var(--line); border-left: 3px solid var(--warn);
  border-radius: var(--r-card); padding: 10px 14px; box-shadow: var(--shadow); transition: opacity 0.2s ease, transform 0.2s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-stagger > * { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .reveal-stagger.is-visible > * { opacity: 1; transform: none; }
.js .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 60ms; }
.js .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 120ms; }
.js .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 180ms; }
.js .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 240ms; }
.js .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 300ms; }
.js .reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 360ms; }
.js .reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 420ms; }
.js .reveal-stagger.is-visible > *:nth-child(n+9) { transition-delay: 480ms; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 12px; }
  .hero-art { min-height: 220px; order: -1; }
  .hero-art .logo-big { width: min(180px, 48%); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .shot, .shot.wide { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .faq-layout { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .toc b { width: 100%; }
}
@media (max-width: 760px) {
  .menu-toggle { display: inline-grid; }
  .nav {
    position: absolute; top: calc(var(--header-h)); left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 12px 12px;
    background: var(--site); border-bottom: 1px solid var(--line);
    transform-origin: top; transform: scaleY(0.96); opacity: 0; visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s var(--ease), visibility 0.18s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a { height: 40px; }
  .nav a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--accent); }
  .header-actions .btn-primary { display: none; }
  .cta-band { grid-template-columns: 1fr; text-align: left; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2, .steps, .gallery { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .code-tag.t3 { display: none; }
  .cta-row .btn { flex: 1 1 auto; }
  .lb-nav { top: auto; bottom: 8px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .reveal-stagger > * { opacity: 1; transform: none; }
  .pedigree .edge { stroke-dashoffset: 0; }
}
