/* A · Esmeralda: dark emerald editorial with terminal details (from C) and crossing text bands (from B). */
:root {
  --bg: #052927;
  --bg-2: #073532;
  --card: #0a3a37;
  --win: rgba(4, 30, 28, .82);
  --ink: #efe9dc;
  --muted: #a9c2ba;
  --accent: #62f0b5;
  --accent-ink: #032220;
  --line: rgba(239, 233, 220, .13);
  --line-g: rgba(98, 240, 181, .2);
  --focus: var(--accent);
  --live: var(--accent);
  --sans: "Inter Tight", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --pad: clamp(20px, 4.5vw, 72px);
  --radius: 28px;
}
html { background: var(--bg); }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); overflow-x: clip; }
main, .footer { position: relative; z-index: 1; }
::selection { background: var(--accent); color: var(--accent-ink); }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: 0; }
:lang(ru) em { font-family: "PT Serif", Georgia, serif; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.caret { display: inline-block; width: .55em; height: 1.05em; margin-left: 4px; vertical-align: -.18em; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Background: green grid with shapes and letters (drawn by grid.js), faded at the edges. */
.gridfx { position: fixed; inset: 0; z-index: 0; pointer-events: none; width: 100%; height: 100%;
  -webkit-mask-image: radial-gradient(ellipse 95% 85% at 50% 40%, #000 35%, transparent 92%);
          mask-image: radial-gradient(ellipse 95% 85% at 50% 40%, #000 35%, transparent 92%); }

.grain { position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .06;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite; }
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-1%, 3%); } }

/* Cursor */
.cursor { position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none; mix-blend-mode: difference; display: none; }
.cursor span { display: block; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; transition: transform .35s cubic-bezier(.16,1,.3,1); }
.cursor.is-big span { transform: scale(4); }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; opacity: 0; transition: opacity .3s; } .cursor.is-on { opacity: 1; } }

/* Nav */
.nav { position: fixed; inset: 16px var(--pad) auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 20px; border: 1px solid var(--line); border-radius: 999px; background: rgba(5, 41, 39, .62); backdrop-filter: blur(14px) saturate(140%);
  transition: transform .5s cubic-bezier(.16,1,.3,1); }
.nav.is-hidden { transform: translateY(-140%); }
.nav__brand { display: flex; align-items: center; text-decoration: none; font-size: 14px; color: var(--ink); white-space: nowrap; }
.nav__links { display: flex; gap: 4px; }
.nav__links a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: 15px; color: var(--muted); transition: color .3s, background .3s; }
.nav__links a:hover { color: var(--ink); background: rgba(239,233,220,.07); }
.nav__right { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); }
.lang button { border: 0; background: none; padding: 3px 7px; font: inherit; color: var(--muted); border-radius: 5px; transition: color .2s; }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none; transition: transform .4s cubic-bezier(.16,1,.3,1), background .3s, box-shadow .3s; box-shadow: 0 10px 40px -10px rgba(98,240,181,.55); }
.btn:hover { background: #8af7c9; }
.btn svg { transition: transform .4s cubic-bezier(.16,1,.3,1); }
.btn:hover svg { transform: translateX(4px); }
.btn--small { padding: 10px 18px; font-size: 14px; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn--ghost:hover, .btn--ghost.is-done { background: var(--ink); color: var(--bg); }
.link { color: var(--ink); font-weight: 500; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: background-size .4s; }
.link:hover { background-size: 0 1px; background-position: 100% 100%; }
.pill { padding: 14px 20px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px; color: var(--muted); transition: border-color .3s, color .3s; }
.pill:hover { border-color: var(--accent); color: var(--accent); }

/* Terminal windows (from C) */
.win { border: 1px solid var(--line-g); border-radius: 18px; background: var(--win); backdrop-filter: blur(10px); overflow: hidden; }
.win__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.win__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(239,233,220,.16); }
.win__bar i:first-child { background: #ff6b6b99; } .win__bar i:nth-child(2) { background: #ffd16699; } .win__bar i:nth-child(3) { background: #62f0b599; }
.win__bar span { margin-left: 8px; }
.win__bar b { margin-left: auto; color: var(--accent); font-weight: 500; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: 1.15fr .85fr; align-items: end; gap: clamp(24px, 4vw, 64px);
  padding: 116px var(--pad) 64px; overflow: hidden; }
.hero__glow { position: absolute; right: -10%; top: 10%; width: 70vw; height: 70vw; border-radius: 50%; background: radial-gradient(closest-side, rgba(14,90,84,.9), transparent); filter: blur(20px); pointer-events: none; }
.hero__copy { position: relative; z-index: 2; padding-bottom: 2vh; }
.chip { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--muted); background: rgba(5,41,39,.5); }
.eyebrow { margin: 0 0 16px; font-size: 14px; color: var(--accent); }
.hero__title { margin: 0; font-size: clamp(2.7rem, 5.5vw, 6.2rem); line-height: .98; letter-spacing: -.045em; font-weight: 600; max-width: 14ch; }
.hero__lead { max-width: 52ch; margin: 30px 0 0; font-size: clamp(1.02rem, 1.3vw, 1.18rem); color: var(--muted); }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 34px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.hero__clock b { color: var(--ink); font-weight: 500; margin-left: 6px; font-variant-numeric: tabular-nums; }
.hero__photo { position: relative; z-index: 1; margin: 0; align-self: stretch; display: flex; align-items: flex-end; }
.hero__photo picture { display: block; width: 100%; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 80%, transparent 100%), linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 80%, transparent 100%), linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%); }
.hero__photo img { width: 100%; transform: scale(1.12); transition: transform 1.8s cubic-bezier(.16,1,.3,1); will-change: transform; }
.is-loaded .hero__photo img { transform: scale(1) translateY(var(--py, 0px)); transition-duration: 1.8s; }
.hero__photo picture { clip-path: inset(100% 0 0 0); transition: clip-path 1.6s cubic-bezier(.77,0,.18,1) .15s; }
.is-loaded .hero__photo picture, html:not(.js) .hero__photo picture { clip-path: inset(0 0 0 0); }
.float { position: absolute; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px; border: 1px solid var(--line);
  background: rgba(5, 41, 39, .55); backdrop-filter: blur(12px); font-size: 13px; color: var(--ink); line-height: 1.3;
  opacity: 0; transform: translateY(20px); transition: opacity .9s 1.1s, transform .9s cubic-bezier(.16,1,.3,1) 1.1s; }
.is-loaded .float { opacity: 1; transform: none; animation: bob 6s ease-in-out 2s infinite; }
.float svg { color: var(--accent); fill: var(--accent); stroke: none; font-size: 18px; }
.float--2 { right: 0; bottom: 34%; animation-delay: 3s !important; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* Live workflow card on the photo */
.float--flow { display: block; left: -14%; bottom: 7%; width: min(360px, 78%); padding: 0; border-color: var(--line-g); background: var(--win); box-shadow: 0 30px 70px -25px rgba(0,0,0,.7); }
.flow__svg { display: block; width: 100%; height: auto; padding: 6px 8px 0; overflow: visible; }
.flow__svg path { stroke: var(--line-g); stroke-width: 2; stroke-dasharray: 4 5; fill: none; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -9; } }
.packet { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.node rect { fill: #08302d; stroke: var(--line-g); stroke-width: 1.5; animation: lit 3.2s ease-in-out infinite; animation-delay: calc(var(--k) * .8s); }
.node text { fill: var(--ink); font: 18px var(--sans); text-anchor: middle; stroke: none; }
.node .lbl { fill: var(--muted); font: 11px var(--mono); }
@keyframes lit { 0%, 30%, 100% { stroke: var(--line-g); fill: #08302d; } 12% { stroke: var(--accent); fill: rgba(98,240,181,.18); } }

.hero__scroll { position: absolute; left: 50%; bottom: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.hero__scroll i { width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); animation: drip 2s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Stats */
.stats { padding: 0 var(--pad); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 38px 28px 34px 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.stat__n { display: block; font-size: clamp(2.6rem, 5vw, 4.6rem); line-height: 1; letter-spacing: -.05em; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat__l { display: block; margin-top: 12px; font-size: 13px; color: var(--muted); max-width: 24ch; line-height: 1.45; font-family: var(--mono); }

/* Crossing text bands (from B) */
.bands { position: relative; height: clamp(170px, 18vw, 250px); margin: clamp(40px, 6vw, 80px) 0 0; overflow: clip; }
.band { position: absolute; left: -4%; right: -4%; top: 50%; padding: 16px 0; }
.band span { font-size: clamp(1.5rem, 3.4vw, 2.9rem); font-weight: 600; letter-spacing: -.035em; padding: 0 .45em; }
.band i { font-style: normal; align-self: center; font-size: .9em; }
.band--front { z-index: 2; background: var(--accent); color: var(--accent-ink); transform: translateY(-50%) rotate(-3deg); box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); --speed: 36s; }
.band--back { background: #0b4a47; color: var(--ink); transform: translateY(-50%) rotate(4.5deg); border-block: 1px solid var(--line-g); --speed: 44s; }
.band--back span { font-family: var(--mono); font-weight: 400; letter-spacing: 0; font-size: clamp(1.05rem, 2vw, 1.6rem); color: var(--muted); }
.band--back i { color: var(--accent); }
.marquee--rev .marquee__track { animation-direction: reverse; }

/* Sections */
.section { padding: clamp(80px, 11vw, 160px) var(--pad); }
.section__head { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: clamp(40px, 6vw, 80px); max-width: 1100px; }
.kicker { margin: 0; display: flex; gap: 8px; font-size: 13px; color: var(--muted); }
.kicker span:first-child { color: var(--accent); }
.section__title { margin: 0; font-size: clamp(2.3rem, 5.4vw, 5rem); line-height: 1; letter-spacing: -.045em; font-weight: 600; }
.section__note { margin: 0; color: var(--muted); max-width: 60ch; }

/* Work: cards stack while scrolling */
.stack { display: grid; gap: 22px; }
.case { position: sticky; top: calc(96px + var(--n) * 16px); display: grid; grid-template-columns: 1fr; gap: 28px; padding: clamp(26px, 3.6vw, 52px);
  border-radius: var(--radius); background: linear-gradient(160deg, #0d4642 0%, var(--card) 45%, #072f2c 100%); border: 1px solid var(--line);
  box-shadow: 0 -20px 60px -30px rgba(0,0,0,.6); transform-origin: 50% 0; min-height: min(560px, 74vh); }
.case__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.case__file b { color: var(--accent); font-weight: 400; }
.case__title { margin: 0; font-size: clamp(1.9rem, 3.8vw, 3.4rem); line-height: 1.02; letter-spacing: -.04em; font-weight: 600; max-width: 20ch; }
.case__client { margin: 10px 0 0; color: var(--muted); }
.case__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: auto; padding-top: 26px; border-top: 1px dashed var(--line-g); }
.case__cols h4 { margin: 0 0 8px; font: 500 12px var(--mono); color: var(--accent); }
.case__cols p { margin: 0; font-size: 15.5px; color: #d6dfd8; }
.case__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.case__tags span { padding: 5px 11px; border-radius: 8px; background: rgba(98,240,181,.07); font: 12px var(--mono); color: var(--muted); }
.case__link { color: var(--accent); text-decoration: none; }
.case__link:hover { text-decoration: underline; }
.case__body { display: flex; flex-direction: column; gap: 24px; }
.case { grid-template-columns: 1.25fr 1fr; grid-template-areas: "top top" "body art" "cols cols"; column-gap: clamp(24px, 4vw, 56px); }
.case__top { grid-area: top; } .case__body { grid-area: body; } .case__cols { grid-area: cols; }

/* Project diagrams (art.js) */
.case__art { grid-area: art; margin: 0; align-self: center; border: 1px solid var(--line-g); border-radius: 20px; padding: 10px;
  background: radial-gradient(120% 90% at 70% 20%, rgba(98,240,181,.1), transparent 60%), rgba(3, 30, 28, .55); }
.art { display: block; width: 100%; height: auto; overflow: visible; }
.art .a-grid path { stroke: rgba(98,240,181,.06); stroke-width: 1; }
.art .a-box { fill: #08302d; stroke: var(--line-g); stroke-width: 1.5; }
.art .a-hotbox { stroke: rgba(98,240,181,.5); }
.art .a-fill { fill: rgba(98,240,181,.16); stroke: none; }
.art .a-line { stroke: rgba(239,233,220,.35); stroke-width: 3; }
.art .a-line.a-dark { stroke: rgba(3,34,32,.55); }
.art .a-node { fill: #0a3a37; stroke: var(--accent); stroke-width: 1.5; }
.art .a-pulse { animation: a-pulse 3s ease-in-out infinite; }
@keyframes a-pulse { 50% { fill: rgba(98,240,181,.22); } }
.art .a-flow { stroke: var(--line-g); stroke-width: 2; stroke-dasharray: 4 5; fill: none; animation: dash 1s linear infinite; }
.art .a-pkt { fill: var(--accent); stroke: none; filter: drop-shadow(0 0 5px var(--accent)); }
.art text { stroke: none; text-anchor: middle; }
.art .a-left { text-anchor: start; }
.art .a-right { text-anchor: end; }
.art .a-txt { fill: var(--muted); font: 11px var(--mono); }
.art .a-mono { fill: var(--accent); font: 11px var(--mono); text-anchor: start; }
.art .a-ico { fill: var(--accent); font: 20px var(--sans); }
.art .a-big { fill: var(--accent); font: 600 26px var(--sans); letter-spacing: -.03em; }
.art .a-chip rect { fill: #08302d; stroke: var(--line-g); stroke-width: 1.2; }
.art .a-chip path { stroke: rgba(239,233,220,.3); stroke-width: 3; }
.art .a-chip circle { fill: var(--accent); stroke: none; }
.art .a-chip { animation: a-chip 3.6s ease-in-out infinite; animation-delay: calc(var(--k) * .35s); }
@keyframes a-chip { 0%, 100% { opacity: .45; } 25%, 60% { opacity: 1; } }
.art .a-dot { fill: rgba(239,233,220,.45); stroke: none; }
.art .a-dup { fill: #ff8a8a; animation: a-dup 2.4s ease-in-out infinite; }
@keyframes a-dup { 50% { opacity: .25; } }
.art .a-sign { stroke: var(--accent); stroke-width: 2.5; fill: none; stroke-dasharray: 120; stroke-dashoffset: 120; animation: a-sign 3.2s ease-in-out infinite; }
@keyframes a-sign { 40%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.art .a-bubble { fill: #0a3a37; stroke: var(--line-g); stroke-width: 1.2; }
.art .a-bubble.a-me { fill: var(--accent); stroke: none; }
.art .a-tdot { fill: var(--accent-ink); stroke: none; animation: a-type 1.2s ease-in-out infinite; }
@keyframes a-type { 50% { transform: translateY(-3px); opacity: .4; } }
.art .a-bar { fill: rgba(239,233,220,.14); stroke: none; }
.art .a-hotbar { fill: var(--accent); transform-box: fill-box; transform-origin: left; animation: a-bar 4s cubic-bezier(.16,1,.3,1) infinite; }
@keyframes a-bar { 0% { transform: scaleX(1.66); } 35%, 100% { transform: scaleX(1); } }

/* Services */
.services__grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.service { position: relative; padding: clamp(28px, 3.4vw, 48px); border-bottom: 1px solid var(--line); overflow: hidden; isolation: isolate; transition: color .5s; }
.service:nth-child(odd) { border-right: 1px solid var(--line); }
.service::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: translateY(101%); transition: transform .6s cubic-bezier(.77,0,.18,1); }
.service:hover { color: var(--accent-ink); }
.service:hover::before { transform: none; }
.service:hover p { color: var(--accent-ink); }
.service__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; border: 1px solid currentColor; font-size: 22px; margin-bottom: 26px; opacity: .9; }
.service h3 { margin: 0 0 10px; font-size: clamp(1.4rem, 2.2vw, 2rem); letter-spacing: -.03em; font-weight: 600; }
.service p { margin: 0; color: var(--muted); max-width: 46ch; transition: color .5s; }

/* Process: big outlined numbers that fill on hover (from B) */
.process { margin-top: clamp(80px, 10vw, 140px); }
.process__title { margin: 16px 0 44px; font-size: clamp(2rem, 4.2vw, 3.8rem); line-height: 1.02; letter-spacing: -.04em; font-weight: 600; }
.process__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { position: relative; padding-top: 26px; }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.step::after { content: ""; position: absolute; left: 0; top: 0; height: 1px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.16,1,.3,1) var(--d, 0ms); }
.step.is-in::after { transform: scaleX(1); }
.step b { display: block; font-size: clamp(4rem, 7.5vw, 7rem); line-height: .9; font-weight: 700; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px var(--accent); transition: color .5s; }
.step:hover b { color: var(--accent); }
.step h4 { margin: 18px 0 6px; font-size: 1.3rem; letter-spacing: -.02em; font-weight: 600; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* About + git log (from C) */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 100px); align-items: start; }
.about__photo { margin: 0; position: sticky; top: 110px; border-radius: var(--radius); overflow: hidden; }
.about__photo img { width: 100%; transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.about__photo:hover img { transform: scale(1.04); }
.about__copy > p:not(.kicker) { color: #d6dfd8; font-size: clamp(1.05rem, 1.35vw, 1.22rem); max-width: 60ch; }
.about__copy .section__title { margin: 18px 0 30px; }
.log { margin-top: 44px; }
.log__body { padding: 20px 22px 24px; font-size: 13.5px; }
.log__h { margin: 22px 0 8px; color: var(--accent); }
.log__h::before { content: "# "; color: var(--muted); }
.log__h:first-child { margin-top: 0; }
.log ul { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 76px 1fr; gap: 2px 14px; padding: 11px 0; border-bottom: 1px dashed var(--line); transition: background .3s, padding .3s; }
.log li:hover { background: rgba(98,240,181,.05); padding-left: 8px; }
.log li time { color: #ffd166; }
.log li strong { color: var(--ink); font-weight: 500; }
.log li span { grid-column: 2; color: var(--muted); }

/* Contact inside a terminal window */
.contact { padding: clamp(90px, 12vw, 170px) var(--pad) clamp(70px, 8vw, 110px); border-top: 1px solid var(--line);
  background: radial-gradient(80% 60% at 50% 100%, rgba(98,240,181,.13), transparent 70%); }
.term { box-shadow: 0 40px 120px -40px rgba(98,240,181,.25); }
.term__body { padding: clamp(28px, 5vw, 70px); }
.contact__title { margin: 22px 0 0; font-size: clamp(2.6rem, 6.4vw, 6.4rem); line-height: .98; letter-spacing: -.05em; font-weight: 600; max-width: 16ch; }
.contact__lead { color: var(--muted); max-width: 52ch; margin: 26px 0 0; font-size: 1.1rem; }
.term__cmd { margin: 40px 0 6px; font-size: 14px; color: var(--muted); }
.contact__mail { display: inline-flex; align-items: center; font-size: clamp(1.4rem, 4.2vw, 3.8rem); letter-spacing: -.04em; font-weight: 500; text-decoration: none; word-break: break-all;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px no-repeat; transition: background-size .6s cubic-bezier(.16,1,.3,1), color .3s; }
.contact__mail:hover { background-size: 100% 3px; color: var(--accent); }
.contact__mail .caret { height: .9em; }
.contact__row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px var(--pad) 34px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 1020px) {
  .nav__links { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 110px; align-items: start; }
  .hero__photo { order: -1; max-width: 460px; width: 86%; margin: 0 auto -40px; }
  .hero__title { max-width: 16ch; }
  .float--flow { left: -8%; bottom: 8%; }
  .stats__grid { 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); }
  .case__cols { grid-template-columns: 1fr; gap: 18px; }
  .case { grid-template-columns: 1fr; grid-template-areas: "top" "body" "art" "cols"; }
  .case__art { max-width: 460px; }
  .process__list { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .about { grid-template-columns: 1fr; }
  .about__photo { position: relative; top: 0; max-width: 440px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { inset: 10px 12px auto; padding-left: 14px; }
  .nav__brand { font-size: 12px; }
  .nav__right .btn--small { display: none; }
  .hero__scroll { display: none; }
  .float { font-size: 12px; padding: 10px 12px; }
  .float--flow { width: 82%; left: -6%; bottom: 6%; }
  .services__grid { grid-template-columns: 1fr; }
  .service:nth-child(odd) { border-right: 0; }
  .process__list { grid-template-columns: 1fr; }
  .case { position: relative; top: 0; min-height: 0; }
  .stat { padding: 26px 14px 24px 0; }
  .stat + .stat { padding-left: 14px; }
  .log li { grid-template-columns: 64px 1fr; }
  .term__body { padding: 26px 20px 30px; }
}
/* Short screens: no sticky stacking, so tall cards are never cut off. */
@media (max-height: 760px) { .case { position: relative; top: 0; min-height: 0; } }
