/* ============================================================
   SourClient site — SOUR // ZEST
   Graphite ground + electric citrus accent. Dark-committed brand.
   Two type voices: Bebas Neue (display), Sansation (body),
   system mono (instrument readouts).
   ============================================================ */

@font-face {
  font-family: "Bebas Neue";
  src: url("../fonts/BebasNeue-Regular.ttf") format("truetype");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Sansation";
  src: url("../fonts/Sansation-Regular.ttf") format("truetype");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Sansation";
  src: url("../fonts/Sansation-Bold.ttf") format("truetype");
  font-weight: 700; font-display: swap;
}

:root {
  /* Graphite ground — never pure black */
  --bg:      #080B0F;
  --surface: #0E1319;
  --card:    #141B22;
  --hover:   #1B242E;
  --line:    #232D38;
  --line-soft: #171F27;

  /* Ink — never pure white */
  --fg:    #EAF0F2;
  --muted: #8A97A2;
  --faint: #5A6672;

  /* Accent — SourClient launcher green #087815 (exact).
     Solid fills use the exact green; on-dark text/lines use a legibility-lifted
     tint of the same hue so small marks stay readable on the graphite ground. */
  --accent:    #087815;          /* EXACT launcher accent — solid fills, primary CTAs, bars */
  --accent-hi: #0AA01D;          /* hover for solid fills */
  --accent-lo: #05590F;          /* pressed / active */
  --zest:      #2FC24A;          /* accent green for text/lines/marks on dark (legible) */
  --zest-hi:   #5BD870;          /* lighter accent text (code, hover) */
  --zest-lo:   #23A83C;          /* deeper accent text (eyebrows, keys) */
  --zest-ink:  #F1F8F2;          /* text on solid accent fills */
  --zest-glow: rgba(47, 194, 74, 0.14);

  /* Type */
  --display: "Bebas Neue", "Arial Narrow", sans-serif;
  --body: "Sansation", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* 4px rhythm */
  --u: 4px;
  --pad: clamp(20px, 5vw, 48px);
  --maxw: 1200px;
  --radius: 14px;
  --radius-sm: 8px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--zest); color: var(--zest-ink); }

/* subtle machined grid wash on the page ground */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 78% -10%, var(--zest-glow), transparent 60%),
    linear-gradient(180deg, #0A0E13 0%, var(--bg) 40%);
}

/* ---------- shell ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
section { position: relative; }
.pad-y { padding-block: clamp(64px, 10vw, 128px); }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--zest-lo); margin: 0 0 16px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; background: var(--zest); display: inline-block;
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; line-height: 0.92; margin: 0; }
h1 { font-size: clamp(56px, 11vw, 132px); text-transform: uppercase; }
h2 { font-size: clamp(38px, 6vw, 72px); text-transform: uppercase; }
h3 { font-size: clamp(24px, 3vw, 34px); text-transform: uppercase; }
.lede { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 56ch; }
.mono { font-family: var(--mono); }
.zest { color: var(--zest); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: 68px; display: flex; align-items: center;
  background: rgba(8, 11, 15, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(8, 11, 15, 0.9); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.brand b {
  font-family: var(--display); font-size: 26px; letter-spacing: 0.04em;
  text-transform: uppercase; font-weight: 400;
}
.brand b i { color: var(--zest); font-style: normal; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 14px; color: var(--muted); position: relative; padding: 6px 0;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--zest); transition: width 0.24s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--fg); cursor: pointer; padding: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-weight: 700; font-size: 15px;
  padding: 14px 22px; border-radius: var(--radius-sm);
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: var(--zest-ink);
  box-shadow: 0 0 0 0 var(--zest-glow);
}
.btn-primary:hover { background: var(--accent-hi); box-shadow: 0 8px 34px -12px rgba(10, 160, 29, 0.65); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--zest-lo); color: var(--zest); }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-lg { padding: 17px 28px; font-size: 16px; }

/* ---------- viewfinder frame (the signature) ---------- */
.frame { position: relative; }
.frame::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  --t: 16px; --w: 2px; --c: var(--zest);
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--t) var(--w),
    linear-gradient(var(--c), var(--c)) 0 0 / var(--w) var(--t),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--t) var(--w),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--w) var(--t),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--t) var(--w),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--w) var(--t),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--t) var(--w),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--w) var(--t);
  background-repeat: no-repeat;
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(48px, 8vw, 96px) clamp(64px, 10vw, 120px); }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 { margin-bottom: 22px; }
.hero h1 .l2 { color: var(--zest); display: block; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-meta {
  margin-top: 28px; display: flex; gap: 26px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--faint);
  letter-spacing: 0.06em;
}
.hero-meta b { color: var(--fg); font-weight: 400; }

/* instrument scope panel */
.scope {
  background: linear-gradient(160deg, var(--card), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  overflow: hidden;
}
.scope-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 20px;
}
.scope-live { display: inline-flex; align-items: center; gap: 8px; color: var(--zest); }
.scope-live::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--zest);
  box-shadow: 0 0 0 0 var(--zest); animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(196,242,78,0.5); }
  70%,100% { box-shadow: 0 0 0 9px rgba(196,242,78,0); }
}
.scope-logo { display: grid; place-items: center; padding: 18px 0 26px; }
.scope-logo img { width: min(56%, 220px); filter: drop-shadow(0 12px 40px rgba(155,203,58,0.25)); }
.readouts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.readout { padding: 16px 6px 4px; border-right: 1px solid var(--line); text-align: left; }
.readout:last-child { border-right: 0; }
.readout .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.readout .v { font-family: var(--display); font-size: 34px; line-height: 1; color: var(--fg); margin-top: 4px; }
.readout .v small { font-size: 14px; color: var(--zest-lo); }

/* ---------- section headers ---------- */
.sec-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head .lede { margin-top: 18px; }

/* ---------- feature bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; position: relative; overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
}
.tile:hover { border-color: #33414F; transform: translateY(-3px); }
.tile .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--zest-lo); }
.tile h3 { margin: 14px 0 10px; }
.tile p { color: var(--muted); margin: 0; font-size: 15px; }
.tile-wide { grid-column: span 4; }
.tile-half { grid-column: span 3; }
.tile-third { grid-column: span 2; }
.tile-metric .big {
  font-family: var(--display); font-size: clamp(52px, 7vw, 92px); line-height: 0.9;
  color: var(--zest); margin: 6px 0 0;
}
.tile-metric .big small { font-size: 0.32em; color: var(--muted); letter-spacing: 0.1em; }

/* ---------- stat band ---------- */
.band { border-block: 1px solid var(--line); background: var(--surface); }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.band-cell { padding: 40px 24px; border-right: 1px solid var(--line); }
.band-cell:last-child { border-right: 0; }
.band-cell .v { font-family: var(--display); font-size: clamp(40px, 5vw, 60px); line-height: 1; }
.band-cell .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-top: 8px; }

/* ---------- steps (download) ---------- */
.steps { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { display: grid; grid-template-columns: 84px 1fr; background: var(--card); }
.step + .step { border-top: 1px solid var(--line); }
.step .idx {
  font-family: var(--mono); font-size: 15px; color: var(--zest);
  display: grid; place-items: center; border-right: 1px solid var(--line); background: var(--surface);
}
.step .body { padding: 24px 28px; }
.step .body h3 { font-size: 22px; margin-bottom: 8px; }
.step .body p { color: var(--muted); margin: 0; font-size: 15px; }
.step .body code {
  font-family: var(--mono); font-size: 13px; background: var(--bg); color: var(--zest-hi);
  padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line);
}

/* ---------- callout / store teaser ---------- */
.callout {
  background: linear-gradient(150deg, var(--card), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(32px, 5vw, 64px); position: relative; overflow: hidden;
}
.callout .lede { margin-top: 16px; }

/* version / roadmap chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); background: var(--surface); display: inline-flex; align-items: center; gap: 9px;
}
.chip.live { color: var(--zest); border-color: var(--zest-lo); }
.chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--zest); }

/* pillar row */
.pillars { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pillar { padding: 30px 24px; border-right: 1px solid var(--line); }
.pillar:last-child { border-right: 0; }
.pillar .n { font-family: var(--mono); font-size: 12px; color: var(--zest-lo); }
.pillar h3 { font-size: 21px; margin: 12px 0 8px; }
.pillar p { color: var(--muted); font-size: 14px; margin: 0; }

/* placeholder screenshot slots — honest, labeled */
.shot {
  aspect-ratio: 16 / 10; border: 1px dashed var(--line); border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(255,255,255,0.015) 12px, rgba(255,255,255,0.015) 24px),
    var(--surface);
  display: grid; place-items: center; color: var(--faint);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
}

/* ---------- legal / prose ---------- */
.prose { max-width: 780px; }
.prose h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 8px; }
.prose h2 { font-size: 26px; margin: 44px 0 14px; }
.prose h3 { font-size: 19px; font-family: var(--body); font-weight: 700; letter-spacing: 0; text-transform: none; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--muted); font-size: 15px; line-height: 1.75; }
.prose a { color: var(--zest); border-bottom: 1px solid var(--line); }
.prose a:hover { border-color: var(--zest); }
.prose code { font-family: var(--mono); font-size: 13px; color: var(--zest-hi); word-break: break-word; }
.prose .meta { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.1em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose blockquote {
  margin: 24px 0; padding: 18px 22px; border-left: 3px solid var(--zest);
  background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--fg); font-weight: 700; font-size: 14px; letter-spacing: 0.02em;
}
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose .table-scroll { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--zest-lo); background: var(--surface); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: var(--fg); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding-block: 56px 40px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.foot .brand { margin-bottom: 16px; }
.foot p { color: var(--faint); font-size: 14px; max-width: 34ch; }
.foot h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); margin: 0 0 16px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot ul a { color: var(--muted); font-size: 14px; transition: color 0.2s var(--ease); }
.foot ul a:hover { color: var(--zest); }
.foot-base {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.06em;
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .scope { order: -1; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-wide, .tile-half, .tile-third { grid-column: span 2; }
  .band-grid { grid-template-columns: repeat(2, 1fr); }
  .band-cell:nth-child(2) { border-right: 0; }
  .band-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .pillar:nth-child(2n) { border-right: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
    gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 0;
  }
  .nav.open .nav-links a { padding: 14px var(--pad); }
}
@media (max-width: 560px) {
  .bento, .band-grid { grid-template-columns: 1fr; }
  .tile-wide, .tile-half, .tile-third, .band-cell { grid-column: span 1; }
  .band-cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .readouts { grid-template-columns: repeat(3, 1fr); }
  .step { grid-template-columns: 60px 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
