/* ================================================================
   ZeroStaff redesign — design tokens & globals
   ================================================================ */

:root {
  /* Palette — pulled from the ads */
  --paper:        #f0eee9;
  --paper-2:      #e6e2d8;
  --paper-3:      #d6cfc0;
  --ink:          #0e0e0a;
  --ink-2:        #1e1e16;
  --ink-3:        #4a463c;
  --muted:        #76705f;
  --muted-2:      #a39c87;
  --rule:         rgba(14, 14, 10, 0.16);
  --rule-2:       rgba(14, 14, 10, 0.06);

  /* Brand */
  --forest:       #00674a;
  --forest-deep:  #003d2c;
  --forest-2:     #2c8463;
  --coral:        #f0876f;
  --coral-deep:   #c8553a;

  /* Night — deep forest used for all major dark sections (brand presence) */
  --night:        #053527;
  --night-2:      #0a4231;
  --on-night:     #f0eee9;
  --night-rule:   rgba(240, 238, 233, 0.16);
  --night-muted:  rgba(240, 238, 233, 0.62);

  /* Semantic */
  --bg:           var(--paper);
  --fg:           var(--ink);
  --accent:       var(--forest);
  --accent-2:     var(--coral);
  --on-accent:    var(--paper);

  /* Type — Sora everywhere (matches ads) + Geist Mono for tags */
  --f-display: "Sora", -apple-system, BlinkMacSystemFont, sans-serif;
  --f-sans:    "Sora", -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono:    "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Scale (1920 design width — fluid down) */
  --pad-x: clamp(24px, 4.5vw, 80px);
  --pad-section: clamp(72px, 9vw, 160px);
  --maxw: 1440px;
}

  /* Scale (1920 design width — fluid down) */
  --pad-x: clamp(24px, 4.5vw, 80px);
  --pad-section: clamp(72px, 9vw, 160px);
  --maxw: 1440px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "cv11";
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--paper); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow--accent { color: var(--accent); }
.eyebrow--coral  { color: var(--coral-deep); }
.serif { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.025em; }
.mono  { font-family: var(--f-mono); font-feature-settings: "ss01"; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.03em; }

.h-display {
  font-family: var(--f-display);
  font-size: clamp(44px, 6.5vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.h-display em {
  font-style: normal;
  color: var(--coral-deep);
  font-weight: 600;
}
.h-1 {
  font-family: var(--f-display);
  font-size: clamp(40px, 6.2vw, 108px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 600;
}
.h-1 em {
  font-style: normal;
  color: var(--coral-deep);
}
.h-2 {
  font-family: var(--f-display);
  font-size: clamp(32px, 4.2vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.h-2 em {
  font-style: normal;
  color: var(--coral-deep);
}
.h-3 {
  font-family: var(--f-display);
  font-size: clamp(24px, 2.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.lede {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.2vw, 36px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  font-weight: 400;
}
.body-l {
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---------- Layout primitives ---------- */
.page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
}
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
.section {
  padding-top: var(--pad-section);
  padding-bottom: var(--pad-section);
}
.divider {
  height: 1px;
  background: var(--rule);
  width: 100%;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .15s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--forest);
  color: var(--paper);
}
.btn--primary:hover { transform: translateY(-1px); background: var(--forest-deep); }
.btn--accent {
  background: var(--coral);
  color: var(--ink);
}
.btn--accent:hover { transform: translateY(-1px); background: var(--coral-deep); color: var(--paper); }
.btn--ghost {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink); background: rgba(0,0,0,0.04); }
.btn--small { padding: 10px 16px; font-size: 13px; }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- Tag / chips ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--forest);
}
.tag .dot--pulse { background: var(--coral); position: relative; }
.tag .dot--pulse::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: var(--coral); opacity: .35; animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: .5; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ---------- Card surfaces ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.card--ink {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Receipt / printed-page card */
.sheet {
  background: #fefcf7;
  border: 1px solid var(--rule);
  position: relative;
  box-shadow:
    0 1px 0 rgba(13,13,10,0.04),
    0 24px 60px -28px rgba(13,13,10,0.18);
}
.sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(13,13,10,0.018) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

/* ---------- Numerals (tabular) ---------- */
.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------- Utility ---------- */
.hide-on-mobile { display: inherit; }
@media (max-width: 960px) {
  .hide-on-mobile { display: none !important; }
}
.show-on-mobile { display: none; }
@media (max-width: 960px) {
  .show-on-mobile { display: inherit; }
}

/* ---------- Page transition ---------- */
.fade-in {
  animation: fade-in .5s ease-out both;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Scroll snap helpers ---------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* ---------- Inputs ---------- */
input[type="range"].zs-range {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  height: 28px;
  cursor: pointer;
  outline: none;
}
input[type="range"].zs-range:focus { outline: none; }
input[type="range"].zs-range::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--rule);
}
input[type="range"].zs-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--paper);
  margin-top: -8px;
  box-shadow: 0 0 0 1px var(--ink);
}
input[type="range"].zs-range::-moz-range-track {
  height: 2px;
  background: var(--rule);
}
input[type="range"].zs-range::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--ink);
}

/* Ticker animation */
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: ticker 60s linear infinite;
}

/* Hero waveform */
@keyframes wf {
  0%, 100% { transform: scaleY(0.22); }
  50%      { transform: scaleY(1); }
}
.wf-bar {
  width: 4px;
  border-radius: 999px;
  background: var(--coral);
  transform-origin: center;
  animation: wf 1.1s ease-in-out infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes float-y {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-7px); }
}
/* ============================================================
   RESPONSIVE — tablet + mobile
   Stylesheet !important overrides inline grid styles that lack it.
   ============================================================ */

/* ---- Tablet (≤960px): card grids drop to 2 columns ---- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr !important; }
  .hero-graphic { order: -1; min-height: 360px !important; margin-bottom: 8px; }

  .ind-grid,
  .solutions-grid,
  .blog-grid,
  [style*="repeat(3, 1fr)"],
  [style*="repeat(4, 1fr)"],
  [style*="repeat(4, minmax(0, 1fr))"],
  [style*="repeat(3, minmax(0, 1fr))"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  /* integrations 8-up → 4-up */
  [style*="repeat(8, 1fr)"] { grid-template-columns: repeat(4, 1fr) !important; }
}

/* ---- Phone (≤700px): everything stacks to a single column ---- */
@media (max-width: 700px) {
  /* explicit class-based stacks (reliable — no substring matching) */
  .r-split,
  .meet-grid,
  .faq-grid,
  /* two-column header / split / feature rows */
  [style*="1.3fr 1fr"],
  [style*="1.2fr 1fr"],
  [style*="1.4fr 1fr"],
  [style*="1.1fr 1fr"],
  [style*="1.15fr 1fr"],
  [style*="1.6fr repeat"],
  [style*="minmax(0, 1.12fr)"],
  [style*="minmax(0, 1.3fr)"],
  [style*="minmax(0, 1.25fr)"],
  [style*="minmax(0, 0.85fr)"],
  [style*="minmax(0, 1.45fr)"],
  [style*="1fr 1px 1fr"],
  [style*="1fr 1.4fr"],
  [style*="1.2fr 1fr"],
  /* multi-column card grids */
  .ind-grid,
  .solutions-grid,
  .blog-grid,
  .blog-feature,
  [style*="repeat(3, 1fr)"],
  [style*="repeat(4, 1fr)"],
  [style*="repeat(5, 1fr)"],
  [style*="repeat(6, 1fr)"],
  [style*="repeat(8, 1fr)"],
  [style*="repeat(4, minmax(0, 1fr))"],
  [style*="repeat(3, minmax(0, 1fr))"],
  [style*="repeat(2, 1fr)"],
  [style*="repeat(2, minmax(0, 1fr))"],
  /* table-ish rows inside cards / mocks */
  [style*="120px 1.4fr 1.6fr"],
  [style*="0.5fr 1.5fr 2fr"],
  [style*="100px 1.5fr 2fr"],
  [style*="200px 1fr auto"] {
    grid-template-columns: 1fr !important;
  }

  .hero-graphic { min-height: 300px !important; }

  /* hide the thin vertical divider in the Proof twin-number block when stacked */
  .proof-divider { display: none !important; }

  /* keep right-aligned CTA clusters left-aligned and full width on phone */
  .hero-grid .btn,
  .blog-feature { text-align: left; }
}

/* ---- Small phone (≤420px) niceties ---- */
@media (max-width: 420px) {
  :root { --pad-x: 18px; }
}
