/* ─────────────────────────────────────────────────────────────
   INFINITUM — design tokens anchored to the logo
   Palette: ink charcoal · brand blue · brand violet (gradient)
   Type: DM Sans (display + body) + Instrument Serif italic accents
   ───────────────────────────────────────────────────────────── */

:root {
  /* ── Palette (sampled from logo) ── */
  --ink:          #373743;
  --ink-soft:     #4A4A58;
  --ink-deep:     #1F1F28;
  --bg:           #FFFFFF;
  --bg-tint:      #F6F6FA;
  --bg-warm:      #FAFAFC;
  --muted:        #8A8AA0;
  --line:         #ECECF2;
  --line-strong:  #DEDEE8;

  --blue:         #5372FD;
  --blue-deep:    #3A55D8;
  --blue-glow:    #7B92FF;
  --violet:       #CB6BE6;
  --violet-deep:  #A847C9;
  --violet-glow:  #DD8CF1;

  /* signature brand gradient */
  --brand-grad:   linear-gradient(110deg, #5372FD 0%, #8A6FF2 45%, #CB6BE6 100%);
  --brand-grad-soft: linear-gradient(110deg, rgba(83,114,253,.10) 0%, rgba(203,107,230,.10) 100%);

  /* on-color foregrounds */
  --on-blue:      #FFFFFF;
  --on-violet:    #FFFFFF;
  --on-brand:     #FFFFFF;

  /* Type */
  --display: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --sans:    "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:    "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif:   "Instrument Serif", "Times New Roman", serif;

  /* Rhythm */
  --gutter:     clamp(20px, 4vw, 64px);
  --section-y:  clamp(80px, 12vw, 160px);

  /* Motion */
  --ease:       cubic-bezier(.2, .8, .2, 1);
  --ease-snap:  cubic-bezier(.7, 0, .25, 1);
}

[data-theme="dark"] {
  --ink:          #F2F2F7;
  --ink-soft:     #C8C8D4;
  --ink-deep:     #FFFFFF;
  --bg:           #0E0E13;
  --bg-tint:      #16161E;
  --bg-warm:      #14141B;
  --muted:        #7A7A90;
  --line:         #232330;
  --line-strong:  #2E2E40;

  --blue:         #7B92FF;
  --blue-deep:    #5372FD;
  --violet:       #DD8CF1;
  --violet-deep:  #CB6BE6;

  --brand-grad-soft: linear-gradient(110deg, rgba(83,114,253,.20) 0%, rgba(203,107,230,.20) 100%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
}

@media (hover: none) {
  .cursor { display: none !important; }
}

a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  letter-spacing: inherit;
}

::selection { background: var(--blue); color: #FFFFFF; }

/* ─── type utilities ─── */
.serif {
  font-family: var(--serif);
  font-style: italic;
  letter-spacing: -0.015em;
  font-weight: 400;
}
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
  letter-spacing: -0.005em;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

/* gradient text */
.grad-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ─── grain overlay (kept very subtle) ─── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: 0.06; }


/* ─── layout primitives ─── */
.shell {
  width: 100%;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  position: relative;
}

.divider {
  height: 1px;
  background: var(--line);
  width: 100%;
}

/* ─── buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease);
  white-space: nowrap;
  isolation: isolate;
}

.btn-primary {
  background: var(--ink-deep);
  color: #FFFFFF;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-grad);
  transform: translateY(101%);
  transition: transform .55s var(--ease);
  z-index: -1;
}
.btn-primary:hover::before { transform: translateY(0); }

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--bg-tint);
}

.btn-grad {
  background: var(--brand-grad);
  color: var(--on-brand);
  box-shadow: 0 8px 24px -10px rgba(83, 114, 253, .55);
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.btn-grad:hover {
  box-shadow: 0 14px 32px -8px rgba(83, 114, 253, .7);
  transform: translateY(-2px);
}

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

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

/* marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee {
  display: flex;
  width: max-content;
  animation: marquee 50s linear infinite;
}
.marquee-pause:hover .marquee { animation-play-state: paused; }

/* utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
