:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --abyss: #1a120c; --deep: #231910; --panel: #2c2016; --line: #4d3827;
  --neon: #ff8a3d; --glow: #ffb36e;
  --abyss-rgb: 26,18,12; --panel-rgb: 44,32,22; --line-rgb: 77,56,39; --neon-rgb: 255,138,61; --glow-rgb: 255,179,110;
  --on-accent: #2a1608;
  --text: #fcf2e4; --muted: #d0baa3;
  --danger: #ff9a8a; --ok: #7ddf9b;
  --display: 'Unbounded', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --body: 'Hanken Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --wrap: 1160px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --abyss: #fbf4e8; --deep: #f3e7d3; --panel: #fffaf1; --line: #e5d2b6;
  --neon: #f27a1f; --glow: #b8500a;
  --abyss-rgb: 251,244,232; --panel-rgb: 255,250,241; --line-rgb: 229,210,182; --neon-rgb: 242,122,31; --glow-rgb: 184,80,10;
  --on-accent: #2a1608;
  --text: #2b1a0e; --muted: #6b523c;
  --danger: #b3261e; --ok: #1f7a46;
}
:root[data-theme="light"] .btn-primary:hover { background: #ff9440; }
:root[data-theme="light"] .photo, :root[data-theme="light"] .link::before, :root[data-theme="light"] .link span, :root[data-theme="light"] .steps::before, :root[data-theme="light"] .steps li::before { box-shadow: 0 10px 30px -14px rgba(120,60,10,.35); }
:root[data-theme="light"] .checks li::before { box-shadow: none; }
.theme-toggle { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 42px; height: 42px; display: inline-grid; place-items: center; cursor: pointer; margin-left: auto; flex-shrink: 0; }
.theme-toggle:hover { border-color: var(--glow); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
.theme-toggle + .menu-toggle, .theme-toggle + .nav { margin-left: 0; }
@media (min-width: 901px) { .theme-toggle { order: 2; margin-left: 8px; } .nav { margin-left: auto; } }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--abyss);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--glow); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--neon); color: var(--abyss); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 16px; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
p { margin: 0 0 16px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 56ch; }
.muted { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 10px; font: 700 1rem var(--body);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: var(--neon); color: var(--on-accent); box-shadow: 0 0 0 0 rgba(var(--neon-rgb),.0), 0 8px 28px -8px rgba(var(--neon-rgb),.7); }
.btn-primary:hover { background: var(--glow); color: var(--on-accent); box-shadow: 0 10px 34px -6px rgba(var(--glow-rgb),.8); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(var(--panel-rgb),.5); }
.btn-ghost:hover { border-color: var(--glow); color: var(--text); }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(var(--abyss-rgb),.82); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(var(--line-rgb),.7); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 38px; height: 38px; }
.brand b { font: 600 1.15rem var(--display); letter-spacing: -0.02em; }
.brand span { display: block; font-size: .78rem; color: var(--muted); line-height: 1; margin-top: 3px; }
.brand-text { display: block; line-height: 1.1; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { background: rgba(var(--neon-rgb),.14); }
.nav .btn { padding: 9px 18px; margin-left: 8px; color: var(--on-accent); }
.nav .btn:hover { color: var(--on-accent); }
.nav a.btn-primary:hover { color: var(--on-accent); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 9px 14px; font: 700 .95rem var(--body); cursor: pointer; }

/* Hero */
.hero { position: relative; min-height: clamp(540px, 82vh, 780px); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 75% center; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(var(--abyss-rgb),.94) 4%, rgba(var(--abyss-rgb),.7) 36%, rgba(var(--abyss-rgb),0) 68%), linear-gradient(0deg, var(--abyss) 0%, transparent 22%); }
.hero-copy { max-width: 640px; padding: 72px 0; animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy .lead { margin-bottom: 32px; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* Sections */
.section { padding: 80px 0; }
.section.tint { background: linear-gradient(180deg, var(--deep), var(--abyss)); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.photo { border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 0 0 1px rgba(var(--glow-rgb),.08), 0 30px 80px -30px rgba(var(--neon-rgb),.55); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }

.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 12px; height: 12px; border-radius: 3px; background: var(--neon); box-shadow: 0 0 12px var(--glow); transform: rotate(45deg) scale(.8); }

/* Two sides, linked */
.pair { display: grid; grid-template-columns: 1fr 120px 1fr; align-items: stretch; }
.side { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.side img { aspect-ratio: 16 / 10; width: 100%; height: auto; flex-shrink: 0; object-fit: cover; }
.side-body { padding: 28px 28px 32px; display: flex; flex-direction: column; flex: 1; }
.side-body .btn { margin-top: auto; align-self: flex-start; }
.link { position: relative; display: grid; place-items: center; }
.link::before { content: ""; position: absolute; top: 8%; bottom: 8%; left: 50%; width: 3px; margin-left: -1.5px; border-radius: 3px; background: linear-gradient(180deg, transparent, var(--neon) 20%, var(--glow) 50%, var(--neon) 80%, transparent); box-shadow: 0 0 18px var(--glow), 0 0 40px rgba(var(--neon-rgb),.5); }
.link span { position: relative; width: 76px; height: 76px; border-radius: 50%; background: var(--abyss); border: 1px solid var(--glow); display: grid; place-items: center; box-shadow: 0 0 0 8px var(--abyss), 0 0 34px rgba(var(--glow-rgb),.55); }
.link img { width: 44px; height: 44px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; counter-reset: s; }
.steps::before { content: ""; position: absolute; top: 25px; left: 6%; right: 6%; height: 2px; background: linear-gradient(90deg, var(--line), var(--neon), var(--line)); box-shadow: 0 0 14px rgba(var(--neon-rgb),.6); }
.steps li { position: relative; counter-increment: s; }
.steps li::before { content: counter(s); position: relative; display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; border-radius: 50%; background: var(--abyss); border: 2px solid var(--neon); font: 600 1.1rem var(--display); box-shadow: 0 0 22px rgba(var(--neon-rgb),.5); }
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--muted); font-size: .98rem; }
.steps.vertical { grid-template-columns: 1fr; gap: 40px; max-width: 720px; }
.steps.vertical::before { display: none; }
.steps.vertical li { padding-left: 76px; }
.steps.vertical li::before { position: absolute; left: 0; top: 0; }

/* CTA band */
.cta { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--panel), var(--deep)); border: 1px solid var(--line); border-radius: 24px; padding: 64px; isolation: isolate; }
.cta::after { content: ""; position: absolute; right: -60px; top: 50%; width: 360px; height: 360px; transform: translateY(-50%); background: url('/images/logo-mark.png') center / contain no-repeat; opacity: .16; z-index: -1; }
.cta p { max-width: 52ch; color: var(--muted); }

/* Inner page hero */
.page-hero { padding: 72px 0 24px; background: radial-gradient(900px 340px at 18% 0%, rgba(var(--neon-rgb),.22), transparent 70%); }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 18ch; }

/* Cards (used sparingly) */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.item { border-left: 2px solid var(--neon); padding: 4px 0 4px 20px; }
.item h3 { font-size: 1.1rem; margin-bottom: 6px; }
.item p { color: var(--muted); margin: 0; }
.banner { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.banner img { width: 100%; max-height: 420px; object-fit: cover; }

details { border-bottom: 1px solid var(--line); padding: 18px 0; max-width: 760px; }
summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; }
details p { margin: 12px 0 0; color: var(--muted); }

/* Forms */
.form { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 36px; max-width: 760px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); }
input, select, textarea { width: 100%; background: var(--abyss); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: 1rem var(--body); }
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--glow); box-shadow: 0 0 0 3px rgba(var(--glow-rgb),.22); }
.err { color: var(--danger); font-size: .88rem; min-height: 0; }
.form-error { color: var(--danger); margin: 16px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { margin-top: 24px; }
.success { background: var(--panel); border: 1px solid var(--ok); border-radius: 20px; padding: 36px; max-width: 760px; }
.success h2 { font-size: 1.6rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 0; background: var(--deep); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.foot p { color: var(--muted); max-width: 36ch; margin-top: 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.legal { margin-top: 40px; color: var(--muted); font-size: .9rem; }

/* Prose pages */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.4rem; margin-top: 40px; }

/* Admin */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; }
.tabs button { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font: 700 .95rem var(--body); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--on-accent); background: var(--neon); border-color: var(--neon); }
.rows { display: grid; gap: 16px; }
.row { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.row header { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.row h3 { margin: 0; font-size: 1.05rem; }
.row dl { margin: 0; display: grid; grid-template-columns: 150px 1fr; gap: 6px 16px; font-size: .95rem; }
.row dt { color: var(--muted); }
.row dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.row select { width: auto; padding: 8px 10px; }
.when { color: var(--muted); font-size: .85rem; }

@media (max-width: 900px) {
  .section { padding: 72px 0; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .pair { grid-template-columns: 1fr; }
  .link { height: 96px; }
  .link::before { top: 0; bottom: 0; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps::before { display: none; }
  .steps li { padding-left: 76px; }
  .steps li::before { position: absolute; left: 0; top: 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .cta { padding: 40px 28px; }
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--abyss); padding: 16px 24px 24px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .btn { margin: 8px 0 0; }
  .fields { grid-template-columns: 1fr; }
  .form, .success { padding: 24px; }
  .row dl { grid-template-columns: 1fr; }
  .hero::before { background: linear-gradient(0deg, var(--abyss) 8%, rgba(var(--abyss-rgb),.78) 60%, rgba(var(--abyss-rgb),.55)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy { animation: none; }
  .btn { transition: none; }
}

/* Spacing rhythm: consecutive plain sections share one gap instead of doubling it */
.section:not(.tint) + .section:not(.tint) { padding-top: 0; }
.tint + .section { padding-top: 64px; }
.page-hero + .section { padding-top: 40px; }
.page-hero .lead { margin-bottom: 0; }
.lead + .btn-row, .lead + .btn { margin-top: 28px; }
details ~ .btn-row { margin-top: 40px; }
.section-head h2:last-child { margin-bottom: 0; }
.checks + .btn { margin-top: 8px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-head h2 { margin: 0; }
#login h2 { margin-bottom: 24px; }
#login .btn { margin-top: 20px; }
.foot ul { align-content: start; }
