/* ============================================================
   COMMERS.AI — Brand foundation
   Ion Orange · Espresso · Linen — Archivo + JetBrains Mono
   ============================================================ */

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

:root {
  /* Core brand */
  --orange:        #FF5A1F;   /* Ion Orange — primary */
  --orange-bright: #FF6A2E;
  --burnt:         #B8541F;
  --espresso:      #1C1611;
  --linen:         #FBF5EE;
  --paper:         #F0E7DB;   /* Paper · Shade */
  --muted-brand:   #8C8378;

  /* Light surfaces (Linen world) */
  --bg:        #FBF5EE;
  --bg-2:      #F4EBDF;
  --bg-3:      #EDE2D3;
  --card:      #FFFDFA;
  --ink:       #1C1611;
  --ink-2:     #4A4239;
  --muted:     #847B6F;
  --line:      #E6DBCC;
  --line-2:    #DBCFBD;

  /* Dark surfaces (Espresso world) */
  --d-bg:      #16110C;
  --d-bg-2:    #1F1812;
  --d-card:    #241C15;
  --d-card-2:  #2C2219;
  --d-ink:     #FBF5EE;
  --d-ink-2:   #D6CABA;
  --d-muted:   #9A8F80;
  --d-line:    rgba(251,245,238,0.10);
  --d-line-2:  rgba(251,245,238,0.16);

  /* Semantic */
  --ok:    #3F9E6A;
  --warn:  #E08A2B;

  --sans: 'Archivo', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

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

* , *::before, *::after { box-sizing: border-box; }
/* scroll-padding-top offsets in-page anchor jumps (e.g. "How it works" → #how)
   so the target heading lands below the 72px sticky nav instead of under it. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--orange); color: #fff; }

/* ---------- Typographic primitives ---------- */
.mono { font-family: var(--mono); font-feature-settings: "zero" 1; }
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker.muted { color: var(--muted); }
.kicker::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: 0.6;
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
.display {
  font-weight: 800;
  font-size: clamp(44px, 7vw, 92px);
  letter-spacing: -0.04em;
  line-height: 0.96;
}
.h-xl { font-size: clamp(34px, 4.6vw, 60px); letter-spacing: -0.035em; line-height: 1.0; }
.h-lg { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.03em; }
.h-md { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.025em; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 60ch; }
.accent { color: var(--orange); }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: clamp(72px, 9vw, 132px) 0; position: relative; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }
.eyebrow-row { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  letter-spacing: -0.01em;
  padding: 13px 22px; border-radius: 10px;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .2s, color .2s, border-color .2s, box-shadow .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 12px 28px -14px rgba(255,90,31,.7); }
.btn-primary:hover { background: var(--orange-bright); box-shadow: 0 14px 34px -12px rgba(255,90,31,.8); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: rgba(28,22,17,.03); }
.btn-dark { background: var(--espresso); color: var(--linen); }
.btn-dark:hover { background: #2a2018; transform: translateY(-1px); }
.btn-lg { padding: 16px 28px; font-size: 16px; border-radius: 11px; }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* On dark surfaces */
.on-dark .btn-ghost { border-color: var(--d-line-2); color: var(--d-ink); }
.on-dark .btn-ghost:hover { border-color: var(--d-ink); background: rgba(251,245,238,.06); }

/* ---------- The Clearing Matrix mark ---------- */
.matrix {
  display: grid;
  gap: var(--mx-gap, 2px);
  grid-template-columns: repeat(var(--mx-n, 5), 1fr);
  width: var(--mx-size, 30px);
  aspect-ratio: 1;
}
.matrix .cell {
  background: var(--mx-ink, var(--orange));
  border-radius: var(--mx-radius, 1px);
}

/* ---------- Cards & surfaces ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.panel-dark {
  background: var(--d-card);
  border: 1px solid var(--d-line);
  border-radius: 16px;
  color: var(--d-ink);
}

/* Dark section scope */
.dark {
  background: var(--d-bg);
  color: var(--d-ink);
}
.dark .lede { color: var(--d-ink-2); }
.dark .kicker.muted { color: var(--d-muted); }
.dark p { color: var(--d-ink-2); }

/* ---------- Chips / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.04em;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  background: var(--card);
}
.dark .pill { border-color: var(--d-line-2); color: var(--d-ink-2); background: var(--d-card); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(63,158,106,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63,158,106,.5);} 70%{ box-shadow:0 0 0 7px rgba(63,158,106,0);} 100%{ box-shadow:0 0 0 0 rgba(63,158,106,0);} }

/* ---------- Reveal / motion utilities ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal="fade"] { transform: none; }
[data-reveal="scale"] { transform: translateY(26px) scale(.97); }
[data-reveal].in { opacity: 1; transform: none; }

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

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 38s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Utility ---------- */
.center { text-align: center; }
.grid { display: grid; }
.flex { display: flex; }
.tabular { font-variant-numeric: tabular-nums; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.dark hr.rule { border-color: var(--d-line); }

@media (max-width: 860px) {
  .container { padding: 0 20px; }
}
