:root {
  --g900: #16191c;
  --g800: #1e2226;
  --g700: #2a2f34;
  --g600: #3a4047;
  --g400: #8a9199;
  --cyan: #00aeef;
  --cyan-hi: #3fd0ff;
  --cyan-bg: #0090c6;
  --white: #ffffff;
  --w70: rgba(255, 255, 255, 0.72);
  --w40: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.14);
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 84px;
  --pad: clamp(20px, 5vw, 80px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--g800); color: var(--white);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
section { position: relative; scroll-margin-top: 0; }
::selection { background: var(--cyan); color: var(--g900); }

.wrap { padding-inline: var(--pad); max-width: 1600px; margin-inline: auto; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.label { display: inline-flex; align-items: center; gap: 10px; color: var(--w70); }
.label::before { content: ""; width: 8px; height: 8px; background: var(--cyan); }
.display { font-weight: 900; text-transform: uppercase; line-height: 0.88; letter-spacing: -0.035em; }
.d-xxl { font-size: clamp(52px, 9vw, 168px); }
.d-xl { font-size: clamp(44px, 7vw, 128px); }
.d-lg { font-size: clamp(36px, 5vw, 88px); }
.cyan { color: var(--cyan); }

/* ---------- Preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.pre-grid { position: absolute; inset: 0; display: grid; }
.pre-grid i { background: var(--g900); transition: transform 0.5s steps(4), opacity 0.5s steps(4); }
.preloader.done .pre-grid i { transform: scale(0); opacity: 0; }
.pre-center {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 26px;
  transition: opacity 0.3s;
}
.preloader.done .pre-center { opacity: 0; }
.pre-center svg { width: 120px; height: auto; }
.pre-count { font-family: var(--mono); font-size: 13px; letter-spacing: 0.2em; color: var(--w70); }

/* SVG stroke-draw (logo) */
.draw path { fill-opacity: 0; stroke-width: 0.35; stroke-dasharray: 1; stroke-dashoffset: 1; }
.draw.go path {
  animation: drawStroke 1.1s var(--ease) forwards, drawFill 0.6s ease forwards;
  animation-delay: calc(var(--i, 0) * 70ms), calc(0.8s + var(--i, 0) * 70ms);
}
@keyframes drawStroke { to { stroke-dashoffset: 0; } }
@keyframes drawFill { to { fill-opacity: 1; stroke-opacity: 0; } }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: background 0.4s, height 0.4s, backdrop-filter 0.4s;
}
.menu-open .header { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.header.scrolled { --header-h: 68px; background: rgba(22, 25, 28, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header .wrap { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.logo svg { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a.link { font-weight: 600; font-size: 15px; position: relative; padding: 4px 0; display: inline-flex; gap: 6px; }
.nav a.link sup { font-family: var(--mono); font-size: 10px; color: var(--cyan); top: 0; }
.nav a.link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%; background: var(--cyan);
  transform: scaleX(0); transform-origin: right; transition: transform 0.45s steps(6);
}
.nav a.link:hover::after, .nav a.link.active::after { transform: scaleX(1); transform-origin: left; }

/* Pixel-wipe button */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px; font-weight: 700; font-size: 15px; letter-spacing: 0.01em;
  border: 1.5px solid var(--white); cursor: pointer; background: none;
  transition: color 0.35s steps(4);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--white);
  transform: scaleX(0); transform-origin: left; transition: transform 0.45s steps(8);
}
.btn:hover { color: var(--g900); }
.btn:hover::before { transform: scaleX(1); }
.btn.solid { background: var(--cyan); border-color: var(--cyan); color: var(--g900); }
.btn.solid::before { background: var(--white); }
.btn .px { width: 10px; height: 10px; background: currentColor; flex-shrink: 0; }
.btn.small { padding: 11px 18px; font-size: 14px; }

.burger { display: none; width: 46px; height: 46px; background: none; border: 1.5px solid var(--line); cursor: pointer; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--white); transition: transform 0.35s var(--ease); }
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.menu-open .burger span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { height: 100vh; height: 100svh; min-height: 640px; background: var(--g900); overflow: hidden; }
#pixelCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: center; gap: 34px;
  padding-top: var(--header-h); pointer-events: none;
}
.hero-inner a, .hero-inner button { pointer-events: auto; }
.hero h1 { max-width: 11ch; font-size: clamp(50px, 7vw, 140px); }
.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line > span { display: block; transform: translateY(110%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--l, 0) * 90ms); }
.in .line > span, .line.in > span { transform: none; }
/* rotating hero headline: slides share one grid cell; lines wipe up out, next slide wipes up in */
.hero-title { display: grid; }
.hero-title .slide { grid-area: 1 / 1; display: block; }
.hero-title .slide em { font-style: normal; }
.hero-title .line > span { transform: translateY(110%) skewY(7deg); transform-origin: left bottom; transition-delay: calc(var(--l, 0) * 90ms + var(--enter, 0ms)); }
.in .hero-title .slide.active .line > span { transform: none; }
.in .hero-title .slide.leaving .line > span { transform: translateY(-110%) skewY(-7deg); transition-duration: 0.9s; transition-delay: calc(var(--l, 0) * 70ms); }
.hero-title .slide.reset .line > span { transition: none !important; }
.hero-title .slide:not(.active) .cursor-px { animation: none; opacity: 0; }
.hero-dots { display: flex; gap: 10px; margin-top: -10px; }
.hero-dots button { background: none; border: 0; cursor: pointer; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--w70); padding: 6px 0; transition: color 0.3s; }
.hero-dots button i { position: relative; display: block; width: 44px; height: 3px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.hero-dots button i::after { content: ""; position: absolute; inset: 0; background: var(--cyan); transform: scaleX(0); transform-origin: left; }
.hero-dots button.active { color: var(--white); }
.hero-dots button.active i::after { animation: dotFill var(--hold, 5s) linear forwards; }
.hero-dots.static button.active i::after { animation: none; transform: none; }
@keyframes dotFill { to { transform: scaleX(1); } }
.cursor-px { display: inline-block; width: 0.5em; height: 0.12em; background: var(--cyan); margin-left: 0.08em; animation: blink 1s steps(1) infinite; vertical-align: baseline; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 40px; }
.hero-sub p { font-size: clamp(18px, 1.5vw, 22px); color: var(--w70); max-width: 420px; line-height: 1.45; }
.hero-sub p b { color: var(--white); font-weight: 600; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.in .fade-up, .fade-up.in { opacity: 1; transform: none; }
.hero-foot {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 30px;
  display: flex; justify-content: space-between; align-items: end; color: var(--w70);
}
.scroll-hint { display: flex; align-items: center; gap: 12px; }
.scroll-hint i { width: 8px; height: 8px; background: var(--cyan); animation: hop 1.4s steps(3) infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ---------- Marquee ---------- */
.marquee { background: var(--cyan-bg); overflow: hidden; padding: 22px 0; position: relative; z-index: 3; }
.marquee-track { display: flex; width: max-content; animation: marq 36s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; gap: 30px; padding-right: 30px; font-size: clamp(26px, 3.4vw, 50px); font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; white-space: nowrap; }
.marquee-track span::after { content: ""; width: 0.36em; height: 0.36em; background: var(--white); }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- Pixel divider ---------- */
.pixel-divider { display: grid; line-height: 0; position: relative; z-index: 2; }
.pixel-divider i { aspect-ratio: 1; background: var(--to); transform: scale(0); transition: transform 0.35s steps(3); transition-delay: var(--dl); }
.pixel-divider.in i { transform: scale(1); }
.pixel-divider i.off { visibility: hidden; }

/* ---------- Sections ---------- */
.sec { padding: clamp(100px, 13vw, 200px) 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; flex-wrap: wrap; margin-bottom: clamp(50px, 6vw, 90px); }
.sec-head p { max-width: 380px; color: var(--w70); }

/* About */
.about { background: var(--g800); }
.about-statement {
  font-size: clamp(30px, 4.2vw, 68px); font-weight: 800; line-height: 1.08; letter-spacing: -0.025em;
  margin-top: 40px; max-width: 22ch;
}
.about-statement .w { opacity: 0.14; transition: opacity 0.2s linear; }
.about-statement .w.hl { color: var(--cyan); }
.about-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(60px, 8vw, 120px); border-top: 1px solid var(--line); }
.about-cell { padding: 28px 28px 0 0; }
.about-cell + .about-cell { padding-left: 28px; border-left: 1px solid var(--line); }
.about-cell b { display: block; font-size: 22px; font-weight: 800; margin: 18px 0 6px; letter-spacing: -0.01em; }
.about-cell p { color: var(--w70); font-size: 15px; }

/* Services */
.services { background: var(--g900); }
.svc-list { border-top: 1px solid var(--line); }
.svc {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 90px 1fr minmax(0, 420px) 84px; align-items: center; gap: 30px;
  padding: 34px 0; border-bottom: 1px solid var(--line); cursor: default;
}
.svc::before {
  content: ""; position: absolute; inset: 0 calc(var(--pad) * -1); z-index: -1; background: var(--cyan-bg);
  clip-path: inset(0 100% 0 0); transition: clip-path 0.5s steps(10);
}
.svc:hover::before { clip-path: inset(0 0 0 0); }
.svc-num { font-family: var(--mono); font-size: 14px; color: var(--cyan); transition: color 0.3s; }
.svc:hover .svc-num { color: var(--white); }
.svc h3 { font-size: clamp(32px, 4.4vw, 76px); font-weight: 900; text-transform: uppercase; letter-spacing: -0.035em; line-height: 0.92; transition: transform 0.5s var(--ease); }
.svc:hover h3 { transform: translateX(14px); }
.svc-desc p { color: var(--w70); font-size: 16px; transition: color 0.3s; }
.svc:hover .svc-desc p { color: var(--white); }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.svc-tags span { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 9px; border: 1px solid var(--line); }
.svc:hover .svc-tags span { border-color: rgba(255,255,255,0.5); }
.pix-icon { width: 64px; height: 64px; justify-self: end; }
.pix-icon rect { fill: var(--cyan); transform-box: fill-box; transform-origin: center; transition: transform 0.3s steps(2), fill 0.3s; transition-delay: calc(var(--i) * 12ms); }
.svc:hover .pix-icon rect { fill: var(--white); transform: scale(0.72); }

/* Process (horizontal pin) */
.process { background: var(--cyan-bg); height: calc(var(--panels, 5) * 85vh + 100vh); }
.process-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.process-top { position: absolute; top: calc(var(--header-h) + 30px); left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; }
.process-track { display: flex; gap: 0; will-change: transform; padding-left: var(--pad); padding-right: calc(var(--pad) + 40px); }
.panel {
  flex: 0 0 auto; width: min(560px, 80vw); height: min(62vh, 560px);
  border-left: 1.5px solid rgba(255,255,255,0.35); padding: 0 clamp(26px, 3vw, 50px);
  display: flex; flex-direction: column; justify-content: space-between;
}
.panel:first-child { width: min(720px, 86vw); border-left: 0; padding-left: 0; }
.panel-num { font-size: clamp(120px, 15vw, 240px); font-weight: 900; line-height: 0.8; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,0.75); }
.panel h3 { font-size: clamp(34px, 3.6vw, 60px); font-weight: 900; text-transform: uppercase; letter-spacing: -0.03em; line-height: 0.95; margin-bottom: 14px; }
.panel p { color: rgba(255,255,255,0.86); max-width: 380px; }
.process-bar { position: absolute; left: var(--pad); right: var(--pad); bottom: 44px; height: 2px; background: rgba(255,255,255,0.3); }
.process-bar i { position: absolute; inset: 0; background: var(--white); transform-origin: left; transform: scaleX(0); }
.process-count { font-family: var(--mono); font-size: 13px; }

/* Why us — outline-to-fill words */
.why { background: var(--g800); }
.why-row { display: grid; grid-template-columns: 1fr; gap: 14px; padding: clamp(18px, 2.4vw, 34px) 0; border-bottom: 1px solid var(--line); }
.why-row:first-of-type { border-top: 1px solid var(--line); }
.fill-word {
  font-size: clamp(44px, 8.6vw, 172px); font-weight: 900; text-transform: uppercase; letter-spacing: -0.045em; line-height: 0.86;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,0.4);
  background: linear-gradient(90deg, var(--white) 50%, transparent 50%) no-repeat;
  background-size: 200% 100%; background-position-x: calc((1 - var(--p, 0)) * 100%);
  -webkit-background-clip: text; background-clip: text;
}
.fill-word .dot { color: var(--cyan); -webkit-text-stroke: 0; }
.why-row p { color: var(--w70); max-width: 420px; justify-self: end; }
.why-row p b { display: block; color: var(--white); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; font-weight: 600; }

/* Contact */
.contact { background: var(--cyan-bg); }
.contact-big { display: flex; flex-direction: column; gap: 40px; }
.mail-link {
  font-size: clamp(30px, 6vw, 108px); font-weight: 900; letter-spacing: -0.04em; line-height: 1; word-break: break-word;
  background: linear-gradient(var(--white), var(--white)) left bottom / 0 6px no-repeat; padding-bottom: 8px;
  transition: background-size 0.6s steps(10); align-self: flex-start;
}
.mail-link:hover { background-size: 100% 6px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 0; margin-top: clamp(60px, 8vw, 110px); border-top: 1.5px solid rgba(255,255,255,0.5); }
.office { padding: 30px 30px 0 0; }
.office + .office, .form-col { padding-left: 30px; border-left: 1px solid rgba(255,255,255,0.3); }
.office h3 { font-size: clamp(26px, 2.4vw, 38px); font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; line-height: 1; margin: 16px 0 14px; }
.office p { color: rgba(255,255,255,0.86); font-size: 16px; }
.office .phone { display: flex; align-items: center; gap: 8px; line-height: 0; }
.office .phone a { display: block; line-height: 0; }
.office .phone svg { width: 12px; height: 12px; fill: rgba(255,255,255,0.86); flex: none; transition: fill .2s; }
.office .phone a:hover svg { fill: #fff; }
.office .phone img { display: block; width: 143px; height: auto; }
.office .hours { margin-top: 18px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.form-col { padding-top: 30px; }
.form { display: grid; gap: 14px; margin-top: 16px; }
.form input, .form select, .form textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1.5px solid rgba(255,255,255,0.5);
  padding: 12px 0; outline: none; font-size: 17px; border-radius: 0; transition: border-color 0.3s;
}
.form select option { color: #111; }
.form ::placeholder { color: rgba(255,255,255,0.7); }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--white); }
.form textarea { resize: vertical; min-height: 90px; }
.form .btn { justify-self: start; margin-top: 10px; }
.form-note { font-size: 13px; color: rgba(255,255,255,0.8); }

/* Projects */
.projects { background: var(--g800); }
.sec-head .head-side { display: grid; gap: 24px; justify-items: start; max-width: 380px; }
.sec-head .head-side p { color: var(--w70); }
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(40px, 5vw, 80px) clamp(24px, 3vw, 50px); }
.proj-grid.home .proj:nth-child(even) { margin-top: clamp(60px, 9vw, 160px); }
.proj-grid.full { grid-template-columns: repeat(3, 1fr); }
.proj-media { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--g700); isolation: isolate; outline: 1px solid var(--line); outline-offset: -1px; }
.proj-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); will-change: transform; backface-visibility: hidden; }
.proj-media::after {
  content: ""; position: absolute; inset: 0; background: var(--cyan-bg); mix-blend-mode: multiply;
  transform: translate3d(0, 101%, 0); transition: transform 0.7s var(--ease); will-change: transform;
}
.proj:hover .proj-media img { transform: scale(1.05); }
.proj:hover .proj-media::after { transform: translate3d(0, 0, 0); }
.proj-num { position: absolute; z-index: 2; top: 14px; left: 14px; padding: 4px 8px; background: var(--g900); color: var(--cyan); font-size: 12px; }
.proj-view {
  position: absolute; z-index: 2; right: 14px; bottom: 14px; padding: 8px 12px; background: var(--white); color: var(--g900); font-size: 12px;
  opacity: 0; transform: translateY(8px); transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.proj:hover .proj-view { opacity: 1; transform: none; }
.proj-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 20px; }
.proj-meta h3 { font-size: clamp(22px, 2vw, 32px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.proj-meta .mono { color: var(--w70); font-size: 12px; white-space: nowrap; }
.proj .svc-tags { margin-top: 14px; }
.proj.hide { display: none; }

/* Projects page */
.page-hero { background: var(--g900); padding: calc(var(--header-h) + clamp(60px, 9vw, 140px)) 0 clamp(60px, 7vw, 100px); }
.page-hero h1 { margin-top: 22px; }
.page-hero-foot { display: flex; justify-content: space-between; align-items: end; gap: 30px; flex-wrap: wrap; margin-top: clamp(40px, 5vw, 70px); }
.page-hero-foot p { max-width: 420px; color: var(--w70); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 9px 14px; background: none; border: 1px solid var(--line); cursor: pointer; transition: background 0.3s steps(3), color 0.3s steps(3), border-color 0.3s;
}
.filters button:hover { border-color: var(--white); }
.filters button.active { background: var(--cyan); border-color: var(--cyan); color: var(--g900); }
.projects-page { padding-top: clamp(60px, 7vw, 100px); }
.cta-band { background: var(--cyan-bg); }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: end; gap: 40px; flex-wrap: wrap; }

/* Footer */
.footer { background: var(--g900); padding: clamp(70px, 9vw, 130px) 0 30px; overflow: hidden; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-top h2 { max-width: 13ch; }
.footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 50px; align-content: start; }
.footer-links a { font-weight: 600; color: var(--w70); transition: color 0.2s; }
.footer-links a:hover { color: var(--cyan); }
.footer-logo { margin-top: clamp(60px, 8vw, 120px); }
.footer-logo svg { width: 100%; height: auto; }
.footer-logo .draw path { stroke-width: 0.12; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--w70); }
.footer-bottom a:hover { color: var(--cyan); }

/* ---------- Generic reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Scroll progress + section indicator ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: var(--cyan); transform-origin: left; transform: scaleX(0); }
.sec-ind {
  position: fixed; z-index: 45; right: 22px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px; pointer-events: none;
  font-family: var(--mono); font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}
.sec-num { font-size: 12px; letter-spacing: 0.06em; }
.sec-track { width: 2px; height: 110px; background: rgba(255,255,255,0.25); position: relative; overflow: hidden; }
.sec-fill { position: absolute; inset: 0; background: var(--white); transform-origin: top; transform: scaleY(0); }
.sec-name { writing-mode: vertical-rl; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; min-height: 120px; white-space: nowrap; }
.sec-name span { display: inline-block; animation: flyIn 0.7s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.sec-name.out span { animation: flyOut 0.28s ease-in both; animation-delay: calc(var(--i) * 15ms); }
@keyframes flyIn { from { opacity: 0; transform: translate(40px, -24px) rotate(35deg) scale(1.6); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes flyOut { to { opacity: 0; transform: translate(-30px, 18px) rotate(-25deg) scale(0.6); filter: blur(3px); } }

/* Pixel cursor trail */
.to-top {
  position: fixed; z-index: 55; right: 22px; bottom: 22px; width: 42px; height: 42px;
  display: grid; place-items: center; background: var(--cyan); color: #fff;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s, background .2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: #fff; color: var(--g900); }
.to-top svg { width: 16px; height: 16px; fill: currentColor; }
.menu-open .to-top { opacity: 0; pointer-events: none; }
@media (max-width: 700px) { .to-top { right: 16px; bottom: 16px; width: 38px; height: 38px; } }
.trail { position: fixed; z-index: 90; width: 10px; height: 10px; background: var(--cyan); pointer-events: none; opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .svc { grid-template-columns: 60px 1fr 64px; }
  .svc-desc { grid-column: 2 / 3; }
  .pix-icon { grid-row: 1; grid-column: 3; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .about-cell:nth-child(3) { padding-left: 0; border-left: 0; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .form-col { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,0.3); margin-top: 30px; }
  .proj-grid.full { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  :root { --header-h: 70px; }
  body { font-size: 16px; }
  .nav {
    position: fixed; inset: 0; z-index: -1; background: var(--g900);
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; padding: 0 var(--pad);
    clip-path: inset(0 0 100% 0); transition: clip-path 0.6s steps(10);
  }
  .menu-open .nav { clip-path: inset(0 0 0 0); }
  .nav a.link { font-size: 40px; font-weight: 900; text-transform: uppercase; letter-spacing: -0.03em; }
  .nav a.link sup { font-size: 12px; }
  .burger { display: block; }
  .logo svg { height: 28px; }
  .hero-foot .loc { display: none; }
  .svc { grid-template-columns: 1fr 48px; gap: 14px; padding: 26px 0; }
  .svc-num { grid-column: 1 / -1; }
  .svc h3 { grid-column: 1; }
  .pix-icon { width: 44px; height: 44px; grid-row: 2; grid-column: 2; }
  .svc-desc { grid-column: 1 / -1; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-cell, .about-cell + .about-cell, .office, .office + .office { padding-left: 0; border-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
  .why-row p { justify-self: start; }
  .process { height: auto; }
  .process-sticky { position: static; height: auto; padding: 120px 0 80px; }
  .process-top { position: static; padding-inline: var(--pad); margin-bottom: 40px; }
  .process-track { flex-direction: column; transform: none !important; padding-inline: var(--pad); gap: 50px; }
  .panel, .panel:first-child { width: 100%; height: auto; border-left: 0; padding: 0; gap: 20px; }
  .panel-num { font-size: 110px; }
  .process-bar { display: none; }
  .sec-ind {
    top: auto; bottom: 18px; right: auto; left: var(--pad); transform: none; flex-direction: row; gap: 10px;
    background: rgba(22, 25, 28, 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 9px 14px; border: 1px solid var(--line); text-shadow: none;
  }
  .sec-track { width: 50px; height: 2px; }
  .sec-fill { transform-origin: left; }
  .sec-name { writing-mode: horizontal-tb; min-height: 0; letter-spacing: 0.2em; }
  .hero-foot { bottom: 64px; }
  .proj-grid, .proj-grid.full { grid-template-columns: 1fr; }
  .proj-grid.home .proj:nth-child(even) { margin-top: 0; }
  .proj-meta { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
