/* CriticalEx — neon noir: blue-black night, magenta and cyan neon, chrome
   headlines, mono details. Dark only. */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Oxanium";
  src: url("/fonts/oxanium.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

/* Registered so neon edges, fills and glows can transition on hover. */
@property --edge {
  syntax: "<color>";
  inherits: true;
  initial-value: #2C2A4A;
}

@property --fill {
  syntax: "<color>";
  inherits: true;
  initial-value: transparent;
}

@property --glow {
  syntax: "<color>";
  inherits: true;
  initial-value: transparent;
}

/* Contrast (WCAG, small text needs 4.5:1), worst case is text on a card
   inside a band (#101021 on #0E0E1A):
   ink 15.2 · ink-2 7.4 · magenta 5.9 · cyan 13.3. */
:root {
  color-scheme: dark;

  /* Base: near-black blue. */
  --paper: #07070D;
  /* Raised surface: bands, header. */
  --paper-2: #0E0E1A;
  /* Dark glass for cards; composites to #101021 on paper. */
  --surface: rgb(18 18 38 / 0.8);
  --ink: #E8E6F0;
  /* Muted lavender-grey: 7.96:1 on paper. */
  --ink-2: #A3A0BD;
  /* Dim violet-blue rule, decorative only. */
  --rule: #2C2A4A;
  /* Hot magenta: 6.28:1 on paper, so it doubles as small-text accent. */
  --accent: #FF2BD6;
  /* Text on magenta must be dark: white is 3.2:1, paper is 6.28:1. */
  --accent-ink: #07070D;
  --accent-text: #FF2BD6;
  /* Cyan: 14.26:1 on paper; paper on cyan is the same. */
  --cyan: #00F0FF;

  --glow-accent: rgb(255 43 214 / 0.55);
  --glow-cyan: rgb(0 240 255 / 0.5);
  /* Thin neon line: magenta into cyan, fading at both ends. */
  --neon-line: linear-gradient(90deg, transparent, var(--accent) 20%, var(--cyan) 80%, transparent);
  --neon-line-dim: linear-gradient(90deg, transparent, rgb(255 43 214 / 0.35) 20%, rgb(0 240 255 / 0.35) 80%, transparent);
  /* 80s chrome: white sky, hard dark horizon, cyan ground. Darkest stop
     #7D77C2 is 5.06:1 on paper, 4.82:1 on paper-2. */
  --chrome: linear-gradient(180deg, #FFFFFF 0%, #D9D5F2 46%, #7D77C2 52%, #D6F9FF 57%, #9FE6F5 100%);

  --font-display: "Oxanium", "Eurostile", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 40px;
  --s-6: 48px;
  --s-7: 56px;
  --s-8: 64px;
  --s-9: 72px;
  --s-10: 80px;

  --container: 1200px;
  --gutter: 16px;
  /* Horizontal inset that lines full-bleed bars up with .container content. */
  --page-inset: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  --gap: var(--s-3);
  --radius: 2px;
  /* Sticky header height (48px row + 2 × 12px padding + 1px border), used to
     offset anchors and sticky asides. */
  --header-h: 73px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  font-kerning: normal;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* CRT scanlines over everything. 3% white on every third row lifts paper to
   #0E0E14 at most, which keeps ink-2 at 7.6:1. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgb(255 255 255 / 0.03) 0 1px, transparent 1px 3px);
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  margin: 0 0 var(--s-3);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.08;
}

/* Chrome headlines. The gradient repeats per line (1lh) so every line gets
   its own horizon. Fill is cleared with -webkit-text-fill-color, not color,
   so text stays ink anywhere background-clip: text is unsupported. The glow
   is a drop-shadow filter because text-shadow paints over a clear fill. */
h1,
h2:not(.card-title, .aside-title) {
  text-transform: uppercase;
  background-image: var(--chrome);
  background-size: 100% 100%;
  background-size: 100% 1lh;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgb(255 43 214 / 0.4)) drop-shadow(0 0 1px rgb(0 240 255 / 0.5));
}

h3 {
  margin-bottom: var(--s-1);
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: 0;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

p {
  max-width: 68ch;
  text-wrap: pretty;
}

:is(p, ul, ol, dl):last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
}

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-thickness 0.15s var(--ease), text-decoration-color 0.15s var(--ease), color 0.15s var(--ease);
}

a:hover {
  text-decoration-thickness: 2px;
  text-decoration-color: var(--cyan);
}

a[href^="mailto:"] {
  overflow-wrap: anywhere;
}

/* text-fill-color too, or chrome headlines stay clear when selected. */
::selection {
  background: var(--accent);
  color: var(--accent-ink);
  -webkit-text-fill-color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "zero" 1;
}

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  top: var(--s-1);
  left: var(--s-1);
  z-index: 100;
  padding: var(--s-1) var(--s-2);
  background: var(--cyan);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--s-8);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--s-10);
  }
}

/* Two plain sections in a row get a dim neon hairline at the content edge,
   not a gap. */
.section:not(.section-band) + .section:not(.section-band) {
  padding-top: 0;
}

.section:not(.section-band) + .section:not(.section-band) > .container::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: var(--s-8);
  background: var(--neon-line-dim);
}

@media (min-width: 768px) {
  .section:not(.section-band) + .section:not(.section-band) > .container::before {
    margin-bottom: var(--s-10);
  }
}

/* Raised band lit from above, edged top and bottom by a neon line. */
.section-band {
  background:
    radial-gradient(ellipse 60% 160px at 50% 0, rgb(255 43 214 / 0.07), transparent),
    var(--paper-2);
  border-block: 1px solid transparent;
  border-inline: 0;
  border-image: var(--neon-line) 1;
}

/* A band that ends the page meets the footer's rule; don't double it. */
main > .section-band:last-child {
  border-bottom: 0;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: var(--gap);
}

/* auto-fit with a floor of 260px, capped at N columns. */
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(max(min(260px, 100%), calc((100% - var(--gap)) / 2)), 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(max(min(260px, 100%), calc((100% - 2 * var(--gap)) / 3)), 1fr));
}

/* Main column + sidebar; stacks below 900px. */
.split {
  display: grid;
  gap: var(--s-6);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: var(--s-10);
  }

  .split > aside {
    position: sticky;
    top: calc(var(--header-h) + var(--s-4));
    align-self: start;
  }
}

.aside {
  padding-top: var(--s-2);
  border-top: 1px solid var(--cyan);
}

/* ---------- Type utilities ---------- */

.lead {
  max-width: 38em;
  font-size: clamp(1.125rem, 1.1rem + 0.4vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-2);
}

.prose {
  max-width: 68ch;
}

/* Key phrases carry the read: the surrounding prose drops to ink-2 (7.96:1)
   and each phrase steps up to magenta (6.28:1), the same two-level split
   as the wordmark and the bento words. */
.prose:has(.key) {
  color: var(--ink-2);
}

.prose .key {
  color: var(--accent);
  font-weight: 600;
}

.prose > * + h2,
.prose > * + h3 {
  margin-top: var(--s-5);
}

/* Terminal prompt: magenta ">" then cyan label. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 var(--s-3);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 10px rgb(0 240 255 / 0.35);
}

.eyebrow::before {
  content: ">";
  content: ">" / "";
  flex: none;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 8px var(--glow-accent);
}

/* Heading block that opens a section: eyebrow, h2, lead. */
.section-head {
  max-width: 44rem;
  margin-bottom: var(--s-6);
}

.section-head .lead {
  margin-top: var(--s-2);
}

.hero {
  padding-top: var(--s-2);
}

.hero h1 {
  max-width: 14ch;
  margin-bottom: var(--s-4);
}

/* Blinking block cursor. A painted box, not a glyph: the h1 clips its
   chrome gradient to every glyph, so a "▌" would show chrome when it blinks
   off. Empty inline-block sits on the baseline at roughly cap height. */
.hero h1::after {
  content: "";
  content: "" / "";
  display: inline-block;
  width: 0.45em;
  height: 0.72em;
  margin-left: 0.08em;
  background: var(--accent);
  animation: cursor-blink 1.1s steps(1, end) infinite;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

.hero .lead {
  max-width: 32em;
}

/* Every hero section stands on a perspective grid floor that fades into a
   magenta horizon. The extra bottom padding is the floor's stage; clip keeps
   the oversized, rotated floor from adding horizontal scroll. */
.section:has(> .container > .hero) {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-bottom: calc(var(--s-8) + 96px);
}

@media (min-width: 768px) {
  .section:has(> .container > .hero) {
    padding-bottom: calc(var(--s-10) + 128px);
  }
}

/* Horizon: thin magenta line with a glow rising off it. The glow peaks at
   18% magenta, which leaves ink-2 at 6.7:1 where it overlaps text. */
.section:has(> .container > .hero)::before {
  content: "";
  position: absolute;
  inset: auto 0 200px;
  z-index: -1;
  height: 180px;
  background:
    linear-gradient(90deg, transparent 10%, rgb(255 43 214 / 0.6) 50%, transparent 90%) bottom / 100% 1px no-repeat,
    radial-gradient(ellipse 55% 100% at 50% 100%, rgb(255 43 214 / 0.18), rgb(0 240 255 / 0.04) 60%, transparent 80%);
  pointer-events: none;
}

/* 800px tall floor tilted 55° back from its bottom edge under 500px of
   perspective projects to ~200px, meeting the horizon above. */
.section:has(> .container > .hero)::after {
  content: "";
  position: absolute;
  inset: auto -50% 0;
  z-index: -1;
  height: 800px;
  background:
    repeating-linear-gradient(90deg, rgb(255 43 214 / 0.85) 0 2px, transparent 2px 64px),
    repeating-linear-gradient(180deg, rgb(0 240 255 / 0.6) 0 2px, transparent 2px 64px);
  background-position: center bottom, center 0;
  transform: perspective(500px) rotateX(55deg);
  /* Cross-lines roll toward the viewer forever; one 64px cell per loop is
     seamless. Reduced motion stops it via the global block below. */
  animation: grid-scroll 1.6s linear infinite;
  transform-origin: 50% 100%;
  /* 2px lines: 1px ones alias into dotted moiré once tilted. */
  -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 8%, #000 40%, transparent 90%);
  mask-image: linear-gradient(0deg, transparent 0%, #000 8%, #000 40%, transparent 90%);
  filter: drop-shadow(0 0 4px rgb(255 43 214 / 0.6));
  pointer-events: none;
}

@keyframes grid-scroll {
  to {
    background-position: center bottom, center 64px;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-5);
}

/* Narrow screens: wrapped buttons fill the row instead of stacking ragged. */
@media (max-width: 479px) {
  .actions > .btn {
    flex: 1 1 auto;
  }
}

/* Bulleted list with cyan prompts. The marker ("> " in mono, 2 × 0.6em)
   fills the padding exactly, so the prompt sits on the content edge. */
.list {
  padding-left: 1.2em;
}

.list li {
  padding-left: 0.4em;
}

.list li + li {
  margin-top: 0.5em;
}

.list li::marker {
  content: "> ";
  color: var(--cyan);
  font-family: var(--font-mono);
}

/* Numbered process steps. Use <ol class="steps" role="list">. */
.steps {
  display: grid;
  gap: var(--s-5) var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(max(min(240px, 100%), calc((100% - 2 * var(--gap)) / 3)), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps > li {
  padding-top: var(--s-2);
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--accent), var(--cyan) 60%, transparent) 1;
  counter-increment: step;
}

.steps > li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: var(--s-3);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-text);
  text-shadow: 0 0 8px var(--glow-accent);
}

.steps p {
  color: var(--ink-2);
}

/* Small mono link with a trailing arrow: "All services →". */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cyan);
}

.link-arrow:hover {
  text-shadow: 0 0 10px var(--glow-cyan);
}

.link-arrow::after {
  content: "→";
  content: "→" / "";
  color: var(--accent-text);
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover::after {
  transform: translateX(3px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-1) var(--s-4);
  padding-block: 12px;
  padding-inline: var(--page-inset);
  background: rgb(7 7 13 / 0.88);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid transparent;
  border-image: var(--neon-line-dim) 1;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
}

.wordmark-ex {
  color: var(--accent);
  text-shadow: 0 0 6px var(--glow-accent), 0 0 18px rgb(255 43 214 / 0.35);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) var(--s-4);
}

.site-header nav a:not(.btn) {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.15s var(--ease), text-shadow 0.15s var(--ease);
}

/* Cyan slash slides in on hover; stays on the current page. */
.site-header nav a:not(.btn)::before {
  content: "/";
  content: "/" / "";
  position: absolute;
  right: 100%;
  margin-right: 0.3em;
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--cyan);
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 0.15s var(--ease), transform 0.2s var(--ease);
}

.site-header nav a:not(.btn):hover,
.site-header nav a[aria-current="page"] {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--glow-cyan);
}

.site-header nav a:not(.btn):hover::before,
.site-header nav a:not(.btn):focus-visible::before,
.site-header nav a[aria-current="page"]::before {
  opacity: 1;
  transform: none;
}

.site-header nav .btn {
  margin-left: var(--s-1);
}

/* Small screens: wordmark on row one; links and CTA share row two, in normal
   flow, so larger text wraps the CTA onto its own row instead of overlapping. */
@media (max-width: 639px) {
  /* Two rows is too tall to pin on a phone, so the header scrolls away. */
  .site-header {
    position: static;
    row-gap: 0;
    padding-block: 4px 8px;
  }

  .site-header nav {
    flex-basis: 100%;
    gap: var(--s-1) var(--s-2);
  }

  /* Tighter mono so links and CTA share one row down to 360px. */
  .site-header nav a:not(.btn) {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
  }

  .site-header nav .btn {
    margin-left: auto;
    padding-inline: 12px;
  }

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

  /* No hover on touch: mark the current page with an underline instead. */
  .site-header nav a:not(.btn)::before {
    display: none;
  }

  .site-header nav a[aria-current="page"] {
    text-decoration: underline 2px var(--cyan);
    text-underline-offset: 0.45em;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-1) var(--s-4);
  padding-block: var(--s-5);
  padding-inline: var(--page-inset);
  border-top: 1px solid transparent;
  border-image: var(--neon-line-dim) 1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.site-footer > :last-child {
  color: var(--accent-text);
}

@media (min-width: 640px) {
  .site-footer > :last-child {
    margin-left: auto;
  }
}

/* ---------- Clipped-corner frame ---------- */

/* Buttons and cards cut their top-left and bottom-right corners. The surface
   and 1px edge live on ::before, which takes the clip-path, so the element
   itself can still glow (a drop-shadow filter follows the cut shape) and
   show a focus outline. The two corner gradients draw the edge across each
   diagonal cut, which a clipped border alone would leave open. */
.btn::before,
.card::before {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid var(--edge);
  background:
    linear-gradient(to bottom right, transparent 50%, var(--edge) 50% calc(50% + 1.2px), transparent calc(50% + 1.2px)) top left / var(--cut) var(--cut) no-repeat border-box,
    linear-gradient(to bottom right, transparent calc(50% - 1.2px), var(--edge) calc(50% - 1.2px) 50%, transparent 50%) bottom right / var(--cut) var(--cut) no-repeat border-box,
    var(--fill);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  pointer-events: none;
}

/* ---------- Buttons ---------- */

.btn {
  --cut: 8px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  filter: drop-shadow(0 0 10px var(--glow));
  transition: color 0.18s var(--ease), --fill 0.18s var(--ease), --edge 0.18s var(--ease), --glow 0.18s var(--ease);
}

/* Cover the transparent border too, so the frame is the full button box. */
.btn::before {
  inset: -1px;
}

.btn::after {
  content: "→";
  content: "→" / "";
  transition: transform 0.2s var(--ease);
}

.btn[target="_blank"]::after {
  content: "↗";
  content: "↗" / "";
}

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

.btn[target="_blank"]:hover::after {
  transform: translate(2px, -2px);
}

/* Magenta neon fill with dark ink (6.28:1); hover swaps to cyan (14.26:1). */
.btn-primary {
  --fill: var(--accent);
  --edge: var(--accent);
  --glow: rgb(255 43 214 / 0.5);
  color: var(--accent-ink);
}

.btn-primary:hover {
  --fill: var(--cyan);
  --edge: var(--cyan);
  --glow: rgb(0 240 255 / 0.55);
  color: var(--paper);
}

/* Cyan outline on a faint cyan tint; cyan text is 11.6:1 on the hover tint. */
.btn-secondary {
  --fill: rgb(0 240 255 / 0.05);
  --edge: var(--cyan);
  --glow: transparent;
  color: var(--cyan);
}

.btn-secondary:hover {
  --fill: rgb(0 240 255 / 0.12);
  --glow: rgb(0 240 255 / 0.45);
}

/* ---------- Card ---------- */

.card {
  --cut: 14px;
  --edge: var(--rule);
  --fill: var(--surface);
  --glow: transparent;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: var(--s-3);
  filter: drop-shadow(0 0 12px var(--glow));
  transition: transform 0.2s var(--ease), --edge 0.2s var(--ease), --glow 0.2s var(--ease);
}

.card::before {
  inset: 0;
}

@media (min-width: 768px) {
  .card {
    padding: var(--s-4) var(--s-3) var(--s-3);
  }

  .card-meta {
    margin-bottom: var(--s-4);
  }
}

/* On a raised band, cards drop back to darker glass (#090911). */
.section-band .card {
  --fill: rgb(7 7 13 / 0.72);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--s-3);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--accent-text);
}

.card-index {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
}

.card-index::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgb(255 43 214 / 0.5), var(--rule) 40%, transparent);
}

.card-arrow {
  margin-left: auto;
  font-size: 1rem;
  color: var(--ink-2);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.card-title {
  margin: 0 0 var(--s-1);
  font-size: 1.5rem;
}

.card-title a {
  text-decoration: none;
}

/* The title link covers the whole card. The card's clip lives on its
   ::before, so this overlay's focus outline is never clipped. */
.card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card-title a:focus-visible {
  outline: none;
}

.card-title a:focus-visible::after {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.card-body {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-2);
}

/* Only linked cards react to hover; static cards stay put. */
.card-link:hover {
  --edge: var(--accent);
  --glow: rgb(255 43 214 / 0.4);
  transform: translateY(-2px);
}

.card-link:hover .card-arrow {
  color: var(--cyan);
  transform: translateX(3px);
}

/* ---------- Spec list ---------- */

.spec {
  display: grid;
  grid-template-columns: minmax(9ch, max-content) 1fr;
  column-gap: var(--s-4);
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  border-block: 1px solid var(--rule);
}

.spec > div {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 12ch 1fr;
  grid-template-columns: subgrid;
  padding-block: 12px;
}

.spec > div + div {
  border-top: 1px dashed var(--rule);
}

.spec dt {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  padding-top: 0.1em;
}

.spec dd {
  margin: 0;
  color: var(--ink);
}

/* ---------- CTA band ---------- */

.cta {
  display: grid;
  gap: var(--s-4);
}

@media (min-width: 900px) {
  .cta {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--s-10);
    align-items: end;
  }
}

.cta-heading {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
}

.cta-body {
  color: var(--ink-2);
}

.cta-side .actions {
  margin-top: var(--s-3);
}

.cta-email {
  margin-top: var(--s-2);
  font-size: 0.875rem;
  color: var(--ink-2);
}

/* ---------- Motion ---------- */

/* No blinking, no transitions; the cursor stays on, solid. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }

  .hero h1::after {
    opacity: 1;
  }

  .card-link:hover,
  .card-link:hover .card-arrow,
  .btn:hover::after,
  .link-arrow:hover::after,
  .site-header nav a::before {
    transform: none !important;
  }
}

/* ---------- Forced colors ---------- */

/* System colors replace the neon: drop the clear text fill, filters and
   painted frames, and let the element's own border mark buttons and cards. */
@media (forced-colors: active) {
  h1,
  h2:not(.card-title, .aside-title),
  .hero h1::after {
    background: none;
    -webkit-text-fill-color: currentColor;
    filter: none;
  }

  .prose .key {
    text-decoration: underline 2px;
  }

  .btn,
  .card,
  .bento-tile {
    filter: none;
    border: 1px solid CanvasText;
  }

  .btn::before,
  .card::before,
  .bento-tile::before,
  body::before {
    display: none;
  }
}

/* ---------- Home ---------- */

.home-more {
  margin-top: var(--s-5);
}

/* ---------- Bento ---------- */

/* "Ex is for" as an Apple-style bento of lit tiles. The one place the site
   trades clipped corners for big radii: six words shown like product
   features, not chrome. Phone: one column. 640px: two, with Execution and
   Excellence full width so no tile is orphaned. 1024px: four, Execution a
   2×2 hero; at 900px the 1×1 tiles were too narrow to set "Exploration"
   above 25px. Use <ul class="bento" role="list">. */
.bento {
  display: grid;
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Fill #0F0F17 sits a step above paper; each tile is lit by a soft corner
   glow on ::before rather than outlined. Worst case is text right on a
   glow's peak at hover strength, scanlines included: ink-2 5.0:1 (violet),
   5.2:1 (magenta, cyan); 7.1:1 on bare fill. The tile is a size container
   so the word can scale to its own width. */
.bento-tile {
  --hue: rgb(255 43 214 / 0.24);
  --at: 100% 0%;
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
  padding: var(--s-3);
  border: 1px solid rgb(255 255 255 / 0.06);
  border-radius: 28px;
  background: #0F0F17;
  overflow: hidden;
  overflow: clip;
}

.bento-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(75% 85% at var(--at), var(--hue), 40%, transparent);
  opacity: 0.75;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

@media (hover: hover) {
  .bento-tile:hover::before {
    opacity: 1;
  }
}

/* Hues rotate magenta, cyan, violet; corners mix so neighbours never light
   from the same side. Cyan is far brighter, so it gets less alpha. */
.bento-tile:nth-child(1) { --at: 100% 0%; }
.bento-tile:nth-child(2) { --at: 0% 0%; --hue: rgb(0 240 255 / 0.14); }
.bento-tile:nth-child(3) { --at: 100% 100%; --hue: rgb(139 92 246 / 0.28); }
.bento-tile:nth-child(4) { --at: 0% 0%; }
.bento-tile:nth-child(5) { --at: 100% 100%; --hue: rgb(0 240 255 / 0.14); }
.bento-tile:nth-child(6) { --at: 100% 0%; --hue: rgb(139 92 246 / 0.28); }

/* The word fills its tile: 100cqi / --fit, capped at --max. --fit is the
   longest word that can land in the tile, measured in em at Oxanium 700 and
   -0.03em tracking (Execution 4.48, Exploration 5.17, Experimentation 7.51),
   plus ~4% slack, so it never overflows: "Experimentation" sets at 31px in
   a 320px phone's 240px tile. Normal case and tight tracking, Apple style;
   the h1/h2 chrome fill doesn't reach h3. */
.bento-word {
  --fit: 7.8;
  --max: 3.5rem;
  margin: 0 0 12px;
  font-size: 2rem;
  font-size: min(var(--max), 100cqi / var(--fit));
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.bento-tile:nth-child(1) .bento-word {
  --fit: 4.7;
  --max: 6rem;
}

/* Set like the wordmark: magenta "Ex", the rest in the same ink as
   "Critical". Large display text needs 3:1; magenta is 5.6:1 on the fill
   and 4.1:1 on a glow's peak, ink far higher on both. */
.bento-ex {
  color: var(--accent);
}

.bento-rest {
  color: var(--ink);
}

.bento-line {
  margin: 0;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.45;
  color: var(--ink-2);
}

.bento-tile:nth-child(1) {
  min-height: 360px;
}

@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .bento-tile {
    min-height: 240px;
    padding: var(--s-4);
  }

  .bento-tile:nth-child(1) {
    grid-column: 1 / -1;
    min-height: 400px;
  }

  .bento-tile:nth-child(6) {
    grid-column: 1 / -1;
  }
}

/* Auto-placement does the rest: Experience fills row 1 beside the hero,
   Expertise and Exploration row 2, the last two pair up on row 3. */
@media (min-width: 1024px) {
  .bento {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(260px, auto);
  }

  .bento-tile:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 0;
    padding: var(--s-5);
  }

  .bento-tile:is(:nth-child(2), :nth-child(5), :nth-child(6)) {
    grid-column: span 2;
  }

  .bento-tile:is(:nth-child(3), :nth-child(4)) .bento-word {
    --fit: 5.4;
  }
}

/* Tiles rise into place as they scroll in. The static styles are the end
   state, so browsers without scroll timelines and the reduced-motion block
   (animation: none) both show them at rest, fully opaque. animation-timeline
   follows the shorthand, which would reset it. */
@supports (animation-timeline: view()) {
  .bento-tile {
    animation: bento-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
}

@keyframes bento-rise {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
  }
}

/* ---------- Inner pages ---------- */

/* Services anchors land below the sticky header (≥640px). 1px less tucks the
   section's top hairline under the header's own rule instead of doubling it. */
@media (min-width: 640px) {
  .section[id] {
    scroll-margin-top: calc(var(--header-h) - 1px);
  }
}

/* .split that goes two-column from 768px instead of 900px. */
@media (min-width: 768px) {
  .split-md {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: var(--s-8);
  }

  .split-md > aside {
    position: sticky;
    top: calc(var(--header-h) + var(--s-4));
    align-self: start;
  }
}

@media (min-width: 900px) {
  .split-md {
    gap: var(--s-10);
  }
}

/* Small mono label heading inside an .aside: "Typical shape", "Field notes". */
.aside-title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.aside * + .aside-title {
  margin-top: var(--s-4);
}

.contact-cards {
  display: grid;
  gap: var(--gap);
}

.contact-card .card-title {
  /* balance breaks "30-|minute" on phones; pretty keeps the compound whole. */
  text-wrap: pretty;
}

.contact-card .card-body {
  margin-bottom: 0;
}

.contact-card .actions {
  margin-top: var(--s-3);
}

/* The booking card is marked by a lit cyan edge instead of the default rule. */
.contact-card-primary {
  --edge: var(--cyan);
  --glow: rgb(0 240 255 / 0.2);
}

.contact-card-primary .card-title {
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
}

.contact-email {
  margin: var(--s-2) 0 0;
}
