/* ─────────────────────────────────────────────────────────
   Schedularity — editorial design system
   ───────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;1,6..72,300;1,6..72,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Sora:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Type stacks */
  --font-display: 'DM Sans', system-ui, sans-serif;
  --font-display-serif: 'Newsreader', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  /* Light palette — bone & ink */
  --bone: #F4F1EA;
  --bone-2: #EDE9DF;
  --bone-3: #E4DFD2;
  --ink: #0E1116;
  --ink-2: #1A1D24;
  --muted: #6B6862;
  --muted-2: #8E8A82;
  --hairline: #D9D4C8;
  --hairline-2: #C8C2B2;

  --accent: oklch(0.42 0.18 265);          /* deep indigo */
  --accent-2: oklch(0.62 0.14 50);         /* warm clay */
  --accent-3: oklch(0.55 0.14 155);        /* forest */
  --accent-4: oklch(0.55 0.16 25);         /* rose */
  --accent-5: oklch(0.62 0.13 95);         /* ochre */
  --accent-6: oklch(0.50 0.16 285);        /* plum */
  --accent-soft: oklch(0.42 0.18 265 / 0.08);
  --accent-2-soft: oklch(0.62 0.14 50 / 0.12);
  --accent-3-soft: oklch(0.55 0.14 155 / 0.12);
  --accent-4-soft: oklch(0.55 0.16 25 / 0.10);
  --accent-5-soft: oklch(0.62 0.13 95 / 0.14);
  --accent-6-soft: oklch(0.50 0.16 285 / 0.10);
  --success: oklch(0.55 0.14 155);
  --error: oklch(0.55 0.18 25);

  /* Surfaces */
  --bg: var(--bone);
  --bg-elev: #FBF9F4;
  --bg-inverse: var(--ink);
  --fg: var(--ink);
  --fg-muted: var(--muted);
  --rule: var(--hairline);

  /* Density (adjustable) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --section-y: clamp(80px, 12vw, 160px);

  /* Container */
  --container: 1280px;
  --container-narrow: 960px;
  --container-text: 720px;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

[data-theme="dark"] {
  --bone: #0A0B0D;
  --bone-2: #101216;
  --bone-3: #16191F;
  --ink: #ECE7DA;
  --ink-2: #D8D2C2;
  --muted: #8E8A82;
  --muted-2: #6B6862;
  --hairline: #20232A;
  --hairline-2: #2E323B;
  --accent: oklch(0.72 0.16 265);
  --accent-2: oklch(0.78 0.14 50);
  --accent-3: oklch(0.72 0.14 155);
  --accent-4: oklch(0.72 0.16 25);
  --accent-5: oklch(0.78 0.13 95);
  --accent-6: oklch(0.70 0.16 285);
  --accent-soft: oklch(0.72 0.16 265 / 0.18);
  --accent-2-soft: oklch(0.78 0.14 50 / 0.18);
  --accent-3-soft: oklch(0.72 0.14 155 / 0.18);
  --accent-4-soft: oklch(0.72 0.16 25 / 0.18);
  --accent-5-soft: oklch(0.78 0.13 95 / 0.18);
  --accent-6-soft: oklch(0.70 0.16 285 / 0.18);
  --bg: var(--bone);
  --bg-elev: #0F1115;
  --bg-inverse: var(--ink);
  --fg: var(--ink);
  --fg-muted: var(--muted);
  --rule: var(--hairline);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Type primitives ──────────────────────────── */

.serif { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }
.serif-it { font-family: var(--font-display-serif); font-weight: 300; font-style: italic; letter-spacing: -0.01em; }
.mono { font-family: var(--font-mono); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  color: var(--fg);
  text-wrap: balance;
}

h1 {
  font-size: clamp(48px, 7.5vw, 104px);
  letter-spacing: -0.035em;
  line-height: 0.98;
}
h2 { font-size: clamp(36px, 5vw, 64px); letter-spacing: -0.025em; }
h3 { font-size: clamp(24px, 3vw, 36px); }
h4 { font-size: clamp(20px, 2vw, 24px); }

p {
  margin: 0;
  color: var(--fg);
  text-wrap: pretty;
}

a { color: inherit; text-decoration: none; }

em, .italic { font-style: italic; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.lede {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.4;
  color: var(--fg-muted);
  letter-spacing: -0.01em;
}

.muted { color: var(--fg-muted); }

/* ─── Layout primitives ──────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 32px;
}

section { position: relative; }

.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--rule);
}

.section:first-of-type { border-top: 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: end;
}

.section-head .meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 880px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
  .container { padding: 0 20px; }
}

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ─── Buttons ──────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
  text-decoration: none;
  background: transparent;
  color: inherit;
}

.btn-primary {
  background: var(--ink);
  color: var(--bone);
  border-color: var(--ink);
}
[data-theme="dark"] .btn-primary {
  background: var(--ink);
  color: var(--bone);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px -8px var(--ink); }

.btn-ghost {
  border-color: var(--hairline-2);
  color: var(--fg);
}
.btn-ghost:hover { background: var(--bone-2); border-color: var(--ink); }

.btn-link {
  height: auto;
  padding: 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  height: auto;
  padding-bottom: 2px;
}

.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 15px; }

.arrow {
  display: inline-block;
  transition: transform 0.2s var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }

/* ─── Tag / Pill ──────────────────────────── */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--hairline-2);
  color: var(--fg-muted);
  background: transparent;
}

.tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

/* ─── Card ──────────────────────────── */

.card {
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.card:hover { border-color: var(--hairline-2); }

/* ─── Nav ──────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: 'DM Sans', var(--font-display);
  font-size: 21px;
  letter-spacing: -0.045em;
  font-weight: 700;
  color: var(--fg);
}
.logo-mark {
  width: 30px; height: 30px;
  border: none;
  position: relative;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none'><rect x='2' y='2' width='28' height='28' rx='9.5' fill='%23FF5A36'/><path d='M23.4 16a7.4 7.4 0 1 1-2.2-5.3' stroke='white' stroke-width='2.6' stroke-linecap='round'/><path d='M21.8 7.6v3.9h-3.9' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/><circle cx='16' cy='16' r='2.2' fill='white'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}
.nav-links a {
  color: var(--fg-muted);
  transition: color 0.15s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 1px;
  background: var(--fg);
}

.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--hairline-2);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.theme-toggle:hover { background: var(--bone-2); }

@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* ─── Footer ──────────────────────────── */

.footer {
  border-top: 1px solid var(--rule);
  padding: 80px 0 40px;
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a {
  font-size: 14px;
  color: var(--fg);
  transition: opacity 0.15s;
}
.footer-col a:hover { opacity: 0.6; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ─── Sticky scroll CTA ──────────────────────────── */

.sticky-cta {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 22px;
  background: var(--ink);
  color: var(--bone);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.sticky-cta.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.sticky-cta .btn { background: var(--bone); color: var(--ink); height: 38px; padding: 0 18px; font-size: 13px; }

/* ─── Hairline grid bg (for hero/cards) ──────────────────────────── */

.grid-bg {
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 80px 80px;
}

.dot-bg {
  background-image: radial-gradient(var(--hairline-2) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ─── Glow ──────────────────────────── */

.glow {
  position: absolute;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.5;
  border-radius: 50%;
}

[data-theme="dark"] .glow { opacity: 0.35; }

/* ─── Marquee ──────────────────────────── */

.marquee {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: marquee 40s linear infinite;
  align-items: center;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ─── Animations ──────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulseRing {
  0% { transform: scale(0.96); opacity: 0.6; }
  70% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes typing {
  0%, 20% { width: 0; }
  60%, 80% { width: 100%; }
  100% { width: 0; }
}

@keyframes drift {
  0%, 100% { transform: translate(0,0); }
  33% { transform: translate(40px, -20px); }
  66% { transform: translate(-30px, 30px); }
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0.2; }
}

@keyframes counter {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.anim-float { animation: floatY 4s ease-in-out infinite; }
.anim-drift { animation: drift 18s ease-in-out infinite; }
.anim-spin-slow { animation: spinSlow 60s linear infinite; }
.anim-blink { animation: blink 1.4s ease-in-out infinite; }

.live-dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}
.live-dot::before {
  content: "";
  position: absolute; inset: -2px;
  border-radius: 50%;
  background: var(--success);
  animation: pulseRing 2s ease-out infinite;
}

.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--fg) 30%,
    var(--accent) 50%,
    var(--fg) 70%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}

/* Reveal stagger helper: parent gets .stagger, children get .reveal */
.stagger.in > .reveal:nth-child(1) { transition-delay: 0.05s; }
.stagger.in > .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger.in > .reveal:nth-child(3) { transition-delay: 0.15s; }
.stagger.in > .reveal:nth-child(4) { transition-delay: 0.2s; }
.stagger.in > .reveal:nth-child(5) { transition-delay: 0.25s; }
.stagger.in > .reveal:nth-child(6) { transition-delay: 0.3s; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ─── Density modes (Tweak) ──────────────────────────── */

[data-density="compact"] {
  --section-y: clamp(56px, 8vw, 96px);
  --space-7: 32px;
  --space-8: 48px;
}
[data-density="spacious"] {
  --section-y: clamp(120px, 16vw, 200px);
  --space-7: 64px;
  --space-8: 80px;
}

/* ─── Focus ──────────────────────────── */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Utilities ──────────────────────────── */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }

@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: 1fr 1fr; }
}

.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 24px; }

.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; } .mt-6 { margin-top: 32px; } .mt-7 { margin-top: 48px; }
.mt-8 { margin-top: 64px; }

.text-sm { font-size: 13px; } .text-xs { font-size: 12px; } .text-lg { font-size: 18px; }

/* ─── Section label (mono, with §) ──────────────────────────── */

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-label .num {
  color: var(--fg);
}

/* ─── Special: tick / cross for compare ──────────────────────────── */

.tick { color: var(--success); }
.cross { color: var(--muted-2); opacity: 0.5; }
.partial { color: var(--accent-2); }
