/* Layout: full-bleed black canvas of drifting grid lines; a pinned header carries the V mark; sections reveal as cells of the same grid. */
:root {
  --bg: #000000;
  --bg-2: #060a12;
  --panel: #0a1018;
  --line: #16202e;
  --fg: #eaf1fb;
  --muted: #8d9bb0;
  --blue: #3c97fd;
  --blue-hi: #7bb9ff;
  --blue-lo: #1b4f8f;
  --blue-rgb: 60,151,253;
  --hi-rgb: 123,185,255;
  --on-blue: #00060f;
  --hdr-bg: rgba(0,0,0,.78);
  --menu-bg: rgba(0,0,0,.96);
  --vig-mid: rgba(0,0,0,.55);
  --vig-end: #000000;
  --chip-bg: rgba(6,10,18,.7);
  --shadow: rgba(0,0,0,.6);
  --wm-v: #75b4ff;
  --gw1: #868470;
  --gw2: #989c88;
  --gw3: #bccab7;
  --gw-solid: #98a090;
  --f-display: "Chakra Petch", "Segoe UI", sans-serif;
  --f-body: "Manrope", "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}
/* follow the visitor's system setting: light when their phone or computer is in light mode */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f8fd;
    --bg-2: #e9f0f9;
    --panel: #ffffff;
    --line: #d2deec;
    --fg: #0a1626;
    --muted: #4a5d75;
    --blue: #1f6fd1;
    --blue-hi: #0f58b5;
    --blue-lo: #9dbfe9;
    --blue-rgb: 31,111,209;
    --hi-rgb: 15,88,181;
    --on-blue: #ffffff;
    --hdr-bg: rgba(244,248,253,.82);
    --menu-bg: rgba(244,248,253,.97);
    --vig-mid: rgba(244,248,253,.6);
    --vig-end: #f4f8fd;
    --chip-bg: rgba(255,255,255,.8);
    --shadow: rgba(20,50,90,.22);
    --wm-v: #2878d8;
    --gw1: #6b6955;
    --gw2: #6f7e68;
    --gw3: #4d6b5c;
    --gw-solid: #66705e;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f8fd;
  --bg-2: #e9f0f9;
  --panel: #ffffff;
  --line: #d2deec;
  --fg: #0a1626;
  --muted: #4a5d75;
  --blue: #1f6fd1;
  --blue-hi: #0f58b5;
  --blue-lo: #9dbfe9;
  --blue-rgb: 31,111,209;
  --hi-rgb: 15,88,181;
  --on-blue: #ffffff;
  --hdr-bg: rgba(244,248,253,.82);
  --menu-bg: rgba(244,248,253,.97);
  --vig-mid: rgba(244,248,253,.6);
  --vig-end: #f4f8fd;
  --chip-bg: rgba(255,255,255,.8);
  --shadow: rgba(20,50,90,.22);
  --wm-v: #2878d8;
  --gw1: #6b6955;
  --gw2: #6f7e68;
  --gw3: #4d6b5c;
  --gw-solid: #66705e;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--f-body); font-size: 16px; line-height: 1.65;
  padding-inline: 0; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }

/* progress */
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--blue-lo), var(--blue-hi)); }

/* header */
.hdr { position: fixed; inset-inline: 0; top: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.hdr.stuck { background: var(--hdr-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.hdr-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { width: 46px; height: auto; display: block; }
.nav { display: flex; gap: 28px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.nav a { position: relative; padding: 6px 0; transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.nav a:hover, .nav a.on { color: var(--fg); }
.nav a:hover::after, .nav a.on::after { transform: scaleX(1); }
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 600; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; padding: 13px 22px; border: 1px solid var(--blue); color: var(--fg); background: transparent; cursor: pointer; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); transition: background .25s, color .25s; }
.btn:hover { background: var(--blue); color: var(--on-blue); }
.btn.solid { background: var(--blue); color: var(--on-blue); }
.btn.solid:hover { background: var(--blue-hi); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--fg); width: 42px; height: 42px; cursor: pointer; font-family: var(--f-mono); }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: calc(68px + env(safe-area-inset-top, 0px)); left: 0; right: 0; flex-direction: column; gap: 0; background: var(--menu-bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .menu-btn { display: block; }
  .hdr-cta { display: none; }
}

/* hero */
.hero { position: relative; padding-block: 150px 90px; border-bottom: 1px solid var(--line); overflow: hidden; }
#gridcv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 30% 45%, transparent 0%, var(--vig-mid) 70%, var(--vig-end) 100%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 2; }
.term { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: var(--chip-bg); padding: 8px 14px; margin-bottom: 28px; }
.term i { width: 7px; height: 7px; background: var(--blue); border-radius: 50%; box-shadow: 0 0 12px var(--blue); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.term .caret { display: inline-block; width: 8px; height: 14px; background: var(--blue); margin-left: 3px; vertical-align: -2px; animation: blink 1s steps(2) infinite; }
.hero h1 { font-size: clamp(44px, 8.2vw, 112px); font-weight: 700; text-transform: uppercase; line-height: .95; }
.hero h1 .l { display: block; overflow: hidden; }
.hero h1 .l > span { display: inline-block; animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.hero h1 .l:nth-child(2) > span { animation-delay: .12s; }
.hero h1 .l:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lead { max-width: 52ch; margin-top: 28px; color: var(--muted); font-size: 18px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.scrollhint { position: absolute; z-index: 2; left: var(--gutter); bottom: 26px; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.scrollhint b { width: 1px; height: 38px; background: linear-gradient(var(--blue), transparent); animation: drip 2s infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 860px) {
  .hero { padding-block: 120px 90px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
    }

/* ticker */
.ticker { border-bottom: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.track { display: flex; width: max-content; animation: slide 38s linear infinite; }
.ticker:hover .track { animation-play-state: paused; }
.track span { font-family: var(--f-display); font-weight: 600; font-size: 22px; text-transform: uppercase; letter-spacing: .06em; padding: 18px 28px; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 56px; }
.track span::after { content: ""; width: 9px; height: 9px; background: var(--blue); transform: rotate(45deg); }
@keyframes slide { to { transform: translateX(-50%); } }

/* sections */
section { position: relative; }
.sec { padding-block: clamp(72px, 11vw, 140px); border-bottom: 1px solid var(--line); }
.sec-h { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 56px; }
.sec-h h2 { font-size: clamp(32px, 5vw, 62px); font-weight: 700; text-transform: uppercase; margin-top: 14px; }
.sec-h p { color: var(--muted); max-width: 46ch; justify-self: end; }
@media (max-width: 760px) { .sec-h { grid-template-columns: minmax(0, 1fr); } .sec-h p { justify-self: start; } }

/* reveal on scroll */
.rv { opacity: .0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
.rv-l { transform: translateX(-40px); } .rv-r { transform: translateX(40px); }
.rv-l.in, .rv-r.in { transform: none; }

/* about with scroll-drawn logo */
.about { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 90px); align-items: center; }
.about-mark { position: sticky; top: 120px; }
.about-mark svg { width: 100%; max-width: 440px; height: auto; display: block; overflow: visible; }
.about-mark .gridbg { position: absolute; inset: -6%; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 72%); mask-image: radial-gradient(circle, #000 30%, transparent 72%); z-index: -1; }
.about-mark { isolation: isolate; }
.about h2 { font-size: clamp(30px, 4.4vw, 54px); text-transform: uppercase; font-weight: 700; margin-block: 14px 24px; }
.about h2 em { font-style: normal; color: var(--blue); }
.about p { color: var(--muted); margin-bottom: 18px; max-width: 58ch; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pills span { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line); padding: 8px 14px; color: var(--fg); }
@media (max-width: 860px) { .about { grid-template-columns: minmax(0, 1fr); } .about-mark { position: relative; top: 0; max-width: 260px; } }

/* services */
.svc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.svc-c { background: var(--bg); padding: clamp(24px, 3.4vw, 48px); position: relative; overflow: hidden; transition: background .35s; }
.svc-c::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--blue-rgb), .16), transparent 60%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.svc-c:hover::before { opacity: 1; }
.svc-c .idx { font-family: var(--f-mono); font-size: 12px; color: var(--blue); letter-spacing: .14em; }
.svc-c h3 { font-size: clamp(28px, 3.4vw, 44px); text-transform: uppercase; margin-block: 14px 14px; font-weight: 700; }
.svc-c > p { color: var(--muted); max-width: 44ch; margin-bottom: 26px; }
.svc-c ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.svc-c li { padding: 11px 0; border-top: 1px solid var(--line); font-size: 14.5px; display: flex; gap: 10px; align-items: center; }
.svc-c li::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--blue); }
.svc-ic { width: 64px; height: 64px; margin-bottom: 8px; }
.svc-ic * { fill: none; stroke: var(--blue); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
@media (max-width: 760px) { .svc { grid-template-columns: minmax(0, 1fr); } .svc-c ul { grid-template-columns: minmax(0, 1fr); } }

/* portfolio */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filters button { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 10px 18px; background: transparent; color: var(--muted); border: 1px solid var(--line); cursor: pointer; transition: all .2s; }
.filters button:hover { color: var(--fg); border-color: var(--blue-lo); }
.filters button[aria-pressed="true"] { color: var(--on-blue); background: var(--blue); border-color: var(--blue); }
.pf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { position: relative; background: var(--panel); border: 1px solid var(--line); overflow: hidden; transition: transform .35s, border-color .35s, opacity .35s; }
.card:hover { transform: translateY(-6px); border-color: var(--blue); }
.card[hidden] { display: none !important; }
.thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #03060b; border-bottom: 1px solid var(--line); }
.thumb canvas { width: 100%; height: 100%; display: block; }
.thumb .tag { position: absolute; left: 12px; top: 12px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; background: rgba(0,0,0,.7); border: 1px solid var(--line); padding: 5px 9px; color: #7bb9ff; }
.card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { font-size: 22px; text-transform: uppercase; font-weight: 600; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card .meta b { color: var(--blue); font-weight: 500; }
.note { margin-top: 28px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); letter-spacing: .06em; }
@media (max-width: 980px) { .pf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .pf { grid-template-columns: minmax(0, 1fr); } }

/* process */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 17px; height: 1px; background: var(--line); }
.steps::after { content: ""; position: absolute; left: 0; top: 17px; height: 1px; width: calc(100% * var(--sp, 0)); background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.step { position: relative; padding: 56px 24px 0 0; }
.step .node { position: absolute; top: 9px; left: 0; width: 17px; height: 17px; background: var(--bg); border: 1px solid var(--blue); transform: rotate(45deg); transition: background .4s; }
.step.on .node { background: var(--blue); box-shadow: 0 0 16px var(--blue); }
.step h3 { font-size: 22px; text-transform: uppercase; font-weight: 600; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-left: 36px; }
  .steps::before, .steps::after { left: 8px; right: auto; top: 0; width: 1px; height: 100%; }
  .steps::after { height: calc(100% * var(--sp, 0)); width: 1px; }
  .step { padding: 0; } .step .node { left: -36px; top: 5px; }
}

/* contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 90px); }
.contact h2 { font-size: clamp(34px, 5.4vw, 70px); text-transform: uppercase; font-weight: 700; margin-block: 14px 24px; }
.contact h2 em { font-style: normal; color: var(--blue); }
.contact .lead { color: var(--muted); max-width: 44ch; }
form { display: grid; gap: 24px; align-content: start; background: var(--panel); border: 1px solid var(--line); padding: clamp(24px, 3.2vw, 40px); }
label { display: grid; gap: 10px; align-content: start; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
input, select, textarea { width: 100%; font: inherit; font-family: var(--f-body); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--fg); background: var(--bg); border: 1px solid var(--line); padding: 13px 14px; border-radius: 0; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(var(--blue-rgb), .18); }
input, select { height: 50px; }
select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--blue) 50%), linear-gradient(135deg, var(--blue) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.opts { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; min-width: 0; animation: optin .4s cubic-bezier(.2,.8,.2,1); }
.opts[hidden] { display: none; }
.opts legend { display: block; width: 100%; padding: 0; margin-bottom: 12px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chk { display: flex; align-items: center; gap: 12px; min-height: 56px; text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: 14.5px; line-height: 1.35; color: var(--fg); background: var(--bg); cursor: pointer; padding: 12px 14px; border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.chk:hover { border-color: var(--blue-lo); }
.chk:has(input:checked) { border-color: var(--blue); background: rgba(var(--blue-rgb), .1); }
.chk input { width: 16px; height: 16px; flex: none; padding: 0; accent-color: var(--blue); }
@keyframes optin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) { .opts { grid-template-columns: minmax(0, 1fr); } }
.send { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.send .btn { justify-content: center; text-align: center; padding-inline: 16px; }
@media (max-width: 520px) { .send { grid-template-columns: minmax(0, 1fr); } }
.direct { display: flex; flex-wrap: wrap; gap: 8px 28px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.direct b { color: var(--fg); font-weight: 500; user-select: all; overflow-wrap: anywhere; }
.copy { font: inherit; background: none; border: 1px solid var(--line); color: var(--blue-hi); padding: 2px 10px; cursor: pointer; margin-left: 6px; }
.copy:hover { border-color: var(--blue); }
#fmsg { font-family: var(--f-mono); font-size: 12px; color: var(--blue-hi); margin-top: -8px; }
#fmsg:empty { display: none; }
@media (max-width: 860px) { .contact { grid-template-columns: minmax(0, 1fr); } .row2 { grid-template-columns: minmax(0, 1fr); } }

/* footer: brand column, two link columns, contact column, then a bottom bar */
.site-ft { position: relative; background: var(--bg-2); border-top: 1px solid var(--line); padding-block: clamp(56px, 7vw, 88px) calc(28px + env(safe-area-inset-bottom, 0px)); overflow: hidden; isolation: isolate; }
.site-ft::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse 60% 90% at 0% 0%, #000, transparent 70%); mask-image: radial-gradient(ellipse 60% 90% at 0% 0%, #000, transparent 70%); opacity: .7; }
.site-ft::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--blue), transparent); }
.ft { display: grid; gap: clamp(40px, 5vw, 64px); color: var(--muted); font-size: 15px; }
.ft-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px clamp(24px, 4vw, 56px); }
.ft-brand { display: grid; gap: 20px; align-content: start; justify-items: start; }
.ft-brand p { max-width: 36ch; line-height: 1.7; }
.ft-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.ft-cta .btn { font-size: 12.5px; padding: 11px 18px; }
.ft-col h3 { font-size: 12px; font-weight: 500; margin-bottom: 20px; }
.ft-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ft-col > ul > li > a { position: relative; display: inline-block; transition: color .2s, transform .2s; }
.ft-col > ul > li > a:hover { color: var(--fg); transform: translateX(4px); }
.ft-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.ft-bar .legal { font-size: 13px; }
.ft-top { font-size: 11.5px; color: var(--muted); transition: color .2s; }
.ft-top:hover { color: var(--blue-hi); }
@media (max-width: 980px) { .ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ft-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .ft-grid { grid-template-columns: minmax(0, 1fr); } .ft-bar { flex-direction: column; align-items: flex-start; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .track { animation: none; }
  .rv { opacity: 1; transform: none; }
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn:disabled { opacity: .5; cursor: wait; }

/* shared header: current page */
.hdr-in .btn.hdr-cta { white-space: nowrap; }

/* inner page banner */
.page-hero { padding-block: 140px 64px; }
.hero.page-hero h1 { font-size: clamp(40px, 7vw, 88px); text-transform: uppercase; font-weight: 700; line-height: .95; }
.page-hero .crumb { margin-bottom: 18px; }
.page-hero .crumb a { transition: color .2s; }
.page-hero .crumb a:hover { color: var(--blue-hi); }
.page-hero .crumb span { color: var(--muted); padding-inline: 6px; }

/* home: page tiles and closing call to action */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tile { background: var(--bg); padding: 28px 24px 26px; display: flex; flex-direction: column; gap: 12px; min-height: 230px; transition: background .3s; }
.tile h3 { font-size: 26px; text-transform: uppercase; font-weight: 700; }
.tile p { color: var(--muted); font-size: 14.5px; }
.tile .go { margin-top: auto; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); transition: transform .3s; }
.tile:hover { background: var(--panel); }
.tile:hover .go { transform: translateX(6px); }
.cta-band { padding-block: clamp(64px, 9vw, 110px); }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; justify-content: space-between; }
.cta-band h2 { font-size: clamp(30px, 5vw, 60px); text-transform: uppercase; font-weight: 700; }
.cta-band h2 em { font-style: normal; color: var(--blue); }
@media (max-width: 980px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles { grid-template-columns: minmax(0, 1fr); } .tile { min-height: 0; } }

/* footer contact info */
.ft-info ul { gap: 18px; }
.ft-info li { display: grid; gap: 4px; justify-items: start; }
.ft-info .ft-k { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); opacity: .8; }
.ft-info address { margin: 0; font-style: normal; line-height: 1.6; color: var(--fg); }
.ft-info a { color: var(--fg); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; transition: border-color .2s, color .2s; }
.ft-info a:hover { color: var(--blue-hi); border-color: var(--blue); }
.ft-info .sel { color: var(--fg); user-select: all; overflow-wrap: anywhere; }

/* phone: WhatsApp or call chooser */
.phone { position: relative; display: inline-block; }
.phone-btn { font: inherit; color: var(--fg); background: none; border: 0; border-bottom: 1px solid var(--line); padding: 0; cursor: pointer; transition: color .2s, border-color .2s; }
.phone-btn:hover, .phone-btn[aria-expanded="true"] { color: var(--blue-hi); border-color: var(--blue); }
.phone-menu { position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 20; display: grid; min-width: 210px; background: var(--panel); border: 1px solid var(--blue-lo); box-shadow: 0 12px 40px var(--shadow); }
.phone-menu[hidden] { display: none; }
.phone-menu a { display: block; padding: 13px 16px; font-size: 15px; color: var(--fg); border: 0; transition: background .2s, color .2s; }
.phone-menu a + a { border-top: 1px solid var(--line); }
.phone-menu a:hover, .phone-menu a:focus-visible { background: rgba(var(--blue-rgb), .14); color: var(--blue-hi); }

/* contact buttons: WhatsApp = solid blue, email = solid white */
.btn.mail { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn.mail:hover { background: var(--blue-hi); border-color: var(--blue-hi); color: var(--on-blue); }

/* portfolio pictures */
.thumb img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.card:hover .thumb img { transform: scale(1.05); }

/* header wordmark */
.brand .wm { display: inline-flex; align-items: baseline; gap: .12em; font-family: "Orbitron", "Chakra Petch", "Segoe UI", sans-serif; font-weight: 800; font-size: 21px; line-height: 1; letter-spacing: .06em; }
.brand .wm b { font-weight: 800; color: var(--wm-v); }
.brand .wm i { font-style: normal; background: linear-gradient(90deg, var(--gw1) 0%, var(--gw2) 45%, var(--gw3) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--gw-solid); }
@media (max-width: 420px) { .brand .wm { font-size: 18px; } }

/* the word GRID in headings uses the wordmark gradient */
.hero h1 em, .about h2 em, .contact h2 em, .cta-band h2 em { background: linear-gradient(90deg, var(--gw1) 0%, var(--gw2) 45%, var(--gw3) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--gw-solid); text-shadow: none; }

.brand svg g { fill: var(--blue); }

/* about logo: blue outline draws, then the grid-colour outline draws, then both blend into the filled mark */
.about-mark path { fill: none; stroke: none; }
.about-mark .lg path { stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 2400; stroke-dashoffset: 2400; animation-duration: 9s; animation-iteration-count: infinite; animation-timing-function: cubic-bezier(.5,.1,.3,1); animation-fill-mode: both; }
.about-mark .lg-blue path { stroke: var(--blue); animation-name: lgBlue; }
.about-mark .lg-sage path { stroke: url(#lgSage); animation-name: lgSage; }
.about-mark .lg-fill path { fill: url(#lgMix); stroke: none; stroke-dasharray: none; stroke-dashoffset: 0; opacity: 0; animation-name: lgFill; animation-timing-function: ease-in-out; }
.about-mark .lg-fill { filter: drop-shadow(0 0 18px rgba(var(--blue-rgb), .45)); }
.about-mark:not(.go) .lg path { animation-play-state: paused; }
@keyframes lgBlue { 0% { stroke-dashoffset: 2400; opacity: 1; } 28% { stroke-dashoffset: 0; opacity: 1; } 84% { stroke-dashoffset: 0; opacity: 1; } 94%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes lgSage { 0%, 30% { stroke-dashoffset: 2400; opacity: 1; } 58% { stroke-dashoffset: 0; opacity: 1; } 84% { stroke-dashoffset: 0; opacity: 1; } 94%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes lgFill { 0%, 56% { opacity: 0; } 72% { opacity: 1; } 90% { opacity: 1; } 98%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .about-mark .lg path { animation: none !important; } .about-mark .lg-fill path { opacity: 1; } .about-mark .lg-blue path, .about-mark .lg-sage path { stroke-dashoffset: 0; } }

/* home hero: text on the left, the animated logo on the right */
.hero:not(.page-hero) .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: center; }
.hero-logo { position: relative; top: auto; justify-self: center; width: 100%; max-width: 460px; }
@media (max-width: 860px) {
  .hero:not(.page-hero) .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-logo { order: -1; justify-self: start; max-width: 170px; }
}

/* iOS-style glass header */
.hdr, .hdr.stuck {
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  background-color: rgba(20,24,32,.30);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 32px rgba(0,0,0,.25);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hdr, :root:not([data-theme="dark"]) .hdr.stuck {
    background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.35));
    background-color: rgba(255,255,255,.35);
    border-bottom-color: rgba(255,255,255,.7);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 32px rgba(40,70,120,.14);
  }
}
:root[data-theme="light"] .hdr, :root[data-theme="light"] .hdr.stuck {
  background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.35));
  background-color: rgba(255,255,255,.35);
  border-bottom-color: rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 32px rgba(40,70,120,.14);
}
.menu-btn { border-radius: 12px; background: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
@media (max-width: 860px) {
  .nav { background: var(--menu-bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; }
}

/* portfolio detail popup */
.card { cursor: pointer; }
.card .more { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-top: 6px; }
.pm { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.6); overflow-y: auto; }
.pm[hidden] { display: none; }
.pm-box { position: relative; width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--line); padding: 32px 28px 28px; color: var(--fg); animation: optin .3s ease; }
.pm-box h3 { font-size: 26px; text-transform: uppercase; font-weight: 600; margin: 10px 0 4px; }
.pm-box h4 { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin: 20px 0 6px; font-weight: 500; }
.pm-box p, .pm-box li { color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.pm-box ol { margin: 0; padding-left: 20px; }
.pm-box .btn { margin-top: 24px; display: inline-block; }
.pm-tag { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); border: 1px solid var(--line); padding: 4px 8px; }
.pm-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; background: none; border: 1px solid var(--line); color: var(--fg); cursor: pointer; }

/* intro splash: logo draws in blue, then the grid colour, then blends; then reveals the home page */
.splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); animation: spOut .6s ease 3.6s forwards; }
.splash-in { width: min(70vw, 380px); text-align: center; }
.splash svg { width: 100%; height: auto; display: block; overflow: visible; }
.splash path { fill: none; stroke: none; }
.splash .sp path { stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 2400; stroke-dashoffset: 2400; animation-duration: 3.4s; animation-fill-mode: both; animation-timing-function: cubic-bezier(.5,.1,.3,1); }
.splash .sp-blue path { stroke: var(--blue); animation-name: spBlue; }
.splash .sp-sage path { stroke: url(#spSage); animation-name: spSage; }
.splash .sp-fill path { fill: url(#spMix); stroke: none; stroke-dasharray: none; stroke-dashoffset: 0; opacity: 0; animation-name: spFill; animation-timing-function: ease-in-out; }
.splash .sp-fill { filter: drop-shadow(0 0 18px rgba(var(--blue-rgb), .45)); }
.splash-tag { margin-top: 22px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); opacity: 0; animation: spTag .8s ease 2s forwards; }
@keyframes spBlue { 0% { stroke-dashoffset: 2400; } 40% { stroke-dashoffset: 0; opacity: 1; } 85%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes spSage { 0%, 25% { stroke-dashoffset: 2400; } 65% { stroke-dashoffset: 0; opacity: 1; } 85%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes spFill { 0%, 55% { opacity: 0; } 80%, 100% { opacity: 1; } }
@keyframes spTag { to { opacity: 1; } }
@keyframes spOut { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .splash { animation-delay: .6s; } .splash .sp path { animation: none; } .splash .sp-fill path { opacity: 1; } .splash-tag { animation: none; opacity: 1; } }

/* stop reveal-from-right animations causing sideways scroll on phones */
html, body { overflow-x: clip; }
