/* ─────────────────────────────────────────────────────────────────
   Numbs v2 — Editorial AI
   Light editorial hero · dark contrast sections · violet accent
   ───────────────────────────────────────────────────────────────── */

:root {
  /* Light editorial palette */
  --bg:        #FAFAFA;     /* requested light background */
  --bg-2:      #FAFAFA;     /* recessed surface */
  --paper:    #FFFFFF;
  --ink:       #0A0F1F;     /* deep navy for body */
  --ink-2:     #2A3042;
  --ink-3:     #6B7280;
  --ink-4:     #9CA3AF;
  --line:      rgba(10, 15, 31, 0.08);
  --line-2:    rgba(10, 15, 31, 0.16);
  --grid:      rgba(10, 15, 31, 0.045);

  /* Dark sections */
  --dark-bg:   #0A0F1F;
  --dark-bg-2: #11172A;
  --dark-line: rgba(255,255,255,0.08);
  --dark-line-2: rgba(255,255,255,0.16);
  --dark-ink:  #F4F4F2;
  --dark-ink-2: #B8BEC9;
  --dark-ink-3: #6B7280;

  /* Accent (kept from v1) */
  --accent:        #FD4E2E;
  --accent-2:      #FF8B6E;       /* lighter coral */
  --accent-soft:   rgba(253, 78, 46, 0.08);
  --accent-glow:   rgba(253, 78, 46, 0.32);
  --accent-deep:   #D63A1C;

  --radius:    14px;
  --radius-lg: 22px;
  --container: 1280px;

  --font-display: 'Inter Tight', system-ui, sans-serif;
  --font-sans: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* Dark theme tweak (full inversion) */
[data-theme="dark"] {
  --bg:        #0A0F1F;
  --bg-2:      #11172A;
  --paper:     #161C30;
  --ink:       #F4F4F2;
  --ink-2:     #B8BEC9;
  --ink-3:     #6B7280;
  --ink-4:     #4B5263;
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.16);
  --grid:      rgba(255,255,255,0.05);
}

* { box-sizing: border-box; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  margin: 0;
  padding: 0;
}
body {
  overflow-x: hidden;
}

/* ── Type system ──────────────────────────────────────────────── */

.display {
  font-family: var(--font-display);
  font-weight: 500;        /* Inter Tight reads cleaner at 500 */
  letter-spacing: -0.02em;
  line-height: 0.96;
}
.display-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
}
.serif { font-family: var(--font-display); }
.sans { font-family: var(--font-sans); }
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
}

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.0; }

.h-display {
  font-size: clamp(56px, 9vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.h-1 { font-size: 48px; line-height: 1.04; letter-spacing: -0.025em; }
.h-2 { font-size: clamp(32px, 3.4vw, 52px); line-height: 1.04; letter-spacing: -0.025em; }
.h-3 { font-size: clamp(22px, 1.8vw, 28px); line-height: 1.2; letter-spacing: -0.015em; font-weight: 500; font-family: var(--font-sans); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow .num {
  font-feature-settings: "tnum";
  color: var(--ink-2);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.accent-word {
  font-style: italic;
  color: var(--accent);
}

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
.section { padding: 120px 0; position: relative; }
.section-tight { padding: 80px 0; }
.section-xl { padding: 160px 0; }

/* Dark section */
.section-dark {
  background: var(--dark-bg);
  color: var(--dark-ink);
  /* On dark backgrounds use the same vivid accent (no lighter fade) */
  --accent-2: #FD4E2E;
  --accent-soft: rgba(253, 78, 46, 0.12);
  --accent-glow: rgba(253, 78, 46, 0.32);
  position: relative;
  overflow: hidden;
}
.section-dark .ink { color: var(--dark-ink); }
.section-dark .ink-2 { color: var(--dark-ink-2); }
.section-dark .ink-3 { color: var(--dark-ink-3); }
.section-dark .eyebrow { color: var(--dark-ink-3); }
.section-dark .eyebrow .num { color: var(--dark-ink-2); }

/* ── Utilities ────────────────────────────────────────────────── */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.center { align-items: center; }
.between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-48 { gap: 48px; }
.gap-64 { gap: 64px; } .gap-80 { gap: 80px; }

.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.mt-80 { margin-top: 80px; } .mt-120 { margin-top: 120px; }

.ink   { color: var(--ink); }
.ink-2 { color: var(--ink-2); }
.ink-3 { color: var(--ink-3); }
.accent { color: var(--accent); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  background: transparent;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn-lg { padding: 18px 28px; font-size: 15px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
.btn-primary .arrow { transition: transform .2s ease; }
.btn-primary:hover .arrow { transform: translateX(3px); }

.btn-ink {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-ink:hover { background: #000; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--bg-2); }

.section-dark .btn-ghost {
  color: var(--dark-ink);
  border-color: var(--dark-line-2);
}
.section-dark .btn-ghost:hover { background: var(--dark-line); border-color: var(--dark-ink-2); }

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.section-dark .card {
  background: var(--dark-bg-2);
  border-color: var(--dark-line);
}

/* ── Inputs ───────────────────────────────────────────────────── */
.input, .textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.input:focus, .textarea:focus {
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.textarea { resize: vertical; min-height: 110px; line-height: 1.5; }

.section-dark .input, .section-dark .textarea {
  background: rgba(255,255,255,0.04);
  border-color: var(--dark-line);
  color: var(--dark-ink);
}
.section-dark .input::placeholder, .section-dark .textarea::placeholder { color: var(--dark-ink-3); }

/* ── Scroll-triggered section fade-in ─────────────────────────── */
.section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.section.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .section { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── Subtle background grid for hero ──────────────────────────── */
.bg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 35%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 35%, transparent 95%);
}

/* Dark ambient glow */
.glow-violet {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Dotted background for dark sections */
.bg-dots {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 90%);
}

/* ── Divider rule ─────────────────────────────────────────────── */
.rule { height: 1px; background: var(--line); border: 0; }
.section-dark .rule { background: var(--dark-line); }

/* ── Pill / chip ──────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--paper);
  white-space: nowrap;
}
.section-dark .chip {
  border-color: var(--dark-line-2);
  background: rgba(255,255,255,0.04);
  color: var(--dark-ink-2);
}
.chip-accent {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Big numbered count */
.bignum {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
}

/* Marquee item label */
.label-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

/* Form field group */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label {
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Magnetic CTA placeholder */
.magnetic { display: inline-block; transition: transform .2s ease-out; }

/* Underline accent for serif words */
.underlined {
  position: relative;
  display: inline-block;
}
.underlined::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.05em;
  height: 0.08em;
  background: var(--accent);
  border-radius: 2px;
}

/* Density */
[data-density="compact"] .section { padding: 88px 0; }
[data-density="compact"] .section-xl { padding: 120px 0; }
[data-density="comfy"] .section { padding: 144px 0; }
[data-density="comfy"] .section-xl { padding: 200px 0; }

/* Loading state */
@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
.blink { animation: blink 1.4s ease-in-out infinite; }

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee { display: flex; width: max-content; animation: marquee 40s linear infinite; gap: 80px; }
.marquee-track { overflow: hidden; mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%); }

/* Hide scrollbar on process tabs */
.process-tabs { scrollbar-width: none; -ms-overflow-style: none; }
.process-tabs::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ── Responsive ─────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
  .container, .container-wide { padding: 0 24px; }
  .section { padding: 96px 0; }
  .section-xl { padding: 128px 0; }
  .h-display { font-size: clamp(48px, 8vw, 112px); }
  .h-1 { font-size: clamp(36px, 5.2vw, 48px); }

  /* Footer — stack brand and columns, keep cols horizontal */
  .footer-row { flex-direction: column !important; align-items: stretch !important; gap: 40px !important; margin-bottom: 56px !important; }
  .footer-row > div:first-child { max-width: 100% !important; flex: 0 0 auto !important; width: 100%; }
  .footer-cols { gap: 48px !important; flex: 0 0 auto !important; width: 100%; align-items: flex-start !important; }
  .footer-cols > div { flex: 1 1 160px; }
}

/* Mobile */
@media (max-width: 768px) {
  .container, .container-wide { padding: 0 20px; }
  .section { padding: 64px 0 !important; }
  .section-xl { padding: 80px 0 !important; }
  .section-tight { padding: 48px 0 !important; }
  .hide-mobile { display: none !important; }
  [data-density="compact"] .section,
  [data-density="comfy"]   .section { padding: 64px 0 !important; }

  /* Typography */
  h1, h2, h3, h4 { letter-spacing: -0.02em; }
  .h-display { font-size: clamp(36px, 9vw, 64px) !important; line-height: 1.04; letter-spacing: -0.025em; }
  .h-1 { font-size: clamp(36px, 9vw, 64px) !important; line-height: 1.04; letter-spacing: -0.025em; }
  .h-2 { font-size: clamp(28px, 7vw, 48px) !important; line-height: 1.08; }
  .h-3 { font-size: clamp(20px, 4.5vw, 24px) !important; }
  .lead { font-size: 15px !important; }

  /* Gaps */
  .gap-32 { gap: 20px; }
  .gap-48 { gap: 24px; }
  .gap-64 { gap: 28px; }
  .gap-80 { gap: 32px; }

  /* Buttons */
  .btn { padding: 12px 18px; font-size: 14px; }
  .btn-lg { padding: 14px 22px; font-size: 14px; }
  .btn-sm { padding: 9px 14px; font-size: 12px; }

  /* Cards */
  .card { border-radius: 12px; }

  /* Hero */
  #top { padding-top: 96px !important; padding-bottom: 48px !important; min-height: auto !important; }
  #top h1 {
    font-size: clamp(36px, 9vw, 64px) !important;
    line-height: 1.04;
    margin-bottom: 32px !important;
    max-width: none !important;
    overflow-wrap: break-word;
    word-break: normal;
  }
  #top h1 br { display: none; }
  #top .hero-eyebrow-row { margin-bottom: 32px !important; }
  #top .hero-bottom { gap: 32px !important; margin-top: 24px !important; }
  #top .hero-bottom > div:not(.hero-stats) { min-width: 0; max-width: 100% !important; width: 100%; }
  #top .hero-bottom > div:not(.hero-stats) .row { flex-wrap: wrap; gap: 12px !important; }
  #top .hero-bottom .btn-lg { flex: 1 1 100%; justify-content: center; }

  /* Hero stats — show on mobile as compact label-value rows */
  .hero-stats {
    flex-direction: column;
    gap: 0 !important;
    margin-left: 0 !important;
    margin-top: 24px;
    width: 100%;
    border-top: 1px solid var(--line);
  }
  .hero-stats > div {
    min-width: 0 !important;
    width: 100%;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .hero-stats > div:last-child { border-bottom: none; }
  .hero-stats .label-mono { margin-bottom: 0 !important; flex-shrink: 0; }
  .hero-stats .hero-stat-value { font-size: 26px !important; }
  .hero-stats .hero-stat-value > span { font-size: 14px !important; margin-left: 6px !important; }

  #top .hero-strip { margin-top: 56px !important; padding-top: 24px !important; gap: 16px !important; }

  /* Solution principles + flow */
  .principle { padding: 28px 20px !important; border-right: none !important; border-bottom: 1px solid var(--line) !important; }
  .principle:last-child { border-bottom: none !important; }
  .flow-stages { grid-template-columns: 1fr 1fr !important; gap: 24px 12px !important; }
  .flow-line { display: none !important; }

  /* Pain comparison table */
  .pain-sticky { position: static !important; top: auto !important; }
  .compare-table { padding: 24px !important; }
  .compare-table .compare-head { flex-wrap: wrap; gap: 12px; }
  .compare-table .compare-grid { grid-template-columns: 1.4fr 1fr 1fr !important; }
  .compare-table .compare-grid > div { font-size: 13px !important; padding: 16px 0 !important; }
  .compare-table .compare-grid > div:first-child,
  .compare-table .compare-grid > div:nth-child(3n+1) { font-size: 11px !important; }

  /* Cases */
  .flagship-text { padding: 32px !important; min-height: auto !important; }
  .flagship-visual { min-height: 300px !important; border-left: none !important; border-top: 1px solid var(--line) !important; }
  .scenario-card { padding: 24px !important; min-height: auto !important; }
  .scenario-card .scenario-stat { font-size: 56px !important; }

  /* Service cards */
  .service-card { padding: 24px !important; min-height: auto !important; }
  .service-card .service-title { font-size: 26px !important; }

  /* Process */
  .process-tabs { padding-bottom: 4px; }
  .process-tabs button { padding: 16px 18px !important; }
  .process-active { padding-top: 40px !important; gap: 32px !important; }

  /* Offer */
  .offer-card { padding: 32px 24px !important; }
  .offer-card h2 { font-size: clamp(28px, 7vw, 40px) !important; }
  .offer-card .offer-side { flex: 1 1 100% !important; }

  /* Ecosystem */
  .eco-card { padding: 24px !important; }
  .eco-card h3 { font-size: 26px !important; }

  /* Pricing */
  .pricing-tier { padding: 28px 24px !important; min-height: auto !important; }
  .pricing-tier h3 { font-size: 26px !important; }
  .price-big { font-size: 44px !important; }
  .pricing-note { padding: 16px 20px !important; }

  /* CTA / form */
  .cta-card { padding: 24px !important; }
  .cta-row { gap: 32px !important; }

  /* Footer */
  .footer-row { margin-bottom: 48px !important; gap: 32px !important; }
  .footer-cols { gap: 32px !important; }
  .footer-cols > div { flex: 1 1 140px; }
}

/* Small phones */
@media (max-width: 420px) {
  .container, .container-wide { padding: 0 16px; }
  .hero-stat-value { font-size: 38px !important; }
  .nav-studio-chip { display: none !important; }
}
