/* Shared base for every direction: fonts, reset, motion primitives, cursor, form
   mechanics and the review switcher. Directions set colours through the variables. */

@font-face { font-family: 'Inter'; src: url('/shared/fonts/inter.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/shared/fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/shared/fonts/geist.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/shared/fonts/geist-mono.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Inter Fallback'; src: local('Arial'); size-adjust: 107.4%; ascent-override: 90%; descent-override: 22.43%; line-gap-override: 0%; }

:root {
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --gutter: clamp(20px, 3.4vw, 48px);
  --max: 1440px;
  --bg: #fff;
  --ink: #0a0a0a;
  --muted: rgba(10, 10, 10, .58);
  --line: rgba(10, 10, 10, .1);
  --accent: #ef4323;
  --cursor: #0a0a0a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', 'Inter Fallback', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.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; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); transition: top .3s var(--ease); }
.skip:focus { top: 12px; }

/* ---------- Reveals ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, var(--rise, 16px), 0);
  filter: blur(var(--blur, 10px));
  transition: opacity 1s var(--ease) var(--d, 0ms), transform 1s var(--ease) var(--d, 0ms), filter 1s var(--ease) var(--d, 0ms);
}
html.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
[data-split] .w > span { display: inline-block; }
html.js [data-split] .w > span {
  transform: translate3d(0, 105%, 0);
  transition: transform 1.1s var(--ease) calc(var(--d, 0ms) + var(--i) * 45ms);
}
html.js [data-split].is-in .w > span { transform: none; }

/* ---------- Letter roll ---------- */
[data-letters] { display: inline-flex; white-space: nowrap; }
[data-letters] .l { position: relative; display: inline-block; overflow: hidden; line-height: 1.2; }
[data-letters] .l > span { display: block; transition: transform .55s var(--ease) calc(var(--i) * 16ms); }
[data-letters] .l > span + span { position: absolute; left: 0; top: 100%; }
a:hover [data-letters] .l > span, button:hover [data-letters] .l > span,
[data-letters]:hover .l > span, a:focus-visible [data-letters] .l > span { transform: translate3d(0, -100%, 0); }

/* ---------- Tilt glare ---------- */
[data-tilt] { position: relative; transform-style: preserve-3d; will-change: transform; }
.tilt-glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .22), transparent 55%);
  mix-blend-mode: soft-light; opacity: 0; transition: opacity .5s ease;
}
[data-tilt].is-tilting .tilt-glare { opacity: 1; }

/* ---------- Scroll fill ---------- */
[data-fill] .w { display: inline; }
[data-fill] .w > span { opacity: calc(.16 + var(--on, 0) * .84); transition: opacity .25s linear; }

/* ---------- Cursor (system pointer stays visible above it) ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none;
  width: 0; height: 0; opacity: 0; transition: opacity .4s var(--ease);
}
.cursor.is-on { opacity: 1; }
.cursor.is-idle { opacity: 0; }
.cursor__dot {
  position: absolute; left: 0; top: 0;
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--cursor); border: 1.25px solid var(--cursor);
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), background-color .3s ease, border-color .3s ease, opacity .3s ease;
}
.cursor[data-mode="link"] .cursor__dot { width: 44px; height: 44px; margin: -22px 0 0 -22px; background: transparent; }
.cursor[data-mode="text"] .cursor__dot { width: 2px; height: 22px; margin: -11px 0 0 -1px; border-radius: 2px; }
.cursor[data-mode="view"] .cursor__dot { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
.cursor.is-down .cursor__dot { transform: scale(.82); }
.cursor__label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.6);
  font: 500 11px/1 'Inter', sans-serif; letter-spacing: .04em; white-space: nowrap;
  color: var(--cursor-ink, #fff); opacity: 0; transition: opacity .3s ease, transform .5s var(--ease);
}
.cursor[data-mode="view"] .cursor__label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Form mechanics ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form[data-contact] [data-status] { min-height: 1.5em; }

/* ---------- Review switcher ---------- */
.review {
  position: fixed; left: 14px; bottom: 14px; z-index: 350;
  display: flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: 999px; background: rgba(20, 20, 20, .82);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .08);
  font: 500 11px/1 'Inter', sans-serif; letter-spacing: .02em;
}
.review a { padding: 8px 10px; border-radius: 999px; color: rgba(255, 255, 255, .62); transition: background-color .25s, color .25s; }
.review a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.review a.is-current { color: #0a0a0a; background: #fff; }
.review .review__all { color: #fff; padding-right: 12px; margin-right: 2px; border-right: 1px solid rgba(255, 255, 255, .14); border-radius: 999px 0 0 999px; }
@media (max-width: 640px) { .review { left: 50%; transform: translateX(-50%); bottom: 10px; } .review .review__all { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
