/*
 * Primer — v4 stylesheet
 * ───────────────────────────────────────────────────────────
 * Single source of truth for the "cutout panels" direction:
 * black + lime as the identity layer, cream as the product
 * surface layer. Self-hosted fonts — no CDN, no silent fallback.
 *
 * Sections:
 *   1.  Fonts                     (@font-face)
 *   2.  Design tokens             (:root)
 *   3.  Reset & base              (*, html, body)
 *   4.  Type scale                (h1, h2, h3, p)
 *   5.  Layout primitives         (.section, .section-inner)
 *   6.  Header & nav              (header, nav, .logo)
 *   7.  Buttons & links           (.btn-primary, .btn-secondary)
 *   8.  Eyebrow / labels          (.eyebrow)
 *   9.  Cards                     (.card, .feature-card)
 *  10.  Windows / screenshots     (.window)
 *  11.  Footer                    (footer)
 *  12.  Responsive
 */


/* ============================================================
 * 1. FONTS
 * ============================================================ */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* No 800 weight exists in this family — 700 is the heaviest available.
   Anything styled font-weight:800 renders at 700; don't request a
   weight the font doesn't ship. */

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}


/* ============================================================
 * 2. DESIGN TOKENS
 * ============================================================ */
:root {
  /* Brand */
  --black:       #09090B;
  --cream:       #FAF8F5;
  --white:       #FFFFFF;
  --ink:         #1C1917;
  --muted:       #78716C;
  --muted-ondark:#A8A29A;
  --dim:         #8A8782;
  --line-light:  #DED9D2;
  --line-dark:   #2A2A2C;
  --lime:        #BAEA2A;
  --lime-dim:    #7A9A1A;
  --rust:        #E84536;
  --rust-dim:    #B7410E;

  /* Fonts */
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --page-max: 1180px;
  --gutter:   40px;
}


/* ============================================================
 * 3. RESET & BASE
 * ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
code {
  font-family: var(--mono);
}


/* ============================================================
 * 4. TYPE SCALE
 * ============================================================ */
h1 {
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  text-wrap: balance;
}
h2 {
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  text-wrap: balance;
}
h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
}
p {
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 20px;
}


/* ============================================================
 * 5. LAYOUT PRIMITIVES
 * ============================================================ */
.section {
  padding: 110px var(--gutter);
}
.section-inner {
  max-width: var(--page-max);
  margin: 0 auto;
}
.split {
  display: flex;
  align-items: center;
  gap: 64px;
}
.split-fixed {
  flex: 0 0 420px;
}
.split-fluid {
  flex: 1 1 auto;
  min-width: 0;
}

/* Theme surfaces — pair with these rather than hardcoding bg colors */
.on-black   {
  background-color: var(--black);
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--white);
}
.on-cream   { background: var(--cream); color: var(--ink); }

/* Scroll reveal — paired with assets/js/reveal.js */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}


/* ============================================================
 * 6. HEADER & NAV
 * ============================================================ */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
}
.logo { display: flex; align-items: center; gap: 10px; }
nav {
  display: flex;
  gap: 30px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--muted-ondark);
  font-weight: 600;
}
nav a {
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--lime);
  transition: right 0.25s ease;
}
nav a:hover { color: var(--white); }
nav a:hover::after { right: 0; }


/* ============================================================
 * 7. BUTTONS & LINKS
 * ============================================================ */
.btn-primary {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 13px 26px;
  border-radius: 3px;
  background: var(--ink);
  color: var(--cream);
}
.btn-secondary {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 13px 26px;
  border-radius: 3px;
  border: 1px solid var(--line-light);
  color: var(--ink);
}
.hdr-cta {
  display: inline-block;
  background: var(--lime);
  color: var(--black);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 10px 18px;
  border-radius: 2px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--lime-dim);
  padding-bottom: 3px;
}


/* ============================================================
 * 8. EYEBROW / LABELS
 * ============================================================ */
.eyebrow {
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime-dim);
  margin: 0 0 22px;
}
.on-black .eyebrow { color: var(--lime); }


/* ============================================================
 * 9. CARDS
 * ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: 3px;
  padding: 30px 26px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--lime-dim);
  box-shadow: 0 16px 36px -16px rgba(0,0,0,0.25);
}
.on-black .card {
  background: var(--line-dark);
  border: 1px solid transparent;
}
.on-black .card:hover {
  border-color: var(--lime-dim);
  box-shadow: 0 16px 36px -16px rgba(0,0,0,0.6);
}
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.65; margin: 0; }
.on-black .card p { color: var(--muted-ondark); }

.fact-row { display: flex; gap: 12px; align-items: flex-start; }
.fact-row .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--lime-dim);
  margin-top: 7px;
  flex: none;
}
.on-black .fact-row .dot { background: var(--lime); }
.fact-row p { font-size: 14px; margin: 0; }
.fact-row strong { color: var(--ink); font-weight: 700; }
.on-black .fact-row strong { color: var(--white); }


/* ============================================================
 * 10. WINDOWS / SCREENSHOTS
 * ============================================================ */
.window {
  background: var(--white);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--line-light);
  box-shadow: 0 40px 90px -20px rgba(0,0,0,0.25);
}
.on-black .window { box-shadow: 0 40px 100px -20px rgba(0,0,0,0.6); }
.window img { display: block; width: 100%; height: auto; }


/* ============================================================
 * 11. FOOTER
 * ============================================================ */
footer {
  padding: 36px var(--gutter);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--dim);
  border-top: 1px solid var(--line-dark);
}
footer a:hover { color: var(--white); }


/* ============================================================
 * 12. RESPONSIVE
 * ============================================================ */
@media (max-width: 860px) {
  .split { flex-direction: column; gap: 40px; }
  .split-fixed { flex: 1 1 auto; }
  nav { display: none; }
  .section { padding: 70px 24px; }
}
