/* =====================================================================
   grahamstest.com — style.css
   Bright, glitchy, cinematic. No framework. 2026/27 platform features
   with graceful fallbacks (scroll-driven animations, oklch, view()).
   ===================================================================== */

:root {
  --bg: #07040f;
  --bg-2: #0d0820;
  --ink: #f6f2ff;
  --ink-dim: color-mix(in oklab, var(--ink) 62%, transparent);

  --c-magenta: oklch(70% 0.32 340);
  --c-cyan:    oklch(86% 0.19 200);
  --c-lime:    oklch(90% 0.24 120);
  --c-orange:  oklch(76% 0.24 45);
  --c-violet:  oklch(64% 0.28 295);
  --c-yellow:  oklch(93% 0.2 95);

  --grad-hot: linear-gradient(100deg, var(--c-magenta), var(--c-orange) 35%, var(--c-yellow) 60%, var(--c-cyan));
  --grad-cool: linear-gradient(100deg, var(--c-cyan), var(--c-violet) 50%, var(--c-magenta));

  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 5vw, 72px);
  --radius: 22px;

  --mx: .5;  /* mouse x 0..1 */
  --my: .5;  /* mouse y 0..1 */
  --vel: 0;  /* scroll velocity, -1..1 */
}

/* fallbacks for browsers without oklch */
@supports not (color: oklch(50% 0.1 100)) {
  :root {
    --c-magenta: #ff3fb3; --c-cyan: #4de8ff; --c-lime: #c8ff3c;
    --c-orange: #ff8a3d; --c-violet: #8a5cff; --c-yellow: #ffe94d;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw + 12px, 19px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}
@media (hover: none), (pointer: coarse) { body { cursor: auto; } }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: inherit; }
::selection { background: var(--c-magenta); color: #000; }

.mono { font-family: var(--font-mono); font-size: .78em; letter-spacing: .04em; text-transform: uppercase; }
.nowrap { white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; }

/* =========================================================
   BOOT OVERLAY
   ========================================================= */
.boot {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .5s ease, visibility .5s;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot__inner { display: grid; gap: 14px; justify-items: start; }
.boot__txt {
  font-size: clamp(14px, 2.2vw, 22px);
  letter-spacing: .32em;
  position: relative;
  color: var(--ink);
}
.boot__txt::before, .boot__txt::after {
  content: attr(data-text); position: absolute; inset: 0; opacity: .7;
  mix-blend-mode: screen; pointer-events: none;
}
.boot__txt::before { color: var(--c-cyan); animation: bootshift 1.1s steps(2) infinite; }
.boot__txt::after { color: var(--c-magenta); animation: bootshift 1.1s steps(2) infinite reverse; }
@keyframes bootshift { 0%,100% { transform: translate(0,0);} 33% { transform: translate(-3px,1px);} 66% { transform: translate(3px,-1px);} }
.boot__bar { width: 100%; height: 2px; background: color-mix(in oklab, var(--ink) 15%, transparent); overflow: hidden; }
.boot__bar i { display: block; height: 100%; width: 0; background: var(--grad-hot); animation: bootfill 1.1s cubic-bezier(.7,0,.2,1) forwards; }
@keyframes bootfill { to { width: 100%; } }
.boot__meta { font-size: 11px; opacity: .45; }

/* =========================================================
   ATMOSPHERE LAYERS
   ========================================================= */
.aurora { position: fixed; inset: -20%; z-index: 0; pointer-events: none; filter: blur(70px) saturate(1.4); opacity: .55; }
.aurora i {
  position: absolute; border-radius: 50%;
  width: 55vmax; height: 55vmax;
  mix-blend-mode: screen;
  animation: drift 24s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { background: radial-gradient(circle, var(--c-magenta), transparent 60%); left: -10%; top: -10%; }
.aurora i:nth-child(2) { background: radial-gradient(circle, var(--c-cyan), transparent 60%); right: -15%; top: 10%; animation-delay: -6s; animation-duration: 30s; }
.aurora i:nth-child(3) { background: radial-gradient(circle, var(--c-violet), transparent 60%); left: 20%; bottom: -20%; animation-delay: -12s; animation-duration: 27s; }
.aurora i:nth-child(4) { background: radial-gradient(circle, var(--c-orange), transparent 60%); right: 10%; bottom: -10%; animation-delay: -18s; animation-duration: 33s; opacity: .7; }
@keyframes drift {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(8vw, -6vh) scale(1.15); }
  100% { transform: translate(-6vw, 8vh) scale(.95); }
}

.grain {
  position: fixed; inset: -100px; z-index: 60; pointer-events: none;
  opacity: .11; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0);} 20% { transform: translate(-30px,20px);} 40% { transform: translate(40px,-25px);}
  60% { transform: translate(-20px,-40px);} 80% { transform: translate(30px,35px);} 100% { transform: translate(0,0);}
}
.vignette {
  position: fixed; inset: 0; z-index: 59; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(3,1,10,.7) 100%);
}
/* horizontal "tear" line that sweeps on random glitch events */
.tearline {
  position: fixed; left: 0; right: 0; top: -10%; height: 3px; z-index: 61; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--c-cyan), var(--c-magenta), transparent);
  opacity: 0; mix-blend-mode: screen;
}
body.tear .tearline { animation: tearsweep .35s linear; }
@keyframes tearsweep { 0% { top: -2%; opacity: 1; } 100% { top: 102%; opacity: 1; } }
body.tear .page { animation: pagetear .32s steps(3); }
@keyframes pagetear {
  0%   { transform: translateX(0);  filter: none; }
  30%  { transform: translateX(-9px) skewX(-1.5deg); filter: hue-rotate(35deg) saturate(1.8); clip-path: inset(30% 0 0 0); }
  55%  { transform: translateX(7px); filter: hue-rotate(-40deg) contrast(1.3); clip-path: inset(0 0 45% 0); }
  100% { transform: translateX(0); filter: none; clip-path: inset(0); }
}

/* =========================================================
   CURSOR
   ========================================================= */
.cursor { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
.cursor__dot, .cursor__ring {
  position: absolute; top: 0; left: 0; border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor__dot { width: 8px; height: 8px; background: var(--ink); mix-blend-mode: difference; }
.cursor__ring {
  width: 42px; height: 42px;
  border: 1.5px solid var(--ink); mix-blend-mode: difference;
  transition: width .25s, height .25s, border-color .25s, background .25s;
}
.cursor.is-hover .cursor__ring { width: 72px; height: 72px; border-color: var(--c-cyan); background: color-mix(in oklab, var(--c-cyan) 18%, transparent); }
.cursor__label {
  position: absolute; top: 0; left: 0; transform: translate(18px, 18px);
  font-size: 10px; letter-spacing: .2em; color: var(--c-lime);
  opacity: 0; transition: opacity .2s; white-space: nowrap;
  text-shadow: 0 0 10px var(--c-lime);
}
.cursor.is-hover .cursor__label { opacity: 1; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px var(--gutter);
  mix-blend-mode: difference; color: #fff;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.nav.hide { transform: translateY(-110%); }
.nav__logo { font-size: 18px; font-weight: 600; letter-spacing: .1em; }
.nav__links { display: flex; gap: clamp(14px, 3vw, 34px); font-weight: 500; font-size: 15px; }
.nav__links a { position: relative; padding: 4px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .35s cubic-bezier(.7,0,.2,1);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { font-size: 12px; padding: 8px 14px; border: 1px solid currentColor; border-radius: 999px; }
@media (max-width: 640px) { .nav__cta { display: none; } }

/* =========================================================
   GLITCH TEXT
   ========================================================= */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%;
  pointer-events: none; opacity: 0; white-space: nowrap;
}
.glitch::before { color: var(--c-cyan); text-shadow: 2px 0 var(--c-cyan); }
.glitch::after  { color: var(--c-magenta); text-shadow: -2px 0 var(--c-magenta); }
.glitch.is-glitching::before { opacity: .9; animation: glitchA .5s steps(2) both; }
.glitch.is-glitching::after  { opacity: .9; animation: glitchB .5s steps(2) both; }
.glitch.is-glitching { animation: glitchBase .5s steps(2) both; }
@keyframes glitchBase { 0%,100% { transform: none; } 40% { transform: translateX(3px) skewX(-6deg);} 60% { transform: translateX(-4px) skewX(4deg);} }
@keyframes glitchA {
  0%   { clip-path: inset(10% 0 80% 0); transform: translate(-8px,-2px); }
  25%  { clip-path: inset(60% 0 10% 0); transform: translate(6px,2px); }
  50%  { clip-path: inset(30% 0 50% 0); transform: translate(-4px,0); }
  75%  { clip-path: inset(80% 0 5% 0);  transform: translate(9px,-1px); }
  100% { clip-path: inset(45% 0 40% 0); transform: translate(-2px,1px); }
}
@keyframes glitchB {
  0%   { clip-path: inset(70% 0 10% 0); transform: translate(7px,1px); }
  25%  { clip-path: inset(15% 0 70% 0); transform: translate(-6px,-2px); }
  50%  { clip-path: inset(50% 0 30% 0); transform: translate(5px,0); }
  75%  { clip-path: inset(5% 0 85% 0);  transform: translate(-9px,2px); }
  100% { clip-path: inset(35% 0 55% 0); transform: translate(3px,-1px); }
}
/* light-weight hover glitch for headings/links */
.glitch-hover { position: relative; }
.glitch-hover::before, .glitch-hover::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; pointer-events: none;
  opacity: 0; transition: opacity .15s;
  -webkit-background-clip: initial; background: none; color: inherit;
}
.glitch-hover::before { color: var(--c-cyan); }
.glitch-hover::after  { color: var(--c-magenta); }
.glitch-hover:hover::before { opacity: .8; animation: glitchA .4s steps(2) infinite alternate; }
.glitch-hover:hover::after  { opacity: .8; animation: glitchB .4s steps(2) infinite alternate-reverse; }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(34px, 5.6vw, 76px);
  line-height: .98; letter-spacing: -.02em; margin: 14px 0 22px;
  text-wrap: balance;
}
.grad {
  background: var(--grad-hot); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: gradshift 6s linear infinite;
}
.grad--warm { background-image: linear-gradient(100deg, var(--c-yellow), var(--c-orange), var(--c-magenta)); }
@keyframes gradshift { to { background-position: 200% 0; } }
.tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .28em; color: var(--c-lime);
}
.tag::before { content: ""; width: 26px; height: 1px; background: currentColor; }
p { max-width: 62ch; }

.btn {
  --pad: 16px 30px;
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: var(--pad); border-radius: 999px; overflow: hidden;
  font-family: var(--font-display); font-weight: 700; letter-spacing: .02em; font-size: 15px;
  color: #08050f; background: var(--grad-hot); background-size: 200% 100%;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background-position .6s;
  isolation: isolate;
}
.btn span { position: relative; z-index: 1; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(circle at calc(var(--bx, .5) * 100%) calc(var(--by, .5) * 100%), rgba(255,255,255,.7), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.btn:hover { transform: translateY(-2px) scale(1.03); background-position: 100% 0; }
.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(.97); }
.btn--ghost {
  color: var(--ink); background: transparent;
  box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--ink) 40%, transparent);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--c-cyan); color: var(--c-cyan); }
.btn--sm { --pad: 12px 22px; font-size: 13px; }

/* =========================================================
   HERO
   ========================================================= */
.page { position: relative; z-index: 1; }
.hero {
  position: relative; min-height: 100svh; display: grid; align-items: end;
  padding: 0 var(--gutter) clamp(40px, 8vh, 90px);
  overflow: hidden; isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -1; will-change: transform; }
.hero__gl, .hero__fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__gl { opacity: 0; transition: opacity .8s ease; }
.hero.gl-ready .hero__gl { opacity: 1; }
.hero.gl-ready .hero__fallback { opacity: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(7,4,15,.35), transparent 35%, rgba(7,4,15,.35) 75%, var(--bg));
}
.hero__content { position: relative; max-width: 1100px; animation: herofade 1.2s .3s cubic-bezier(.2,.8,.2,1) both; }
@keyframes herofade { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.hero__kicker { color: var(--c-lime); font-size: 11px; margin: 0 0 18px; max-width: none; text-shadow: 0 0 12px color-mix(in oklab, var(--c-lime) 60%, transparent); }
.hero__title {
  font-family: var(--font-display); font-weight: 800;
  /* Syne 800 is ~1.19em per uppercase glyph: "GRAHAM'S" ≈ 8.7em */
  font-size: min(calc((100vw - 2 * var(--gutter)) / 8.7), 165px);
  line-height: .86; letter-spacing: -.045em;
  margin: 0 0 24px; text-transform: uppercase;
  display: block;
}
.hero__title .hero__line { display: block; width: fit-content; }
.hero__line--alt {
  -webkit-text-stroke: 2px var(--ink); color: transparent;
  margin-left: .08em;
}
.hero__line--alt::before, .hero__line--alt::after { color: transparent; }
.hero__line--alt::before { -webkit-text-stroke-color: var(--c-cyan); text-shadow: none; }
.hero__line--alt::after  { -webkit-text-stroke-color: var(--c-magenta); text-shadow: none; }
@media (max-width: 640px) {
  /* stack: small GRAHAM'S over a huge outlined TEST */
  .hero__title { font-size: 10.4vw; }
  .hero__line--alt { font-size: 1.9em; -webkit-text-stroke-width: 1.2px; margin-left: -.02em; }
}
.hero__sub { font-size: clamp(17px, 1.6vw, 24px); color: var(--ink-dim); max-width: 34ch; margin: 0 0 30px; }
.hero__sub b { color: var(--ink); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: clamp(40px, 8vh, 90px);
  display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 10px; letter-spacing: .3em; opacity: .7;
}
.hero__scroll i { width: 1px; height: 56px; background: linear-gradient(var(--ink), transparent); animation: scrollpulse 1.8s ease-in-out infinite; }
@keyframes scrollpulse { 0% { transform: scaleY(0); transform-origin: top;} 50% { transform: scaleY(1); transform-origin: top;} 51% { transform-origin: bottom;} 100% { transform: scaleY(0); transform-origin: bottom;} }
.hero__coords { position: absolute; left: var(--gutter); top: 84px; font-size: 10px; opacity: .5; letter-spacing: .2em; }
@media (max-width: 640px) { .hero__scroll, .hero__coords { display: none; } }

/* =========================================================
   TICKER
   ========================================================= */
.ticker {
  position: relative; z-index: 2; overflow: hidden; white-space: nowrap;
  padding: 18px 0; margin-top: -1px;
  background: var(--grad-hot); background-size: 300% 100%; animation: gradshift 12s linear infinite;
  color: #08050f; font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 3.2vw, 40px);
  text-transform: uppercase; letter-spacing: -.01em;
  transform: rotate(-1.2deg) scale(1.03);
}
.ticker__track { display: inline-flex; align-items: center; gap: 28px; will-change: transform; }
.ticker__track em { font-style: normal; font-size: .5em; opacity: .5; }

/* =========================================================
   MANIFESTO (word-by-word scroll reveal)
   ========================================================= */
.manifesto { padding: clamp(90px, 16vh, 200px) var(--gutter); max-width: 1200px; margin: 0 auto; }
.manifesto__text {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 4.4vw, 64px); line-height: 1.12; letter-spacing: -.02em;
  max-width: none; margin: 0; text-wrap: pretty;
}
.manifesto__text em { font-style: normal; }
/* words get split into .w spans, so the gradient clip must live on each word */
.manifesto__text em .w { background: var(--grad-cool); -webkit-background-clip: text; background-clip: text; color: transparent; }
.manifesto__text q { quotes: "\201C" "\201D"; opacity: .55; }
.manifesto__foot { margin: 34px 0 0; color: var(--c-lime); }
.w { display: inline-block; opacity: .12; transform: translateY(.2em) skewX(-8deg); filter: blur(4px); transition: none; }
/* scroll-driven per-word reveal */
@supports (animation-timeline: view()) {
  .w {
    animation: wordin linear both;
    animation-timeline: view();
    animation-range: entry calc(20% + var(--i) * 1.2%) entry calc(60% + var(--i) * 1.2%);
  }
}
@keyframes wordin { to { opacity: 1; transform: none; filter: blur(0); } }
/* IntersectionObserver fallback */
@supports not (animation-timeline: view()) {
  .w { transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1), filter .6s; transition-delay: calc(var(--i) * 28ms); }
  .manifesto.in .w { opacity: 1; transform: none; filter: blur(0); }
}

/* =========================================================
   PARALLAX BANDS
   ========================================================= */
.band {
  position: relative; min-height: 92svh; display: grid; align-items: center;
  padding: clamp(80px, 14vh, 160px) var(--gutter);
  overflow: hidden; isolation: isolate;
}
.band__bg { position: absolute; inset: -18% 0; z-index: -2; will-change: transform; }
.band__bg img { width: 100%; height: 100%; object-fit: cover; }
.band__haze {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(7,4,15,.85), rgba(7,4,15,.35) 55%, transparent);
}
.band--core .band__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(7,4,15,.85), rgba(7,4,15,.3) 55%, transparent); }
.band::before, .band::after {
  content: ""; position: absolute; left: 0; right: 0; height: 120px; z-index: 0; pointer-events: none;
}
.band::before { top: 0; background: linear-gradient(var(--bg), transparent); }
.band::after  { bottom: 0; background: linear-gradient(transparent, var(--bg)); }
.band__content .h2 { font-size: clamp(27px, 4.6vw, 62px); hyphens: auto; }
.band__content {
  position: relative; z-index: 1; max-width: min(640px, 100%); min-width: 0;
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--bg) 45%, transparent);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid color-mix(in oklab, var(--ink) 14%, transparent);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8);
}
.band__content--right { justify-self: end; }
.band__content p { color: var(--ink-dim); margin: 0; }
.band__num {
  position: absolute; right: var(--gutter); bottom: 6%; z-index: 0;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(120px, 26vw, 360px);
  line-height: 1; color: transparent; -webkit-text-stroke: 1px color-mix(in oklab, var(--ink) 30%, transparent);
  pointer-events: none; will-change: transform;
}
.band--core .band__num { right: auto; left: var(--gutter); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 24px 0 0; font-size: 11px; }
.chips li { padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--c-cyan) 50%, transparent); color: var(--c-cyan); }
.float {
  position: absolute; z-index: 0; left: 6%; top: 8%; margin: 0;
  width: clamp(200px, 32vw, 460px); aspect-ratio: 3/2; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.9), 0 0 0 1px color-mix(in oklab, var(--ink) 15%, transparent);
  transform: rotate(-6deg); will-change: transform;
}
.float img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .float { left: auto; right: -10%; top: 4%; width: 52vw; opacity: .8; }
  .band__content--right { justify-self: stretch; }
}

/* =========================================================
   SERVICES
   ========================================================= */
.services { padding: clamp(80px, 14vh, 160px) var(--gutter); max-width: 1400px; margin: 0 auto; }
.services__head { margin-bottom: clamp(36px, 6vw, 70px); }
.services__head p { color: var(--ink-dim); margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; perspective: 1400px; }
.card--wide { grid-column: 1 / -1; }
/* 3 + 3 layout: [1][2][3] / [4][   5 wide   ] */
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } .card--wide { grid-column: span 2; } }

.card {
  --x: 50%; --y: 50%; --rx: 0deg; --ry: 0deg;
  --accent: oklch(78% 0.26 var(--hue));
  position: relative; overflow: hidden;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--radius);
  background:
    radial-gradient(600px circle at var(--x) var(--y), color-mix(in oklab, var(--accent) 22%, transparent), transparent 40%),
    linear-gradient(160deg, color-mix(in oklab, var(--bg-2) 85%, var(--accent)), var(--bg-2));
  border: 1px solid color-mix(in oklab, var(--ink) 10%, transparent);
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0);
  transform-style: preserve-3d;
  transition: transform .18s ease-out, border-color .3s, box-shadow .3s;
  isolation: isolate;
  min-height: 300px; display: flex; flex-direction: column;
}
@supports not (color: oklch(50% 0.1 100)) { .card { --accent: var(--c-cyan); } }
.card::after {          /* holographic foil sheen */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: conic-gradient(from calc(var(--x) * 1deg) at var(--x) var(--y),
    var(--c-magenta), var(--c-orange), var(--c-yellow), var(--c-lime), var(--c-cyan), var(--c-violet), var(--c-magenta));
  mix-blend-mode: color-dodge; opacity: 0; transition: opacity .35s;
  filter: blur(30px) saturate(1.5);
}
.card::before {         /* scanning line */
  content: ""; position: absolute; left: 0; right: 0; top: -20%; height: 20%; z-index: 0; pointer-events: none;
  background: linear-gradient(transparent, color-mix(in oklab, var(--accent) 35%, transparent), transparent);
  opacity: 0; transition: opacity .3s;
}
.card:hover { border-color: color-mix(in oklab, var(--accent) 60%, transparent); box-shadow: 0 30px 80px -30px var(--accent); }
.card:hover::after { opacity: .28; }
.card:hover::before { opacity: 1; animation: scan 1.6s linear infinite; }
@keyframes scan { to { top: 120%; } }
.card > * { position: relative; z-index: 1; transform: translateZ(30px); }
.card__glyph { font-size: 12px; color: var(--accent); text-shadow: 0 0 14px var(--accent); }
.card h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 1.7vw, 28px); line-height: 1.05; margin: 34px 0 12px; letter-spacing: -.02em; hyphens: auto; }
.card--wide h3 { font-size: clamp(22px, 2.2vw, 34px); }
.card p { color: var(--ink-dim); margin: 0 0 auto; font-size: .95em; }
.card__foot { margin-top: 28px; font-size: 10px; color: color-mix(in oklab, var(--accent) 80%, var(--ink)); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  position: relative; padding: clamp(100px, 18vh, 220px) var(--gutter);
  text-align: center; overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 50% 60%, color-mix(in oklab, var(--c-violet) 35%, transparent), transparent 70%);
}
.contact__inner { display: grid; justify-items: center; gap: 0; }
.contact__title { font-size: clamp(34px, 9vw, 130px); margin-bottom: 20px; }
.contact__lead { color: var(--ink-dim); max-width: 56ch; margin: 0 auto 44px; }
.contact__lead b { color: var(--ink); font-weight: 600; }
.email {
  font-family: var(--font-mono); font-weight: 600;
  font-size: clamp(22px, 6.2vw, 84px); letter-spacing: -.02em;
  padding: .2em .35em; border-radius: 18px;
  background: var(--grad-hot); background-size: 200% 100%; animation: gradshift 8s linear infinite;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
  max-width: 100%; overflow-wrap: anywhere;
}
.email::before, .email::after { -webkit-background-clip: initial; background: none; }
.email:hover { transform: scale(1.04) rotate(-1deg); }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px; margin-top: 30px; }
.contact__note { font-size: 11px; opacity: .5; }
.copied .contact__note { color: var(--c-lime); opacity: 1; }

/* =========================================================
   FOOTER
   ========================================================= */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 30px var(--gutter) max(30px, env(safe-area-inset-bottom));
  border-top: 1px solid color-mix(in oklab, var(--ink) 10%, transparent);
  font-size: 11px; opacity: .6;
}
.foot a:hover { color: var(--c-cyan); }

/* =========================================================
   REVEAL (generic scroll-in)
   ========================================================= */
.reveal { opacity: 0; transform: translateY(40px); }
@supports (animation-timeline: view()) {
  .reveal { animation: revealin .9s cubic-bezier(.2,.8,.2,1) both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
}
@supports not (animation-timeline: view()) {
  .reveal { transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
  .reveal.in { opacity: 1; transform: none; }
}
@keyframes revealin { to { opacity: 1; transform: none; } }
.grid .card:nth-child(2) { animation-delay: .08s; transition-delay: .08s; }
.grid .card:nth-child(3) { animation-delay: .16s; transition-delay: .16s; }
.grid .card:nth-child(4) { animation-delay: .24s; transition-delay: .24s; }

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .boot { display: none; }
  .grain, .tearline { display: none; }
  .reveal, .w { opacity: 1; transform: none; filter: none; }
  .hero__gl { display: none; }
  .hero .hero__fallback { opacity: 1 !important; }
  html { scroll-behavior: auto; }
}
