/* Gravy Digital — design tokens come from the logo (cube faces: top / left / right).
   Palettes are swapped with <html data-palette="...">. */

:root,
[data-palette="molten"] {
  --bg: #0D0A08;
  --bg-2: #120E0B;
  --surface: #17120F;
  --surface-2: #211913;
  --line: rgba(255, 196, 150, .12);
  --line-strong: rgba(255, 196, 150, .24);
  --fg: #F5EDE6;
  --muted: #A99B90;
  --c-top: #FC9C2A;
  --c-left: #E8560A;
  --c-right: #C83A02;
  --accent: #E8560A;
  --accent-hi: #FC9C2A;
  --on-accent: #170903;
  --drip: var(--bg);
  --glow: rgba(232, 86, 10, .35);
  color-scheme: dark;
}

[data-palette="steel"] {
  --bg: #0B0E12;
  --bg-2: #0F1318;
  --surface: #141A20;
  --surface-2: #1C232B;
  --line: rgba(170, 195, 220, .12);
  --line-strong: rgba(170, 195, 220, .24);
  --fg: #EEF2F5;
  --muted: #93A1AE;
  --c-top: #FFB347;
  --c-left: #F26B1D;
  --c-right: #B8430B;
  --accent: #F26B1D;
  --accent-hi: #FFB347;
  --on-accent: #120700;
  --glow: rgba(242, 107, 29, .3);
}

[data-palette="bloodmoon"] {
  --bg: #0C0808;
  --bg-2: #110B0B;
  --surface: #181010;
  --surface-2: #221616;
  --line: rgba(255, 170, 160, .12);
  --line-strong: rgba(255, 170, 160, .24);
  --fg: #F3E9E4;
  --muted: #AA9A95;
  --c-top: #E8A33D;
  --c-left: #B3261E;
  --c-right: #7E1612;
  --accent: #D2362B;
  --accent-hi: #E8A33D;
  --on-accent: #FFF4EE;
  --glow: rgba(179, 38, 30, .38);
}

[data-palette="bone"] {
  --bg: #F1E9DE;
  --bg-2: #EADFD1;
  --surface: #FBF6EF;
  --surface-2: #E4D7C6;
  --line: rgba(60, 35, 15, .14);
  --line-strong: rgba(60, 35, 15, .28);
  --fg: #1C1410;
  --muted: #65564B;
  --c-top: #FC9C2A;
  --c-left: #E8560A;
  --c-right: #C83A02;
  --accent: #C24400;
  --accent-hi: #B04000;
  --on-accent: #FFF6EE;
  --drip: #FBF6EF;
  --glow: rgba(252, 156, 42, .35);
  color-scheme: light;
}

:root {
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 18px;
  --radius-sm: 10px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* no scroll-behavior: smooth here: it makes ScrollTrigger.refresh() measure pins mid-scroll,
   which left the pinned hero offset (a big blank gap) after scrolling back up. Anchor links
   scroll smoothly from main.js instead. */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 var(--font-body);
  overflow-x: hidden;
  transition: background-color .4s, color .4s;
}
/* film grain keeps the dark surfaces from looking flat */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.02; letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(2.2rem, 5.5vw, 4.5rem); font-weight: 800; }
h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
.mono { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.small { font-size: .72rem; }
.accent { color: var(--accent-hi); }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--accent); color: var(--on-accent); border-radius: var(--radius-sm); text-decoration: none; }
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 6px; }

.eyebrow { color: var(--accent-hi); margin-bottom: 18px; }
.lede { color: var(--muted); font-size: 1.15rem; max-width: 56ch; margin-top: 20px; }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }

/* ---------- brand mark ---------- */
.m-top { fill: var(--c-top); }
.m-left { fill: var(--c-left); }
.m-right { fill: var(--c-right); }
.m-top, .m-left, .m-right { stroke-linejoin: round; stroke-width: 3; }
.m-top { stroke: var(--c-top); } .m-left { stroke: var(--c-left); } .m-right { stroke: var(--c-right); }
.m-drip-line { fill: none; stroke: var(--drip); stroke-width: 3.4; stroke-linecap: round; }
.m-drop { fill: var(--drip); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { height: 36px; width: auto; }

/* ---------- progress + nav ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--c-right), var(--c-left), var(--c-top)); }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  transition: transform .45s var(--ease-out), background-color .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
/* a soft fade, not a solid bar: backdrop-filter over the clipped/scaled feature image
   renders as a black box in Chromium when the nav slides back in on scroll-up */
.nav::before {
  content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--bg) 0%, color-mix(in srgb, var(--bg) 75%, transparent) 55%, transparent 100%);
  opacity: 0; transition: opacity .3s;
}
.nav.is-scrolled::before { opacity: 1; }
.nav.is-hidden { transform: translateY(-100%); }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a { display: inline-block; padding: 10px 14px; text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--muted); border-radius: 999px; transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--fg); background: var(--surface-2); }
.nav-links .nav-cta { color: var(--on-accent); background: var(--accent); }
.nav-links .nav-cta:hover { background: var(--accent-hi); color: var(--on-accent); }
@media (max-width: 640px) {
  .nav-links li:not(:last-child) { display: none; }
  .brand-logo { height: 30px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease-out), box-shadow .25s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 30px -10px var(--glow); }
.btn-primary:hover { background: var(--accent-hi); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent-hi); color: var(--accent-hi); }
.btn-xl { min-height: 68px; padding: 20px 44px; font-size: 1.2rem; }
.text-link { display: inline-flex; gap: 8px; margin-top: 18px; color: var(--accent-hi); font-weight: 600; text-decoration: none; }
.text-link span { transition: transform .25s var(--ease-out); }
.text-link:hover span { transform: translateX(5px); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding-top: 90px; }
.hero-glow {
  position: absolute; inset: -20% -10% auto auto; width: 75vw; height: 75vw; max-width: 1100px; max-height: 1100px;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-title { font-size: clamp(3rem, 8.4vw, 7.4rem); font-weight: 800; letter-spacing: -.045em; line-height: .95; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .word { display: inline-block; white-space: nowrap; }
@media (max-height: 760px) { .scroll-cue { display: none; } }
.hero-sub { margin-top: 28px; max-width: 48ch; color: var(--muted); font-size: 1.15rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-cube { perspective: 1000px; }
.cube-tilt { transform-style: preserve-3d; will-change: transform; }
.cube-svg { width: 100%; max-width: 560px; margin-inline: auto; display: block; overflow: visible; --drip: var(--bg); filter: drop-shadow(0 40px 60px var(--glow)); }
.cube-svg .ghost path { fill: none; stroke: var(--accent-hi); stroke-width: .5; stroke-dasharray: 2 2; opacity: 0; }
.face-labels text { fill: var(--muted); font-size: 5px; letter-spacing: .25em; opacity: 0; }
.floaters { position: absolute; inset: 0; pointer-events: none; }
.floater { position: absolute; fill: none; stroke: var(--accent-hi); stroke-width: 1; opacity: .28; }
.f1 { width: 90px; height: 90px; left: 6%; top: 18%; }
.f2 { width: 46px; height: 46px; left: 44%; top: 12%; opacity: .2; }
.f3 { width: 140px; height: 140px; right: 4%; bottom: 8%; opacity: .14; }
.f4 { width: 34px; height: 34px; left: 30%; bottom: 14%; opacity: .35; }
.f5 { width: 64px; height: 64px; right: 38%; top: 72%; opacity: .2; }
.floater { animation: drift 14s ease-in-out infinite alternate; }
.f2 { animation-duration: 11s; } .f3 { animation-duration: 18s; } .f4 { animation-duration: 9s; }
@keyframes drift { to { rotate: 25deg; translate: 0 -18px; } }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; }
.scroll-cue i { width: 2px; height: 46px; background: linear-gradient(var(--accent), transparent); border-radius: 2px; animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 899px) {
  .hero { align-items: flex-start; padding-top: 110px; padding-bottom: 80px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-cube { order: -1; max-width: 300px; margin: 0 auto; }
  .scroll-cue { display: none; }
}
/* phones: smaller cube and tighter type so the buttons sit above the fold */
@media (max-width: 640px) {
  .hero { padding-top: 84px; padding-bottom: 56px; }
  .hero-inner { gap: 20px; }
  .hero-cube { max-width: 210px; }
  .hero-title { font-size: clamp(2.6rem, 12.5vw, 3.4rem); }
  .hero-sub { margin-top: 18px; font-size: 1.02rem; }
  .hero-ctas { margin-top: 24px; }
}
.nw { white-space: nowrap; }

/* ---------- marquee ---------- */
.marquee { padding: clamp(40px, 7vw, 90px) 0; overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-2); }
.marquee-row { display: flex; gap: 32px; white-space: nowrap; width: max-content; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.4rem, 7vw, 6rem); letter-spacing: -.03em; line-height: 1.1; }
.marquee-row b { color: var(--accent); font-size: .4em; align-self: center; }
.row-b { color: transparent; -webkit-text-stroke: 1.5px var(--line-strong); margin-top: 6px; }
.row-b b { -webkit-text-stroke: 0; color: var(--c-top); }

/* ---------- projects ---------- */
.projects { padding-block: clamp(90px, 14vw, 180px); }
.project-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.project-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .3s, transform .4s var(--ease-out);
}
.project-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.card-game { grid-column: span 3; }
.card-pack { grid-column: span 3; }
.card-next { grid-column: span 6; flex-direction: row; align-items: center; }
.project-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.project-card:hover .project-media img { transform: scale(1.05); }
.project-body { padding: 28px; }
.project-body h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 14px 0 10px; }
.project-body p { color: var(--muted); max-width: 52ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: .68rem; }
.tags .tag-live { color: var(--accent-hi); border-color: color-mix(in srgb, var(--accent-hi) 50%, transparent); }
.tags .tag-live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--accent-hi); vertical-align: 1px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.simmer { flex: none; width: clamp(120px, 18vw, 200px); padding: 28px; display: grid; place-items: center; }
.simmer-mark { width: 100%; aspect-ratio: 1; --drip: var(--surface); animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -8px; } }
@media (max-width: 899px) {
  .card-game, .card-pack, .card-next { grid-column: span 6; }
  .card-next { flex-direction: column; align-items: flex-start; }
  .simmer { width: 120px; padding: 28px 28px 0; }
}

/* ---------- feature reveal ---------- */
.feature { position: relative; height: 100svh; min-height: 560px; }
/* edges feather into the page instead of a hard clip: the render's backdrop is lighter than --bg.
   --ix/--iy (inset) and --fx/--fb (side/bottom feather) are scrubbed from a soft card to full-bleed in main.js */
.feature-frame { position: relative; height: 100%; overflow: hidden;
  --ix: 0%; --iy: 0%; --fx: 0px; --fb: 0px; --ft: clamp(60px, 16vh, 180px);
  --mask-x: linear-gradient(90deg, transparent var(--ix), #000 calc(var(--ix) + var(--fx)), #000 calc(100% - var(--ix) - var(--fx)), transparent calc(100% - var(--ix)));
  --mask-y: linear-gradient(180deg, transparent var(--iy), #000 calc(var(--iy) + var(--ft)), #000 calc(100% - var(--iy) - var(--fb)), transparent calc(100% - var(--iy)));
  -webkit-mask-image: var(--mask-x), var(--mask-y); -webkit-mask-composite: source-in;
  mask-image: var(--mask-x), var(--mask-y); mask-composite: intersect; }
.feature-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-shade { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 0%, transparent 45%), linear-gradient(90deg, color-mix(in srgb, var(--bg) 70%, transparent), transparent 55%); }
.feature-copy { position: absolute; left: 0; right: 0; bottom: clamp(32px, 7vw, 90px); }
.feature-copy h2 { font-size: clamp(3rem, 10vw, 9rem); letter-spacing: -.05em; }
.stats { display: flex; flex-wrap: wrap; gap: clamp(20px, 5vw, 64px); list-style: none; padding: 0; margin: 28px 0 0; }
.stats li { display: flex; flex-direction: column; }
.stats strong { font: 800 clamp(2rem, 4vw, 3.2rem)/1 var(--font-display); color: var(--accent-hi); }
.stats span { color: var(--muted); margin-top: 6px; }
.feature-cta { margin-top: 32px; }
.card-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.btn-sm { min-height: 42px; padding: 10px 18px; font-size: .9rem; }

/* ---------- armory ---------- */
.armory { position: relative; padding-top: clamp(90px, 12vw, 150px); overflow: hidden; }
.armory-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.armory-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.counter { color: var(--muted); font-size: .9rem; }
.counter b { color: var(--fg); font-weight: 500; }
.blood-toggle, .w-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px;
  font: 500 .9rem/1 var(--font-body); color: var(--fg); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px;
  transition: border-color .25s, background-color .25s, color .25s;
}
.blood-toggle:hover, .w-toggle:hover { border-color: var(--accent-hi); }
.bt-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); transition: background-color .25s, box-shadow .25s; }
.blood-toggle[aria-pressed="true"] .bt-dot { background: #C1121F; box-shadow: 0 0 12px #C1121F; }
.w-toggle[aria-pressed="true"] { border-color: #C1121F; color: #FF8A8A; }

/* default: native swipe rail (mobile, reduced motion, no JS); JS pins it on desktop */
.armory-viewport { padding-bottom: clamp(60px, 9vw, 120px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.armory-viewport::-webkit-scrollbar { display: none; }
.armory.is-pinned { padding-top: clamp(80px, 11vh, 130px); }
.armory.is-pinned .armory-viewport { overflow: visible; scroll-snap-type: none; }
.armory-track { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0 var(--gutter); width: max-content; will-change: transform; }
.weapon {
  width: min(78vw, 820px, calc((100svh - 500px) * 1.7778)); min-width: min(86vw, 520px); flex: none; scroll-snap-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.weapon-media { position: relative; aspect-ratio: 16 / 9; background: #14100E; }
.weapon-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s var(--ease-out), transform .9s var(--ease-out); }
.weapon-media .w-bloody { opacity: 0; }
.weapon.is-bloody .w-bloody { opacity: 1; }
.weapon.is-bloody .w-clean { opacity: 0; }
.weapon:hover .weapon-media img { transform: scale(1.03); }
.weapon-info { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 20px; align-items: center; padding: 24px 28px 28px; }
.w-num { color: var(--accent-hi); grid-row: span 2; align-self: start; padding-top: 8px; }
.weapon-info h3 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); }
.kanji { font-family: serif; font-weight: 400; font-size: .6em; color: var(--muted); margin-left: 8px; }
.weapon-info p { color: var(--muted); grid-column: 2; }
.w-toggle { grid-column: 3; grid-row: 1 / span 2; }
@media (max-width: 899px) {
  .weapon { width: 86vw; }
  .weapon-info { grid-template-columns: auto 1fr; }
  .w-toggle { grid-column: 1 / -1; grid-row: auto; justify-self: start; margin-top: 10px; }
}

/* ---------- details bento ---------- */
.details { padding-block: clamp(90px, 12vw, 160px); }
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(180px, 20vw, 280px); gap: 16px; }
.tile { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.tile-media { position: absolute; inset: -12% 0; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; }
.tile figcaption { position: absolute; left: 14px; bottom: 14px; padding: 7px 11px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(8px); color: var(--fg); font-size: .66rem; }
.tile-compare { grid-column: span 2; grid-row: span 2; }
.tile-wide { grid-column: span 2; }
@media (max-width: 899px) {
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: 42vw; }
  .tile-compare { grid-column: span 2; grid-row: span 1; aspect-ratio: auto; }
  .tile-wide { grid-column: span 2; }
}

.compare { position: absolute; inset: 0; --pos: 50%; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.compare-top { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; translate: -1px 0; background: var(--fg); pointer-events: none; box-shadow: 0 0 20px rgba(0,0,0,.6); }
.compare-handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; box-shadow: 0 6px 24px var(--glow); }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-range:focus-visible + .compare-tag, .compare:focus-within .compare-handle::after { outline: 2px solid var(--fg); outline-offset: 3px; }
.compare-tag { position: absolute; top: 14px; padding: 7px 11px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 70%, transparent); font-size: .66rem; pointer-events: none; }
.tag-l { left: 14px; color: #FF8A8A; } .tag-r { right: 14px; }

/* ---------- toolkit ---------- */
.toolkit { padding-bottom: clamp(90px, 12vw, 160px); }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tool {
  position: relative; padding: 32px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%); border: 1px solid var(--line);
  transition: border-color .3s, transform .4s var(--ease-out);
}
.tool::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 70%; aspect-ratio: 1; background: radial-gradient(closest-side, var(--glow), transparent); opacity: 0; transition: opacity .4s; }
.tool:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.tool:hover::after { opacity: 1; }
.tool-glyph { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-size: 1.05rem; text-transform: none; letter-spacing: 0; margin-bottom: 28px; }
.tool:nth-child(2) .tool-glyph { background: var(--c-top); }
.tool:nth-child(3) .tool-glyph { background: var(--c-right); color: #FFF4EC; }
.tool:nth-child(4) .tool-glyph { background: var(--fg); color: var(--bg); }
.tool h3 { font-size: 1.8rem; margin-bottom: 12px; }
.tool p { color: var(--muted); }
@media (max-width: 1199px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .tool-grid { grid-template-columns: 1fr; } }

/* ---------- process ---------- */
.process { padding-bottom: clamp(90px, 12vw, 160px); }
.timeline { position: relative; padding-left: 60px; max-width: 820px; }
.timeline-rail { position: absolute; left: 18px; top: 8px; bottom: 8px; width: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.timeline-fill { position: absolute; inset: 0; transform-origin: top; transform: scaleY(0); background: linear-gradient(var(--c-top), var(--c-left), var(--c-right)); border-radius: 4px; }
.timeline ol { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(40px, 6vw, 72px); }
.step { position: relative; display: flex; gap: 22px; opacity: .35; transition: opacity .5s; }
.step.is-on { opacity: 1; }
.step::before { content: ""; position: absolute; left: -49px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 3px solid var(--line-strong); transition: border-color .4s, background-color .4s, box-shadow .4s; }
.step.is-on::before { border-color: var(--accent-hi); background: var(--accent); box-shadow: 0 0 18px var(--glow); }
.step-n { color: var(--accent-hi); padding-top: 6px; }
.step h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 8px; }
.step p { color: var(--muted); }
.no-motion .step { opacity: 1; }

/* ---------- contact ---------- */
.contact { position: relative; overflow: hidden; padding-block: clamp(110px, 16vw, 220px); text-align: center; border-top: 1px solid var(--line); background: var(--bg-2); }
.contact-glow { position: absolute; left: 50%; top: 60%; width: 900px; height: 900px; translate: -50% -50%; background: radial-gradient(closest-side, var(--glow), transparent 70%); pointer-events: none; }
.contact-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.contact h2 { font-size: clamp(3rem, 9vw, 8rem); letter-spacing: -.05em; }
.contact .lede { margin: 24px auto 44px; }
.contact-email { margin-top: 22px; color: var(--muted); text-decoration: none; font-size: 1.05rem; border-bottom: 1px solid var(--line-strong); transition: color .2s, border-color .2s; }
.contact-email:hover { color: var(--accent-hi); border-color: var(--accent-hi); }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; list-style: none; padding: 0; margin: 40px 0 0; }
.socials a { display: inline-block; padding: 12px 18px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; color: var(--muted); transition: color .2s, border-color .2s; }
.socials a:hover { color: var(--fg); border-color: var(--accent-hi); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 36px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer .small { color: var(--muted); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .step { opacity: 1; }
}
