/* ============================================================
   Sproq — brand foundation  ·  "from spark to shipped"
   Direction: late-night workshop / engineered warmth.
   ============================================================ */

:root {
  /* — palette — */
  --ink:        #171513;  /* warm near-black canvas              */
  --ink-2:      #1F1B17;  /* raised surface                       */
  --ink-3:      #29231D;  /* card / inset                         */
  --graphite:   #3A3530;  /* borders, code chrome                 */
  --filings:    #A89F96;  /* muted text — lifted to clear AA at small sizes */
  --paper:      #FBF7F0;  /* warm light                           */
  --paper-2:    #F1EBE0;
  --filament:   #FF7A1A;  /* THE spark — primary accent           */
  --ember:      #C2410C;  /* pressed / deep                       */
  --teal:       #19B9A4;  /* the mechanism (agents, in-progress)  */
  --green:      #34B765;  /* shipped / resolved                   */
  --coral:      #FF8A7A;  /* bug / alert (warm, never alarm-red)  */

  --line:       rgba(255,255,255,.09);
  --line-2:     rgba(255,255,255,.05);
  --glow:       0 0 60px rgba(255,122,26,.35);

  /* — type — */
  --display: 'Bricolage Grotesque', Georgia, serif;
  --body:    'Hanken Grotesk', system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;

  --r:   14px;
  --r-lg: 22px;
  --maxw: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--ink);
  color: #EFE8DF;
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* warm paper-grain texture over the whole dark canvas */
body::before {
  content:""; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .04; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--filament); color: var(--ink); }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

h1,h2,h3,h4 { font-family: var(--display); font-weight: 600; line-height: 1.04; letter-spacing: -.02em; color: #FFF6EC; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.35rem; letter-spacing: -.01em; }
p  { color: #D8CFC4; }
strong { color: #FFF6EC; font-weight: 600; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
section { padding: clamp(72px, 11vw, 140px) 0; position: relative; }

/* — eyebrow / kicker — */
.kicker {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--filament); display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px;
}
.kicker::before { content:""; width: 26px; height: 1px; background: var(--filament); opacity: .6; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: #C9C0B5; max-width: 56ch; }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--body); font-weight: 600;
  font-size: .98rem; padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .2s, box-shadow .2s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--filament); color: #1A1208; box-shadow: 0 6px 22px rgba(255,122,26,.32); } /* dark-on-amber */
.btn-primary:hover { background: #ff8c34; box-shadow: 0 8px 30px rgba(255,122,26,.5); }
.btn-ghost { background: transparent; color: #EFE8DF; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--filament); color: #FFF6EC; }

/* — code / the hero artifact — */
.code {
  font-family: var(--mono); font-size: .92rem; background: #100E0C; border: 1px solid var(--graphite);
  border-radius: var(--r); color: #E7DFD4; padding: 18px 20px; overflow-x: auto; position: relative;
}
.code .tok-tag { color: var(--teal); }
.code .tok-attr { color: var(--filament); }
.code .tok-str { color: #E9C893; }
.code .tok-mut { color: var(--filings); }
.code-label {
  position: absolute; top: 11px; right: 14px; font-family: var(--mono); font-size: .66rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--filings);
}

/* — cards — */
.card {
  background: linear-gradient(180deg, var(--ink-2), var(--ink)); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 28px; transition: border-color .25s, transform .25s;
}
.card:hover { border-color: rgba(255,122,26,.4); transform: translateY(-3px); }
.card .ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px;
  background: rgba(255,122,26,.12); color: var(--filament); margin-bottom: 18px; font-size: 20px; }

/* — status chips (the loop) — */
.chip { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--filings); white-space: nowrap; }
.chip.new   { color: var(--filament); border-color: rgba(255,122,26,.4); }
.chip.prog  { color: var(--teal);     border-color: rgba(25,185,164,.4); }
.chip.done  { color: var(--green);    border-color: rgba(52,183,101,.4); }

/* — the wire: spark → shipped — */
.wire { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.wire .node { display: flex; align-items: center; gap: 10px; }
.wire .seg { flex: 1 1 28px; min-width: 28px; height: 2px;
  background: linear-gradient(90deg, var(--filament), var(--teal)); opacity: .5; position: relative; }

/* — lockup / wordmark — */
.lockup { display: inline-flex; align-items: center; gap: 11px; }
.lockup .wm { font-family: var(--display); font-weight: 600; font-size: 1.5rem; letter-spacing: -.03em; color: #FFF6EC; }
.lockup .wm b { color: var(--filament); font-weight: 600; }

/* — nav — */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px);
  background: rgba(23,21,19,.72); border-bottom: 1px solid var(--line); }
.nav .row { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav .links { display: flex; gap: 30px; align-items: center; }
.nav .links a { font-size: .94rem; color: #C9C0B5; transition: color .2s; }
.nav .links a:hover { color: var(--filament); }

/* — footer — */
footer { border-top: 1px solid var(--line); padding: 56px 0 40px; }
footer a:hover { color: var(--filament); }

/* — glow blobs — */
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; z-index: 0; }

/* — load reveal — */
@keyframes up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.up { animation: up .8s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce){
  .up{ animation:none !important; opacity:1 !important; transform:none !important }
  .card:hover{ transform:none } html{ scroll-behavior:auto }
}

/* keyboard focus — visible on the dark canvas (Ink ring on the orange CTA per the rule) */
:focus-visible{ outline:2px solid var(--filament); outline-offset:3px; border-radius:4px }
.btn-primary:focus-visible{ outline-color:var(--ink) }
/* anchor jumps clear the sticky nav */
section[id], header[id]{ scroll-margin-top:84px }

.grid { display: grid; gap: 20px; }
@media (min-width: 720px){ .g3{ grid-template-columns: repeat(3,1fr) } .g2{ grid-template-columns: repeat(2,1fr) } .g4{ grid-template-columns: repeat(4,1fr) } }
@media (max-width: 719px){ .nav .links{ display:none } h1{ font-size: 2.5rem } }
