/* Five Eye — brand design system.
   White pages with light blue-tinted bands, the logo's blue and green, and real
   contour artwork tinted in brand colours. Type is Archivo throughout.
   Motion: headings rise word by word, real contour lines draw themselves, a GIS
   layer stack follows the services, and card images wipe in. */

:root {
  --paper: #ffffff;
  --paper-2: #f1f5fa;
  --card: #ffffff;
  --ink: #0f2545;
  --body: #475569;
  --muted: #6b7a8c;
  --line: #dbe3ee;
  --line-soft: #e8eef5;
  --blue: #1d4e96;
  --blue-d: #133a75;
  --blue-l: #b5cdee;
  --green: #5c9a2e;
  --green-d: #3f7020;
  --contour: #1d4e96;
  --red: #c8402a;

  --font: 'Archivo', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --r: 4px;
  --r-lg: 8px;
  --wrap: 1280px;
  --gutter: 32px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.7, 0, 0.2, 1);
}

/* ---------- base ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 17px;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--blue); color: var(--paper); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.icon { flex: none; }
.mono { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; color: inherit; }

/* ---------- animated type ---------- */
/* Words rise out of a mask, staggered (SplitText.astro + data-type). */
[data-type] .w,
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.04em 0.14em; margin: 0 -0.04em -0.14em; }
[data-type] .w > span { display: inline-block; transform: translateY(115%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 60ms + 80ms); }
[data-type].in .w > span { transform: none; }

/* Hover roll: each letter slides up to its twin (Roll.astro). */
.roll { display: inline-flex; overflow: hidden; vertical-align: bottom; line-height: 1.2; }
.roll .l { position: relative; display: inline-block; white-space: pre; transition: transform 0.5s var(--ease-io); transition-delay: calc(var(--i) * 14ms); }
.roll .l::after { content: attr(data-t); position: absolute; left: 0; top: 100%; }
a:hover .roll .l, button:hover .roll .l, a:focus-visible .roll .l { transform: translateY(-100%); }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 22px; border-radius: var(--r);
  font-weight: 600; font-size: 15px; line-height: 1;
  background: var(--ink); color: var(--paper);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.btn:hover { background: var(--blue); }
/* The arrow slides out to the right and a fresh one slides in from the left. */
.btn:hover .icon, .link-arrow:hover .icon { animation: arrow-swap 0.6s var(--ease); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; color: var(--blue); }
.btn[disabled] { opacity: 0.6; pointer-events: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; padding-bottom: 6px; font-weight: 600; font-size: 15px; color: var(--ink); border-bottom: 1px solid var(--ink); transition: color 0.2s, border-color 0.2s; }
.link-arrow:hover { color: var(--blue); border-color: var(--blue); }

/* ---------- header ---------- */
.hd { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.hd.s { border-color: var(--line); }
.hd-bar { position: relative; display: flex; align-items: center; gap: 24px; height: 80px; }
.logo img { height: 40px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav a.n { position: relative; padding: 10px 14px; font-weight: 500; font-size: 15.5px; color: var(--body); transition: color 0.2s; }
.nav a.n:hover, .nav a.n.on { color: var(--ink); }
.nav a.n::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1.5px; background: var(--blue); transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.nav a.n.on::after { transform: scaleX(1); transform-origin: left; }
.nav .btn { margin-left: 16px; padding: 13px 18px; }
.burger { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: var(--r); place-items: center; color: var(--ink); }
.burger:hover { background: var(--paper-2); }
#pb { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--blue); z-index: 60; }


/* ---------- contour artwork (SVG used as a mask, tinted per context) ---------- */
.topo { position: absolute; inset: 0; pointer-events: none; background: var(--contour); opacity: 0.14; -webkit-mask: var(--topo) center / cover no-repeat; mask: var(--topo) center / cover no-repeat; }

/* Real contours that trace themselves in (TopoDraw.astro). Each contour draws
   from its start at the same speed, so short rings close first and long ridges
   keep growing. */
.topo-draw { position: absolute; z-index: -1; pointer-events: none; fill: none; stroke: var(--blue); stroke-linejoin: round; stroke-linecap: round; }
.topo-draw path { stroke-dasharray: 5000 5000; stroke-dashoffset: 5000; transition: stroke-dashoffset 6s cubic-bezier(0.25, 0.1, 0.25, 1); }
.topo-draw .minor { stroke-width: 0.6; opacity: 0.3; }
.topo-draw .major { stroke-width: 1.1; opacity: 0.5; stroke: var(--green); transition-delay: 0.9s; }
.topo-draw.in path { stroke-dashoffset: 0; }
.hero-topo, .ph-topo { top: 0; right: 0; width: 58%; height: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); }
/* The hero's contours fade out at the bottom too, so they dissolve into the map below. */
.hero-topo {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%), linear-gradient(180deg, #000 45%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 45%), linear-gradient(180deg, #000 45%, transparent 100%);
  mask-composite: intersect;
  animation: float 40s ease-in-out infinite alternate;
}
.ph-topo {
  opacity: 0.75;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%), linear-gradient(180deg, #000 40%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 45%), linear-gradient(180deg, #000 40%, transparent 100%);
  mask-composite: intersect;
}
.hero-topo .minor { transform: translate3d(calc(var(--mx, 0) * -10px), calc(var(--my, 0) * -8px), 0); }
.hero-topo .major { transform: translate3d(calc(var(--mx, 0) * -24px), calc(var(--my, 0) * -18px), 0); }
.cta-topo { inset: 0; width: 100%; height: 100%; stroke: #fff; -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent 92%); mask-image: linear-gradient(180deg, #000 35%, transparent 92%); }
.cta-topo .major { stroke: #fff; }
.cta-topo .minor { opacity: 0.16; }
.cta-topo .major { opacity: 0.3; }
.nf-topo { inset: 0; width: 100%; height: 100%; }

/* ---------- home hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(72px, 12vh, 132px) 0 clamp(64px, 9vh, 104px); }
.hero .wrap { position: relative; }
.hero-title .hl { color: var(--green); }
.hero-sub { max-width: 46ch; margin-top: 28px; font-size: 18px; line-height: 1.6; color: var(--body); animation: up 1s var(--ease) 0.55s backwards; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; animation: up 1s var(--ease) 0.7s backwards; }
.hero-title { font-size: clamp(38px, 5.4vw, 74px); font-weight: 700; line-height: 1.06; letter-spacing: -0.03em; }
.hero-title .ln { display: block; }
.hero-title .ln:nth-child(2) { color: var(--blue); }

/* Map figure: opens from the text column to full bleed as it scrolls up. */

/* ---------- figures (stats) ---------- */
.figures { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.fig-n { padding: 32px 32px 8px 0; }
.fig-n + .fig-n { padding-left: 32px; border-left: 1px solid var(--line); }
.fig-n strong::after { content: ''; display: block; width: min(140px, 60%); height: 2px; margin-top: 14px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease) 0.1s; }
.fig-n.in strong::after { transform: none; }
.fig-n strong { display: block; font-size: clamp(42px, 4.4vw, 60px); font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--blue); font-variant-numeric: tabular-nums; }
.fig-n > span { display: block; margin-top: 10px; font-weight: 600; font-size: 17px; }
.fig-n p { margin-top: 6px; font-size: 15px; color: var(--body); max-width: 34ch; }

/* ---------- sections ---------- */
.section { padding: 128px 0; }
.section + .section:not(.section-tint) { padding-top: 0; }
.section.section-tint + .section { padding-top: 128px; }
.section-tint { background: linear-gradient(180deg, var(--paper) 0, var(--paper-2) 140px, var(--paper-2) calc(100% - 140px), var(--paper) 100%); }
.sh { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 56px; }
.sh h2, .split-head h2 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.15; margin-top: 14px; max-width: 20ch; }
.sh h2[data-type]::after, .split-head h2[data-type]::after { content: ''; display: block; width: 64px; height: 2px; margin-top: 20px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease) 0.55s; }
.sh h2[data-type].in::after, .split-head h2[data-type].in::after { transform: none; }
.sh p { max-width: 460px; color: var(--body); }

/* services index (home) */
.split-head { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
.sticky { position: sticky; top: 128px; }
.sticky h2 { margin-bottom: 30px; }
.svc-list { list-style: none; border-bottom: 1px solid var(--line); }
.svc-row { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) 48px; gap: 20px; align-items: center; padding: 28px 0; border-top: 1px solid var(--line); overflow: hidden; }
.svc-art {
  position: absolute; top: 0; right: 0; bottom: 0; width: 60%; background: var(--green); opacity: 0;
  -webkit-mask: var(--topo) center / cover no-repeat, linear-gradient(90deg, transparent, #000);
  -webkit-mask-composite: source-in;
  mask: var(--topo) center / cover no-repeat, linear-gradient(90deg, transparent, #000);
  mask-composite: intersect;
  transition: opacity 0.6s;
}
.svc-row:hover .svc-art { opacity: 0.4; }
.svc-ic { position: relative; align-self: start; width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); color: var(--blue); transition: background 0.3s, color 0.3s; }
.svc-row:hover .svc-ic { background: var(--blue); color: #fff; }
.sh-lead { max-width: 40ch; color: var(--body); margin-top: -16px; }
.svc-main { position: relative; display: flex; flex-direction: column; gap: 10px; transition: transform 0.6s var(--ease); }
.svc-row:hover .svc-main { transform: translateX(10px); }
.svc-t { font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; transition: color 0.3s; }
.svc-row:hover .svc-t { color: var(--blue); }
.svc-d { max-width: 52ch; font-size: 15.5px; color: var(--body); }
.svc-go { position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.5s var(--ease); }
.svc-row:hover .svc-go { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: rotate(45deg); }

/* big drifting type band */

/* GIS layer stack (LayerStack.astro) */
.stack { --spread: 0; position: relative; height: 420px; margin: 8px 0 20px; perspective: 1400px; }
.stack-3d { position: absolute; left: 50%; top: 66%; width: 210px; height: 210px; margin: -105px 0 0 -105px; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-42deg); }
.plate {
  --z: calc(var(--k) * (12px + var(--spread) * 46px));
  position: absolute; inset: 0; border-radius: 8px; overflow: hidden;
  background: rgba(255, 255, 255, 0.92); border: 1px solid #c9d5e3; color: #8299b5; box-shadow: -6px 6px 16px rgba(15, 37, 69, 0.06);
  transform: translateZ(var(--z));
  transition: transform 0.8s var(--ease), border-color 0.4s, color 0.4s, box-shadow 0.6s;
}
.plate svg { position: absolute; inset: 14%; width: 72%; height: 72%; }
.plate-topo { position: absolute; inset: 0; background: currentColor; opacity: 0.9; -webkit-mask: var(--topo) center / cover no-repeat; mask: var(--topo) center / cover no-repeat; }
.stack[data-active='0'] [data-layer='0'],
.stack[data-active='1'] [data-layer='1'],
.stack[data-active='2'] [data-layer='2'],
.stack[data-active='3'] [data-layer='3'] { transform: translateZ(calc(var(--z) + 28px)); border-color: var(--blue); color: var(--blue); box-shadow: -22px 22px 40px rgba(15, 37, 69, 0.16); }
.stack[data-active='0'] [data-layer='0'] { color: var(--green); border-color: var(--green); }

/* industries */
.ind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.tile { display: flex; flex-direction: column; gap: 22px; }
.tile-art { position: relative; height: 240px; border-radius: var(--r); background: var(--paper-2); overflow: hidden; }
.tile-art .topo { opacity: 0.16; transition: transform 1.4s var(--ease); }
.tile:hover .tile-art .topo { transform: scale(1.08); }
.tile-art svg.motif { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile-body { border-top: 1px solid var(--ink); padding-top: 18px; }
.tile-body h3 { font-size: 21px; margin-bottom: 10px; }
.tile-body p { font-size: 15.5px; color: var(--body); }
.motif .draw { stroke-dasharray: 700; stroke-dashoffset: 700; transition: stroke-dashoffset 2s var(--ease); }
.tile:hover .motif .draw, .tile.in .motif .draw { stroke-dashoffset: 0; }
.motif .pop { transform-box: fill-box; transform-origin: center; transform: scale(0) rotate(-90deg); transition: transform 0.6s var(--ease) 0.7s; }
.tile.in .motif .pop, .tile:hover .motif .pop { transform: none; }

/* clients */
.mq { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.mq .tr { display: flex; width: max-content; animation: mq 80s linear infinite; }
.mq:hover .tr { animation-play-state: paused; }
.mq .tr > div[aria-hidden] { display: contents; }
.cl { display: flex; align-items: center; gap: 16px; padding: 18px 36px 18px 0; }
.mq .cl { flex: none; margin-right: 36px; border-right: 1px solid var(--line); }
.cl-mark { flex: none; width: 52px; height: 52px; border-radius: var(--r); display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--blue); font: 700 15px/1 var(--font); overflow: hidden; }
.cl-mark img { width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #fff; }
.cl-text { min-width: 0; }
.cl-text b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.cl-text small { display: flex; align-items: center; gap: 5px; margin-top: 2px; font: 400 13.5px/1.4 var(--font); color: var(--muted); }
.clients { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.clients .cl { padding: 22px 16px 22px 0; border-bottom: 1px solid var(--line); }

/* media (uploaded images, or tinted contour placeholders) */
.card { position: relative; }
.media { position: relative; overflow: hidden; border-radius: var(--r); background-color: var(--paper-2); background-size: cover; background-position: center; }
.media.photo { transition: transform 1.2s var(--ease); }
.topo-media::before { content: ''; position: absolute; inset: 0; background: var(--contour); opacity: 0.22; -webkit-mask: var(--topo) center / 150% no-repeat; mask: var(--topo) center / 150% no-repeat; transition: transform 1.4s var(--ease); }
.card:hover .topo-media::before { transform: scale(1.1); }
.media-tag { position: absolute; top: 12px; left: 12px; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 24px); }
.legend { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 3px; font: 600 13px/1 var(--font); color: var(--ink); background: var(--card); }

/* project cards */
.proj { display: flex; flex-direction: column; cursor: pointer; text-align: left; }
.proj .media { aspect-ratio: 4 / 3; }
.proj-body { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; flex: 1; }
.proj h3 { font-size: 19px; line-height: 1.2; letter-spacing: -0.015em; transition: color 0.2s; }
.proj:hover h3 { color: var(--blue); }
.proj p { font-size: 15px; color: var(--body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.proj-client { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 8px; font: 400 14px/1.4 var(--font); font-style: normal; color: var(--muted); }
.out { display: none !important; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 32px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 40px; }
.carousel-nav { display: flex; gap: 10px; }
.carousel-nav button { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink); transition: background 0.2s, color 0.2s, border-color 0.2s; }
.carousel-nav button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
#car .proj:nth-child(n + 4) { display: none; }

/* category tabs */
.layers { position: relative; display: flex; flex-wrap: wrap; gap: 4px 28px; margin-bottom: 48px; border-bottom: 1px solid var(--line); }
.tab-ink { position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--blue); transition: transform 0.55s var(--ease), width 0.55s var(--ease); pointer-events: none; }
.layers button { position: relative; padding: 14px 0; font-weight: 500; font-size: 15.5px; color: var(--muted); transition: color 0.2s; }
.layers button:hover { color: var(--ink); }
.layers button.on { color: var(--ink); }
.empty { text-align: center; color: var(--muted); padding: 40px 0 10px; font-size: 15px; }

/* services page */
.sv { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; padding: 64px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.sv:first-child { border-top: 0; padding-top: 0; }
.sv.rev .sv-art { order: 2; }
.sv-art { min-height: 420px; display: grid; place-items: center; }
.sv-art::before { content: ''; position: absolute; inset: 0; background: var(--green); opacity: 0.3; -webkit-mask: var(--topo) center / 150% no-repeat; mask: var(--topo) center / 150% no-repeat; transition: transform 1.6s var(--ease); }
.sv:hover .sv-art::before { transform: scale(1.06) rotate(1deg); }
.sv.gr .sv-art::before { background: var(--blue); opacity: 0.22; }
.sv-art .big-icon { position: relative; width: 104px; height: 104px; border-radius: var(--r); display: grid; place-items: center; background: var(--card); border: 1px solid var(--ink); color: var(--blue); transition: transform 0.6s var(--ease); }
.sv:hover .big-icon { transform: translateY(-6px); }
.sv-body { padding-top: 8px; }
.sv-tag { font-weight: 600; font-size: 14px; color: var(--green-d); }
.sv-body h3 { font-size: clamp(26px, 2.8vw, 36px); margin: 16px 0 18px; }
.sv-body > p { color: var(--body); font-size: 17px; line-height: 1.7; }
.sv-body h4 { margin: 32px 0 6px; font: 600 14px/1 var(--font); color: var(--muted); }
.caps { list-style: none; }
.caps li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--ink); line-height: 1.5; }
.caps .icon { margin-top: 1px; color: var(--green); }

/* about */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 28px; }
.mem-photo { aspect-ratio: 4 / 5; display: grid; place-items: center; }
.mem-initials { position: relative; font-size: 52px; font-weight: 700; letter-spacing: -0.03em; color: var(--blue); transition: transform 0.6s var(--ease); }
.mem:hover .mem-initials { transform: scale(1.08); }
.mem-body { padding-top: 16px; }
.mem h3 { font-size: 20px; letter-spacing: -0.01em; }
.mem p { font: 400 14px/1.5 var(--font); color: var(--muted); margin-top: 4px; }
/* Staff verification page (QR code on ID cards) */
.staff-card { max-width: 280px; margin-top: 8px; }
.staff-card .chip { margin-top: 14px; font-size: 13px; }

/* blog list */
.bl { display: flex; flex-direction: column; }
.bl .media { aspect-ratio: 16 / 10; }
.bl-body { display: flex; flex-direction: column; gap: 12px; padding-top: 22px; flex: 1; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font: 400 14px/1.3 var(--font); color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 7px; }
.bl h3 { font-size: 23px; line-height: 1.15; }
.bl h3 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 0.5s var(--ease); }
.bl h3 a:hover { background-size: 100% 1.5px; }
.bl p { color: var(--body); font-size: 15.5px; flex: 1; }
.bl .btn { align-self: flex-start; padding: 0 0 6px; background: none; color: var(--ink); border-bottom: 1px solid var(--ink); border-radius: 0; }
.bl .btn:hover { color: var(--blue); border-color: var(--blue); }

/* blog post */
.post-hero h1 { max-width: 22ch; }
.post-hero .meta { margin-top: 4px; }
.post-hero .meta b { color: var(--ink); font-weight: 500; }
.post-tags { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags .legend { border: 1px solid var(--line); }
.post-cover { max-width: 1080px; margin: 56px auto 0; padding: 0 var(--gutter); }
.post-cover .media { height: min(540px, 56vw); }
.post-body { max-width: 740px; margin: 0 auto; padding: 64px var(--gutter) 40px; }

/* rich text */
.prose { color: var(--body); font-size: 18px; line-height: 1.8; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: 30px; color: var(--ink); margin-top: 1.8em; }
.prose h3 { font-size: 25px; color: var(--ink); margin-top: 1.7em; }
.prose h4 { font-size: 20px; color: var(--ink); margin-top: 1.5em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.5em; }
.prose > :first-child { margin-top: 0; }
.prose strong { color: var(--ink); }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--green); }
.prose blockquote { border-left: 2px solid var(--blue); padding: 4px 0 4px 24px; font-size: 22px; line-height: 1.4; color: var(--ink); }
.prose img { border-radius: var(--r); }
.prose pre { background: var(--ink); color: var(--paper); border-radius: var(--r); padding: 16px 18px; overflow: auto; font: 14px/1.6 var(--font-mono); }
.prose code { font-family: var(--font-mono); font-size: 0.9em; }
.prose hr { border: 0; border-top: 1px solid var(--line); }
.legal { max-width: 820px; margin: 64px auto 110px; padding: 0 var(--gutter); }

/* closing call to action */
/* Deepens from brand blue into the footer's navy, so the two read as one surface. */
.cta-big { position: relative; overflow: hidden; isolation: isolate; padding: 110px 0 150px; background: linear-gradient(180deg, var(--blue) 0%, var(--blue) 40%, var(--ink) 100%); color: var(--paper); }
.cta-big h2 { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.1; letter-spacing: -0.03em; max-width: 20ch; margin: 18px 0 40px; }

/* contact */
.ct { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: start; }
.ct-info { border-top: 1px solid var(--ink); padding-top: 28px; display: flex; flex-direction: column; }
.ct-info h2 { font-size: clamp(28px, 3vw, 38px); margin: 16px 0 16px; }
.ct-info > p { color: var(--body); }
.ct-list { list-style: none; margin: 32px 0; border-top: 1px solid var(--line); }
.ct-list li a, .ct-list li > span { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 17px; transition: color 0.2s, padding 0.4s var(--ease); }
.ct-list li a:hover { color: var(--blue); padding-left: 8px; }
.ct-list .icon { color: var(--blue); }
.ct-list small { display: block; font: 400 13px/1.2 var(--font); color: var(--muted); margin-bottom: 4px; }
.soc { display: flex; align-items: center; gap: 10px; font: 600 13.5px/1 var(--font); color: var(--muted); }
.soc a { width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink); transition: background 0.2s, color 0.2s, border-color 0.2s; }
.soc a:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.form { padding: 44px 40px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.form h2 { font-size: 26px; margin-bottom: 28px; }
.field { margin-bottom: 22px; }
.field label { display: block; font: 600 13.5px/1 var(--font); color: var(--muted); margin-bottom: 10px; }
.field input, .field textarea { width: 100%; font: inherit; font-size: 17px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); transition: border-color 0.2s; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); }
.field .bad { border-color: var(--red); }
.form .btn { width: 100%; justify-content: center; padding: 18px 22px; font-size: 16px; margin-top: 8px; }
.ok, .err { display: none; border-radius: var(--r); padding: 14px 16px; margin-top: 16px; font-weight: 500; font-size: 15px; }
.ok { background: #e6f1dc; color: var(--green-d); }
.ok-check { width: 20px; height: 20px; margin-right: 8px; vertical-align: -4px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ok-check path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-in 0.7s var(--ease) 0.15s forwards; }
.err { background: #f8e4df; color: #9d2c1b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ct-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.ct-map { position: relative; height: 480px; margin-top: 64px; border-radius: var(--r-lg); overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); }

/* 404 / 500 */
.nf { position: relative; overflow: hidden; min-height: calc(100svh - 80px); display: flex; align-items: center; padding: 80px 0; }
.nf .wrap { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.nf h1 { font-size: clamp(36px, 4.4vw, 60px); margin: 16px 0 20px; }
.nf .lead { color: var(--body); font-size: 19px; max-width: 36ch; margin-bottom: 32px; }
.nf-code { font-size: clamp(110px, 16vw, 220px); font-weight: 800; line-height: 0.9; letter-spacing: -0.05em; color: var(--blue); animation: up 1.2s var(--ease) backwards; }

/* inner page hero */
.page-hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(64px, 10vh, 112px) 0 clamp(56px, 8vh, 88px); background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.page-hero h1 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 28px; max-width: 18ch; }
.page-hero.wide h1 { font-size: clamp(32px, 4.2vw, 54px); max-width: 22ch; }
.ph-body { max-width: 1000px; animation: up 1s var(--ease) 0.45s backwards; }
.ph-body:empty { display: none; }
.ph-body:has(> .lead + .lead) { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; }
.page-hero .lead { max-width: 60ch; color: var(--body); font-size: 17px; line-height: 1.7; }
.chip-row { grid-column: 1 / -1; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: var(--r); font: 400 14px/1.3 var(--font); border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.chip .icon { color: var(--blue); }

/* footer: navy, with Kathmandu's contours drawing in behind */
.ft { position: relative; overflow: hidden; isolation: isolate; padding: 104px 0 0; background: var(--ink); color: #c9d6e8; }
.ft-topo { inset: 0; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 42%, transparent 90%); mask-image: linear-gradient(180deg, transparent, #000 22%, #000 42%, transparent 90%); }
.ft-topo .minor { stroke: var(--blue-l); opacity: 0.12; }
.ft-topo .major { opacity: 0.28; }
.ft-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: end; padding-bottom: 72px; border-bottom: 1px solid rgba(181, 205, 238, 0.16); }
.ft-tag { font-size: clamp(32px, 4.2vw, 56px); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; color: #fff; }
.ft-tag .ln { display: block; }
.ft-tag .ln:nth-child(2) { color: var(--blue-l); }
.ft-tag .hl { color: #8cc65a; }
.ft-reach { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ft-big { font-size: clamp(20px, 2vw, 26px); font-weight: 600; color: #fff; letter-spacing: -0.01em; padding-bottom: 4px; background: linear-gradient(#8cc65a, #8cc65a) 0 100% / 0 2px no-repeat; transition: background-size 0.5s var(--ease); }
.ft-big:hover { background-size: 100% 2px; }
.ft-reach .btn { margin-top: 18px; }
.ft-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 1.2fr 1.1fr; gap: 48px; padding: 64px 0 72px; }
.ft-logo { display: inline-flex; align-items: center; gap: 14px; color: #fff; }
.ft-mark { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: #fff; }
.ft-mark img { width: 40px; height: 40px; }
.ft-logo b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.ft-logo small { display: block; font-size: 13.5px; color: #93a7c2; }
.ft-brand p { margin-top: 22px; max-width: 30ch; font-size: 15.5px; color: #c9d6e8; }
.ft-soc { display: flex; gap: 10px; margin-top: 24px; }
.ft-soc a { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; border: 1px solid rgba(181, 205, 238, 0.25); color: #fff; transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.4s var(--ease); }
.ft-soc a:hover { background: #8cc65a; border-color: #8cc65a; color: var(--ink); transform: translateY(-3px); }
.ft h2 { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 20px; }
.ft ul { list-style: none; display: grid; gap: 11px; }
.ft ul a, .ft ul span { font-size: 15px; color: #a9bad1; transition: color 0.2s; }
.ft ul a:hover { color: #fff; }
.collar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 24px 0 30px; border-top: 1px solid rgba(181, 205, 238, 0.16); font-size: 14px; color: #93a7c2; }
.ft-up { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 500; }
.ft-up .icon { transition: transform 0.4s var(--ease); }
.ft-up:hover .icon { transform: translateY(-3px); }

/* ---------- modal, toast, back-to-top ---------- */
#md { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(22, 32, 46, 0.55); }
#md.on { display: flex; animation: fade 0.25s; }
#md .box { position: relative; width: 100%; max-width: 680px; max-height: calc(100vh - 40px); overflow: auto; background: var(--card); border-radius: var(--r-lg); animation: rise 0.5s var(--ease); }
#md .media { height: 280px; border-radius: 0; }
#md .bd { padding: 30px 34px 34px; }
#md h3 { font-size: 26px; margin-bottom: 12px; }
#md p { color: var(--body); margin-bottom: 16px; }
#md em { display: block; font: 400 14.5px/1.4 var(--font); font-style: normal; color: var(--muted); margin-bottom: 24px; }
#md .x { position: absolute; top: 14px; right: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--ink); transition: background 0.2s, color 0.2s, transform 0.4s var(--ease); }
#md .x:hover { background: var(--ink); color: var(--paper); transform: rotate(90deg); }
#toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translate(-50%, 140px); padding: 14px 22px; border-radius: var(--r); background: var(--ink); color: var(--paper); font-weight: 500; transition: transform 0.5s var(--ease); }
#toast.on { transform: translate(-50%, 0); }
#top { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity 0.3s, transform 0.4s var(--ease), background 0.2s; }
#top.on { opacity: 1; transform: none; pointer-events: auto; }
#top.on.off { opacity: 0; transform: translateY(16px); pointer-events: none; }
#top:hover { background: var(--blue); }
#top .ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; }
#top .ring circle { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--progress, 0)); }

/* ---------- page transitions (native View Transitions; ignored where unsupported) ---------- */
@view-transition { navigation: auto; }
.hd { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out 0.3s ease both; }
::view-transition-new(root) { animation: vt-in 0.55s var(--ease) both; }
/* A project card's image grows into the popup (site.ts names both ends). */
::view-transition-group(proj-media) { animation-duration: 0.55s; animation-timing-function: var(--ease); }

/* ---------- line icons trace themselves when their row or section enters ---------- */
.svc-ic .icon *, .sv .big-icon .icon *, .sv .caps .icon * { stroke-dasharray: 90; stroke-dashoffset: 90; transition: stroke-dashoffset 1.4s var(--ease) 0.3s; }
li.in .svc-ic .icon *, .sv.in .big-icon .icon *, .sv.in .caps .icon * { stroke-dashoffset: 0; }
.sv.in .caps li:nth-child(1) .icon * { transition-delay: 0.65s; }
.sv.in .caps li:nth-child(2) .icon * { transition-delay: 0.80s; }
.sv.in .caps li:nth-child(3) .icon * { transition-delay: 0.95s; }
.sv.in .caps li:nth-child(4) .icon * { transition-delay: 1.10s; }
.sv.in .caps li:nth-child(5) .icon * { transition-delay: 1.25s; }
.sv.in .caps li:nth-child(6) .icon * { transition-delay: 1.40s; }

/* ---------- first visit of a session: logo and a survey line draw, then lift away ---------- */
#intro { display: none; }
.intro #intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--paper); clip-path: inset(0 0 0 0); animation: intro-out 0.75s var(--ease-io) 1.15s forwards; }
.intro-in { display: grid; justify-items: center; gap: 18px; }
.intro-in img { width: 190px; height: auto; animation: rise 0.8s var(--ease) both; }
.intro-in i { display: block; width: 190px; height: 2px; background: var(--green); transform: scaleX(0); transform-origin: left; animation: line-in 0.8s var(--ease) 0.25s forwards; }
/* The hero waits for the intro to lift before it animates in. */
.intro .hero [data-type] .w > span { transition-delay: calc(var(--i, 0) * 60ms + 1.35s); }
.intro .hero-sub { animation-delay: 1.8s; }
.intro .hero-cta { animation-delay: 1.95s; }

/* ---------- motion ---------- */
/* Image wipes: card media and service art uncover as they enter. */
.reveal .media, .reveal .tile-art { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease) 0.1s; }
.reveal.in .media, .reveal.in .tile-art { clip-path: inset(0 0 0 0); }
.sv .sv-art { clip-path: inset(0 100% 0 0); transition: clip-path 1.4s var(--ease) 0.15s; }
.sv.rev .sv-art { clip-path: inset(0 0 0 100%); }
.sv.in .sv-art { clip-path: inset(0 0 0 0); }
.rv { opacity: 0; }
.rv.in { opacity: 1; animation: up 1s var(--ease) backwards; }
.proj:not(.out), .bl:not(.out) { animation: rise 0.6s var(--ease); }
#car .proj { animation: slide 0.7s var(--ease); }
.shake { animation: shake 0.4s; }
@keyframes up { from { opacity: 0; transform: translateY(28px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { opacity: 0; transform: translateX(40px); } }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes mq { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes arrow-swap { 0% { transform: none; } 45% { transform: translateX(110%); opacity: 0; } 46% { transform: translateX(-110%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes draw-in { to { stroke-dashoffset: 0; } }
@keyframes line-in { to { transform: scaleX(1); } }
@keyframes unfold { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes intro-out { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes float { to { transform: translate(-3%, 2%) scale(1.06); } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .burger { display: grid; }
  .nav { position: absolute; top: 80px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  /* The panel unfolds (stays opaque) while its links rise in one after another. */
  .nav.open { display: flex; animation: unfold 0.45s var(--ease); }
  .nav.open > * { animation: rise 0.5s var(--ease) both; }
  .nav.open > :nth-child(1) { animation-delay: 0.09s; }
  .nav.open > :nth-child(2) { animation-delay: 0.14s; }
  .nav.open > :nth-child(3) { animation-delay: 0.19s; }
  .nav.open > :nth-child(4) { animation-delay: 0.24s; }
  .nav.open > :nth-child(5) { animation-delay: 0.29s; }
  .nav.open > :nth-child(6) { animation-delay: 0.34s; }
  .nav.open > :nth-child(7) { animation-delay: 0.39s; }
  .nav a.n { padding: 16px 0; font-size: 19px; font-weight: 600; border-bottom: 1px solid var(--line-soft); }
  .nav a.n::after { display: none; }
  .nav a.n.on { color: var(--blue); }
  .nav .btn { margin: 18px 0 0; justify-content: center; }
  .team { grid-template-columns: repeat(3, 1fr); }
  .split-head { grid-template-columns: 1fr; gap: 40px; }
  .sticky { position: static; }
  .ft-grid { grid-template-columns: 1fr 1fr; }
  .ft-top { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 860px) {
  :root { --gutter: 18px; }
  body { font-size: 16px; }
  .section { padding: 88px 0; }
  .section.section-tint + .section { padding-top: 88px; }
  .figures, .ind-grid, .grid3, .grid2, .ct, .sv, .nf .wrap { grid-template-columns: 1fr; }
  .fig-n, .fig-n + .fig-n { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .hero-figures .fig-n:first-child { border-top: 0; }
  .clients { grid-template-columns: repeat(2, 1fr); }
  .team { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .sh { flex-direction: column; align-items: flex-start; }
  .svc-row { grid-template-columns: 44px minmax(0, 1fr); padding: 24px 0; }
  .svc-ic { width: 44px; height: 44px; }
  .stack { height: 340px; }
  .hero-topo, .ph-topo { width: 100%; opacity: 0.6; }
  .svc-go { display: none; }
  .sv { gap: 28px; padding: 48px 0; }
  .sv.rev .sv-art { order: 0; }
  .sv-art { min-height: 240px; }
  .form { padding: 30px 22px; }
  .ph-body:has(> .lead + .lead) { grid-template-columns: 1fr; }
  .cta-big { padding: 96px 0; }
  .logo img { height: 34px; }
  .hd-bar { height: 68px; }
  .nav { top: 68px; }
  .ct-map { height: 360px; }
}
@media (max-width: 520px) {
  .clients { grid-template-columns: 1fr; }
  .ft-grid { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .ft-brand, .ft-grid > div:last-child { grid-column: 1 / -1; }
  .ft { padding-top: 72px; }
  .hero-cta .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  [data-type] .w > span { transform: none; }
  .rv { opacity: 1; }
  .topo-draw path { stroke-dashoffset: 0; }
  .svc-ic .icon *, .sv .big-icon .icon *, .sv .caps .icon *, .ok-check path { stroke-dashoffset: 0; }
  .fig-n strong::after, .sh h2[data-type]::after, .split-head h2[data-type]::after { transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .reveal .media, .reveal .tile-art, .sv .sv-art { clip-path: none; }
}
