/* ==========================================================================
   Lariel — style.css
   Direction: MERIDIAN. Dark, blue-shifted, precise.
   Tokens first; every rule below references them. Change the palette here.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colour roles */
  --surface:        #0A0D12;
  --surface-alt:    #0C1017;
  --raised:         #121721;
  --raised-hi:      #161C28;
  --border:         #1E2633;
  --border-hi:      #2B3647;
  /* Borders on interactive controls need 3:1 against --surface (WCAG 1.4.11).
     --border-hi is decorative only; these two are for inputs and buttons. */
  --border-ui:      #59647A;
  --border-ui-hi:   #76839B;
  --text:           #E6EBF2;
  --muted:          #8A97A8;
  --accent:         #4DD0E1;
  --accent-hover:   #6FDCEA;
  --accent-2:       #5B6CFF;
  --on-accent:      #06121A;
  --danger:         #FF8A8A;
  --success:        #6EE7A8;

  /* Accent gradient — reserved for the h1 emphasis and the primary CTA */
  --accent-grad: linear-gradient(100deg, var(--accent), var(--accent-2));

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Section rhythm — fluid */
  --section-y: clamp(56px, 9vw, 120px);
  --gutter:    clamp(18px, 5vw, 72px);
  --measure:   68ch;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 8px 28px rgba(0, 0, 0, .45);

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
               "Liberation Mono", monospace;

  /* Motion */
  --t-fast: 120ms;
  --t-base: 180ms;
  --t-slow: 240ms;
  --ease:   cubic-bezier(.2, .7, .2, 1);

  /* Layout */
  --max:    1180px;
  --max-narrow: 760px;
  --header-h: 64px;
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 400 clamp(15px, .4vw + 14px, 17px)/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.022em;
  text-wrap: balance;
}

h1 { font-size: clamp(33px, 5.6vw, 62px); line-height: 1.05; letter-spacing: -.03em; }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: clamp(17px, 1.3vw, 19px); letter-spacing: -.012em; }
h4 { font-size: 16px; letter-spacing: -.008em; }

p  { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--s-4); padding-left: 1.15em; }
li { margin-bottom: var(--s-2); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: color var(--t-base) var(--ease);
}
a:hover { color: var(--accent-hover); }

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

strong { font-weight: 600; color: var(--text); }

hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: var(--s-7) 0;
}

::selection { background: var(--accent); color: var(--on-accent); }

/* Focus — visible on everything interactive, never removed */
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   3. Utilities
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: var(--max-narrow); }

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

.section--alt {
  background: var(--surface-alt);
  border-block: 1px solid var(--border);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin: 0 0 var(--s-4);
  font: 500 clamp(10px, .9vw, 12px)/1 var(--font-mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.lede {
  color: var(--muted);
  font-size: clamp(16px, 1.1vw, 18px);
  max-width: 58ch;
}

.section-head { margin-bottom: clamp(34px, 5vw, 60px); }
.section-head p { color: var(--muted); max-width: 60ch; margin-top: var(--s-4); }

/* Hairline that draws itself in on reveal */
.rule {
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--border) 40%, transparent);
  transform-origin: left center;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -120px;
  z-index: 200;
  padding: var(--s-3) var(--s-5);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: top var(--t-base) var(--ease);
}
.skip-link:focus { top: var(--s-4); color: var(--on-accent); }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font: 600 15px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: filter var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent-grad);
  color: var(--on-accent);
}
.btn--primary:hover { filter: brightness(1.08); color: var(--on-accent); }

.btn--ghost {
  background: transparent;
  border-color: var(--border-ui);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--sm { padding: 10px 18px; font-size: 14px; }

.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn[disabled]:active { transform: none; }

/* --------------------------------------------------------------------------
   5. Header and navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 18, .86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -.02em;
  font-size: 17px;
}
.brand:hover { color: var(--text); }
.brand svg { flex: none; }
.brand span small {
  display: block;
  font: 500 9px/1 var(--font-mono);
  letter-spacing: .16em;
  color: var(--muted);
  margin-top: 3px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--s-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  transition: color var(--t-base) var(--ease);
}
.nav-links a:hover { color: var(--text); }

.nav-cta { display: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-ui);
  border-radius: var(--r-sm);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease);
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle .bar {
  position: relative;
  display: block;
  width: 17px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--t-base) var(--ease),
              opacity var(--t-fast) var(--ease);
}
.nav-toggle .bar::before,
.nav-toggle .bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--t-base) var(--ease);
}
.nav-toggle .bar::before { top: -5px; }
.nav-toggle .bar::after  { top:  5px; }

.nav-toggle[aria-expanded="true"] .bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .bar::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar::after  { transform: translateY(-5px) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.mobile-menu.is-open { display: block; }
.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: var(--s-4) 0 var(--s-5);
}
.mobile-menu li { margin: 0; }
.mobile-menu a {
  display: block;
  padding: 13px 0;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}
.mobile-menu .btn { width: 100%; margin-top: var(--s-5); }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta   { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-menu, .mobile-menu.is-open { display: none; }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 11vw, 132px) clamp(52px, 9vw, 112px);
  overflow: hidden;
}

/* Signature effect: a faint technical grid plus a cold accent bloom.
   Both are decorative and carry no content. */
.hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  opacity: .38;
  -webkit-mask-image: radial-gradient(70% 62% at 50% 24%, #000 20%, transparent 78%);
  mask-image: radial-gradient(70% 62% at 50% 24%, #000 20%, transparent 78%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: -28%;
  right: -14%;
  width: min(880px, 92vw);
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%,
              rgba(77, 208, 225, .17), rgba(91, 108, 255, .10) 42%, transparent 68%);
  pointer-events: none;
  animation: bloom 22s var(--ease) infinite alternate;
}

@keyframes bloom {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-5%, 4%, 0) scale(1.14); }
}

.hero > .wrap { position: relative; z-index: 1; }

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

.hero h1 .grad {
  /* Solid colour first: if background-clip:text is unsupported the words
     still read at 9.6:1 against the surface. */
  color: var(--accent);
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hero h1 .grad { -webkit-text-fill-color: transparent; color: transparent; }
}

.hero .lede { font-size: clamp(16px, 1.3vw, 19px); max-width: 56ch; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-6);
  margin-top: clamp(40px, 6vw, 68px);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
  font: 500 12px/1.5 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-meta span::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* --------------------------------------------------------------------------
   7. Cards and grids
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 268px), 1fr));
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.3vw, 28px);
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease),
              transform var(--t-base) var(--ease);
}
.card:hover {
  border-color: var(--accent);
  background: var(--raised-hi);
  transform: translateY(-3px);
}

.card h3 { margin-bottom: var(--s-3); }
.card p  { color: var(--muted); font-size: 14.5px; margin-bottom: 0; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--s-5);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-sm);
  color: var(--accent);
  transition: border-color var(--t-base) var(--ease);
}
.card:hover .card-icon { border-color: var(--accent); }
.card-icon svg { width: 20px; height: 20px; }

.card-list {
  margin: var(--s-4) 0 0;
  padding: 0;
  list-style: none;
}
.card-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: var(--s-2);
  font-size: 13.5px;
  color: var(--muted);
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 7px;
  height: 1px;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   8. Process timeline
   -------------------------------------------------------------------------- */
.phases {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  counter-reset: phase;
}

.phase {
  position: relative;
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
}
.phase::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 46px;
  height: 1px;
  background: var(--accent);
}
.phase .num {
  display: block;
  margin-bottom: var(--s-3);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .18em;
  color: var(--accent);
}
.phase h3 { margin-bottom: var(--s-3); }
.phase p  { color: var(--muted); font-size: 14.5px; }

/* --------------------------------------------------------------------------
   9. Split panel (about / sectors)
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
@media (min-width: 880px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); }
}

.fact-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.fact-list > div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--border);
}
.fact-list dt {
  flex: 0 0 148px;
  font: 500 11.5px/1.5 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.fact-list dd {
  flex: 1 1 200px;
  margin: 0;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   10. Engagement models
   -------------------------------------------------------------------------- */
.model {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.4vw, 30px);
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t-base) var(--ease);
}
.model:hover { border-color: var(--border-hi); }
.model .tag {
  align-self: flex-start;
  margin-bottom: var(--s-4);
  padding: 5px 11px;
  border: 1px solid var(--border-hi);
  border-radius: var(--r-pill);
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.model p { color: var(--muted); font-size: 14.5px; }

/* --------------------------------------------------------------------------
   11. Contact and form
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: clamp(30px, 5vw, 60px);
  align-items: start;
}
@media (min-width: 880px) {
  .contact-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

.form {
  padding: clamp(22px, 3vw, 36px);
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.field { margin-bottom: var(--s-5); }
.field:last-of-type { margin-bottom: var(--s-4); }

.field label {
  display: block;
  margin-bottom: var(--s-2);
  font: 500 11.5px/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.field .opt { text-transform: none; letter-spacing: 0; opacity: .7; }

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-ui);
  border-radius: var(--r-sm);
  color: var(--text);
  font: 400 15px/1.5 var(--font-sans);
  transition: border-color var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: #78869A; }

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

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-alt);
  box-shadow: 0 0 0 3px rgba(77, 208, 225, .14);
}
.field input:focus-visible,
.field textarea:focus-visible { outline: none; }

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

.consent {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.consent input {
  flex: none;
  width: 17px;
  height: 17px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}
.consent label {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  margin: 0;
}

/* Honeypot — out of layout, out of the a11y tree */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: var(--s-4) 0 0;
  min-height: 1.4em;
  font-size: 14px;
  color: var(--muted);
}
.form-status.is-success { color: var(--success); }
.form-status.is-error   { color: var(--danger); }

.form-note {
  margin-top: var(--s-4);
  font-size: 13px;
  color: var(--muted);
}

/* Shown only when JavaScript is unavailable */
.no-js-note { display: none; }
html:not(.js) .no-js-note {
  display: block;
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--muted);
}

.contact-aside h3 { margin-bottom: var(--s-4); }
.contact-aside .rule { margin: var(--s-6) 0; }
.contact-aside address {
  font-style: normal;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}
.contact-aside .email {
  display: inline-block;
  margin-top: var(--s-2);
  font: 500 15px/1.5 var(--font-mono);
  word-break: break-all;
}

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  padding-block: clamp(40px, 6vw, 72px) var(--s-6);
  font-size: 14px;
}

.footer-top {
  display: grid;
  gap: var(--s-7);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  padding-bottom: var(--s-7);
  border-bottom: 1px solid var(--border);
}

.footer-top h4 {
  margin-bottom: var(--s-4);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-top ul { list-style: none; margin: 0; padding: 0; }
.footer-top li { margin-bottom: var(--s-3); }
.footer-top a {
  color: var(--text);
  text-decoration: none;
  font-size: 14.5px;
}
.footer-top a:hover { color: var(--accent); }
.footer-top p { color: var(--muted); font-size: 14px; }
.footer-top address {
  margin-top: var(--s-4);
  font-style: normal;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  align-items: center;
  padding-top: var(--s-5);
  color: var(--muted);
  font-size: 13px;
}
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }
.footer-bottom .spacer { margin-left: auto; }

/* --------------------------------------------------------------------------
   13. Legal pages and 404
   -------------------------------------------------------------------------- */
.doc { padding-block: clamp(44px, 7vw, 86px); }
.doc .doc-head { margin-bottom: var(--s-7); }
.doc .doc-head p { color: var(--muted); margin-top: var(--s-3); }

.doc-meta {
  margin: var(--s-5) 0 0;
  padding: var(--s-5);
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--muted);
}
.doc-meta strong { display: block; color: var(--text); margin-bottom: var(--s-2); }

.doc-body { max-width: var(--measure); }
.doc-body h2 {
  margin-top: var(--s-8);
  margin-bottom: var(--s-4);
  font-size: clamp(21px, 2.2vw, 26px);
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { margin-top: var(--s-6); margin-bottom: var(--s-3); }
.doc-body p,
.doc-body li { color: var(--muted); }
.doc-body li { margin-bottom: var(--s-3); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-8);
  font: 500 13px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
}

.error-page {
  display: flex;
  align-items: center;
  min-height: 64vh;
  padding-block: var(--s-9);
}
.error-page .code {
  font: 500 clamp(56px, 13vw, 128px)/1 var(--font-mono);
  letter-spacing: -.04em;
  color: var(--accent);
  margin-bottom: var(--s-4);
}

/* --------------------------------------------------------------------------
   14. Scroll reveals
   Driven by the `js` class, so with JavaScript off every element is already
   in its final state and nothing is stuck invisible.
   -------------------------------------------------------------------------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-slow) var(--ease),
              transform var(--t-slow) var(--ease);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

html.js .reveal-rule { transform: scaleX(0); transition: transform 700ms var(--ease); }
html.js .reveal-rule.is-visible { transform: scaleX(1); }

/* Stagger within a grid */
html.js .reveal[data-delay="1"] { transition-delay: 60ms; }
html.js .reveal[data-delay="2"] { transition-delay: 120ms; }
html.js .reveal[data-delay="3"] { transition-delay: 180ms; }
html.js .reveal[data-delay="4"] { transition-delay: 240ms; }
html.js .reveal[data-delay="5"] { transition-delay: 300ms; }

/* --------------------------------------------------------------------------
   15. Reduced motion — WCAG 2.2 SC 2.3.3
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  html.js .reveal,
  html.js .reveal-rule {
    opacity: 1 !important;
    transform: none !important;
  }

  .card:hover { transform: none; }
  .hero::after { animation: none; }
}


/* ==========================================================================
   16. Image slots — used by the photography variant (index-images.html) only
   Every slot has a tinted, bordered container and a fixed aspect ratio, so a
   missing file reads as a deliberate panel rather than a broken image.
   ========================================================================== */
.media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    linear-gradient(145deg, rgba(77, 208, 225, .09), rgba(91, 108, 255, .07)),
    var(--raised);
}

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

/* Photographs are warmer and brighter than this palette. The overlay cools
   them down and darkens the lower edge so captions and adjacent text keep
   their contrast. */
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(10, 13, 18, .92) 0%, rgba(10, 13, 18, .55) 26%, rgba(10, 13, 18, .10) 60%),
    linear-gradient(140deg, rgba(91, 108, 255, .18), rgba(77, 208, 225, .10));
  mix-blend-mode: normal;
}

/* 4:5 only where the hero is a narrow side column. Full-width below the
   split breakpoint, a 4:5 box becomes a ~1080px-tall wall on a tablet, so the
   slot goes landscape there and object-fit crops the supplied portrait. */
.media--hero { aspect-ratio: 4 / 3; max-height: 58vh; }
@media (min-width: 960px) {
  .media--hero { aspect-ratio: 4 / 5; max-height: none; }
}
.media--wide { aspect-ratio: 16 / 10; }
.media--card { aspect-ratio: 3 / 2; border: 0; border-radius: 0; }

/* Caption sitting over the bottom of a slot */
.media-caption {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: var(--s-5);
  font: 500 11.5px/1.5 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
}

/* Hero becomes a two-column split when there is a picture to show */
@media (min-width: 960px) {
  .hero--split .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
  }
}

.hero--split .media--hero { margin-top: var(--s-6); }
@media (min-width: 960px) {
  .hero--split .media--hero { margin-top: 0; }
}

/* Cards that lead with a photograph */
.card--media { padding: 0; overflow: hidden; }
.card--media .card-body { padding: clamp(20px, 2.3vw, 26px); }
.card--media .media--card { border-bottom: 1px solid var(--border); }

/* About section image */
.about-media { margin-top: var(--s-6); }

@media (prefers-reduced-motion: reduce) {
  .card--media:hover { transform: none; }
}
