/* ==========================================================================
   Bardos Digital — site styles
   Tokens → base → components → sections → pages → motion preferences
   ========================================================================== */

@font-face { font-family: "Inter"; src: url("/fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/fonts/inter-display-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/fonts/inter-display-800.woff") format("woff"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/fonts/lora-italic-var.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --ink: #050a1c;        /* midnight navy */
  --ink-2: #0a1230;      /* raised surface */
  --ink-3: #111c44;
  --paper: #f3f0e8;      /* warm off-white */
  --dim: #b4bbd3;        /* secondary text on ink */
  --cobalt: #1f4bff;     /* electric cobalt */
  --ice: #9db8ff;        /* luminous accent, text-safe on ink */
  --line: rgba(243, 240, 232, 0.14);
  --line-strong: rgba(243, 240, 232, 0.32);
  --bad: #ff9d8a;

  --f-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-voice: "Lora", Georgia, "Times New Roman", serif;

  --pad: clamp(1.25rem, 4.5vw, 4rem);
  --max: 82rem;
  --sec: clamp(5rem, 11vw, 10rem);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; background: var(--ink); }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font: 400 1.0625rem/1.6 var(--f-text); font-feature-settings: "ss01", "calt";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--cobalt); color: #fff; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
main:focus { outline: none; }

@view-transition { navigation: auto; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--paper); color: var(--ink); padding: 0.7rem 1rem; font-weight: 600; text-decoration: none; }
.skip:focus { top: 1rem; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.ico { flex: none; }

/* ---------- Type ---------- */
.h2 { font: 600 clamp(2.1rem, 5.4vw, 4.25rem)/1.02 var(--f-display); letter-spacing: -0.035em; text-wrap: balance; max-width: 18ch; }
.h3 { font: 600 clamp(1.3rem, 2.2vw, 1.6rem)/1.2 var(--f-display); letter-spacing: -0.02em; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--dim); max-width: 38em; text-wrap: pretty; }
p { text-wrap: pretty; }

.tlink { display: inline-flex; align-items: center; min-height: 2.75rem; gap: 0.35rem; font-weight: 600; color: var(--paper); text-decoration: underline; text-decoration-color: var(--cobalt); text-decoration-thickness: 2px; text-underline-offset: 0.3em; transition: text-decoration-color 0.2s; }
.tlink:hover { text-decoration-color: var(--ice); }
.tlink .ico { width: 1rem; height: 1rem; }

.badge { display: inline-block; font-size: 0.8125rem; font-weight: 600; line-height: 1; padding: 0.4rem 0.55rem; border: 1px solid var(--ice); color: var(--ice); border-radius: 2px; white-space: nowrap; }

.ticks li { display: flex; gap: 0.7rem; align-items: flex-start; padding-block: 0.5rem; }
.ticks .ico { color: var(--ice); margin-top: 0.2rem; }
.plain li { padding: 0.55rem 0 0.55rem 1.4rem; border-top: 1px solid var(--line); position: relative; }
.plain li::before { content: ""; position: absolute; left: 0; top: 1.2rem; width: 0.7rem; height: 2px; background: var(--cobalt); }
.plain a, .prose a, .wnote a, .form-fine a { color: var(--ice); text-underline-offset: 0.2em; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--dim); font-size: 0.9375rem; }
.tags li { position: relative; padding-left: 0.9rem; }
.tags li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 5px; height: 5px; background: var(--cobalt); transform: rotate(45deg); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--cobalt); --fg: #fff; --wipe: var(--paper); --wfg: var(--ink);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.35rem; border: 1px solid transparent; border-radius: 2px;
  background: var(--bg); color: var(--fg);
  font: 600 1rem/1.2 var(--f-text); text-decoration: none; cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s; will-change: transform;
}
.btn::before { content: ""; position: absolute; z-index: -1; inset: -1px -30%; background: var(--wipe); transform: translateX(-101%) skewX(-24deg); transition: transform 0.45s var(--ease); }
.btn:hover, .btn:focus-visible { color: var(--wfg); }
.btn:hover::before, .btn:focus-visible::before { transform: translateX(0) skewX(-24deg); }
.btn:active { scale: 0.98; }
.btn-ghost { --bg: transparent; --fg: var(--paper); border-color: var(--line-strong); }
.btn-ink { --bg: var(--ink); --fg: var(--paper); --wipe: var(--cobalt); --wfg: #fff; }
.btn-sm { min-height: 2.5rem; padding: 0.45rem 1rem; font-size: 0.9375rem; }
.btn-lg { min-height: 3.5rem; padding: 0.9rem 1.7rem; font-size: 1.0625rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
.btn .ico { width: 1.05rem; height: 1.05rem; }

/* ---------- Header ---------- */
.hdr { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; view-transition-name: hdr; }
.hdr.is-stuck { background: rgba(5, 10, 28, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.hdr-in { display: flex; align-items: center; gap: 2rem; height: 4.5rem; padding-inline: var(--pad); max-width: calc(var(--max) + 2 * var(--pad)); margin-inline: auto; }
.logo { display: inline-flex; align-items: center; min-height: 2.75rem; gap: 0.6rem; text-decoration: none; font: 600 1.125rem/1 var(--f-display); letter-spacing: -0.02em; color: var(--paper); margin-right: auto; }
.logo .zmark { color: var(--ice); }
.logo-t span { color: var(--dim); }
.hdr-nav { display: flex; gap: 0.25rem; }
.hdr-nav a { padding: 0.6rem 0.9rem; text-decoration: none; font-weight: 600; font-size: 0.9375rem; color: var(--dim); transition: color 0.2s; position: relative; }
.hdr-nav a:hover, .hdr-nav a[aria-current] { color: var(--paper); }
.hdr-nav a[aria-current]::after { content: ""; position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.25rem; height: 2px; background: var(--cobalt); }
.menu-btn { display: none; width: 3rem; height: 3rem; margin-right: -0.6rem; background: none; border: 0; cursor: pointer; align-items: center; justify-content: center; }
.menu-btn-l, .menu-btn-l::before { display: block; width: 1.5rem; height: 2px; background: var(--paper); transition: transform 0.35s var(--ease); }
.menu-btn-l { position: relative; transform: translateY(-4px); }
.menu-btn-l::before { content: ""; position: absolute; top: 8px; }
.menu-btn[aria-expanded="true"] .menu-btn-l { transform: translateY(0) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn-l::before { transform: translateY(-8px) rotate(-90deg); }

.menu { position: fixed; inset: 0; z-index: 40; background: var(--ink); padding: 6.5rem var(--pad) 2rem; display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto; }
.menu[hidden] { display: none; }
.menu nav { display: grid; }
.menu nav a { font: 600 clamp(2.2rem, 10vw, 3.5rem)/1.1 var(--f-display); letter-spacing: -0.035em; text-decoration: none; padding: 0.55rem 0; border-bottom: 1px solid var(--line); color: var(--paper); animation: menu-in 0.5s var(--ease) both; }
.menu nav a:nth-child(2) { animation-delay: 0.04s; } .menu nav a:nth-child(3) { animation-delay: 0.08s; }
.menu nav a:nth-child(4) { animation-delay: 0.12s; } .menu nav a:nth-child(5) { animation-delay: 0.16s; }
.menu nav a[aria-current] { color: var(--ice); }
.menu nav a:last-child { color: #fff; border: 0; margin-top: 1.5rem; background: var(--cobalt); padding: 1rem 1.2rem; font-size: 1.5rem; }
.menu-foot { color: var(--dim); font-size: 0.9375rem; margin-top: 2rem; }
@keyframes menu-in { from { opacity: 0; transform: translateY(1rem); } }

@media (max-width: 47.99rem) {
  .hdr-nav, .hdr-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .hdr-in { height: 4rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; background:
  radial-gradient(90% 70% at 78% 38%, rgba(31, 75, 255, 0.22), transparent 62%),
  linear-gradient(180deg, #03061a, var(--ink)); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(180deg, transparent, rgba(5, 10, 28, 0.9)); pointer-events: none; }
.hero-in { position: relative; z-index: 1; padding-top: 7rem; padding-bottom: clamp(2rem, 5vw, 4rem); }
.hero-k { font-weight: 600; color: var(--ice); margin-bottom: clamp(0.8rem, 2vw, 1.5rem); animation: fade-up 0.8s 0.1s var(--ease) both; }
.hero-h { font: 800 clamp(3.5rem, 15.4vw, 11rem)/0.86 var(--f-display); letter-spacing: -0.05em; text-transform: uppercase; word-spacing: 0.06em; margin-left: -0.04em; }
.hero-h .ln { display: block; overflow: hidden; padding: 0.06em 0.06em 0.02em 0.04em; margin: -0.06em -0.06em -0.02em -0.04em; }
.hero-h .ln > span { display: block; animation: line-up 1s var(--ease) both; }
.hero-h .ln:nth-child(2) > span { animation-delay: 0.09s; }
.hero-h .ln:nth-child(3) > span { animation-delay: 0.18s; }
.hero-foot { display: grid; gap: 1.5rem; margin-top: clamp(1.5rem, 3.5vw, 3rem); animation: fade-up 0.9s 0.45s var(--ease) both; }
.hero-sub { font-size: clamp(1.0625rem, 1.7vw, 1.35rem); line-height: 1.45; max-width: 27em; color: var(--paper); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (min-width: 60rem) {
  .hero-foot { grid-template-columns: 1fr auto; align-items: end; gap: 3rem; }
}
@media (max-width: 30rem) {
  .hero-cta .btn { flex: 1 1 100%; }
}
@keyframes line-up { from { transform: translateY(110%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(1.2rem); } }

/* ---------- Sections ---------- */
.sec { padding-block: var(--sec); }
.sec-head { display: grid; gap: 1.5rem; margin-bottom: clamp(2.5rem, 6vw, 5rem); }
@media (min-width: 60rem) { .sec-head { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; gap: 5vw; } .sec-head .h2 { max-width: 16ch; } }
.sec-more { margin-top: 3rem; }

/* Reveal: headings unmask once when they enter the viewport */
.rv { display: block; }
.js [data-reveal] .rv { clip-path: inset(0 0 100% 0); transform: translateY(0.35em); transition: clip-path 0.9s var(--ease), transform 0.9s var(--ease); }
.js [data-reveal].in .rv { clip-path: inset(-0.2em -0.1em -0.25em -0.1em); transform: none; }

/* ---------- Services index (home) ---------- */
.svc { border-top: 1px solid var(--line); }
.svc-t { font: inherit; border-bottom: 1px solid var(--line); }
.svc-t button { display: flex; align-items: baseline; gap: 1rem; width: 100%; padding: 1.15rem 0; background: none; border: 0; text-align: left; cursor: pointer; font: 600 clamp(1.5rem, 3.4vw, 2.75rem)/1.1 var(--f-display); letter-spacing: -0.03em; color: var(--dim); transition: color 0.3s, padding 0.4s var(--ease); }
.svc-t button::before { content: ""; flex: none; width: 0; height: 0.12em; background: var(--cobalt); align-self: center; transition: width 0.4s var(--ease); }
.svc-t button[aria-expanded="true"] { color: var(--paper); }
.svc-t button[aria-expanded="true"]::before { width: 1.1em; }
.svc-t button:hover { color: var(--paper); }
.svc-p { padding: 1.5rem 0 2.5rem; display: grid; gap: 1.1rem; align-content: start; }
.svc-p > p:not(.svc-hl) { color: var(--dim); max-width: 34em; }
.svc-hl { font: italic 500 clamp(1.5rem, 2.6vw, 2.1rem)/1.2 var(--f-voice); color: var(--ice); }
.js .svc-p[data-closed] { display: none; }
.js .svc-p:not([data-closed]) { animation: fade-up 0.5s var(--ease) both; }
@media (min-width: 60rem) {
  .js .svc { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: repeat(5, auto) 1fr; column-gap: 6vw; border-top: 0; }
  .js .svc-t { grid-column: 1; grid-row: var(--r); }
  .js .svc-t:first-child { border-top: 1px solid var(--line); }
  .js .svc-p { grid-column: 2; grid-row: 1 / span 6; padding: 0.4rem 0 0 2.5rem; border-left: 1px solid var(--line); min-height: 30rem; }
}

/* ---------- Device previews ---------- */
.devices { position: relative; padding: 0 12% 6% 0; }
.dev-browser { border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--ink-2); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.dev-bar { display: flex; align-items: center; gap: 5px; height: 1.9rem; padding: 0 0.7rem; border-bottom: 1px solid var(--line); font-size: 0.6875rem; color: var(--dim); }
.dev-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.dev-bar span { margin-left: 0.6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-2); }
.dev-screen img, .dev-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; border: 0; }
.dev-phone { position: absolute; right: 0; bottom: 0; width: 24%; border: 1px solid var(--line-strong); border-radius: 14px; padding: 4px; background: var(--ink); box-shadow: -18px 24px 50px -20px rgba(0, 0, 0, 0.9); }
.dev-phone .dev-screen { aspect-ratio: 9 / 18; border-radius: 10px; }
.plate { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.4rem; padding: 7%; background:
  repeating-linear-gradient(-56deg, transparent 0 22px, rgba(157, 184, 255, 0.07) 22px 23px),
  radial-gradient(120% 90% at 100% 0%, rgba(31, 75, 255, 0.55), transparent 60%), var(--ink-2); }
.plate-n { font: 800 clamp(1.3rem, 3.6vw, 2.6rem)/0.95 var(--f-display); letter-spacing: -0.04em; text-transform: uppercase; max-width: 9em; }
.plate-c { color: var(--ice); font-size: 0.875rem; font-weight: 600; }
.plate-s { padding: 12% 10%; }
.plate-s .plate-n { font-size: clamp(0.6rem, 1.5vw, 0.95rem); letter-spacing: -0.02em; }

/* ---------- Project cards ---------- */
.pgrid { display: grid; gap: clamp(3.5rem, 7vw, 6rem) 5vw; }
@media (min-width: 52rem) {
  .pgrid { grid-template-columns: 1fr 1fr; }
  .pgrid .pcard:nth-child(even) { margin-top: clamp(4rem, 9vw, 9rem); }
}
.pcard { display: grid; gap: 1.5rem; align-content: start; }
.pcard-media { display: block; text-decoration: none; color: inherit; transition: transform 0.6s var(--ease); }
.pcard:hover .pcard-media { transform: translateY(-6px); }
.pcard-body { display: grid; gap: 0.8rem; }
.pcard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; color: var(--dim); font-size: 0.9375rem; }
.pcard-h { font: 600 clamp(1.6rem, 3vw, 2.25rem)/1.1 var(--f-display); letter-spacing: -0.03em; }
.pcard-h a { text-decoration: none; }
.pcard-h a:hover { color: var(--ice); }
.pcard-body > p:not([class]) { color: var(--dim); max-width: 34em; }
.pcard-links { display: flex; flex-wrap: wrap; gap: 0 1.75rem; }

/* ---------- Why (paper section) ---------- */
.why { background: var(--paper); color: var(--ink); }
.why ::selection { background: var(--ink); color: var(--paper); }
.why :focus-visible { outline-color: var(--cobalt); }
.why .h2 { max-width: 15ch; }
.why-q { font: italic 500 clamp(1.4rem, 2.8vw, 2.2rem)/1.3 var(--f-voice); max-width: 28em; margin-top: 2rem; color: #1b2a6b; }
.why-l { margin-top: clamp(2.5rem, 6vw, 5rem); border-bottom: 1px solid rgba(5, 10, 28, 0.2); }
.why-l li { display: grid; gap: 0.4rem 3rem; padding-block: 1.6rem; border-top: 1px solid rgba(5, 10, 28, 0.2); }
.why-l strong { font: 600 clamp(1.4rem, 2.8vw, 2.1rem)/1.1 var(--f-display); letter-spacing: -0.03em; }
.why-l span { font-size: 1.125rem; max-width: 32em; color: #2a3350; }
@media (min-width: 52rem) { .why-l li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: baseline; } }
.why-foot { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; font-size: 1.125rem; font-weight: 600; }

/* ---------- Process: the Z route ---------- */
.zroute-svg { display: none; }
.zroute-l { display: grid; gap: 0; counter-reset: z; }
.zstep { position: relative; padding: 0 0 2.5rem 3.75rem; }
.zstep::before { content: ""; position: absolute; left: 1.15rem; top: 2.4rem; bottom: 0; width: 1px; background: var(--line-strong); }
.zstep:last-child::before { display: none; }
.zstep-n { position: absolute; left: 0; top: 0; width: 2.35rem; height: 2.35rem; display: grid; place-items: center; border: 1px solid var(--ice); color: var(--ice); font: 600 1rem/1 var(--f-display); transform: rotate(45deg); }
.zstep-n { font-size: 0; }
.zstep-n::after { content: counter(z); counter-increment: z; font-size: 1rem; transform: rotate(-45deg); }
.zstep h3 { font: 600 clamp(1.6rem, 3vw, 2.25rem)/1.1 var(--f-display); letter-spacing: -0.03em; margin-bottom: 0.6rem; }
.zstep p { color: var(--dim); max-width: 26em; }

@media (min-width: 60rem) {
  .js .zroute { --band: clamp(10rem, 19vw, 17rem); position: relative; }
  .js .zroute-svg { display: block; position: absolute; left: 0; width: 100%; height: var(--band); top: var(--z-top, 50%); overflow: visible; fill: none; }
  .zroute-bg { stroke: var(--line-strong); stroke-width: 1; }
  .zroute-fg { stroke: var(--cobalt); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 1)); filter: drop-shadow(0 0 10px rgba(31, 75, 255, 0.9)); }
  .js .zroute-l { grid-template-columns: 1fr 1fr; column-gap: 12vw; row-gap: var(--band); }
  .js .zstep { padding: 0; display: grid; align-content: start; }
  .js .zstep::before { display: none; }
  .js .zstep-n { position: static; margin-bottom: 1.4rem; transition: background 0.4s, color 0.4s, border-color 0.4s; }
  .js .zstep.on .zstep-n { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
  .js .zstep-1, .js .zstep-2 { padding-bottom: 2.5rem; }
  .js .zstep-3, .js .zstep-4 { padding-top: 2.5rem; }
  .js .zstep-2, .js .zstep-4 { justify-self: end; width: min(100%, 26rem); }
  .js .zstep { opacity: 0.45; transition: opacity 0.5s; }
  .js .zstep.on { opacity: 1; }
}

/* ---------- Closing CTA ---------- */
.cta { position: relative; overflow: hidden; padding-block: clamp(6rem, 14vw, 12rem); border-top: 1px solid var(--line); background: radial-gradient(80% 120% at 85% 100%, rgba(31, 75, 255, 0.35), transparent 60%), var(--ink); }
.cta-z { position: absolute; right: -4%; top: 50%; translate: 0 -50%; color: #5d7dff; opacity: 0.9; width: min(80vw, 44rem); pointer-events: none; }
.zfield path:first-child { stroke: var(--paper); }
@media (max-width: 47.99rem) { .cta-z { opacity: 0.4; right: -38%; top: 22%; width: 34rem; } }
.cta-z svg, .links-z svg, .nf-z svg { width: 100%; height: auto; }
.cta-in { position: relative; display: grid; gap: 1.75rem; justify-items: start; }
.cta-h { font: 800 clamp(2.6rem, 9vw, 7rem)/0.9 var(--f-display); letter-spacing: -0.045em; text-transform: uppercase; max-width: 11ch; text-wrap: balance; }

/* ---------- Footer ---------- */
.ftr { border-top: 1px solid var(--line); padding-block: clamp(3rem, 6vw, 5rem) 2rem; background: #03061a; }
.ftr-in { display: grid; gap: 3rem; }
.ftr-brand { display: grid; gap: 0.9rem; justify-items: start; }
.ftr-brand p { max-width: 24em; }
.ftr-loc, .ftr-legal { color: var(--dim); font-size: 0.9375rem; }
.ftr-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 2rem; }
.ftr-nav a { display: inline-block; padding: 0.3rem 0; color: var(--dim); text-decoration: none; }
.ftr-nav a:hover, .ftr-legal a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 0.25em; }
.ftr-legal { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.ftr-legal a { color: inherit; margin-left: 0.75rem; }
@media (min-width: 60rem) { .ftr-in { grid-template-columns: 1fr 1.3fr; } .ftr-legal { grid-column: 1 / -1; } }

/* ---------- Inner page head ---------- */
.phead { padding-top: clamp(8rem, 16vw, 12rem); padding-bottom: clamp(2.5rem, 6vw, 5rem); display: grid; gap: 1.5rem; }
.phead-h { font: 800 clamp(2.6rem, 8.2vw, 6.25rem)/0.94 var(--f-display); letter-spacing: -0.045em; max-width: 14ch; text-wrap: balance; }
.crumb a { color: var(--ice); font-weight: 600; text-decoration: none; }
.crumb a::before { content: "‹ "; }

/* ---------- Services page ---------- */
.jump { margin-bottom: 1rem; }
.jump ul { display: flex; gap: 0.5rem; overflow-x: auto; padding-block: 0.25rem 1rem; scrollbar-width: none; margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad); }
.jump ul::-webkit-scrollbar { display: none; }
.jump a { display: block; white-space: nowrap; padding: 0.6rem 1rem; border: 1px solid var(--line-strong); border-radius: 2px; text-decoration: none; font-weight: 600; font-size: 0.9375rem; transition: background 0.2s, border-color 0.2s; }
.jump a:hover { background: var(--cobalt); border-color: var(--cobalt); }
.sblock { border-top: 1px solid var(--line); padding-block: clamp(3.5rem, 8vw, 7rem); }
.sblock-in { display: grid; gap: 2.5rem; }
.sblock-head { display: grid; gap: 1.1rem; justify-items: start; align-content: start; }
.sblock-head .h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); max-width: 12ch; }
.sblock-hl { font: italic 500 clamp(1.3rem, 2.2vw, 1.7rem)/1.25 var(--f-voice); color: var(--ice); }
.sblock-body { display: grid; gap: 2rem; }
.sblock-body h3 { font: 600 1.0625rem/1.3 var(--f-text); color: var(--paper); margin-bottom: 0.6rem; }
.sblock-body .lede { color: var(--paper); }
.sblock-cols { display: grid; gap: 2rem; }
.note { border-left: 2px solid var(--cobalt); padding: 0.2rem 0 0.2rem 1.1rem; color: var(--dim); max-width: 36em; }
.cases { display: grid; gap: 0.75rem; }
.cases li { font: italic 400 1.1875rem/1.4 var(--f-voice); color: var(--dim); padding-left: 1.4rem; position: relative; max-width: 34em; }
.cases li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 0.7rem; height: 1px; background: var(--ice); }
.ticks li span, .plain li { color: var(--dim); }
@media (min-width: 40rem) { .sblock-cols { grid-template-columns: 1fr 1fr; gap: 3rem; } }
@media (min-width: 60rem) {
  .sblock-in { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr); gap: 6vw; }
  .sblock-head { position: sticky; top: 7rem; }
}

/* ---------- Work page ---------- */
.wlist { display: grid; gap: clamp(4rem, 9vw, 8rem); padding-bottom: var(--sec); }
@media (min-width: 60rem) {
  .wlist .pcard { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 5vw; align-items: center; }
  .wlist .pcard:nth-child(even) .pcard-media { order: 2; }
}
.wnote { max-width: calc(46rem + 2 * var(--pad)); margin-inline: 0 auto; display: grid; gap: 1rem; padding-bottom: var(--sec); color: var(--dim); }
.wnote .h3 { color: var(--paper); }

/* ---------- Project page ---------- */
.proj-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.disclaimer { display: grid; gap: 0.75rem; justify-items: start; padding: 1.25rem 1.4rem; border: 1px solid var(--line-strong); border-left: 3px solid var(--ice); max-width: 46rem; color: var(--dim); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 2.5rem; margin-block: clamp(2.5rem, 5vw, 4rem); }
.facts div { border-top: 1px solid var(--line); padding-block: 1rem; }
.facts dt { color: var(--dim); font-size: 0.9375rem; }
.facts dd { font-weight: 600; overflow-wrap: anywhere; }
.facts a { color: var(--ice); }
.proj-preview { max-width: 64rem; }
.proj-preview.live .devices { padding: 0; }
.proj-preview.live .dev-phone { display: none; }
.proj-preview.live .dev-screen { aspect-ratio: auto; height: min(78vh, 46rem); }
.proj-preview-act { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.5rem; color: var(--dim); font-size: 0.9375rem; }
html:not(.js) .proj-preview-act { display: none; }
.proj-body { display: grid; gap: 3rem 5vw; margin-block: clamp(3.5rem, 8vw, 7rem); }
.proj-body section { display: grid; gap: 0.9rem; align-content: start; }
.proj-body p { color: var(--dim); max-width: 36em; }
@media (min-width: 52rem) { .proj-body { grid-template-columns: 1fr 1fr; } }
.proj-next { display: grid; gap: 0.3rem; padding-block: 2rem; border-top: 1px solid var(--line); text-decoration: none; margin-bottom: var(--sec); }
.proj-next span { color: var(--dim); }
.proj-next strong { font: 600 clamp(1.8rem, 5vw, 3.5rem)/1.05 var(--f-display); letter-spacing: -0.035em; transition: color 0.2s; }
.proj-next:hover strong { color: var(--ice); }

/* ---------- About ---------- */
.about { display: grid; gap: clamp(3.5rem, 8vw, 6.5rem); padding-bottom: var(--sec); }
.about > section { display: grid; gap: 1.1rem; max-width: 44rem; }
.about > section > p { color: var(--dim); font-size: 1.125rem; }
.about-story > p:first-of-type { color: var(--paper); font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.45; }
.about > .about-three { max-width: none; }
.about-three dl { display: grid; gap: 0 3rem; margin-top: 0.5rem; }
.about-three dl div { border-top: 1px solid var(--line-strong); padding-block: 1.4rem; }
.about-three dt { font: 600 1.5rem/1.2 var(--f-display); letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.about-three dd { color: var(--dim); max-width: 30em; }
@media (min-width: 52rem) { .about-three dl { grid-template-columns: repeat(3, 1fr); } }
.about-q { border-left: 3px solid var(--cobalt); padding-left: clamp(1.25rem, 3vw, 2.5rem); }
.about-q p { font: italic 500 clamp(2rem, 6vw, 4.5rem)/1.08 var(--f-voice); letter-spacing: -0.01em; max-width: 14em; color: var(--paper); text-wrap: balance; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 4rem; padding-bottom: var(--sec); }
@media (min-width: 60rem) { .contact { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 7vw; } }
.form { display: grid; gap: 1.5rem; }
.form-row { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .form-row { grid-template-columns: 1fr 1fr; } }
.f { display: grid; gap: 0.4rem; align-content: start; }
.f label { font-weight: 600; }
.f-opt { font-weight: 400; color: var(--dim); font-size: 0.875rem; margin-left: 0.3rem; }
.f-hint { color: var(--dim); font-size: 0.9375rem; }
.f input, .f select, .f textarea { width: 100%; min-height: 3.25rem; padding: 0.8rem 0.95rem; background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 2px; color: var(--paper); font-size: 1rem; transition: border-color 0.2s, background 0.2s; }
.f textarea { resize: vertical; min-height: 9rem; line-height: 1.5; }
.f select { appearance: none; -webkit-appearance: none; padding-right: 2.6rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239db8ff' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 1.2rem; }
.f select option { background: var(--ink-2); color: var(--paper); }
.f input:hover, .f select:hover, .f textarea:hover { border-color: var(--ice); }
.f input:focus-visible, .f select:focus-visible, .f textarea:focus-visible { outline: 2px solid var(--ice); outline-offset: 0; border-color: var(--ice); background: var(--ink-3); }
.f [aria-invalid="true"] { border-color: var(--bad); }
.f-err { color: var(--bad); font-size: 0.9375rem; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 0.5rem; }
.form-fine { color: var(--dim); font-size: 0.9375rem; max-width: 24em; }
.form-summary { border: 1px solid var(--bad); border-left-width: 3px; padding: 1rem 1.2rem; display: grid; gap: 0.4rem; }
.form-summary strong { color: var(--bad); }
.form-summary a { color: var(--paper); }
.form-summary[hidden], .form-done[hidden], .f-err[hidden] { display: none; }
.btn .spin { width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-done { display: grid; gap: 1.25rem; justify-items: start; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--line-strong); border-left: 3px solid var(--cobalt); animation: fade-up 0.6s var(--ease) both; }
.form-done .zmark { color: var(--ice); }
.form-done:focus { outline: none; }
.contact-side { display: grid; gap: 1.25rem; align-content: start; }
.contact-side .h3:not(:first-child) { margin-top: 1.5rem; }
.next { counter-reset: n; display: grid; }
.next li { counter-increment: n; position: relative; padding: 1rem 0 1rem 2.75rem; border-top: 1px solid var(--line); color: var(--dim); }
.next li::before { content: counter(n); position: absolute; left: 0; top: 1rem; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border: 1px solid var(--ice); color: var(--ice); font-weight: 600; font-size: 0.875rem; }
.next strong { color: var(--paper); display: block; }
.direct li { display: flex; align-items: center; gap: 0.7rem; padding-block: 0.4rem; }
.direct .ico { color: var(--ice); }
.direct a { color: var(--paper); font-weight: 600; overflow-wrap: anywhere; }
.contact-loc { color: var(--dim); }

/* ---------- Prose (privacy) ---------- */
.prose { max-width: calc(44rem + 2 * var(--pad)); margin-inline: 0 auto; padding-bottom: var(--sec); }
.prose h2 { font: 600 1.5rem/1.2 var(--f-display); letter-spacing: -0.02em; margin: 2.75rem 0 0.9rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--dim); margin-bottom: 1rem; }

/* ---------- Links (link-in-bio) ---------- */
.p-links { background: radial-gradient(120% 60% at 100% 0%, rgba(31, 75, 255, 0.4), transparent 60%), var(--ink); min-height: 100svh; }
.links { position: relative; max-width: 30rem; margin-inline: auto; padding: clamp(2rem, 7vw, 4rem) 1.25rem 2rem; min-height: 100svh; display: flex; flex-direction: column; gap: 2rem; overflow: hidden; }
.links-z { position: absolute; top: -2rem; right: -13rem; width: 24rem; color: #5d7dff; opacity: 0.7; pointer-events: none; animation: z-drift 14s ease-in-out infinite alternate; }
@keyframes z-drift { to { transform: translate(-1.2rem, 1.2rem); } }
.links-head { position: relative; display: grid; gap: 1rem; justify-items: start; padding-top: 1rem; }
.links-head .logo { margin: 0 0 1.5rem; }
.links-h { font: 800 clamp(2.8rem, 14vw, 4.2rem)/0.88 var(--f-display); letter-spacing: -0.05em; text-transform: uppercase; max-width: 9ch; }
.links-head p { color: var(--paper); max-width: 22em; }
.links-list { position: relative; display: grid; gap: 0.6rem; }
.lk { display: flex; align-items: center; gap: 0.9rem; min-height: 4rem; padding: 0.8rem 1.1rem; border: 1px solid var(--line-strong); border-radius: 2px; background: rgba(10, 18, 48, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-decoration: none; font-weight: 600; font-size: 1.0625rem; transition: border-color 0.2s, background 0.2s, transform 0.15s; animation: fade-up 0.6s var(--ease) both; }
.links-list li:nth-child(2) .lk { animation-delay: 0.05s; } .links-list li:nth-child(3) .lk { animation-delay: 0.1s; }
.links-list li:nth-child(4) .lk { animation-delay: 0.15s; } .links-list li:nth-child(5) .lk { animation-delay: 0.2s; }
.links-list li:nth-child(n + 6) .lk { animation-delay: 0.25s; }
.lk:hover { border-color: var(--ice); background: var(--ink-3); }
.lk:active { transform: scale(0.98); }
.lk-t { flex: 1; display: grid; line-height: 1.25; }
.lk-t small { font-weight: 400; font-size: 0.875rem; color: var(--dim); }
.lk > .ico:first-child { color: var(--ice); width: 1.4rem; height: 1.4rem; }
.lk > .ico:last-of-type:not(:first-child) { color: var(--dim); width: 1.1rem; height: 1.1rem; }
.lk-main { background: var(--cobalt); border-color: var(--cobalt); min-height: 4.75rem; font-size: 1.1875rem; }
.lk-main:hover { background: #3a61ff; border-color: #fff; }
.lk-main .ico, .lk-main small { color: #fff !important; }
.links-foot { margin-top: auto; padding-top: 1rem; color: var(--dim); font-size: 0.875rem; position: relative; }
.links-foot a { color: inherit; margin-left: 0.6rem; }

/* ---------- 404 ---------- */
.nf { position: relative; min-height: 88svh; display: grid; align-content: center; gap: 1.5rem; padding-block: 8rem 4rem; overflow: hidden; }
.nf-z { position: absolute; right: -2rem; top: 50%; translate: 0 -50%; width: min(70vw, 30rem); color: #5d7dff; opacity: 0.8; transform: rotate(90deg); pointer-events: none; }
.nf > :not(.nf-z) { position: relative; }
.nf-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

/* ---------- Cursor follower (fine pointers only; the native cursor stays) ---------- */
.cur { position: fixed; left: 0; top: 0; z-index: 90; width: 2.25rem; height: 2.25rem; margin: -1.125rem 0 0 -1.125rem; border: 1px solid var(--ice); border-radius: 50%; pointer-events: none; opacity: 0; display: grid; place-items: center; font-size: 0.75rem; font-weight: 600; color: transparent; transition: opacity 0.3s, width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), background 0.3s, color 0.2s, border-color 0.3s; mix-blend-mode: normal; }
.cur.on { opacity: 0.7; }
.cur.is-link { width: 3.25rem; height: 3.25rem; margin: -1.625rem 0 0 -1.625rem; opacity: 0.35; }
.cur.is-label { width: 4.5rem; height: 4.5rem; margin: -2.25rem 0 0 -2.25rem; background: var(--cobalt); border-color: var(--cobalt); color: #fff; opacity: 1; }

/* ---------- Motion and input preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js [data-reveal] .rv { clip-path: none; transform: none; }
  .js .zstep { opacity: 1; }
  .cur { display: none; }
  @view-transition { navigation: none; }
}
@media print {
  .hdr, .menu, .cur, .hero-canvas, .cta-z { display: none !important; }
  body { background: #fff; color: #000; }
}
.form[hidden] { display: none; }
