/* Ferrix website. Palette and type follow docs/brand/BRAND.md. */
:root {
  --bg: #0d0f12;
  --bg-alt: #111419;
  --surface: #161a20;
  --line: #262c35;
  --text: #eef1f5;
  --muted: #9aa4b2;
  --rust: #ff7a2b;
  --ember: #ffb547;
  --term-bg: #0a0c0f;
  --term-text: #c9d1db;
  --term-dim: #56606c;
  --shadow: 0 30px 80px rgba(0, 0, 0, .45);
  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, "Liberation Mono", monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f5f2;
    --bg-alt: #efebe5;
    --surface: #ffffff;
    --line: #e1dbd2;
    --text: #16181c;
    --muted: #5b6470;
    --rust: #c64a06;
    --ember: #a85f00;
    --shadow: 0 24px 60px rgba(40, 30, 20, .18);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--rust); text-underline-offset: 3px; }
code, kbd { font-family: var(--mono); font-size: .88em; }
p code, li code, h1 code, h3 code, summary code { color: var(--rust); }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* navigation */
.nav {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text);
         font-weight: 750; font-size: 19px; letter-spacing: -.02em; text-decoration: none; }
.nav nav { display: flex; gap: 22px; margin-left: auto; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav nav a:hover { color: var(--text); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--rust); color: #fff; font-weight: 650; text-decoration: none;
  padding: 12px 22px; border-radius: 10px; border: 1.5px solid var(--rust);
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-small { padding: 7px 14px; font-size: 14px; border-radius: 8px; }

/* hero */
.hero {
  position: relative; overflow: hidden; padding: 72px 0 56px;
  background:
    radial-gradient(600px 400px at 8% -10%, color-mix(in srgb, var(--rust) 22%, transparent), transparent 70%),
    url("assets/lattice.svg");
}
.hero-in { display: grid; grid-template-columns: 1fr; gap: 48px; }
.eyebrow { color: var(--rust); font-weight: 650; font-size: 14px; letter-spacing: .08em;
           text-transform: uppercase; margin: 0 0 14px; }
h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.04; letter-spacing: -.035em;
     margin: 0; font-weight: 800; max-width: 900px; }
h1 code { font-size: .86em; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 720px; margin: 22px 0 0; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.arches { color: var(--muted); font-size: 14px; font-weight: 550; margin-top: 18px; }
.hero-shot { margin: 0; }
.hero-shot img { display: block; border-radius: var(--radius); border: 1px solid var(--line);
                 box-shadow: var(--shadow); }
.hero-shot figcaption { color: var(--muted); font-size: 14px; margin-top: 12px; text-align: center; }

/* stats */
.stats { border-block: 1px solid var(--line); background: var(--bg-alt); }
.stats-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-in > div { padding: 28px 20px; border-left: 1px solid var(--line); }
.stats-in > div:first-child { border-left: 0; padding-left: 0; }
.stats b { display: block; font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stats span { color: var(--muted); font-size: 15px; }

/* gallery */
.gallery-sec { padding-bottom: 0; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gallery figure { margin: 0; }
.gallery img { display: block; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.gallery figcaption { color: var(--muted); font-size: 14.5px; margin-top: 10px; }
@media (max-width: 760px) { .gallery { grid-template-columns: minmax(0, 1fr); } }

/* sections */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.03em; line-height: 1.12; margin: 0 0 14px; }
h3 { font-size: 19px; letter-spacing: -.01em; margin: 0 0 8px; }
.sub { color: var(--muted); font-size: 19px; max-width: 760px; margin: 0 0 36px; }
.note { color: var(--muted); max-width: 860px; margin-top: 28px; }

.term {
  background: var(--term-bg); color: var(--term-text); font-family: var(--mono);
  font-size: 14px; line-height: 1.7; padding: 18px 20px; border-radius: 12px;
  border: 1px solid #262c35; overflow-x: auto; margin: 16px 0 0;
}
.term .ts { color: var(--term-dim); }
.term .hi { color: #ffb547; }
.term .c { color: #6f7a87; }
.term.big { font-size: 15px; }

.proof { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.proof > *, .grid > *, .built > *, .road > * { min-width: 0; }
.proof article, .card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.proof p { color: var(--muted); margin: 0; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.card p { color: var(--muted); font-size: 15.5px; margin: 0; }
.card h3::before { content: ""; display: block; width: 26px; height: 3px; border-radius: 2px;
                   background: var(--rust); margin-bottom: 14px; }

.built { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
.built p { color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 20px 22px; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px;
                       border-radius: 50%; background: var(--bg); border: 2px solid var(--rust); }
.timeline b { color: var(--text); }
.timeline time { display: block; font-family: var(--mono); font-size: 13px; color: var(--rust); }

.road { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.road > div { border-top: 3px solid var(--line); padding-top: 16px; }
.road p { color: var(--muted); margin: 0; }
.road .done { color: #3fb97c; }
.road .doing { color: var(--ember); }

.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; max-width: 820px; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 18px; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

.foot { padding: 32px 0; color: var(--muted); font-size: 14px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-in span { display: inline-flex; align-items: center; gap: 8px; }
.foot a { color: var(--muted); }

@media (max-width: 960px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .proof, .built { grid-template-columns: minmax(0, 1fr); }
  .stats-in { grid-template-columns: 1fr 1fr; }
  .stats-in > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats-in > div { border-top: 1px solid var(--line); }
  .stats-in > div:nth-child(-n+2) { border-top: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav nav { display: none; }
  .nav-in { justify-content: space-between; }
  .grid, .road { grid-template-columns: 1fr; }
  .stats-in > div { padding: 20px 12px; }
  .proof article, .card { padding: 20px; }
  .term { font-size: 12.5px; padding: 14px; }
  .stats-in > div:nth-child(odd) { padding-left: 0; }
  .stats b { font-size: 30px; }
  .section { padding: 60px 0; }
  .hero { padding-top: 44px; }
  .wrap { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
