/* Ingegnere F1 — Landing page
   Design system Arborae, HTML + CSS, no build step.
   Direction (Unslop): the pit wall at night. Quiet ink-green neutrals, the Arborae green as the one
   accent, the radio panel in the hero as the one rich moment, a radio waveform as the signature.
   Dark by default, light with prefers-color-scheme. Motion (motion.dev) only for entrances, optional.
*/

:root {
  color-scheme: dark light;

  /* Ink-green ramp (dark) */
  --bg: #0a0d0c;
  --bg-deep: #070a09;
  --surface: #111614;
  --raised: #18201d;
  --hairline: rgba(236, 241, 239, 0.08);
  --hairline-strong: rgba(236, 241, 239, 0.14);

  --text: #ecf1ef;
  --muted: #a3b1ac;
  --dim: #7d8a85;

  --brand: #00b585;
  --brand-hover: #19c796;
  --brand-ink: #3ecf9f;
  --on-brand: #04110d;
  --accent-text: #00b585;

  --ok: #4cc38a;
  --warn: #e2a336;
  --bad: #e5484d;
  --win: #5aa9e6;

  --code-bg: #070a09;
  --code-text: #c9e3db;
  --nav-bg: rgba(10, 13, 12, 0.92);
  --btn-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --shadow-float: 0 24px 48px -24px rgba(0, 0, 0, 0.7);
  --shadow-small: none;

  --radius-control: 10px;
  --radius-card: 16px;
  --radius-panel: 20px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 160ms;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

/* Light theme: neutral ramp, darker greens where green is text (AA on white) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8f7;
    --bg-deep: #eef1ef;
    --surface: #ffffff;
    --raised: #eef2f0;
    --hairline: rgba(20, 28, 25, 0.09);
    --hairline-strong: rgba(20, 28, 25, 0.16);

    --text: #141c19;
    --muted: #4b5652;
    --dim: #5f6a66;

    --brand: #00b585;
    --brand-hover: #00a377;
    --brand-ink: #007a59;
    --on-brand: #04110d;
    --accent-text: #007a59;

    --ok: #16a34a;
    --warn: #c27c0e;
    --bad: #dc2626;
    --win: #2b7bc0;

    --code-bg: #f1f4f2;
    --code-text: #1f2b27;
    --nav-bg: rgba(247, 248, 247, 0.94);
    --btn-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.24);
    --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-small: 0 1px 2px rgba(0, 0, 0, 0.05);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(0, 181, 133, 0.3); }

img { max-width: 100%; border-radius: 8px; }

/* --- Layout --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5.2vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

h3 { font-size: 1.0625rem; margin-bottom: 8px; }

p { margin: 0 0 16px; color: var(--muted); }

b { font-weight: 600; color: var(--text); }

a { color: inherit; text-decoration: none; }

/* The second half of the headline in the Arborae green, solid (no gradient) */
.accent-text { color: var(--accent-text); }

/* --- Icons (lucide, one size, one stroke) --- */
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Signature: the radio waveform --- */
.wave { display: block; flex: none; }
.wave rect { fill: currentColor; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 1rem;
}

.brand-main {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--brand-ink);
  background: var(--raised);
  border: 1px solid var(--hairline);
}

.nav-links { display: flex; gap: 28px; }

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--fast) var(--ease);
}

.nav-links a:hover { color: var(--text); }

.nav-cta { display: flex; gap: 8px; align-items: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-control);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease),
    color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.btn:active { transform: scale(0.98); }

.btn.primary {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: var(--btn-highlight);
}

.btn.primary:hover { background: var(--brand-hover); }

.btn.ghost {
  border-color: var(--hairline-strong);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.btn.ghost:hover { background: var(--raised); }

.btn.small { height: 36px; padding: 0 16px; font-size: 0.875rem; border-radius: 8px; }

.lang-btn { font-family: var(--font-mono); min-width: 56px; }

/* --- Hero --- */
.hero {
  padding: 144px 0 96px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.65;
  max-width: 34rem;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.status-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 32px;
  max-width: 34rem;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}

.status-note .icon { color: var(--dim); margin-top: 1px; }

.topics {
  display: flex;
  gap: 4px 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--dim);
}

/* --- Hero moment: the radio panel --- */
.window {
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-panel);
  overflow: hidden;
  box-shadow: var(--shadow-float);
}

.hero .window { max-width: 520px; margin-left: auto; }

.win-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--hairline);
}

.win-bar .icon { width: 16px; height: 16px; color: var(--brand-ink); }

.win-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.app-body { display: grid; grid-template-columns: 168px 1fr; }

.app-side {
  padding: 12px 8px;
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-deep);
}

.app-card {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.app-card b { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.app-card span { display: block; font-size: 0.75rem; color: var(--dim); line-height: 1.4; }
.app-card.active {
  background: var(--raised);
  border-color: var(--hairline);
  box-shadow: var(--btn-highlight);
}
.app-card.active b { color: var(--text); }

.app-main { padding: 16px; display: flex; flex-direction: column; gap: 8px; }

.app-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 24px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
}
.switch i {
  width: 28px;
  height: 16px;
  border-radius: 8px;
  background: var(--brand);
  position: relative;
}
.switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
}

.result {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
}
.result .g {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: currentColor;
}
.result b { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--text); }
.result span { display: block; font-size: 0.8125rem; color: var(--muted); line-height: 1.45; }

/* The call on air right now: the one rich spot */
.result.live { background: var(--raised); border-color: var(--hairline-strong); }
.result.live .wave { color: var(--brand-ink); margin-top: 8px; }

.mock-caption {
  margin: 12px 4px 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--dim);
}

/* --- Sections --- */
.section { padding-top: 96px; padding-bottom: 96px; }
.section + .section { border-top: 1px solid var(--hairline); }
.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head p { font-size: 1rem; }

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--brand-ink);
  margin-bottom: 12px;
}

/* --- Cards --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-small);
  transition: border-color var(--fast) var(--ease);
}

.card:hover { border-color: var(--hairline-strong); }

.card p { font-size: 0.9375rem; margin: 0; }
.card-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: var(--raised);
  color: var(--muted);
}

/* Second row of features: lighter, so the grid has a rhythm */
.card.plain {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  box-shadow: none;
  padding: 24px 0 0;
  margin-top: 16px;
}
.card.plain .card-icon { width: auto; height: auto; background: transparent; place-items: start; }

.card ul { margin: 16px 0 0; padding: 0; list-style: none; }
.card li {
  position: relative;
  padding-left: 16px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 4px 0;
}
.card li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.75em;
  width: 6px;
  height: 1px;
  background: var(--dim);
}

/* --- Code --- */
pre {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--code-text);
  background: var(--code-bg);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline-strong) transparent;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1px 6px;
}

pre code { background: none; border: none; padding: 0; font-size: inherit; }

.quickstart {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 8px;
  box-shadow: var(--shadow-small);
}

.quickstart .hint {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
  padding: 16px 12px 12px;
}

/* --- Steps --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
  padding: 24px 0 0;
  border-top: 1px solid var(--hairline-strong);
}
.step-n {
  display: block;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}
.step p { font-size: 0.9375rem; margin: 0; }
.step code, .quickstart .hint code { white-space: nowrap; }

/* --- CTA --- */
.cta-box {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-small);
}

.cta-box h3 { font-size: 1.25rem; }
.cta-box p { margin: 4px 0 0; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--hairline);
  margin-top: 32px;
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--dim);
  font-size: 0.875rem;
}

.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-left .wave { color: var(--brand-ink); }
.footer-right { display: flex; gap: 24px; }
.footer-right a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  transition: color var(--fast) var(--ease);
}
.footer-right a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; border-radius: 6px; }

/* --- Entrance: hidden only while Motion is expected (class removed on failure or after 1.5 s) --- */
.motion-ready .reveal { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; }
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 120px; }
  .hero .window { max-width: 560px; margin: 0; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .card.plain { margin-top: 0; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-cta .btn.primary { display: none; }
  .hero { padding-top: 112px; padding-bottom: 64px; }
  h1 { font-size: 2.375rem; letter-spacing: -0.02em; }
  .lead { font-size: 1.0625rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .app-body { grid-template-columns: 1fr; }
  .app-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }
  .mock-caption { text-align: left; }
  .cta-box { flex-direction: column; align-items: flex-start; padding: 24px; }
  .footer { flex-direction: column; align-items: flex-start; }
}
