/* ─────────────────────────────────────────────────────────────────────────────
   Redline OS — marketing site (redlineos.ai)
   Tokens are the locked RedlineOS brand system:
   https://design.redlineos.ai/redlineos-brand.html
   Rules honoured here: red and cyan never share an edge (buffered by --night /
   surface / whitespace); cyan is dark-surface only; red = brand moments +
   redline states, never the default button fill; display face Space Grotesk,
   body Inter. The logo lockup is locked — mark + REDLINE + gauge dial O + S.
   ───────────────────────────────────────────────────────────────────────────── */
:root {
  /* logo — locked */
  --s-top: #743939;
  --s-bottom: #e5242a;
  --mark-top: #d24b4b;

  /* core */
  --red: #e5242a;
  --red-soft: #d24b4b;
  --cyan-hot: #1fc3d8;
  --cyan: #0e8a99;
  --night: #0c0f12;
  --ink: #14171b;
  --paper: #ffffff;

  /* marketing dark surfaces */
  --bg: #0c0f12;
  --bg-alt: #10141a;
  --surface: #14181d;
  --raised: #1b2127;
  --text: #eef1f3;
  --soft: #9aa4ad;
  --faint: #6b7383;
  --line: #242b32;

  --display: 'Space Grotesk', 'Space Grotesk Fallback', ui-sans-serif, system-ui, sans-serif;
  --body: 'Inter', 'Inter Fallback', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1160px;
  --r: 14px;
}

/* Self-hosted latin cuts. font-display: optional = never swap after first
   paint, so the Google-Fonts FOUT (system → Grotesk/Inter) cannot happen.
   Preload both files from index.html so they usually win the first-paint
   window. Metric-matched Arial fallbacks keep layout stable if they miss. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: optional;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600 700;
  font-display: optional;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
  size-adjust: 107.64%;
  ascent-override: 90%;
  descent-override: 22.43%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Space Grotesk Fallback';
  src: local('Arial'), local('Helvetica Neue');
  size-adjust: 102%;
  ascent-override: 93%;
  descent-override: 23%;
  line-gap-override: 0%;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--cyan-hot); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.15rem, 4vw, 2rem); }
.narrow { max-width: 860px; }
.center { text-align: center; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--surface); color: var(--text); padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--cyan-hot); outline-offset: 3px; border-radius: 4px; }

/* ── Type ──────────────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 700; line-height: 1.02; }
h2 { font-size: clamp(1.85rem, 4vw, 2.7rem); font-weight: 600; line-height: 1.1; }
h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0 0 1rem; }
.lede { color: var(--soft); font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 58ch; margin: 1.1rem 0 0; }
.center-lede { margin-left: auto; margin-right: auto; }
.prose { color: var(--soft); font-size: clamp(1.02rem, 1.5vw, 1.16rem); margin: 1.4rem 0 0; }
.note { color: var(--faint); font-size: 0.875rem; font-style: italic; margin-top: 1.4rem; }
.kicker {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: #e07074; margin: 0 0 0.5rem;
}
.accent-cyan { color: var(--cyan-hot); }

/* ── Brand lockup (locked — B·1) ───────────────────────────────────────── */
.lk {
  display: inline-flex; align-items: center; gap: 0.55em; line-height: 1; white-space: nowrap;
  font-family: var(--display); font-size: 1.15rem; color: var(--paper);
}
.lk:hover { text-decoration: none; }
.lk-mark { height: 1.75em; width: 1.75em; flex: none; display: block; border-radius: 0.3em; }
.lk-word { display: inline-flex; align-items: center; min-width: 0; }
.lk-wm { font-weight: 600; letter-spacing: 0.055em; color: var(--paper); }
.lk-gauge { width: 0.84em; height: 0.84em; margin: 0 0.1em 0 0.08em; flex: none; display: block; }
.lk-s {
  font-weight: 600; font-size: 1.14em; letter-spacing: 0.02em;
  background: linear-gradient(180deg, var(--s-top) 12%, var(--s-bottom) 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lk-sm { font-size: 0.95rem; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--body); font-weight: 600; font-size: 0.98rem;
  padding: 0.82rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
/* Interaction is cyan/teal on dark — red stays a brand moment (B·5). */
.btn-primary { background: var(--cyan); color: #fff; }
.btn-primary:hover { background: #12a0b1; }
.btn-ghost { background: rgba(255,255,255,0.04); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan-hot); color: var(--cyan-hot); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }
.center-row { justify-content: center; }

/* ── Nav ───────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--night) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.nav[data-scrolled] { border-bottom-color: var(--line); background: color-mix(in srgb, var(--night) 96%, transparent); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: var(--soft); font-size: 0.94rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.btn { color: #fff; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 10px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; inset: 68px 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 0.5rem 1.15rem 1.25rem;
    display: none;
  }
  .nav[data-open] .nav-links { display: flex; }
  .nav-links a { padding: 0.8rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-links a.btn { margin-top: 1rem; border-bottom: 0; justify-content: center; }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg picture, .hero-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  max-width: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center 68%;
}
@media (max-width: 700px) {
  .hero-bg img { object-position: center 40%; }
  .hero-in { padding-block: 3.25rem 3.6rem; }
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12,15,18,0.92) 0%,
    rgba(12,15,18,0.82) 32%,
    rgba(12,15,18,0.86) 62%,
    var(--bg) 100%
  );
}
.hero-in { padding: clamp(4.5rem, 12vh, 8.5rem) clamp(1.15rem, 4vw, 2rem) clamp(4.5rem, 11vh, 7.5rem); text-align: center; }
.hero h1 { margin: 1.1rem auto 0; max-width: 20ch; }
.hero .lede { margin-left: auto; margin-right: auto; }
.hero .cta-row { justify-content: center; }
.pill {
  display: inline-block; margin: 0;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cyan-hot);
  border: 1px solid color-mix(in srgb, var(--cyan-hot) 42%, var(--night));
  background: var(--night);
  padding: 0.4rem 0.95rem; border-radius: 999px;
}
.hero-more { display: inline-block; margin-top: 2.2rem; color: var(--faint); font-size: 0.9rem; }
.hero-more:hover { color: var(--cyan-hot); text-decoration: none; }

/* ── Bands ─────────────────────────────────────────────────────────────── */
.band { padding: clamp(3.75rem, 9vh, 6.5rem) 0; border-top: 1px solid var(--line); }
.band.alt { background: var(--bg-alt); }
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.cards { list-style: none; margin: 2.75rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .cards.four, .cards.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards.four, .cards.three { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.4rem 1.35rem 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--cyan-hot) 40%, var(--line)); transform: translateY(-2px); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--soft); font-size: 0.95rem; margin: 0; }
.card .num { font-family: var(--mono); font-size: 0.75rem; color: var(--faint); }
.ico {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: color-mix(in srgb, var(--cyan) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--cyan-hot) 26%, transparent);
  color: var(--cyan-hot); margin-bottom: 1rem;
}
.card-top .ico { margin-bottom: 0; }
.ico svg { width: 19px; height: 19px; stroke-linecap: round; stroke-linejoin: round; }

/* ── Feature list (AI section) ─────────────────────────────────────────── */
.feats { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; gap: 1.4rem; }
.feats li { padding-left: 1.1rem; border-left: 2px solid var(--line); }
.feats h3 { margin-bottom: 0.3rem; }
.feats p { color: var(--soft); font-size: 0.95rem; margin: 0; }
.stamp {
  margin-top: 2rem; font-family: var(--display); font-size: 1.02rem; color: var(--cyan-hot);
}

/* ── Screenshot ────────────────────────────────────────────────────────── */
.shot { margin: 0; }
.shot img {
  display: block; width: 100%; height: auto; border-radius: var(--r);
  border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.shot figcaption { color: var(--faint); font-size: 0.85rem; margin-top: 0.8rem; }

/* ── Ticks + quote ─────────────────────────────────────────────────────── */
.ticks { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0.85rem; }
.ticks li { position: relative; padding-left: 1.9rem; color: var(--soft); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 10px; border-radius: 3px;
  background: var(--cyan-hot);
}
.quote {
  margin: 0; padding: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  border-left: 3px solid var(--red-soft);
  font-family: var(--display); font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.35; color: var(--text);
}

/* ── Reasons ───────────────────────────────────────────────────────────── */
.reasons { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem 2rem; }
@media (max-width: 800px) { .reasons { grid-template-columns: 1fr; } }
.reasons li {
  display: flex; gap: 0.9rem; align-items: flex-start; color: var(--soft);
  border-top: 1px solid var(--line); padding-top: 0.9rem; font-size: 0.97rem;
}
.reasons .n { font-family: var(--mono); font-size: 0.78rem; color: var(--red-soft); padding-top: 0.28rem; }

/* ── ROI ───────────────────────────────────────────────────────────────── */
.roi .stats {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.5rem, 3.5vw, 2.1rem);
}
.stats-head { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 0 0 1.25rem; }
.stats dl { margin: 0; display: grid; gap: 1rem; }
.stats dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.9rem; }
.stats dt { color: var(--soft); font-size: 0.94rem; }
.stats dd { margin: 0; font-family: var(--display); font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 600; }
.stats .note { margin-top: 1.1rem; }

/* ── Closer ────────────────────────────────────────────────────────────── */
.closer {
  padding: clamp(4.5rem, 11vh, 7rem) 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, color-mix(in srgb, var(--cyan) 16%, transparent), transparent 70%),
    var(--bg);
}
.closer h2 { font-size: clamp(2.1rem, 5.2vw, 3.3rem); font-weight: 700; }
.tag {
  margin-top: 2.4rem; font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--faint);
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 3.25rem 0 1.5rem; }
.foot-in { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 800px) { .foot-in { grid-template-columns: 1fr 1fr; } }
.foot-brand p { color: var(--soft); font-size: 0.85rem; margin: 0.9rem 0 0; }
.foot nav { display: flex; flex-direction: column; gap: 0.55rem; }
.foot nav h2 {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 0.35rem; font-weight: 500;
}
.foot nav a { color: var(--soft); font-size: 0.92rem; }
.foot nav a:hover { color: var(--cyan-hot); text-decoration: none; }
.foot-legal { margin-top: 2.75rem; padding-top: 1.35rem; border-top: 1px solid var(--line); }
.foot-legal p { color: var(--faint); font-size: 0.8rem; margin: 0; }

/* ── Reveal on scroll (progressive enhancement — see js/site.js) ───────── */
html.anim .reveal { opacity: 0; transform: translateY(14px); }
html.anim .reveal.inview {
  opacity: 1; transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.anim .reveal { opacity: 1 !important; transform: none !important; }
  .btn:hover, .card:hover { transform: none; }
}
