/* Shared v004 motion chrome — original. Grain, cursor, preloader, transitions, marquees, glass. */
@font-face{font-family:"Noto Sans";src:local("Noto Sans"),url("/fonts/NotoSans-latin-var.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}



* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; }
body {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Noto Sans",sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-width: 320px;
  cursor: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }
img, svg, canvas { display: block; max-width: 100%; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

.skip {
  position: absolute; left: 1.2rem; top: -6rem; z-index: 400;
  background: var(--ink); color: var(--paper); padding: .8rem 1.2rem; border-radius: .8rem;
}
.skip:focus { top: 1.2rem; outline: 3px solid var(--accent); outline-offset: 3px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Grain + vignette */
.grain, .vignette {
  pointer-events: none; position: fixed; inset: 0; z-index: 80;
}
.grain {
  background: url("../img/grain.png") repeat;
  opacity: .11;
  mix-blend-mode: multiply;
}
.vignette {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(11,16,19,.16) 100%);
  z-index: 79;
}

/* Custom cursor */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none;
  width: 1.2rem; height: 1.2rem; margin: -.6rem 0 0 -.6rem;
  border-radius: 50%; background: var(--accent);
  mix-blend-mode: multiply;
  transform: translate(-100vw, -100vh);
  will-change: transform;
}
.cursor-ring {
  position: fixed; left: 0; top: 0; z-index: 299; pointer-events: none;
  width: 4.4rem; height: 4.4rem; margin: -2.2rem 0 0 -2.2rem;
  border-radius: 50%; border: 1px solid var(--ink);
  transform: translate(-100vw, -100vh);
  will-change: transform;
  opacity: .55;
}
.cursor.is-down { transform: scale(.6); }
.cursor-ring.is-hover { transform: scale(1.45); border-color: var(--accent); }
body.is-touch .cursor, body.is-touch .cursor-ring, body.is-touch { cursor: auto; }
body.is-touch button, body.is-touch a { cursor: pointer; }

/* Preloader */
.preloader {
  position: fixed; inset: 0; z-index: 250;
  background: var(--bg-soft);
  color: var(--ink);
  display: grid; place-items: center;
  overflow: hidden;
}
.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .7s ease, visibility .7s; }
.preloader-inner { position: relative; width: 100%; height: 100%; }
.preloader-pct {
  position: absolute; left: 4rem; bottom: 10rem;
  font-weight: 600; letter-spacing: -.08em; line-height: .8;
  font-size: clamp(8rem, 18vw, 22rem);
}
.preloader-msg {
  position: absolute; left: 4rem; bottom: 4rem;
  font-size: 1.4rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600;
}
.preloader-ring { position: absolute; right: 4rem; bottom: 4rem; width: 4.8rem; height: 4.8rem; }
.preloader-ring circle { fill: none; stroke: var(--ink); stroke-width: 3; }
.preloader-ring .meter { stroke: var(--accent); stroke-dasharray: 113; stroke-dashoffset: 113; transform-origin: 50% 50%; transform: rotate(-90deg); }
.preloader-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 6rem 6rem;
  mask-image: radial-gradient(circle at 70% 40%, #000 0, transparent 70%);
  animation: grid-shift 16s linear infinite;
  opacity: .7;
}
@keyframes grid-shift { to { background-position: 6rem 6rem; } }

/* Page transition — hidden until a navigation starts */
.transition {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 240; pointer-events: none;
  background: var(--overlay);
  transform: translateY(100%);
  visibility: hidden;
}
.transition.is-in { pointer-events: auto; visibility: visible; }

/* Solid surfaces (no glass). */
.glass {
  background: var(--paper, #FFFEFB);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.pill, .btn-primary, .btn-ghost, .scroll-btn, .talk {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 1.6rem;
  border-radius: 999px; font-weight: 600;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background .25s, color .25s;
}
.pill, .scroll-btn {
  background: var(--paper); color: var(--ink);
  padding: 1.5rem 2.2rem; min-width: 26rem; box-shadow: var(--shadow);
}
.btn-primary, .talk {
  background: var(--accent); color: var(--on-accent);
  padding: .85rem 1.3rem;
}
.btn-ghost {
  border: 1px solid var(--line); padding: .85rem 1.3rem;
}
.magnetic:hover { transform: translateY(-2px); }

/* Distortion hover — SVG filter target */
.distort {
  transition: transform .5s cubic-bezier(.2,.8,.2,1), filter .5s;
  transform-style: preserve-3d;
}
.distort:hover {
  transform: perspective(800px) rotateX(var(--ry, 0)) rotateY(var(--rx, 0)) translateZ(8px);
  filter: url(#hover-distort);
}

/* Marquee */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line);
  background: var(--ink); color: var(--paper);
  padding: 1.4rem 0;
}
.marquee-track {
  display: flex; width: max-content; gap: 0;
  animation: marquee 28s linear infinite;
  font-weight: 600; letter-spacing: -.02em; text-transform: uppercase;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
}
.marquee-track span { padding: 0 2.4rem; white-space: nowrap; }
.marquee-track em { font-style: normal; color: var(--accent-on-dark, var(--accent-soft)); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Animated line grid overlay for sections */
.lined {
  position: relative;
}
.lined::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 8rem 8rem;
  opacity: .45;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

@media (prefers-reduced-motion: reduce) {
  .preloader { display: none !important; }
  .cursor, .cursor-ring { display: none !important; }
  body { cursor: auto; }
  .marquee-track, .preloader-grid, .spin-slow { animation: none !important; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media (pointer: coarse) {
  .cursor, .cursor-ring { display: none !important; }
  body { cursor: auto; }
}

/* v006 — clean light hero animation and Apple-style Inter typography. No water ripple. */
.hero-canvas, #hero-3d, #hero-canvas { display: none !important; }
.hero-fallback { display: block !important; z-index: 0; }
.hero-fallback.is-drifting {
  animation: lotDrift 64s linear infinite;
  transform-origin: center center;
}
@keyframes lotDrift {
  0% { transform: translate3d(0,0,0) scale(1.02); }
  100% { transform: translate3d(-1.6%, -1.2%, 0) scale(1.06); }
}
.hero-fx{
  position:absolute; inset:0;
  overflow:hidden; pointer-events:none;
  z-index:1;
}
.hero-fx-wash{
  position:absolute; inset:-10%;
  display: none;
  background: none;
}
.hero-fx-orb{
  position:absolute; border-radius:50%;
  display: none;
  filter: none;
  opacity: 0;
  will-change:transform;
}
.hero-fx-orb-a{
  width:56vmax; height:56vmax; left:-18vmax; top:-20vmax;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  animation:heroOrbA 38s ease-in-out infinite;
}
.hero-fx-orb-b{
  width:44vmax; height:44vmax; right:-14vmax; top:10vmax;
  background: rgba(160,176,190,.45);
  animation:heroOrbB 44s ease-in-out infinite;
}
.hero-fx-orb-c{
  width:40vmax; height:40vmax; left:30vmax; bottom:-18vmax;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  animation:heroOrbC 50s ease-in-out infinite;
}
.hero-fx-grid{
  position:absolute; inset:-10%;
  background-image:
    linear-gradient(to right, rgba(16,19,24,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16,19,24,.05) 1px, transparent 1px);
  background-size:80px 80px;
  mask-image:radial-gradient(ellipse at 50% 42%, #000 0%, transparent 78%);
  -webkit-mask-image:radial-gradient(ellipse at 50% 42%, #000 0%, transparent 78%);
  animation:heroGrid 60s linear infinite;
}
.hero-fx-sheen{
  position:absolute; inset:-20%;
  display: none;
  background: none;
  animation: none;
}
@keyframes heroOrbA{
  0%,100%{ transform:translate3d(0,0,0) scale(1); }
  50%{ transform:translate3d(8%,6%,0) scale(1.08); }
}
@keyframes heroOrbB{
  0%,100%{ transform:translate3d(0,0,0) scale(1); }
  50%{ transform:translate3d(-10%,4%,0) scale(1.1); }
}
@keyframes heroOrbC{
  0%,100%{ transform:translate3d(0,0,0) scale(1); }
  50%{ transform:translate3d(-6%,-8%,0) scale(1.05); }
}
@keyframes heroGrid{
  0%{ transform:translate3d(0,0,0); }
  100%{ transform:translate3d(-80px,-80px,0); }
}
@keyframes heroSheen{
  0%,100%{ transform:translate3d(-16%,0,0); opacity:.14; }
  50%{ transform:translate3d(16%,0,0); opacity:.42; }
}
.page-hero{
  position:absolute; top:0; left:0; right:0;
  height: 28rem;
  overflow:hidden;
  pointer-events:none;
  z-index:0;
  background: transparent;
}
body.inner main, body.inner .page, main.page { position: relative; z-index: 1; }

html, body{
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Noto Sans",sans-serif;
  font-optical-sizing: auto;
  font-synthesis: none;
  font-stretch: normal;
}
h1, h2, h3, h4,
.hero-title, .hero-kicker, .section-title, .chapter-name,
.js-overflow, .js-3d, .logo, .tile h3, .plat h3, .card h3, .cta h2{
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Noto Sans",sans-serif;
  font-stretch: normal;
  font-optical-sizing: auto;
  font-synthesis: none;
  text-transform: none;
  transform: none;
}
.hero-title, h1, .js-overflow{
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.96;
}
h2, h3, .section-title, .chapter-name, .tile h3, .plat h3, .card h3, .cta h2, .hero-kicker{
  font-weight: 800;
  letter-spacing: -0.03em;
}
body { font-weight: 400; }
@media (prefers-reduced-motion: reduce){
  .hero-fx-orb, .hero-fx-grid, .hero-fx-sheen, .hero-fallback.is-drifting{
    animation: none !important;
  }
}

/* v007: hero paints immediately; no blocking splash. */
.preloader { display: none !important; }
