/* ============================================================
   RapidCheck — "Blueprint" design system
   Adopted from aihero.dev: light editorial grid, orange accent,
   heavy grotesque headlines, blocky buttons, hairline framing.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700;800;900&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Warm paper surfaces */
  --paper: #F7F5F1;
  --paper-2: #FBFAF7;
  --paper-3: #F1EDE6;
  --white: #FFFFFF;

  /* Ink + text — warmed off pure black */
  --ink: #221E18;
  --ink-soft: #3B362F;
  --body: #5F5B53;
  --muted: #8B867C;
  --faint: #ABA597;

  /* Hairlines / grid — softened so structure whispers */
  --line: #EBE7DF;
  --line-soft: #F1EDE6;
  --line-strong: #DFD9CD;

  /* Accent — orange-red, deepened a touch off neon */
  --accent: #E64E1E;
  --accent-bright: #FB6537;
  --accent-deep: #C8410E;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(230, 78, 30, 0.09);
  --accent-line: rgba(230, 78, 30, 0.26);

  /* Functional status hues (data/monitoring only) */
  --ok: #3E7C76;
  --ok-soft: rgba(62, 124, 118, 0.13);
  --amber: #D98A2B;
  --rose: #C9543F;

  /* Geometry — blocky, gently rounded */
  --r-xs: 4px;
  --r-sm: 7px;
  --r-md: 11px;
  --r-lg: 15px;

  --shadow-soft: 0 1px 2px rgba(26, 23, 20, 0.04);
  --shadow-float: 0 24px 60px -28px rgba(26, 23, 20, 0.28);

  --maxw: 1240px;
  --pad: clamp(0px, 0vw, 0px); /* frame handles gutter */
  --gut: clamp(20px, 4.4vw, 56px);

  --font-display: 'Schibsted Grotesk', sans-serif;
  --font-body: 'Hanken Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ---------- Framed layout ----------
   The signature: a central column bounded by vertical hairlines,
   with sections stacked and divided by horizontal hairlines. */
.frame {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  border-inline: 1px solid var(--line);
}
.wrap { padding-inline: var(--gut); }
.frame > * { } /* sections inside frame */
.ruled { border-top: 1px solid var(--line); }
.ruled-b { border-bottom: 1px solid var(--line); }

.section { padding-block: clamp(56px, 7vw, 104px); }
.section-sm { padding-block: clamp(36px, 4.5vw, 60px); }

/* Background helpers */
.bg-paper { background: var(--paper); }
.bg-paper2 { background: var(--paper-2); }
.bg-paper3 { background: var(--paper-3); }
.bg-white { background: var(--white); }
.bg-ink { background: var(--ink); color: var(--paper); }

/* ---------- Hatch texture ---------- */
.hatch {
  background-image: repeating-linear-gradient(45deg, var(--line-strong) 0 1px, transparent 1px 8px);
}
.hatch-accent {
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.6) 0 1px, transparent 1px 7px);
}

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); }

.display {
  font-size: clamp(40px, 5.6vw, 66px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 700; letter-spacing: -0.018em; line-height: 1.07; text-wrap: balance; }
.h3 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; letter-spacing: -0.015em; }
.accent-text { color: var(--accent); }

.lead {
  font-family: var(--font-body);
  font-size: clamp(16.5px, 1.4vw, 19px);
  line-height: 1.62;
  color: var(--body);
  text-wrap: pretty;
  max-width: 60ch;
  font-weight: 400;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}

.muted { color: var(--body); }

/* ---------- Buttons (blocky) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 15px;
  letter-spacing: -0.005em;
  padding: 13px 22px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .12s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-deep); }

.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #000; }

.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }

.btn-lg { padding: 16px 26px; font-size: 16px; }

/* Play-triangle accent button (AI Hero "Start Learning" style) */
.btn-play { position: relative; padding-left: 22px; overflow: hidden; }
.btn-play .tri { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid currentColor; }

/* ---------- Pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.04em;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--body);
  background: var(--white);
}
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--r-xs);
  background: var(--accent-soft); color: var(--accent-deep); font-weight: 500;
}

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(62,124,118,0.5); animation: pulse 2.4s infinite; flex: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(62,124,118,0.4); }
  70% { box-shadow: 0 0 0 6px rgba(62,124,118,0); }
  100% { box-shadow: 0 0 0 0 rgba(62,124,118,0); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(130%);
  border-bottom: 1px solid var(--line);
}
.site-header .frame { border-inline: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 26px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 18.5px; letter-spacing: -0.02em; color: var(--ink); }
.brand-mark {
  width: 28px; height: 28px; border-radius: var(--r-xs);
  background: var(--ink); color: var(--white);
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 17px; height: 17px; }
.nav-links { display: flex; align-items: center; gap: 24px; margin-left: 12px; }
.nav-links a { font-family: var(--font-display); font-size: 14.5px; color: var(--ink-soft); font-weight: 500; transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-actions .signin { font-family: var(--font-display); font-size: 14.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.nav-actions .signin:hover { color: var(--accent); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-actions .signin { display: none; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.card-flat {
  background: var(--paper-2);
  border: 1px solid var(--line);
}

/* ---------- Cells (gridded children, gap:0 + dividers) ---------- */
.cells { display: grid; }
.cells > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Section heads ---------- */
.sec-head { max-width: 640px; }
.sec-head .h2 { margin-top: 14px; }
.sec-head .lead { margin-top: 16px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); }
.site-footer .frame { border-inline: 1px solid var(--line); }
.footer-grid {
  display: grid; grid-template-columns: 1.7fr repeat(3, 1fr);
}
.footer-grid > * { padding: 44px var(--gut); border-right: 1px solid var(--line); }
.footer-grid > *:last-child { border-right: 0; }
.footer-col h5 { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); font-weight: 700; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14.5px; color: var(--body); padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: var(--accent); }
.footer-about .brand { margin-bottom: 14px; }
.footer-about .lead { font-size: 14.5px; max-width: 32ch; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px var(--gut); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.footer-bottom .links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-family: var(--font-display); font-weight: 500; }
.footer-bottom .links a:hover { color: var(--accent); }
.footer-bottom .socials { display: flex; align-items: center; gap: 8px; }
.footer-bottom .socials a {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--ink-soft);
  transition: color .15s, border-color .15s, background .15s;
}
.footer-bottom .socials a:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.footer-bottom .socials svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > * { border-bottom: 1px solid var(--line); }
  .footer-about { grid-column: 1 / -1; }
}

/* ---------- Misc ---------- */
.kicker-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.fade-edge-r { -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); }

.up { color: var(--ok); }
.warn { color: var(--amber); }

/* ---------- Motion: gentle scroll reveal ---------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
  .reveal.in { opacity: 1; transform: none; }
}

