/* ShowOnce design system. Inverted earthy palette: warm near-black, sand text, terracotta-orange and olive accents.
   Type: Unbounded (display), Manrope (text), JetBrains Mono (labels and data). All fonts self-hosted (OFL). */
@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #11100d;
  --bg-2: #16150f;
  --surface: #1b1a14;
  --surface-2: #23211a;
  --field: #0d0c0a;
  --line: #33302a;
  --line-strong: #4b463a;
  --ink: #f1e8d9;
  --muted: #b3a690;
  --accent: #e07b39;
  --accent-hi: #f08c4b;
  --accent-ink: #11100d;
  --terracotta: #c4592b;
  --link: #f0955a;
  --accent-soft: #2a1c12;
  --olive: #9aa65a;
  --olive-hi: #aab86a;
  --olive-soft: #20241a;
  --danger: #ef6a5b;
  --danger-soft: #33170f;
  --glow: 0 0 0 1px rgba(224, 123, 57, .45), 0 14px 44px -14px rgba(224, 123, 57, .55);
  --shadow: 0 24px 70px -36px rgba(0, 0, 0, .9);
  --radius: 14px;
  --radius-sm: 8px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --dur-1: 160ms;
  --dur-2: 260ms;
  --dur-3: 640ms;
  --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.65; color: var(--ink); background-color: var(--bg);
  background-image: linear-gradient(rgba(241, 232, 217, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(241, 232, 217, .035) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; line-height: 1.12; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.hide { display: none !important; }
.muted, .small { color: var(--muted); }
.small { font-size: 15px; }
.mono { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; font-weight: 700; transition: top var(--dur-2) var(--ease-out); }
.skip:focus { top: 12px; }

/* Nav */
nav.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.logo { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.logo .mark { position: relative; width: 22px; height: 22px; border: 2px solid var(--accent); border-radius: 6px; display: inline-grid; place-items: center; transition: transform var(--dur-2) var(--ease-spring); }
.logo .mark::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.logo:hover .mark { transform: rotate(90deg); }
nav.top .links { display: flex; gap: 26px; }
nav.top .links a { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 12px 0; position: relative; }
nav.top .links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-2) var(--ease-out); }
nav.top .links a:hover { color: var(--ink); }
nav.top .links a:hover::after { transform: scaleX(1); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border: 1px solid transparent; border-radius: 10px; padding: 12px 22px; font: inherit; font-size: 15px; font-weight: 750; letter-spacing: .01em; cursor: pointer; text-decoration: none; text-align: center; touch-action: manipulation; transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), background-color var(--dur-2), border-color var(--dur-2), color var(--dur-2); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-main { background: var(--accent); color: var(--accent-ink); }
.btn-main:hover { background: var(--accent-hi); box-shadow: var(--glow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }
.btn-olive { background: var(--olive); color: var(--accent-ink); }
.btn-olive:hover { background: var(--olive-hi); box-shadow: 0 0 0 1px rgba(154, 166, 90, .5), 0 14px 40px -14px rgba(154, 166, 90, .5); }
.btn-stop { background: var(--danger); color: var(--accent-ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* Panels */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.lift { transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2), box-shadow var(--dur-2); }
.lift:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
/* Corner marks: the neo-futurist "frame" used on the main panels. */
.frame::before, .frame::after { content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none; }
.frame::before { top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); border-top-left-radius: var(--radius); }
.frame::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); border-bottom-right-radius: var(--radius); }

/* Forms */
label { display: block; font-weight: 700; margin: 18px 0 8px; }
input[type=text], input[type=email], select, textarea { width: 100%; min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; font: inherit; color: var(--ink); background: var(--field); transition: border-color var(--dur-2), box-shadow var(--dur-2); }
input::placeholder, textarea::placeholder { color: #8a7f6d; }
input[type=text]:focus, input[type=email]:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 123, 57, .22); }
textarea { min-height: 110px; resize: vertical; }
.msg { margin-top: 10px; font-size: 15px; font-weight: 600; }
.msg.bad { color: var(--danger); }
.msg.ok { color: var(--olive); }

/* Section headers: left-aligned, indexed */
.sec-head { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; margin-bottom: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.sec-head .mono { color: var(--accent); padding-top: 6px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 40px); margin: 0 0 10px; }
.sec-head p { margin: 0; color: var(--muted); font-size: 17px; max-width: 40em; }

/* Footer */
footer.site { margin-top: 96px; background: var(--bg-2); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site .wrap { padding-top: 28px; padding-bottom: 36px; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--ink); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }
footer.site nav a { padding: 8px 0; }

/* Motion */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(50px, -36px, 0) scale(1.15); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* Elements below the fold start hidden only once JS has marked them, so nothing flashes or stays hidden without JS. */
.reveal { transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.reveal.pending { opacity: 0; transform: translateY(24px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .reveal.pending { opacity: 1; transform: none; }
}
@media (max-width: 760px) {
  nav.top .links a:not(.keep) { display: none; }
  .card { padding: 22px; }
  .sec-head { grid-template-columns: 1fr; gap: 10px; }
}
