/* ─────────────────────────────────────────────────────────────────────────
   Arcline — shared base + variant tokens
   ──────────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

/* Variant tokens */
body[data-variant="polished"] {
  --bg: #f0ece1;
  --bg-alt: #e8e3d4;
  --bg-elev: #f7f3ea;
  --ink: #0a0f1e;
  --ink-dim: #2c3142;
  --ink-mute: #6c7080;
  --rule: rgba(10, 15, 30, 0.10);
  --rule-strong: rgba(10, 15, 30, 0.38);
  --accent: #002fa7;
  --accent-2: #ff6b1a;
  --display: 'Fraunces', 'Instrument Serif', Georgia, serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  background: var(--bg);
  color: var(--ink);
}

/* Type-pair overrides */
body[data-typepair="all-sans"] {
  --display: 'Space Grotesk', system-ui, sans-serif;
}
body[data-typepair="editorial-mono"] {
  --display: 'Instrument Serif', Georgia, serif;
}
body[data-typepair="geometric"] {
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
}

/* ─── Background textures ──────────────────────────────────────────────── */
.bg-texture {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
body[data-bg="grid"] .bg-texture {
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 85%);
}
body[data-bg="noise"] .bg-texture {
  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.9' 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.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
}
body[data-bg="dots"] .bg-texture {
  background-image: radial-gradient(var(--rule-strong) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 90%);
}
body[data-bg="none"] .bg-texture { display: none; }

/* ─── Layout ───────────────────────────────────────────────────────────── */
.container { max-width: 1440px; margin: 0 auto; padding: 0 56px; position: relative; z-index: 1; }
@media (max-width: 880px) { .container { padding: 0 24px; } }

section { position: relative; z-index: 1; }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.rule-strong { height: 1px; background: var(--rule-strong); border: 0; }

/* labels */
.mono-label {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-mute);
}
.mono-label .slash { color: var(--accent-2, var(--accent)); margin-right: 6px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 24px; border-radius: 999px;
  font-family: var(--body); font-size: 14px; font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .2s ease, background .25s ease, color .25s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--bg-elev); }
.btn .arr { display: inline-block; transition: transform .25s ease; }
.btn:hover .arr { transform: translateX(4px); }

body[data-variant="bold"] .btn { border-radius: 0; padding: 18px 26px; font-weight: 600; }
body[data-variant="bold"] .btn-primary { background: var(--ink); color: var(--bg); }
body[data-variant="bold"] .btn-primary:hover { background: var(--accent); color: var(--ink); }

/* ─── Custom cursor ────────────────────────────────────────────────────── */
.cursor {
  position: fixed; top: 0; left: 0; pointer-events: none;
  z-index: 9999; mix-blend-mode: difference;
  will-change: transform;
}
.cursor.ring {
  width: 28px; height: 28px; border: 1.5px solid var(--ink); border-radius: 999px;
  transform: translate(-50%, -50%);
  transition: width .2s ease, height .2s ease, background .2s ease;
}
.cursor.ring.is-hover { width: 56px; height: 56px; background: rgba(10,15,30,0.08); }
.cursor.dot {
  width: 8px; height: 8px; background: var(--ink); border-radius: 999px;
  transform: translate(-50%, -50%);
}
.cursor.crosshair {
  width: 24px; height: 24px;
  transform: translate(-50%, -50%);
}
.cursor.crosshair::before, .cursor.crosshair::after {
  content: ''; position: absolute; background: var(--ink);
}
.cursor.crosshair::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.cursor.crosshair::after { top: 50%; left: 0; right: 0; height: 1px; }
.cursor.none { display: none; }
@media (hover: none) { .cursor { display: none !important; } }

/* hide system cursor when custom on */
body[data-cursor="ring"], body[data-cursor="dot"], body[data-cursor="crosshair"] {
  cursor: none;
}
body[data-cursor="ring"] a, body[data-cursor="ring"] button,
body[data-cursor="dot"] a, body[data-cursor="dot"] button,
body[data-cursor="crosshair"] a, body[data-cursor="crosshair"] button { cursor: none; }
