/* ════════════════════════════════════════════════════════════════════════════
   FALAK · Landing
   xAI design language — dark canvas, Geist 400, Geist Mono eyebrows,
   pill buttons, charcoal cards, hairline borders, no shadows.
   Per DESIGN.md.
   ════════════════════════════════════════════════════════════════════════════ */

body.landing {
  /* — Tokens — */
  --canvas:       #0a0a0a;
  --canvas-soft:  #1a1c20;
  --canvas-card:  #191919;
  --canvas-mid:   #363a3f;
  --hairline:     #212327;
  --hairline-bright: rgba(255,255,255,0.10);

  --ink:       #ffffff;
  --body:      #dadbdf;
  --body-mid:  #7d8187;
  --mute:      #5a5e64;

  --pill-border: rgba(255,255,255,0.25);
  --pill-border-hover: rgba(255,255,255,0.55);

  --accent-sunset:  #ff7a17;
  --accent-dusk:    #7c3aed;
  --accent-twilight:#c4b5fd;
  --accent-breeze:  #a0c3ec;

  --container: 1200px;
  --gutter: 24px;
  --r-pill: 9999px;
  --r-card: 8px;

  --font-sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", "SF Mono", Menlo, monospace;

  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01";
}

body.landing * { box-sizing: border-box; }
body.landing a { color: var(--ink); text-decoration: none; }

body.landing ::selection { background: rgba(255,255,255,0.18); color: var(--ink); }

/* ─── Typography scale — weight 400 everywhere, tight negative tracking ─────── */
body.landing .display-xl {
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
body.landing .display-lg {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
body.landing .display-md {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
body.landing .display-sm {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

body.landing .lead {
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  color: var(--body);
  max-width: 640px;
  letter-spacing: 0;
}

body.landing .eyebrow,
body.landing .caption-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
body.landing .caption-mono { color: var(--body-mid); font-size: 12px; letter-spacing: 1.2px; }
body.landing .caption-center { display: block; text-align: center; margin-top: 18px; }

/* tabular numbers everywhere — every digit aligns */
body.landing { font-variant-numeric: tabular-nums; }

/* live dot */
body.landing .dot-live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-sunset);
  box-shadow: 0 0 0 0 rgba(255,122,23,0.6);
  animation: live-pulse 2.4s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,122,23,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(255,122,23,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,122,23,0); }
}

/* ─── Pill buttons — the brand's entire interactive vocabulary ────────────── */
body.landing .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--pill-border);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}
body.landing .pill:hover {
  border-color: var(--pill-border-hover);
  background: rgba(255,255,255,0.04);
  color: var(--ink);
}

body.landing .pill-solid {
  background: var(--ink);
  color: var(--canvas);
  border-color: var(--ink);
}
body.landing .pill-solid:hover {
  background: rgba(255,255,255,0.94);
  color: var(--canvas);
  border-color: rgba(255,255,255,0.94);
}

body.landing .link-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--body);
  transition: color 200ms ease;
}
body.landing .link-mono:hover { color: var(--ink); }

/* ─── Nav ─────────────────────────────────────────────────────────────────── */
body.landing .nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(10,10,10,0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
body.landing .nav-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: -0.01em;
}
body.landing .mark-dot {
  width: 9px; height: 9px;
  background: var(--ink);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}
body.landing .mark-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  animation: live-pulse 2.4s ease-out infinite;
}

body.landing .nav-links {
  display: flex;
  gap: 28px;
}
body.landing .nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--body);
  transition: color 200ms ease;
}
body.landing .nav-links a:hover { color: var(--ink); }

body.landing .nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */
body.landing .hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
  isolation: isolate;
}

/* Background image bleeds to the viewport edges; horizontal fade keeps the
   left half pure canvas so the text reads on solid black. */
body.landing .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
body.landing .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
  filter: saturate(0.88) contrast(1.04);
}
body.landing .hero-bg-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      var(--canvas) 0%,
      var(--canvas) 38%,
      rgba(10,10,10,0.85) 52%,
      rgba(10,10,10,0.45) 70%,
      rgba(10,10,10,0.10) 90%,
      rgba(10,10,10,0.00) 100%
    ),
    /* gentle top/bottom shading so the image blends into the page bands */
    linear-gradient(
      180deg,
      rgba(10,10,10,0.25) 0%,
      rgba(10,10,10,0.00) 18%,
      rgba(10,10,10,0.00) 82%,
      rgba(10,10,10,0.55) 100%
    );
}

body.landing .hero-wrap {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
body.landing .hero-text { max-width: 620px; min-width: 0; }
body.landing .hero .eyebrow { margin-bottom: 32px; }
body.landing .hero-headline { margin-bottom: 28px; max-width: 14ch; }
body.landing .hero .lead { margin-bottom: 36px; max-width: 540px; }

body.landing .cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

body.landing .hero-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.6px;
  color: var(--body-mid);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
body.landing .hero-meta span:first-child { color: var(--accent-sunset); }

/* ─── Bands & rules ───────────────────────────────────────────────────────── */
body.landing .band {
  max-width: var(--container);
  margin: 0 auto;
  padding: 96px var(--gutter);
}
body.landing .band-head {
  margin-bottom: 56px;
  max-width: 760px;
}
body.landing .band-head .eyebrow { margin-bottom: 22px; }
body.landing .band-head .display-md { margin-bottom: 18px; }
body.landing .band-head .lead { max-width: 660px; }

body.landing .rule {
  height: 1px;
  background: var(--hairline);
  width: 100%;
  /* draws in on scroll via JS */
  transform-origin: left;
}

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

body.landing .card {
  background: var(--canvas-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 28px;
  transition: border-color 200ms ease, background 200ms ease;
  position: relative;
}
body.landing .card:hover {
  border-color: rgba(255,255,255,0.16);
  background: #1c1c1c;
}
body.landing .card .caption-mono { margin-bottom: 32px; display: block; }
body.landing .card h3 { margin-bottom: 10px; color: var(--ink); }
body.landing .card p { color: var(--body); font-size: 15px; line-height: 1.55; }

/* data-card extras */
body.landing .card-meta {
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}
body.landing .card-meta li {
  display: flex; flex-direction: column;
  gap: 2px;
}
body.landing .card-meta span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--body-mid);
}
body.landing .card-meta b {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13px;
  color: var(--ink);
}

/* ─── Figures ─────────────────────────────────────────────────────────────── */
body.landing .figure {
  margin: 0;
}
body.landing .figure .caption-mono { display: block; margin-bottom: 14px; }
body.landing .figure-frame {
  background: var(--canvas-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow: hidden;
  padding: 12px;
}
body.landing .figure-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
body.landing .figure figcaption {
  margin-top: 14px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.55;
  max-width: 720px;
}

body.landing .model-stack {
  display: grid;
  gap: 24px;
  margin-bottom: 48px;
}

/* ─── Timeline ────────────────────────────────────────────────────────────── */
body.landing .timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 32px;
}
body.landing .timeline-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 10px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  color: var(--ink);
  background: var(--canvas-card);
}
body.landing .timeline-line {
  width: 28px;
  height: 1px;
  background: var(--hairline);
}

/* ─── Product steps ───────────────────────────────────────────────────────── */
body.landing .steps {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow: hidden;
}
body.landing .steps li {
  background: var(--canvas-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 200ms ease;
}
body.landing .steps li:hover { background: #1c1c1c; }
body.landing .step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--body-mid);
  letter-spacing: 0.6px;
}
body.landing .steps h4 { color: var(--ink); margin: 0; }
body.landing .steps p { color: var(--body); font-size: 14.5px; }

/* ─── Priority table ──────────────────────────────────────────────────────── */
body.landing .ptable {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--canvas-card);
}
body.landing .ptable header,
body.landing .ptable .pt-row {
  display: grid;
  grid-template-columns: 56px 1.4fr 110px 130px 1fr;
  gap: 18px;
  padding: 14px 22px;
  align-items: center;
}
body.landing .ptable header {
  background: transparent;
  color: var(--body-mid);
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
body.landing .pt-row {
  border-bottom: 1px solid var(--hairline);
  font-size: 14.5px;
  color: var(--ink);
  transition: background 200ms ease;
}
body.landing .pt-row:last-child { border-bottom: none; }
body.landing .pt-row:hover { background: rgba(255,255,255,0.025); }
body.landing .pt-row > span:first-child {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--body-mid);
}
body.landing .pt-row > span:nth-child(4),
body.landing .pt-row > span:nth-child(5) {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--body);
}

/* Risk tags — small outline pills, no fills (palette stays inside illustrations only) */
body.landing .risk-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.4px;
  background: transparent;
}
body.landing .risk-tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
body.landing .risk-high::before { background: var(--accent-sunset); }
body.landing .risk-med::before  { background: var(--accent-twilight); }
body.landing .risk-low::before  { background: var(--accent-breeze); }

/* ─── CTA finale ──────────────────────────────────────────────────────────── */
body.landing .cta {
  max-width: var(--container);
  margin: 0 auto;
  padding: 120px var(--gutter) 140px;
}
body.landing .cta .eyebrow { margin-bottom: 32px; }
body.landing .cta .display-xl { margin-bottom: 28px; max-width: 18ch; }
body.landing .cta .lead { margin-bottom: 40px; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
body.landing .footer {
  border-top: 1px solid var(--hairline);
  padding: 56px var(--gutter) 32px;
  background: var(--canvas);
}
body.landing .footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 56px;
}
body.landing .footer-brand p {
  margin-top: 14px;
  max-width: 280px;
  color: var(--body-mid);
  font-size: 14px;
}
body.landing .footer-grid > div { display: flex; flex-direction: column; gap: 10px; }
body.landing .footer-grid .caption-mono { margin-bottom: 4px; color: var(--body-mid); }
body.landing .footer-grid a,
body.landing .footer-grid span {
  font-size: 14px;
  color: var(--body);
  transition: color 200ms ease;
}
body.landing .footer-grid a:hover { color: var(--ink); }

body.landing .footer-bottom {
  max-width: var(--container);
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
body.landing .footer-bottom .caption-mono { color: var(--mute); }

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — DESIGN.md uses 768 as the single breakpoint
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  body.landing .grid-3 { grid-template-columns: repeat(2, 1fr); }
  body.landing .steps  { grid-template-columns: repeat(2, 1fr); }
  body.landing .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  body.landing .footer-grid > div:last-child { display: none; }

  /* Tablet: image stays as background but darkens further so text is readable
     when the hero-text spans more of the width */
  body.landing .hero-bg-fade {
    background:
      linear-gradient(
        90deg,
        var(--canvas) 0%,
        rgba(10,10,10,0.92) 55%,
        rgba(10,10,10,0.55) 80%,
        rgba(10,10,10,0.25) 100%
      ),
      linear-gradient(180deg, rgba(10,10,10,0.35) 0%, rgba(10,10,10,0) 30%, rgba(10,10,10,0) 70%, rgba(10,10,10,0.6) 100%);
  }
}

@media (max-width: 768px) {
  body.landing .nav { padding: 14px 20px; }
  body.landing .nav-links { display: none; }
  body.landing .link-mono { display: none; }

  body.landing .hero    { padding: 64px 0 56px; }
  body.landing .hero-wrap { padding: 0 20px; }
  body.landing .hero-bg-fade {
    /* Phone: image becomes a quiet textural backdrop — text always wins */
    background:
      linear-gradient(180deg,
        rgba(10,10,10,0.78) 0%,
        rgba(10,10,10,0.86) 55%,
        rgba(10,10,10,0.96) 100%);
  }
  body.landing .band    { padding: 64px 20px; }
  body.landing .cta     { padding: 80px 20px; }

  body.landing .grid-3 { grid-template-columns: 1fr; }
  body.landing .steps  { grid-template-columns: 1fr; }

  body.landing .ptable header,
  body.landing .ptable .pt-row {
    grid-template-columns: 36px 1fr 96px 100px;
    padding: 14px 16px;
    gap: 10px;
    font-size: 13px;
  }
  body.landing .ptable header span:last-child,
  body.landing .pt-row span:last-child { display: none; }

  body.landing .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  body.landing .footer-grid > div:last-child { display: flex; }

  body.landing .hero-meta { font-size: 11px; gap: 10px; }
}

@media (max-width: 480px) {
  body.landing .ptable header span:nth-child(4),
  body.landing .pt-row span:nth-child(4) { display: none; }
  body.landing .ptable header,
  body.landing .ptable .pt-row { grid-template-columns: 32px 1fr 90px; }
}
