/* =========================================================
   Muhammet Ali Akagündüz · Personal site
   ========================================================= */

:root {
  --bg: #f6f4ef;
  --bg-elev: #ffffff;
  --bg-soft: #eeebe4;
  --ink: #141312;
  --ink-2: #4a463f;
  --muted: #878175;
  --line: rgba(20, 19, 18, .10);
  --line-2: rgba(20, 19, 18, .18);
  --accent: #b4530f;
  --accent-2: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(180, 83, 15, .10);
  --accent-2-soft: rgba(15, 118, 110, .12);
  --danger: #d1343a;
  --success: #1f8f55;
  --shadow-sm: 0 1px 2px rgba(20, 19, 18, .06);
  --shadow: 0 1px 2px rgba(20, 19, 18, .04), 0 22px 60px -24px rgba(20, 19, 18, .28);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --r: 20px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0b; --bg-elev: #121213; --bg-soft: #1a1a1c;
    --ink: #f3f0e9; --ink-2: #bab4a8; --muted: #7f7a71;
    --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .16);
    --accent: #f2b54f; --accent-2: #5eead4; --accent-ink: #141312;
    --accent-soft: rgba(242, 181, 79, .12); --accent-2-soft: rgba(94, 234, 212, .12);
    --danger: #ff6b6b; --success: #3fcf85;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 28px 70px -28px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a0b; --bg-elev: #121213; --bg-soft: #1a1a1c;
  --ink: #f3f0e9; --ink-2: #bab4a8; --muted: #7f7a71;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .16);
  --accent: #f2b54f; --accent-2: #5eead4; --accent-ink: #141312;
  --accent-soft: rgba(242, 181, 79, .12); --accent-2-soft: rgba(94, 234, 212, .12);
  --danger: #ff6b6b; --success: #3fcf85;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 28px 70px -28px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; scrollbar-gutter: stable; }
html.locked { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
a { color: inherit; }
svg { display: block; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.mono { font-family: var(--mono); }
.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 600; padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600; transition: top .3s;
}
.skip:focus { top: 16px; }

.grain {
  position: fixed; inset: 0; z-index: 150; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 500; background: #0a0a0b; color: #f3f0e9;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(20px, 4vw, 48px);
  transition: transform 1s var(--ease-io);
  animation: loader-safety 0s linear 4s forwards;
}
.loaded .loader { transform: translateY(-100%); }
.no-js .loader, .no-loader .loader { display: none; }
@keyframes loader-safety { to { visibility: hidden; } }
.loader-top { display: flex; justify-content: space-between; align-items: center; }
.loader-mark { font-family: var(--serif); font-size: 30px; }
.loader-label { font-size: 12px; opacity: .55; letter-spacing: .04em; }
.loader-count { display: block; font-family: var(--serif); font-size: clamp(110px, 22vw, 280px); line-height: .8; letter-spacing: -.04em; }
.loader-bar { height: 1px; margin-top: 28px; background: rgba(255, 255, 255, .14); }
.loader-bar i { display: block; height: 100%; background: #f2b54f; transform: scaleX(0); transform-origin: left; }

/* ---------- Progress + cursor ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 95; pointer-events: none; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: left; }

.cursor {
  position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent);
  display: grid; place-items: center; opacity: 0;
  font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink);
  transition: width .35s var(--ease), height .35s var(--ease), background .3s, border-color .3s, opacity .3s;
}
.cursor.on { opacity: 1; }
.cursor.hover { width: 54px; height: 54px; background: var(--accent-soft); border-color: var(--accent); }
.cursor.label { width: 86px; height: 86px; background: var(--accent); border-color: var(--accent); }
.cursor span { opacity: 0; transition: opacity .2s; }
.cursor.label span { opacity: 1; }
.cursor.down { width: 26px; height: 26px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 90; padding: 14px var(--gutter); transition: transform .5s var(--ease); }
.nav.hide { transform: translateY(-120%); }
.nav-inner {
  max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 10px; border-radius: 999px; border: 1px solid transparent;
  transition: background .4s, border-color .4s, box-shadow .4s;
}
.nav.scrolled .nav-inner, .menu-open .nav-inner {
  background: color-mix(in srgb, var(--bg-elev) 74%, transparent);
  border-color: var(--line); box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font-family: var(--serif); font-size: 18px;
  transition: transform .5s var(--ease), border-radius .5s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-8deg); border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15px; font-weight: 600; }
.brand-text small { font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 500;
  color: var(--ink-2); transition: color .3s, background .3s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); background: var(--bg-soft); }
.nav-tools { display: flex; gap: 6px; align-items: center; }
.tool {
  height: 38px; min-width: 38px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink);
  font: 600 12px/1 var(--mono); display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: border-color .25s, transform .25s var(--ease), background .25s;
}
.tool:hover { border-color: var(--line-2); transform: translateY(-1px); }
.tool.icon { padding: 0; width: 38px; }
.kbd-mod { color: var(--muted); }
.i-moon { display: none; }
[data-theme="dark"] .i-sun { display: none; }
[data-theme="dark"] .i-moon { display: block; }
.menu-btn { display: none; flex-direction: column; gap: 5px; }
.menu-btn span { display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .4s var(--ease); }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 80; background: var(--bg);
  padding: 110px var(--gutter) 32px; display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease-io);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.open { clip-path: inset(0 0 0 0); }
.mobile-menu nav a {
  display: flex; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: clamp(40px, 11vw, 64px); line-height: 1.1; text-decoration: none;
  opacity: 0; transform: translateY(32px); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.mobile-menu nav a .mono { font-size: 12px; color: var(--accent); }
.mobile-menu.open nav a { opacity: 1; transform: none; }
.mobile-menu.open nav a:nth-child(1) { transition-delay: .15s; }
.mobile-menu.open nav a:nth-child(2) { transition-delay: .2s; }
.mobile-menu.open nav a:nth-child(3) { transition-delay: .25s; }
.mobile-menu.open nav a:nth-child(4) { transition-delay: .3s; }
.mobile-menu.open nav a:nth-child(5) { transition-delay: .35s; }
.mm-foot { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.mm-foot a { text-decoration: none; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 24px; border-radius: 999px; border: 1px solid var(--ink); cursor: pointer;
  font: 600 15px/1 var(--sans); text-decoration: none; white-space: nowrap; overflow: hidden; isolation: isolate;
  transition: transform .35s var(--ease), color .35s, border-color .35s, background .35s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--accent); transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover::before { transform: none; }
.btn .arr { transition: transform .4s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { color: var(--accent-ink); border-color: var(--accent); }
.btn.is-sent, .btn.is-sent:hover { background: var(--success); border-color: var(--success); color: #fff; }
.btn.is-sent::before { display: none; }
.magnetic { will-change: transform; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 4px; transition: border-color .3s, gap .3s; }
.link-arrow:hover { border-color: var(--accent); gap: 12px; }

.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #34c06e; flex: none; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #34c06e; animation: ping 2s var(--ease) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 128px 0 96px; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 25%, transparent 75%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(90px); }
.b1 { width: 560px; height: 560px; right: -160px; top: -180px; background: var(--accent); opacity: .20; animation: drift 18s ease-in-out infinite alternate; }
.b2 { width: 460px; height: 460px; left: -160px; bottom: -200px; background: var(--accent-2); opacity: .13; animation: drift 24s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-70px, 50px) scale(1.12); } }

.hero-inner { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(36px, 5vw, 80px); align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 28px; padding: 8px 14px 8px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
  font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.hero-title {
  font-family: var(--serif); font-weight: 400; margin: 0 0 26px;
  font-size: clamp(50px, 6.3vw, 98px); line-height: .96; letter-spacing: -.025em; text-wrap: balance;
}
.hero-title .line { display: block; }
.hero-title em { color: var(--accent); }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .04em .08em .16em; margin: -.04em -.08em -.16em; }
.wi { display: inline-block; transform: translateY(110%) rotate(5deg); transform-origin: left bottom; transition: transform 1.1s var(--ease) calc(var(--i, 0) * 70ms); }
.hero-title.is-in .wi { transform: none; }
.role { font-family: var(--mono); font-size: 14.5px; color: var(--ink-2); margin: 0 0 18px; min-height: 1.6em; }
.role-prefix { color: var(--accent); }
.caret { display: inline-block; width: 8px; height: 1.05em; margin-left: 3px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lede { font-size: clamp(16.5px, 1.45vw, 19px); color: var(--ink-2); max-width: 560px; margin: 0 0 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }
.hero-meta { list-style: none; margin: 0; padding: 22px 0 0; display: flex; flex-wrap: wrap; gap: 14px 40px; border-top: 1px solid var(--line); }
.hero-meta li { display: flex; flex-direction: column; gap: 2px; }
.hero-meta span { font-size: 12px; color: var(--muted); }
.hero-meta b { font-size: 15px; font-weight: 600; }

/* Integration map */
.map-card {
  position: relative; border: 1px solid var(--line); border-radius: 26px; overflow: hidden;
  background: color-mix(in srgb, var(--bg-elev) 72%, transparent); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.map-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image: radial-gradient(var(--line-2) 1px, transparent 1px); background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 15%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 50%, #000 15%, transparent 70%);
}
.map-head, .map-foot { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-size: 12px; color: var(--ink-2); }
.map-head { border-bottom: 1px solid var(--line); }
.map-tag { margin-left: auto; color: var(--muted); }
.map-foot { border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); gap: 16px; }
.map-foot > span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.lg.in { background: var(--accent-2); }
.lg.out { background: var(--accent); }
.map-foot .map-hint { margin-left: auto; color: var(--ink-2); text-align: right; transition: opacity .25s; }
.fm { position: relative; width: 100%; height: auto; }
.fm-orbit { fill: none; stroke: var(--line-2); stroke-dasharray: 2 7; transform-box: fill-box; transform-origin: center; animation: spin 50s linear infinite; }
.fm-ring { fill: none; stroke: var(--line); stroke-dasharray: 3 6; }
@keyframes spin { to { transform: rotate(360deg); } }
.fm-link { transition: opacity .35s; }
.fm-path { fill: none; stroke: var(--line-2); stroke-width: 1.2; transition: stroke .3s; }
.fm-flow { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 3 9; opacity: 0; transition: opacity .3s; animation: dash .9s linear infinite; }
.fm-link.in .fm-flow { stroke: var(--accent-2); animation-direction: reverse; }
@keyframes dash { to { stroke-dashoffset: -12; } }
.fm.has-active .fm-link:not(.is-active) { opacity: .28; }
.fm-link.is-active .fm-flow { opacity: 1; }
.fm-link.is-active .fm-path { stroke: transparent; }
.pk { filter: drop-shadow(0 0 4px currentColor); }
.pk.out { fill: var(--accent); color: var(--accent); }
.pk.in { fill: var(--accent-2); color: var(--accent-2); }
.fm-node { cursor: pointer; outline: none; }
.fm-node .nc { fill: var(--bg-elev); stroke: var(--line-2); stroke-width: 1.2; transition: stroke .3s, fill .3s; }
.fm-node .nh { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0; transform: scale(.8); transform-box: fill-box; transform-origin: center; transition: opacity .3s, transform .45s var(--ease); }
.fm-node .nt { font: 600 8.5px var(--mono); fill: var(--muted); letter-spacing: .06em; transition: fill .3s; }
.fm-node .nl { font: 600 12.5px var(--sans); fill: var(--ink); }
.fm-node:hover .nh, .fm-node:focus-visible .nh, .fm-node.is-active .nh { opacity: 1; transform: none; }
.fm-node.is-active .nc { stroke: var(--accent); fill: var(--accent-soft); }
.fm-node.is-active .nt { fill: var(--accent); }
.fm-hub .hb { fill: var(--ink); }
.fm-hub .ht { font: 400 22px var(--serif); fill: var(--bg); }
.fm-hub .hs { font: 600 7.5px var(--mono); letter-spacing: .2em; fill: color-mix(in srgb, var(--bg) 62%, transparent); }
.fm-pulse { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; animation: pulse-ring 3.2s var(--ease) infinite; }
.fm-pulse.p2 { animation-delay: 1.6s; }
@keyframes pulse-ring { 0% { transform: scale(.85); opacity: .55; } 100% { transform: scale(1.55); opacity: 0; } }

.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 24px; height: 38px; margin-left: -12px; border: 1.5px solid var(--line-2); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--ink-2); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80%, 100% { transform: translateY(12px); opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line); padding: 26px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; list-style: none; margin: 0; padding: 0; }
.marquee li { display: flex; align-items: center; gap: 36px; padding-right: 36px; white-space: nowrap; font-family: var(--serif); font-size: clamp(26px, 3vw, 42px); line-height: 1; transition: color .3s; }
.marquee li::after { content: "✦"; font-size: .42em; color: var(--accent); }
.marquee li:nth-child(even) { font-style: italic; color: var(--ink-2); }
.marquee li:hover { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-top: clamp(100px, 12vw, 168px); }
.sec-head { display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: 22px; row-gap: 14px; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-num { font-size: 12px; color: var(--accent); letter-spacing: .12em; padding-bottom: .95em; }
.sec-head h2, .contact-title {
  font-family: var(--serif); font-weight: 400; margin: 0;
  font-size: clamp(46px, 6.2vw, 88px); line-height: .95; letter-spacing: -.025em;
}
.sec-sub { grid-column: 2; margin: 0; max-width: 560px; color: var(--ink-2); font-size: 17px; }
h2 em, .contact-title em, .foot-cta em { color: var(--accent); }
h3 { margin: 0 0 10px; font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }

/* About */
.statement { max-width: 1120px; margin: 0 0 clamp(52px, 7vw, 100px); font-family: var(--serif); font-size: clamp(30px, 4.2vw, 60px); line-height: 1.1; letter-spacing: -.015em; }
.statement .rw { opacity: .14; transition: opacity .4s ease; }
.statement .rw.lit { opacity: 1; }
.about-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: start; }
.about-body p { margin: 0 0 20px; font-size: 18px; color: var(--ink-2); }
.about-body .link-arrow { margin-top: 8px; }
.now-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-elev); padding: 26px; box-shadow: var(--shadow-sm); }
.now-head { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.now-card ul { list-style: none; margin: 0; padding: 0; }
.now-card li { display: flex; flex-direction: column; gap: 2px; padding: 16px 0; border-bottom: 1px dashed var(--line-2); }
.now-card li:last-child { border-bottom: 0; padding-bottom: 0; }
.now-org { font-weight: 600; font-size: 17px; }
.now-role { color: var(--muted); font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(56px, 8vw, 110px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; gap: 10px; padding: 34px 24px 34px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat b { font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 5.4vw, 76px); line-height: .9; letter-spacing: -.02em; }
.stat b sup { font-size: .45em; color: var(--accent); vertical-align: top; position: relative; top: .1em; }
.stat b em { color: var(--accent); font-style: normal; padding: 0 .06em; }
.stat > span { font-size: 14px; color: var(--muted); max-width: 210px; }

/* Services */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.svc {
  position: relative; display: flex; flex-direction: column; padding: 28px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-elev);
  transition: transform .5s var(--ease), border-color .4s, box-shadow .5s;
}
.svc::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.svc:hover { transform: translateY(-6px); border-color: var(--line-2); box-shadow: var(--shadow); }
.svc:hover::after { transform: scaleX(1); }
.svc-n { position: absolute; top: 28px; right: 28px; font-size: 12px; color: var(--muted); }
.svc-icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 44px; border-radius: 15px; background: var(--accent-soft); color: var(--accent); transition: transform .6s var(--ease), background .4s, color .4s; }
.svc:hover .svc-icon { transform: rotate(-10deg) scale(1.08); background: var(--accent); color: var(--accent-ink); }
.svc p { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; }
.svc ul { list-style: none; margin: auto 0 0; padding: 0; border-top: 1px solid var(--line); }
.svc li { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 14px; color: var(--ink-2); }
.svc li::before { content: "→"; font-family: var(--mono); color: var(--accent); }

/* Work */
.work-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-elev); }
.filter { border: 0; background: none; cursor: pointer; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: color .3s, background .3s; }
.filter:hover { color: var(--ink); }
.filter sup { margin-left: 5px; font-size: 10px; color: var(--muted); }
.filter.is-active { background: var(--ink); color: var(--bg); }
.filter.is-active sup { color: inherit; opacity: .6; }
.work-count { font-size: 12px; color: var(--muted); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.work-card {
  position: relative; display: flex; flex-direction: column; min-height: 320px; padding: 28px; cursor: pointer; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-elev);
  transition: transform .45s var(--ease), border-color .4s, box-shadow .5s;
}
.work-card.is-hidden { display: none; }
.work-card.feature { grid-column: span 2; background: linear-gradient(150deg, var(--bg-elev) 40%, var(--bg-soft)); }
.wc-glow { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 55%); }
.work-card:hover { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); box-shadow: var(--shadow); }
.work-card:hover .wc-glow { opacity: 1; }
.wc-head { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 30px; }
.tag { padding: 7px 10px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font: 600 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.wc-year { margin-left: auto; font-size: 12px; color: var(--muted); }
.work-card h3 { position: relative; font-size: 21px; }
.work-card.feature h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.02; letter-spacing: -.015em; margin-bottom: 14px; }
.work-card p { position: relative; margin: 0 0 22px; color: var(--ink-2); font-size: 15px; }
.work-card.feature p { font-size: 16.5px; max-width: 620px; }
.stack { position: relative; list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.stack li { padding: 4px 9px; border: 1px solid var(--line); border-radius: 7px; font: 11.5px/1.5 var(--mono); color: var(--muted); background: var(--bg); }
.wc-more { position: relative; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 0; border: 0; background: none; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); }
.wc-more .arr { transition: transform .4s var(--ease); }
.work-card:hover .wc-more .arr { transform: translateX(5px); }
.wc-more::after { content: ""; position: absolute; left: 0; right: 26px; bottom: -3px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.work-card:hover .wc-more::after { transform: scaleX(1); }

.pipe { position: relative; display: flex; align-items: center; margin: 0 0 26px; font: 500 11px/1 var(--mono); max-width: 560px; }
.pipe span { padding: 8px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); white-space: nowrap; }
.pipe span:last-child { border-color: var(--accent); color: var(--accent); }
.pipe i { position: relative; flex: 1; min-width: 14px; height: 1px; background: var(--line-2); overflow: hidden; }
.pipe i::after { content: ""; position: absolute; top: -1px; left: -40%; width: 40%; height: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: pipe 2s linear infinite; }
.pipe i:nth-of-type(2)::after { animation-delay: .25s; }
.pipe i:nth-of-type(3)::after { animation-delay: .5s; }
.pipe i:nth-of-type(4)::after { animation-delay: .75s; }
@keyframes pipe { to { left: 100%; } }

/* Process */
.process { position: relative; }
.proc-line { position: absolute; top: 7px; left: 0; right: 0; height: 1px; background: var(--line-2); }
.proc-line i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: left; transition: transform 1.8s var(--ease-io) .2s; }
.process.in .proc-line i { transform: scaleX(1); }
.proc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.proc-step { position: relative; padding-top: 44px; opacity: .35; transition: opacity .6s; }
.process.in .proc-step { opacity: 1; }
.proc-dot { position: absolute; top: 0; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); transition: background .4s, border-color .4s, box-shadow .4s; }
.process.in .proc-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.process.in .proc-step:nth-child(1), .process.in .proc-step:nth-child(1) .proc-dot { transition-delay: .2s; }
.process.in .proc-step:nth-child(2), .process.in .proc-step:nth-child(2) .proc-dot { transition-delay: .65s; }
.process.in .proc-step:nth-child(3), .process.in .proc-step:nth-child(3) .proc-dot { transition-delay: 1.1s; }
.process.in .proc-step:nth-child(4), .process.in .proc-step:nth-child(4) .proc-dot { transition-delay: 1.55s; }
.proc-n { font-size: 12px; color: var(--muted); }
.proc-step h3 { margin: 10px 0; font-family: var(--serif); font-weight: 400; font-size: 34px; letter-spacing: -.01em; line-height: 1.05; }
.proc-step p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* Timeline */
.tl-wrap { position: relative; }
.tl-rail { position: absolute; top: 8px; bottom: 8px; left: 228px; width: 1px; background: var(--line-2); }
.tl-rail i { position: absolute; inset: 0; background: linear-gradient(var(--accent), var(--accent-2)); transform: scaleY(0); transform-origin: top; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 200px 1fr; gap: 56px; padding-bottom: 60px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; top: 5px; left: 222px; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); transition: background .4s, border-color .4s, box-shadow .4s; }
.tl-item.passed .tl-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.tl-when { padding-top: 2px; text-align: right; font-size: 13px; color: var(--muted); }
.tl-card h3 { font-size: 24px; margin-bottom: 4px; }
.tl-org { color: var(--accent); font-weight: 500; }
.tl-meta { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.tl-card > p:not(.tl-meta) { margin: 0 0 16px; max-width: 660px; color: var(--ink-2); }
.tl-card .stack { margin-top: 0; }

/* Toolkit */
.tk-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.tk-group, .tk-lang { padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-elev); }
.tk-lang { grid-column: 3; grid-row: 1 / span 2; }
.tk-group h3, .tk-lang h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin-bottom: 18px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: border-color .3s, background .3s, color .3s, transform .3s var(--ease); }
.chips li:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); transform: translateY(-2px); }
.lang-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.lang-row:last-child { border-bottom: 0; }
.lang-row b { font-weight: 600; }
.lang-row span { font-size: 13px; color: var(--muted); }
.segs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.segs i { position: relative; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.segs i.on::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.tk-lang.in .segs i.on::after { transform: scaleX(1); }
.tk-lang.in .segs i:nth-child(2)::after { transition-delay: .1s; }
.tk-lang.in .segs i:nth-child(3)::after { transition-delay: .2s; }
.tk-lang.in .segs i:nth-child(4)::after { transition-delay: .3s; }
.tk-lang.in .segs i:nth-child(5)::after { transition-delay: .4s; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-intro .sec-num { display: block; padding: 0 0 18px; }
.contact-title { margin-bottom: 24px; }
.contact-d { margin: 0 0 36px; max-width: 460px; font-size: 17px; color: var(--ink-2); }
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cl-k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.cl-v { min-width: 0; overflow-wrap: anywhere; font-weight: 500; text-decoration: none; transition: color .3s; }
a.cl-v:hover { color: var(--accent); }
.cl-btn { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: none; cursor: pointer; font-size: 12.5px; font-weight: 600; transition: border-color .3s, background .3s, color .3s; }
.cl-btn:hover { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }

.contact-form { padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: 26px; background: var(--bg-elev); box-shadow: var(--shadow); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { position: relative; margin-bottom: 22px; }
.field input, .field textarea {
  display: block; width: 100%; padding: 24px 0 10px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  background: transparent; color: var(--ink); font: 16px/1.5 var(--sans); outline: none; transition: border-color .3s;
}
.field textarea { resize: vertical; min-height: 130px; padding-bottom: 28px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field label { position: absolute; left: 0; top: 24px; color: var(--muted); pointer-events: none; transform-origin: left top; transition: transform .35s var(--ease), color .3s; }
.field input:focus ~ label, .field input:not(:placeholder-shown) ~ label,
.field textarea:focus ~ label, .field textarea:not(:placeholder-shown) ~ label { transform: translateY(-21px) scale(.78); color: var(--accent); }
.field .bar { display: none; }
.char { position: absolute; right: 0; bottom: 8px; font-size: 11px; color: var(--muted); pointer-events: none; }
.field.invalid .char { bottom: 30px; }
.err { display: none; margin-top: 6px; font-size: 12.5px; color: var(--danger); }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field.invalid label { color: var(--danger) !important; }
.field.shake { animation: shake .4s var(--ease); }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.topic { margin: 6px 0 26px; padding: 0; border: 0; min-width: 0; }
.topic legend { margin-bottom: 12px; padding: 0; font-size: 13px; color: var(--muted); }
.topic-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-opts input { position: absolute; opacity: 0; pointer-events: none; }
.topic-opts label { padding: 9px 15px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; font-size: 14px; transition: background .3s, color .3s, border-color .3s; }
.topic-opts label:hover { border-color: var(--ink); }
.topic-opts input:checked + label { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.topic-opts input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.form-note { margin: 0; max-width: 260px; font-size: 13px; color: var(--muted); }

/* Footer */
.footer { position: relative; margin-top: clamp(110px, 13vw, 180px); border-top: 1px solid var(--line); overflow: hidden; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 52px 0 40px; }
.foot-cta { margin: 0; font-family: var(--serif); font-size: clamp(34px, 4.4vw, 60px); line-height: 1; letter-spacing: -.02em; }
.foot-word {
  font-family: var(--serif); font-size: clamp(64px, 16vw, 236px); line-height: .82; letter-spacing: -.04em;
  text-align: center; white-space: nowrap; user-select: none; padding-bottom: 12px;
  color: transparent; -webkit-text-stroke: 1px var(--line-2); transition: -webkit-text-stroke-color .6s;
}
.foot-word:hover { -webkit-text-stroke-color: var(--accent); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 22px 0 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot-bottom b { color: var(--ink); font-weight: 500; }
.foot-link { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--muted); text-decoration: none; transition: color .3s; }
.foot-link:hover { color: var(--ink); }
kbd { padding: 3px 7px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 11px; background: var(--bg-elev); color: var(--ink-2); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; }
.modal[hidden], .palette[hidden] { display: none; }
.modal-backdrop, .palette-backdrop { position: absolute; inset: 0; background: rgba(6, 6, 7, .58); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity .4s; }
.modal-panel {
  position: relative; width: min(860px, 100%); max-height: min(88vh, 940px); overflow: auto; overscroll-behavior: contain;
  border: 1px solid var(--line-2); border-radius: 28px; background: var(--bg-elev); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(36px) scale(.97); transition: opacity .4s, transform .55s var(--ease);
}
.modal.open .modal-backdrop, .palette.open .palette-backdrop { opacity: 1; }
.modal.open .modal-panel { opacity: 1; transform: none; }
.modal-close {
  position: sticky; top: 16px; float: right; z-index: 2; margin: 16px 16px 0 0;
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-elev); transition: transform .4s var(--ease), border-color .3s;
}
.modal-close:hover { transform: rotate(90deg); border-color: var(--line-2); }
.modal-body { padding: clamp(28px, 5vw, 60px); }
.cs-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; }
.cs-kicker .mono { font-size: 12px; color: var(--muted); }
.cs-title { margin: 0 0 18px; font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5vw, 60px); line-height: 1; letter-spacing: -.02em; }
.cs-summary { margin: 0; max-width: 680px; font-size: 18px; color: var(--ink-2); }
.cs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 40px 0 28px; }
.cs-block { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); }
.cs-block.wide { grid-column: 1 / -1; }
.cs-block h4 { margin: 0 0 12px; font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.cs-block p { margin: 0; color: var(--ink-2); }
.cs-impact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cs-impact li { display: flex; gap: 12px; align-items: flex-start; }
.cs-impact svg { flex: none; margin-top: 3px; color: var(--success); }
.cs-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.cs-nav button { display: flex; flex-direction: column; gap: 4px; max-width: 48%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.cs-nav button:last-child { text-align: right; align-items: flex-end; }
.cs-nav small { font: 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.cs-nav span { font-weight: 600; transition: color .3s; }
.cs-nav button:hover span { color: var(--accent); }

/* Command palette */
.palette { position: fixed; inset: 0; z-index: 210; display: flex; justify-content: center; align-items: flex-start; padding: 14vh 16px 16px; }
.palette-panel {
  position: relative; width: min(640px, 100%); overflow: hidden; border: 1px solid var(--line-2); border-radius: 20px;
  background: var(--bg-elev); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .55);
  opacity: 0; transform: scale(.96) translateY(-10px); transition: opacity .25s, transform .35s var(--ease);
}
.palette.open .palette-panel { opacity: 1; transform: none; }
.palette-search { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); font: 17px var(--sans); }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: min(420px, 52vh); overflow: auto; }
.pal-group { padding: 12px 10px 6px; font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pal-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; cursor: pointer; font-size: 15px; }
.pal-item.is-active { background: var(--bg-soft); }
.pal-item.is-active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--accent); }
.pal-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); font: 12px var(--mono); color: var(--ink-2); flex: none; }
.pal-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-hint { font-size: 11px; color: var(--muted); }
.pal-empty { padding: 28px; text-align: center; color: var(--muted); }
.palette-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.palette-foot span:nth-child(odd) { padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; }

/* Toast + to-top */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 260; display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: opacity .35s, transform .45s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 50px; height: 50px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow); cursor: pointer;
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none; transition: opacity .4s, transform .45s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top.show:hover { transform: translateY(-3px); }
.to-top .ring { position: absolute; inset: 1px; width: 48px; height: 48px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 2; }
.ring .bg { stroke: var(--line); }
.ring .fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 138.23; stroke-dashoffset: 138.23; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; }
.js .reveal.in { opacity: 1; animation: rise 1s var(--ease) var(--d, 0ms) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }

/* View transition (theme) */
.vt-theme::view-transition-old(root), .vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .tk-grid { grid-template-columns: 1fr 1fr; }
  .tk-lang { grid-column: auto; grid-row: auto; }
}
@media (max-width: 900px) {
  .nav-links, .kbd-btn { display: none; }
  .menu-btn { display: inline-flex; }
  .hero { min-height: auto; padding: 124px 0 88px; }
  .hero-inner { grid-template-columns: 1fr; }
  .scroll-cue { display: none; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .proc-steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .proc-line { display: none; }
  .tl-rail { left: 6px; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; padding-left: 40px; padding-bottom: 48px; }
  .tl-dot { left: 0; }
  .tl-when { text-align: left; }
}
@media (max-width: 640px) {
  .brand-text small { display: none; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-num { padding-bottom: 0; }
  .sec-sub { grid-column: 1; font-size: 16px; }
  .svc-grid, .work-grid, .tk-grid { grid-template-columns: 1fr; }
  .work-card.feature { grid-column: auto; }
  .work-card { min-height: 0; padding: 24px; }
  .pipe { font-size: 10px; }
  .pipe span { padding: 6px 7px; }
  .filters { width: 100%; border-radius: 18px; }
  .filter { padding: 8px 11px; font-size: 13px; }
  .proc-steps { grid-template-columns: 1fr; }
  .stat { padding: 26px 12px 26px 0; }
  .stat + .stat { padding-left: 14px; }
  .stat:nth-child(3) { padding-left: 0; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-foot .btn { width: 100%; }
  .contact-list li { grid-template-columns: 1fr auto; }
  .cl-k { grid-column: 1 / -1; }
  .hero-meta { gap: 14px 28px; }
  .hero-cta .btn { flex: 1; }
  .map-foot .map-hint { display: none; }
  .cs-grid { grid-template-columns: 1fr; }
  .modal { padding: 0; align-items: end; }
  .modal-panel { max-height: 92vh; border-radius: 26px 26px 0 0; transform: translateY(100%); }
  .to-top { right: 16px; bottom: 16px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; }
  .wi { transform: none; }
}

@media print {
  .loader, .nav, .cursor, .grain, .progress, .to-top, .toast, .marquee, .hero-bg, .scroll-cue { display: none !important; }
  .js .reveal { opacity: 1 !important; animation: none !important; }
  .wi { transform: none !important; }
}
