/* mona-sans-vietnamese-wght-normal */
@font-face {
  font-family: 'Mona Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/_astro/mona-sans-vietnamese-wght-normal.DsUdksa4.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* mona-sans-latin-ext-wght-normal */
@font-face {
  font-family: 'Mona Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/_astro/mona-sans-latin-ext-wght-normal.BqSk0Z3x.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* mona-sans-latin-wght-normal */
@font-face {
  font-family: 'Mona Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/_astro/mona-sans-latin-wght-normal.Pz49MTQZ.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* geist-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/_astro/geist-cyrillic-ext-wght-normal.DjL33-gN.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* geist-cyrillic-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/_astro/geist-cyrillic-wght-normal.BEAKL7Jp.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* geist-vietnamese-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/_astro/geist-vietnamese-wght-normal.6IgcOCM7.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* geist-latin-ext-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/_astro/geist-latin-ext-wght-normal.DC-KSUi6.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* geist-latin-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/_astro/geist-latin-wght-normal.BgDaEnEv.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* adeeb.codes — "Exploded view"
   Two colours: midnight indigo carries the page (buttons, panels, the data layer) and amber marks
   what to look at (the logic layer, the middle plan, the panel's call to action).
   Mona Sans display over Geist. The hero stack and the work prism are the only expressive 3D objects. */

:root {
  --font-display: 'Mona Sans Variable', 'Helvetica Neue', Arial, sans-serif;
  --font-sans: 'Geist Variable', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: var(--font-display);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f7f7fa;
  --surface: #ffffff;
  --surface-hover: #efeff5;
  --raised: #e9e9f1;
  --line: #e1e1ea;
  --line-strong: #c8c8d6;
  --ink: #0e1024;
  --ink-secondary: #262a40;
  --muted: #565a70;
  --accent: #2a2f8f;
  --accent-hover: #212577;
  --accent-ink: #ffffff;
  --accent-subtle: #e7e8f8;
  --accent-border: #b8bbe8;
  --panel: #11143a;
  --panel-ink: #f4f3ee;
  --panel-muted: #a9abc8;

  /* Second colour: fills and marks only; --spark-text is the shade that passes as text */
  --spark: #ffae2b;
  --spark-hover: #ffc25c;
  --spark-ink: #1f1400;
  --spark-text: #a15f00;

  /* Hero stack surfaces */
  --layer-ui: #ffffff;
  --layer-logic: color-mix(in srgb, var(--spark) 16%, transparent);
  --layer-logic-edge: color-mix(in srgb, var(--spark) 80%, var(--ink));
  --layer-data: var(--panel);
  --layer-data-edge: var(--panel);
  --layer-hot: var(--spark);
  --layer-shadow: rgba(14, 16, 36, 0.18);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(14, 16, 36, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(14, 16, 36, 0.2);
  --shadow-lg: 0 40px 80px -30px rgba(14, 16, 36, 0.38);

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(88px, 11vw, 152px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #0b0c1a;
  --surface: #13152e;
  --surface-hover: #1b1e3d;
  --raised: #1b1e3d;
  --line: #252848;
  --line-strong: #363a62;
  --ink: #f1f0ea;
  --ink-secondary: #d6d6e2;
  --muted: #a0a3bd;
  --accent: #a3aaff;
  --accent-hover: #bcc1ff;
  --accent-ink: #0e1024;
  --accent-subtle: #1e2152;
  --accent-border: #3a3f86;
  /* The panel stays indigo rather than inverting, lifted off the midnight page */
  --panel: #1f2475;
  --panel-ink: #f4f3ee;
  --panel-muted: #b7b9dc;

  --spark-text: #ffc25c;

  --layer-ui: #1b1e3d;
  --layer-data: #171a4a;
  --layer-data-edge: #2c3180;
  --layer-shadow: rgba(0, 0, 0, 0.55);

  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, 0.75);

  color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

h1,
h2,
h3,
h4,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--spark);
  color: var(--spark-ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Elements hidden until GSAP reveals them. `js-pending` is removed by a safety timer, so
   content never stays hidden if the script fails. */
.motion.js-pending [data-reveal] {
  visibility: hidden;
}

/* ---------- Loader ---------- */
/* Covers the page until fonts and first-frame scripts are ready (see the inline script in
   Layout.astro). On a session's first page the name is written one letter at a time: each
   outline is traced, then filled. Later pages get the plain cover, which reads as a fade. */
.loader {
  display: none;
}

.is-loading .loader,
.is-leaving .loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
}

.is-leaving .loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.5s ease,
    visibility 0s linear 0.5s;
}

.loader-name {
  display: none;
  width: min(78vw, 460px);
  height: auto;
  overflow: visible;
  color: var(--ink);
}

.is-greeting .loader-name {
  display: block;
}

.loader-name path {
  fill: currentColor;
  fill-opacity: 0;
  stroke: currentColor;
  stroke-width: 0.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation:
    signature-draw 0.6s cubic-bezier(0.65, 0, 0.35, 1) forwards,
    signature-fill 0.35s ease forwards;
  animation-delay:
    calc(var(--i) * 0.24s),
    calc(var(--i) * 0.24s + 0.4s);
}

.is-leaving .loader-name {
  transform: translateY(-12px);
  transition: transform 0.5s var(--ease-out);
}

@keyframes signature-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes signature-fill {
  to {
    fill-opacity: 1;
  }
}

/* ---------- Type ---------- */
.display,
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.1rem, 3.8vw, 3.25rem);
}

h3 {
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

.lede {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 34em;
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 15px;
}

.btn .arrow {
  transition: transform 0.25s var(--ease-out);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.text-link:hover {
  border-color: currentColor;
}

/* ---------- Header ---------- */
/* The header is one more plane: it rests on the page at the top and lifts off it on scroll */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: 12px;
  --pad-start: 16px;
  --pad-end: 7px;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 58px;
  /* Bleeds by its own padding so the brand lands on the wrap edge */
  margin-inline: calc(var(--pad-start) * -1) calc(var(--pad-end) * -1);
  padding-inline: var(--pad-start) var(--pad-end);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.45s var(--ease-out);
}

.is-scrolled .header-inner,
.is-open .header-inner {
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border-color: var(--line);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 24px;
  height: 24px;
  overflow: visible;
}

.brand-mark path {
  stroke-linejoin: round;
  stroke-width: 1.4;
  transition: transform 0.4s var(--ease-out);
}

.brand-page {
  fill: var(--layer-ui);
  stroke: var(--ink);
}

.brand-logic {
  fill: var(--spark);
  stroke: var(--spark);
}

.brand-data {
  fill: var(--accent);
  stroke: var(--accent);
}

/* The mark explodes a little, like the hero stack */
.brand:hover .brand-page {
  transform: translateY(-2px);
}

.brand:hover .brand-data {
  transform: translateY(2px);
}

.site-nav {
  position: relative;
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease;
}

/* Inside the lifted bar the track merges into it */
.is-scrolled .site-nav {
  background: transparent;
  border-color: transparent;
}

.site-nav a {
  position: relative;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.site-nav a[aria-current] {
  color: var(--accent);
}

.nav-marker {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--marker-w, 0);
  border-radius: var(--radius-pill);
  background: var(--accent-subtle);
  opacity: 0;
  transform: translateX(var(--marker-x, 0));
  transition: opacity 0.25s ease;
}

.site-nav.has-marker .nav-marker {
  opacity: 1;
  transition:
    transform 0.4s var(--ease-out),
    width 0.4s var(--ease-out),
    opacity 0.25s ease;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
}

.header-actions .btn-small {
  min-height: 44px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.4s var(--ease-out);
}

.icon-btn:hover {
  border-color: var(--line-strong);
}

.header-actions .icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
}

.header-actions .icon-btn:hover {
  background: var(--surface-hover);
}

#theme-toggle-btn:active svg {
  transform: rotate(180deg);
}

#theme-toggle-btn svg {
  transition: transform 0.5s var(--ease-out);
}

.menu-btn {
  display: none;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 16px;
  height: 1.8px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.3s var(--ease-out),
    opacity 0.2s ease;
}

.menu-lines {
  position: relative;
}

.menu-lines::before,
.menu-lines::after {
  content: '';
  position: absolute;
  left: 0;
}

.menu-lines::before {
  top: -5px;
}

.menu-lines::after {
  top: 5px;
}

.menu-btn[aria-expanded='true'] .menu-lines {
  background: transparent;
}

.menu-btn[aria-expanded='true'] .menu-lines::before {
  transform: translateY(5px) rotate(45deg);
}

.menu-btn[aria-expanded='true'] .menu-lines::after {
  transform: translateY(-5px) rotate(-45deg);
}

/* A second plane dropped under the bar */
.mobile-nav {
  display: grid;
  margin: 8px calc(var(--pad-end) * -1) 0 calc(var(--pad-start) * -1);
  padding: 8px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform-origin: top center;
  animation: menu-drop 0.35s var(--ease-out);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a:not(.btn) {
  padding: 14px 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.mobile-nav .btn {
  margin-top: 20px;
}

@keyframes menu-drop {
  from {
    opacity: 0;
    transform: perspective(800px) rotateX(-12deg) translateY(-8px);
  }
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--section) 0;
}

.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-head p {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 32em;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 120px);
  overflow: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}

.hero-copy {
  display: grid;
  gap: 28px;
  justify-items: start;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1f9d55;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid #1f9d55;
  opacity: 0;
  animation: ping 2.4s var(--ease-out) infinite;
}

@keyframes ping {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.hero-title {
  font-size: clamp(2.6rem, 5.4vw, 4.9rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 11ch;
  text-wrap: balance;
}

.hero-title .line {
  padding-bottom: 0.06em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.hero-note {
  margin-top: -8px;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Hero stack: a website pulled apart into its layers ---------- */
.hero-visual {
  display: grid;
  gap: 8px;
}

.stack {
  position: relative;
  height: clamp(360px, 36vw, 480px);
  perspective: 1800px;
  perspective-origin: 50% 40%;
}

.stack-scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-38deg);
  --gap: 88px;
  --spread: 1;
}

.layer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--layer-w, 340px);
  height: calc(var(--layer-w, 340px) * 0.72);
  margin-left: calc(var(--layer-w, 340px) / -2);
  margin-top: calc(var(--layer-w, 340px) * -0.36);
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--z) * var(--gap) * var(--spread)));
}

.layer-body {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.layer-plane {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  transform-style: preserve-3d;
  transition:
    transform 0.6s var(--ease-out),
    opacity 0.4s ease,
    box-shadow 0.6s var(--ease-out);
}

/* The highlighted layer lifts out of the stack; the others step back */
.stack[data-active] .layer-plane {
  opacity: 0.3;
}

.stack[data-active='ui'] .layer-ui .layer-plane,
.stack[data-active='logic'] .layer-logic .layer-plane,
.stack[data-active='data'] .layer-data .layer-plane {
  opacity: 1;
  transform: translateZ(28px);
}

.layer-shadow {
  position: absolute;
  inset: 8%;
  border-radius: 40px;
  background: var(--layer-shadow);
  filter: blur(28px);
  transform: translateZ(calc(var(--gap) * -1.2));
}

/* Key: names each layer in plain words, flat and readable beside the 3D */
.stack-key {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: -28px 0 0;
  padding: 0;
  list-style: none;
}

.key {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
  width: 100%;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.key.is-active,
.key[aria-pressed='true'] {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}

/* A tiny drawing of the layer it names */
.key-swatch {
  grid-column: 1 / -1;
  margin: 0 0 6px 2px;
  width: 16px;
  height: 12px;
  border-radius: 3px;
  transform: skewX(-16deg);
}

.key-ui .key-swatch {
  background: var(--layer-ui);
  border: 1px solid var(--line-strong);
}

.key-logic .key-swatch {
  background: var(--layer-logic);
  border: 1.5px dashed var(--layer-logic-edge);
}

.key-data .key-swatch {
  background: var(--layer-data);
  border: 1px solid var(--layer-data-edge);
}

.key-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.key-title,
.key-detail {
  grid-column: 1 / -1;
}

.key-detail {
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

/* Top: the page customers see */
.layer-ui .layer-plane {
  background: var(--layer-ui);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line);
  padding: 16px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  overflow: hidden;
}

.ui-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Logo, menu, and a small call-to-action button */
.ui-bar i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--ink);
}

.ui-bar b {
  margin-left: auto;
  width: 30%;
  height: 6px;
  border-radius: 3px;
  background: var(--raised);
}

.ui-bar s {
  width: 18%;
  height: 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
}

.ui-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 14px;
}

.ui-copy {
  display: grid;
  align-content: start;
  gap: 8px;
}

.ui-copy span {
  height: 12px;
  border-radius: 4px;
  background: var(--ink);
}

.ui-copy span:nth-child(2) {
  width: 70%;
}

.ui-copy em {
  height: 6px;
  margin-top: 6px;
  border-radius: 3px;
  background: var(--raised);
}

.ui-copy em + em {
  width: 80%;
  margin-top: 0;
}

.ui-copy strong {
  width: 62%;
  height: 26px;
  margin-top: 10px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

.ui-media {
  border-radius: 10px;
  background:
    linear-gradient(to top, var(--accent-border) 0 28%, transparent 28%),
    linear-gradient(160deg, var(--accent-subtle), var(--raised));
}

/* Middle: the logic that makes it work */
.layer-logic .layer-plane {
  background: var(--layer-logic);
  border: 1.5px dashed var(--layer-logic-edge);
}

.layer-logic svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.logic-path {
  fill: none;
  stroke: var(--layer-logic-edge);
  stroke-width: 2;
  stroke-dasharray: 5 7;
  animation: flow 1.6s linear infinite;
}

.logic-node {
  fill: var(--surface);
  stroke: var(--layer-logic-edge);
  stroke-width: 2;
}

.logic-core {
  fill: var(--spark);
}

@keyframes flow {
  to {
    stroke-dashoffset: -24;
  }
}

/* Bottom: where the data lives */
.layer-data .layer-plane {
  background: var(--layer-data);
  border: 1px solid var(--layer-data-edge);
  padding: 18px;
  display: grid;
  gap: 9px;
  align-content: start;
}

.data-row {
  display: grid;
  grid-template-columns: 18px 1.4fr 1fr 0.6fr;
  gap: 10px;
  align-items: center;
}

.data-row i,
.data-row b {
  height: 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
}

.data-row i:first-child {
  height: 10px;
  width: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.data-row:first-child b,
.data-row:first-child i {
  background: rgba(255, 255, 255, 0.4);
}

.data-row b.hot {
  background: var(--layer-hot);
}

/* ---------- Work: list + rotating prism ---------- */
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.work-list {
  border-top: 1px solid var(--line);
}

.work-item {
  border-bottom: 1px solid var(--line);
}

.work-link {
  display: grid;
  gap: 8px;
  padding: clamp(28px, 4vw, 44px) 0;
  transition: opacity 0.35s ease;
}

.work-list.has-active .work-item:not(.is-active) .work-link {
  opacity: 0.5;
}

.work-list.has-active .work-item:not(.is-active) .work-link:hover,
.work-list.has-active .work-item:not(.is-active) .work-link:focus-visible {
  opacity: 1;
}

.work-kind {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.work-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.015em;
}

.work-title .arrow {
  flex: none;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-8px);
  transition:
    opacity 0.3s ease,
    transform 0.4s var(--ease-out);
}

.work-item.is-active .work-title .arrow,
.work-link:hover .work-title .arrow,
.work-link:focus-visible .work-title .arrow {
  opacity: 1;
  transform: none;
}

.work-outcome {
  color: var(--ink-secondary);
  max-width: 30em;
}

.work-thumb {
  display: none;
}

.work-stage {
  position: sticky;
  top: calc(50vh - var(--prism-h) / 2);
  --prism-w: min(560px, 44vw);
  --prism-h: calc(var(--prism-w) * 0.667);
  height: var(--prism-h);
  perspective: 1600px;
}

.prism {
  position: relative;
  width: var(--prism-w);
  height: var(--prism-h);
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--prism-w) / -2));
}

.prism-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(calc(var(--i) * 90deg))
    translateZ(calc(var(--prism-w) / 2));
}

.prism-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Services: pick your situation, the matching plan comes to the front ---------- */
.services-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.services-pick .section-head {
  margin-bottom: 32px;
}

.situations {
  display: grid;
  gap: 10px;
}

.situation {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 6px 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.4s var(--ease-out);
}

/* Swatch in the colour of the plan card it brings forward */
.situation::before {
  content: '';
  grid-row: 1 / 3;
  width: 18px;
  height: 13px;
  margin-top: 6px;
  border-radius: 3px;
  background: var(--swatch);
  transform: skewX(-12deg);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.situation[aria-controls='plan-website'] {
  --swatch: var(--surface);
}

.situation[aria-controls='plan-app'] {
  --swatch: var(--spark);
}

.situation[aria-controls='plan-fix'] {
  --swatch: var(--panel);
}

.situation:hover {
  border-color: var(--line-strong);
}

.situation[aria-selected='true'] {
  background: var(--surface);
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
  transform: translateX(6px);
}

.situation-quote {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
}

.situation-for {
  grid-column: 2;
  font-size: 15px;
  color: var(--muted);
}

/* Without JS the plans sit in a column; with it they stack into a deck */
.deck {
  display: grid;
  gap: 16px;
}

.deck.is-deck {
  gap: 0;
  padding-top: 56px;
  transform-style: preserve-3d;
}

.deck.is-deck > .plan {
  grid-area: 1 / 1;
  transform-origin: 50% 0;
}

.plan {
  --plan-bg: var(--surface);
  --plan-ink: var(--ink);
  --plan-muted: var(--muted);
  --plan-line: var(--line);
  --plan-btn: var(--accent);
  --plan-btn-ink: var(--accent-ink);

  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--plan-line);
  border-radius: var(--radius-lg);
  background: var(--plan-bg);
  color: var(--plan-ink);
  box-shadow: var(--shadow-lg);
}

.plan-app {
  --plan-bg: var(--spark);
  --plan-ink: var(--spark-ink);
  --plan-muted: color-mix(in srgb, var(--spark-ink) 78%, var(--spark));
  --plan-line: color-mix(in srgb, var(--spark-ink) 22%, transparent);
  --plan-btn: var(--spark-ink);
  --plan-btn-ink: var(--spark);
}

.plan-fix {
  --plan-bg: var(--panel);
  --plan-ink: var(--panel-ink);
  --plan-muted: var(--panel-muted);
  --plan-line: color-mix(in srgb, var(--panel-ink) 18%, transparent);
  --plan-btn: var(--panel-ink);
  --plan-btn-ink: var(--panel);
}

.plan :focus-visible {
  outline-color: var(--plan-ink);
}

.plan-for {
  font-size: 15px;
  color: var(--plan-muted);
}

.plan-name {
  margin-top: -12px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.015em;
  max-width: 17ch;
}

.plan-change {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--plan-line);
}

.plan-change > div {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 20px;
}

.plan-after {
  padding-left: 24px;
  border-left: 1px solid var(--plan-line);
}

.plan-now {
  padding-right: 24px;
}

.plan-change dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--plan-muted);
}

.plan-after dt {
  color: var(--plan-ink);
}

.plan-now dd {
  color: var(--plan-muted);
}

.plan-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-examples li {
  padding: 6px 14px;
  border: 1px solid var(--plan-line);
  border-radius: var(--radius-pill);
  font-size: 15px;
}

.plan-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 20px 24px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--plan-line);
}

.plan-price {
  display: grid;
  gap: 4px;
}

.plan-from {
  font-size: 15px;
  color: var(--plan-muted);
}

.plan-from strong {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
  color: var(--plan-ink);
  font-variant-numeric: tabular-nums;
}

.plan-terms {
  font-size: 14px;
  color: var(--plan-muted);
}

.plan .btn-primary {
  background: var(--plan-btn);
  color: var(--plan-btn-ink);
}

.plan .btn-primary:hover {
  background: color-mix(in srgb, var(--plan-btn) 86%, var(--plan-bg));
}

/* ---------- Testimonials: a wall of quotes drifting up in columns ---------- */
.quotes-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.wall-pause {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  transition: border-color 0.2s ease;
}

.wall-pause:hover {
  border-color: var(--line-strong);
}

.wall-pause[hidden] {
  display: none;
}

/* Two bars while moving, a play triangle once paused */
.wall-pause-icon {
  width: 10px;
  height: 12px;
  border-inline: 3px solid currentColor;
}

.testimonials:has(.wall[data-paused]) .wall-pause-icon {
  width: 0;
  border-inline: 0;
  border-block: 6px solid transparent;
  border-left: 10px solid currentColor;
}

.wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-height: 720px;
  overflow: clip;
  mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 14%,
    #000 86%,
    transparent
  );
}

/* Keyboard users get the whole wall, unfaded, while they are in it */
.wall:has(:focus-visible) {
  mask-image: none;
}

.wall-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 20px;
  animation: wall-drift var(--duration, 42s) linear infinite;
}

.wall:hover .wall-track,
.wall:focus-within .wall-track,
.wall[data-paused] .wall-track {
  animation-play-state: paused;
}

/* The track holds its quotes twice; half its height is one full loop */
@keyframes wall-drift {
  to {
    transform: translateY(-50%);
  }
}

.wall.is-static {
  max-height: none;
  mask-image: none;
}

.wall.is-static .wall-col {
  grid-column: 1 / -1;
}

.wall.is-static .wall-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  padding-bottom: 0;
  animation: none;
}

.quote {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 24px 48px -32px color-mix(in srgb, var(--accent) 45%, transparent);
}

.quote-draft {
  justify-self: start;
  padding: 4px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.quote blockquote {
  margin: 0;
}

.quote blockquote p {
  font-size: 1.06rem;
  line-height: 1.55;
  text-wrap: pretty;
  text-indent: -0.4em;
}

.quote blockquote p::before {
  content: '“';
  color: var(--spark-text);
}

.quote blockquote p::after {
  content: '”';
  color: var(--spark-text);
}

.quote figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
}

.quote-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 580;
}

.quote-who {
  display: grid;
  gap: 2px;
  line-height: 1.3;
}

.quote-who span {
  font-size: 15px;
  color: var(--muted);
}

.quote-proof {
  display: grid;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.quote-result {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.quote-proof:hover .text-link {
  border-color: currentColor;
}

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.faq-grid .section-head {
  position: sticky;
  top: 120px;
  justify-items: start;
  margin-bottom: 0;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
  interpolate-size: allow-keywords;
}

.faq-item summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-q {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.faq-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    transform 0.5s var(--ease-out);
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 1.8px;
  margin: -0.9px 0 0 -7px;
  border-radius: 2px;
  background: var(--ink);
  transition: background-color 0.3s ease;
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item summary:hover .faq-icon {
  border-color: var(--ink);
}

.faq-item[open] .faq-icon {
  transform: rotate(135deg);
  background: var(--spark);
  border-color: var(--spark);
}

.faq-item[open] .faq-icon::before,
.faq-item[open] .faq-icon::after {
  background: var(--spark-ink);
}

.faq-item::details-content {
  block-size: 0;
  overflow: clip;
  transition:
    block-size 0.5s var(--ease-out),
    content-visibility 0.5s allow-discrete;
}

.faq-item[open]::details-content {
  block-size: auto;
}

.faq-a {
  padding: 0 64px 28px 0;
  max-width: 40em;
  font-size: 1.0625rem;
  color: var(--ink-secondary);
  text-wrap: pretty;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--raised);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}

.about-copy {
  display: grid;
  gap: 24px;
}

.about-copy .body {
  display: grid;
  gap: 18px;
  font-size: 1.125rem;
  color: var(--ink-secondary);
  max-width: 34em;
}

.timeline {
  display: grid;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.timeline li {
  display: grid;
  grid-template-columns: 9.5em 1fr;
  gap: 4px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.timeline .period {
  color: var(--muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.timeline .role {
  font-weight: 600;
}

.timeline .company {
  grid-column: 2;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Contact ---------- */
.contact {
  padding-block: var(--section) clamp(48px, 6vw, 88px);
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(40px, 6vw, 96px);
  padding: clamp(36px, 6vw, 80px);
  border-radius: calc(var(--radius-lg) + 8px);
  background: var(--panel);
  color: var(--panel-ink);
}

.contact-panel h2 {
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  letter-spacing: -0.02em;
  max-width: 10ch;
}

.contact-main {
  display: grid;
  gap: 24px;
  align-content: start;
}

.contact-main > p {
  color: var(--panel-muted);
  font-size: 1.125rem;
  max-width: 28em;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.contact-panel .btn-primary {
  background: var(--spark);
  color: var(--spark-ink);
}

.contact-panel .btn-primary:hover {
  background: var(--spark-hover);
  color: var(--spark-ink);
}

/* Copy button flips over in 3D to confirm */
.flip-btn {
  position: relative;
  min-height: 52px;
  min-width: 160px;
  padding: 0;
  border: 0;
  background: none;
  perspective: 600px;
}

.flip-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease-out);
}

.flip-btn.is-flipped .flip-inner {
  transform: rotateX(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-front {
  border: 1px solid color-mix(in srgb, var(--panel-ink) 35%, transparent);
  color: var(--panel-ink);
  transition: border-color 0.2s ease;
}

.flip-btn:hover .flip-front {
  border-color: var(--panel-ink);
}

.flip-back {
  background: #157a41;
  color: #fff;
  transform: rotateX(180deg);
}

.steps {
  display: grid;
  gap: 4px;
  align-content: start;
  counter-reset: step;
}

.steps h3 {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--panel-muted);
  margin-bottom: 12px;
}

.steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid color-mix(in srgb, var(--panel-ink) 16%, transparent);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--panel-ink) 30%, transparent);
  font-size: 13px;
  font-weight: 600;
}

.contact-email {
  font-size: 15px;
  color: var(--panel-muted);
}

.contact-email a {
  color: var(--panel-ink);
  border-bottom: 1px solid color-mix(in srgb, var(--panel-ink) 40%, transparent);
}

.contact-email a:hover {
  border-color: var(--panel-ink);
}

/* ---------- Contact page ---------- */
.contact-page {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  grid-template-areas:
    'head head'
    'form aside';
  gap: clamp(32px, 4vw, 48px);
  align-items: start;
  padding-top: clamp(40px, 7vw, 96px);
}

.contact-page-head {
  grid-area: head;
  display: grid;
  gap: 20px;
}

.contact-page-head h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.9rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.contact-page-head h1 .line {
  padding-bottom: 0.06em;
}

.form-card {
  grid-area: form;
  perspective: 2000px;
}

/* The form and its confirmation are two faces of one card */
.form-flip {
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.9s var(--ease-out);
}

.form-flip.is-sent {
  transform: rotateY(180deg);
}

.form-face {
  grid-area: 1 / 1;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.form-front {
  display: grid;
  gap: 22px;
}

.form-back {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
  transform: rotateY(180deg);
}

.form-back h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.form-back h2:focus {
  outline: none;
}

.form-back p {
  max-width: 30em;
  color: var(--ink-secondary);
  font-size: 1.0625rem;
}

.form-back .done-fallback {
  color: var(--muted);
  font-size: 15px;
}

.done-fallback a {
  color: var(--accent);
  font-weight: 600;
}

.done-mark {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #157a41;
}

.done-mark::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 16px;
  width: 12px;
  height: 20px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.need-group {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.need-group legend,
.field > span {
  margin-bottom: 10px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
}

.field small {
  font-size: inherit;
  font-weight: 400;
  color: var(--muted);
}

.need-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.need {
  position: relative;
}

.need input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.need span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.need:hover span {
  border-color: var(--ink);
}

.need input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.need input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 16px;
}

.field {
  display: grid;
  align-content: start;
}

.field > span {
  margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s ease;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field select {
  appearance: none;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: var(--ink);
}

.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  border-color: var(--accent);
  outline-offset: 1px;
}

.field textarea::placeholder {
  color: var(--muted);
}

.form-submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 4px;
}

.form-error {
  font-size: 15px;
  font-weight: 500;
  color: #b42318;
}

[data-theme='dark'] .form-error {
  color: #ff9a8a;
}

.form-error:empty {
  display: none;
}

/* A field only bots fill in; kept off-screen rather than display:none so they still find it. */
.form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit .btn:disabled {
  opacity: 0.7;
  cursor: progress;
}

.contact-aside {
  grid-area: aside;
  position: sticky;
  top: 96px;
  display: grid;
  gap: 36px;
  padding: clamp(28px, 3vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--panel-ink);
}

.contact-direct {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.contact-direct h2 {
  font-size: 1.5rem;
}

.contact-address {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, var(--panel-ink) 40%, transparent);
  transition: border-color 0.2s ease;
}

.contact-address:hover {
  border-color: var(--panel-ink);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 32px;
  font-size: 15px;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-nav a:hover {
  color: var(--ink);
}

/* ---------- Case study page ---------- */
.case-hero {
  padding-block: clamp(32px, 5vw, 64px) clamp(40px, 5vw, 64px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(32px, 5vw, 56px);
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--ink);
}

.back-link span {
  transition: transform 0.3s var(--ease-out);
}

.back-link:hover span {
  transform: translateX(-3px);
}

.case-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 24px clamp(32px, 6vw, 96px);
  align-items: end;
}

.case-kind {
  grid-column: 1 / -1;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.case-title {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 620;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.case-lede {
  font-size: 1.2rem;
  color: var(--ink-secondary);
  text-wrap: pretty;
}

.case-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.case-facts dt {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.case-facts dd {
  font-weight: 500;
}

.cover-stage {
  perspective: 1400px;
  perspective-origin: 50% 0%;
}

.cover-tilt {
  transform-style: preserve-3d;
}

.cover {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform-origin: 50% 0%;
  background: var(--raised);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--line);
}

.result {
  display: grid;
  gap: 6px;
  padding: 28px 24px 0 0;
}

.result + .result {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.result-value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.result-label {
  color: var(--muted);
}

.story {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.story-nav {
  position: sticky;
  top: 120px;
  display: grid;
  gap: 4px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.story-nav::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--accent);
  transform-origin: 0 0;
  transform: scaleY(var(--progress, 0));
}

.story-nav a {
  padding: 6px 0;
  font-size: 15px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.story-nav a:hover,
.story-nav a.is-active {
  color: var(--ink);
}

.story-body {
  display: grid;
  gap: clamp(56px, 7vw, 88px);
  max-width: 44em;
}

.story-section {
  display: grid;
  gap: 18px;
}

.story-section h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.story-section p {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--ink-secondary);
  text-wrap: pretty;
}

.case-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.next-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(28px, 4vw, 48px);
  border-radius: calc(var(--radius-lg) + 8px);
  background: var(--surface);
  border: 1px solid var(--line);
  perspective: 1200px;
}

.next-copy {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.next-copy .kicker {
  color: var(--muted);
  font-size: 15px;
}

.next-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.next-outcome {
  color: var(--muted);
  max-width: 28em;
}

.next-art {
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transform: rotateY(-14deg) rotateX(6deg);
  transform-origin: 100% 50%;
  transition:
    transform 0.8s var(--ease-out),
    box-shadow 0.8s var(--ease-out);
}

.next-project:hover .next-art,
.next-project:focus-visible .next-art {
  transform: rotateY(0) rotateX(0) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.next-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case > .section:last-child {
  padding-bottom: clamp(48px, 6vw, 88px);
}

.case-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(24px, 3vw, 32px);
  padding: 32px 0 0;
}

.case-cta p {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------- Short status pages: 404, request sent ---------- */
.error-page,
.status-page {
  display: grid;
  justify-items: start;
  gap: 20px;
  padding-block: clamp(80px, 14vw, 180px);
}

.error-page h1,
.status-page h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  letter-spacing: -0.02em;
}

.error-page p,
.status-page p {
  color: var(--muted);
  font-size: 1.15rem;
}

.status-page p {
  max-width: 52ch;
}

.error-page .error-code {
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wall-col:nth-child(3) {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    max-width: 13ch;
  }

  .hero-visual {
    margin-top: 16px;
  }

  .stack {
    height: 400px;
  }

  .work-grid,
  .services-grid,
  .faq-grid,
  .about-grid,
  .contact-panel,
  .case-head,
  .story,
  .next-project {
    grid-template-columns: 1fr;
  }

  .faq-grid .section-head {
    position: static;
    margin-bottom: 16px;
  }

  .contact-aside {
    position: static;
  }

  .contact-page {
    grid-template-columns: 1fr;
    grid-template-areas:
      'head'
      'form'
      'aside';
  }

  .work-stage {
    display: none;
  }

  .work-thumb {
    display: block;
    margin-bottom: 16px;
    perspective: 1200px;
  }

  .work-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
  }

  .work-list.has-active .work-item:not(.is-active) .work-link {
    opacity: 1;
  }

  .work-title .arrow {
    opacity: 1;
    transform: none;
  }

  .portrait {
    max-width: 320px;
  }

  .story-nav {
    display: none;
  }
}

@media (max-width: 760px) {
  .wall {
    grid-template-columns: minmax(0, 1fr);
    max-height: 640px;
  }

  .wall-col:nth-child(2) {
    display: none;
  }

  .site-nav,
  .header-actions .btn {
    display: none;
  }

  .site-header {
    --pad-start: 12px;
    --pad-end: 5px;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .menu-btn {
    display: grid;
  }

  .stack {
    height: 320px;
    --layer-w: 240px;
  }

  .stack-scene {
    --gap: 64px;
  }

  .hero {
    padding-bottom: 16px;
  }

  .stack-key {
    margin-top: 0;
  }

  .key {
    padding: 10px;
  }

  .key-detail {
    display: none;
  }

  .results {
    grid-template-columns: 1fr;
  }

  .result,
  .result + .result {
    padding: 20px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .faq-a {
    padding-right: 0;
  }

  .situation[aria-selected='true'] {
    transform: none;
  }

  .plan-change {
    grid-template-columns: 1fr;
  }

  .plan-now {
    padding-right: 0;
    padding-bottom: 20px;
  }

  .plan-after {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--plan-line);
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .timeline .company {
    grid-column: 1;
  }

  .next-art {
    transform: none;
  }
}

@media (max-width: 420px) {
  .stack {
    height: 270px;
    --layer-w: 196px;
  }

  .stack-scene {
    --gap: 54px;
  }

  /* Stack the key so each name stays on one or two lines */
  .stack-key {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  /* Swatch beside the name again, one row per layer */
  .key-swatch {
    grid-column: 1;
    margin: 0;
  }

  .key-title {
    grid-column: 2;
  }

  .key {
    padding: 8px 12px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 360px) {
  .stack {
    height: 250px;
    --layer-w: 172px;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* The wall holds still: one column of unique quotes laid out as a grid */
  .wall-pause {
    display: none !important;
  }

  .wall,
  .wall-track {
    display: grid;
  }

  .wall {
    max-height: none;
    mask-image: none;
  }

  .wall-col {
    grid-column: 1 / -1;
  }

  .wall-col + .wall-col,
  .wall [data-clone] {
    display: none;
  }

  .wall-track {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    padding-bottom: 0;
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
