/* ==========================================================================
   MUCO LABS — Design System
   Built to MUCO_LABS_PAGE_BY_PAGE_UI_UX_MASTER_SPEC.md

   Direction (spec §2): premium technology studio + engineering lab + serious
   business partner. Not a template, not a purple-gradient SaaS clone, not an
   over-animated award site.

   Palette (spec §3.1): obsidian and graphite surfaces, warm ivory text, one
   muted copper accent. Secondary colour only where it carries meaning —
   status, warning, error — never as decoration.

   Background (spec §4): layered depth rather than a flat black sheet. A base,
   a low-opacity light source, grain, architectural linework in selected
   sections only, an occasional accent bloom, and a vignette.
   ========================================================================== */

@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-tight-latin-ext.woff2') format('woff2');
  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;
}

@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-tight-latin.woff2') format('woff2');
  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;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  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;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  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;
}

/* --------------------------------------------------------------------------
   1. Tokens (spec §3)
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Obsidian to graphite. Each step is a real surface level, not a tint. */
  --bg: #0a0a0c;
  --surface: #141416;
  --surface-2: #1a1a1d;
  --surface-3: #212125;

  /* Warm ivory rather than pure white, which glares on obsidian. */
  --text: #f2ede6;
  --text-2: #b5ada2;
  --text-dim: #968d82;

  /* Warm-grey borders, three weights. */
  --line: rgba(242, 237, 230, 0.10);
  --line-strong: rgba(242, 237, 230, 0.20);
  --line-soft: rgba(242, 237, 230, 0.055);

  /* One accent, used deliberately (spec §3.1): CTAs, active nav, thin border
     glow, selected tabs, progress, small labels, hover underline, focus ring. */
  --accent: #cf9061;
  --accent-bright: #e0a578;
  --accent-ink: #1a0f07;
  --accent-soft: rgba(207, 144, 97, 0.10);
  --accent-line: rgba(207, 144, 97, 0.34);

  /* Semantic only (spec §3.1). Never decorative. */
  --ok: #6ec08a;
  --warn: #d6a55c;
  --err: #e08a80;
  --info: #7fa8d4;
  --whatsapp: #45c265;

  --radius: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 72px;
  --sp-9: 112px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: 0 12px 34px -18px rgba(0, 0, 0, 0.9);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.95);

  --font-sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --transition: 0.22s var(--ease);
  --nav-h: 68px;
  --gutter: 48px;
  --max: 1320px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

/* Grain (spec §4.1 layer 3, §4.4 "1-3% grain"). Inline SVG so it costs a
   string rather than a request, and it stops large dark gradients banding on
   cheap panels. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

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

img {
  height: auto;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 999;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius);
  transition: top var(--transition);
}

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

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

/* --------------------------------------------------------------------------
   3. Background system (spec §4)
   Layered light sources plus a vignette. Only transform and opacity animate,
   so this stays on the compositor.
   -------------------------------------------------------------------------- */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 52% 40% at 50% -8%, rgba(207, 144, 97, 0.13), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(207, 144, 97, 0.05), transparent 72%),
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(0, 0, 0, 0.55), transparent 70%);
  animation: bloom 44s ease-in-out infinite;
}

/* Vignette (spec §4.1 layer 6). */
.ambient-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 78% 68% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.42));
}

@keyframes bloom {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.82; transform: scale(1.05); }
}

/* Architectural linework, in selected sections only (spec §4.1 layer 4;
   §4.4 forbids visible repeating wallpaper) — masked so it fades out well
   before the section edges. */
.section-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent 78%);
}

/* Section alternation (spec §4.3) so no two consecutive bands look identical. */
.band-surface {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.band-deep {
  background: linear-gradient(180deg, var(--bg), #08080a 60%, var(--bg));
}

/* --------------------------------------------------------------------------
   4. Typography (spec §5)
   -------------------------------------------------------------------------- */
h1 {
  font-size: clamp(38px, 5.6vw, 76px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: var(--sp-5);
  text-wrap: balance;
}

h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.1;
  margin-bottom: var(--sp-4);
  text-wrap: balance;
}

h3 {
  font-size: clamp(19px, 1.5vw, 24px);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.28;
  margin-bottom: var(--sp-2);
}

h4 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-2);
}

p {
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.68;
}

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

/* Spec §5.1 allows a serif only as a very small editorial accent; the accent
   word takes the accent colour instead, which keeps the page on one typeface. */
.accent-serif {
  color: var(--accent);
  font-style: normal;
}

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--text-2);
  max-width: 66ch;
  line-height: 1.6;
  margin-bottom: var(--sp-6);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin-bottom: var(--sp-5);
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--accent-line);
  margin-right: 12px;
}

.section-sub {
  font-size: 17px;
  color: var(--text-2);
  max-width: 62ch;
  margin: var(--sp-3) 0 0;
  line-height: 1.6;
}

.section-head {
  margin-bottom: var(--sp-7);
  max-width: 70ch;
}

.text-mono {
  font-family: var(--font-mono);
}

.prose > * + * {
  margin-top: var(--sp-4);
}

.prose h2 {
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

.prose h3 {
  margin-top: var(--sp-6);
}

.prose ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.prose li {
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.68;
  padding-left: 22px;
  position: relative;
}

.prose li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* --------------------------------------------------------------------------
   5. Layout (spec §6, §7)
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

/* Same outer box as .container, so the gutter lines up exactly with every
   full-width section; only the reading measure inside is capped. Centring the
   whole box instead pushed these sections off the page's left edge. */
.container-narrow > * {
  max-width: 820px;
}

main {
  flex: 1;
  position: relative;
  z-index: 1;
}

section {
  padding: var(--sp-9) 0;
  position: relative;
}

.section-tight {
  padding: var(--sp-8) 0;
}

/* Runs flush against the block above it, so the two read as one unit. */
.section-flush {
  padding-top: 0;
}

.section-centered {
  min-height: 52vh;
  display: flex;
  align-items: center;
}

/* ---- Utilities -----------------------------------------------------------
   Deliberately few and deliberately named after what they do. These replaced
   ~350 repeated inline style attributes across the built pages. */
.mt-1 { margin-top: 4px; }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-7 { margin-bottom: var(--sp-7); }
.mx-auto { margin-left: auto; margin-right: auto; }
.gap-7 { gap: var(--sp-7); }
.grow { flex: 1; }
.block { display: block; }
.center { justify-content: center; text-align: center; }
.self-start { align-self: flex-start; }
.fs-xs { font-size: 12px; }
.fs-sm { font-size: 14.3px; }
.fs-lg { font-size: 19px; letter-spacing: -0.015em; }
.fs-xl { font-size: 22px; letter-spacing: -0.02em; }
.accent { color: var(--accent); }
.ink { color: var(--text); }

/* A paragraph-level aside: smaller and dimmer than body copy. */
.note {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* One step up from body copy, for a card's opening line. */
.lede {
  font-size: 16px;
  color: var(--text);
}

/* Strips a button back to plain text without losing its button semantics. */
.bare {
  padding: 0;
  background: none;
  border: none;
}

.section-divider {
  border-top: 1px solid var(--line);
}

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

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--sp-8);
  align-items: start;
}

/* The enclosing section already supplies the vertical rhythm; adding more
   here left a dead band under the hero. */
/* For a split whose left side is much shorter than its right: the short column
   stays with you instead of leaving a hole beside the long one. */
.split-sticky > :first-child {
  position: sticky;
  top: calc(var(--nav-h) + var(--sp-6));
  align-self: start;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: var(--sp-8);
  align-items: center;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   6. Header (spec §10)
   -------------------------------------------------------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

header.is-scrolled {
  background: rgba(10, 10, 12, 0.92);
  border-bottom-color: var(--line);
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  height: var(--nav-h);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.logo-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.nav-links {
  display: flex;
  gap: var(--sp-6);
  align-items: center;
}

/* Spec §10.3: a thin accent line animates left to right; no bouncing. */
.nav-links a {
  font-size: 14.5px;
  font-weight: 450;
  color: var(--text-2);
  transition: color var(--transition);
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a[aria-current='page'] {
  color: var(--text);
}

.nav-links a[aria-current='page']::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: var(--radius);
  padding: 9px 13px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.mobile-menu {
  display: none;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0 var(--gutter) var(--sp-5);
  flex-direction: column;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}

.mobile-menu a[aria-current='page'] {
  color: var(--accent);
}

.mobile-menu .btn {
  margin-top: var(--sp-4);
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   7. Buttons (spec §12)
   -------------------------------------------------------------------------- */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

.btn-group-center {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  font-size: 14.5px;
  font-weight: 550;
  letter-spacing: -0.008em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: transform var(--transition), background var(--transition),
    border-color var(--transition), box-shadow var(--transition), color var(--transition);
}

/* Spec §12: slight translateY(-1px), subtle glow, icon moves 2-4px. */
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent-line);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  flex-shrink: 0;
  transition: transform var(--transition);
}

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

.btn-primary,
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-primary:hover,
.btn-accent:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  box-shadow: 0 6px 26px -8px rgba(207, 144, 97, 0.55);
}

.btn-secondary {
  background: var(--surface-2);
}

.btn-secondary:hover {
  background: var(--surface-3);
}

/* Spec §12: WhatsApp green for the icon only, not the whole control. */
.btn-whatsapp svg {
  color: var(--whatsapp);
}

.btn-instagram svg {
  color: #e1306c;
}

.btn-sm {
  padding: 9px 15px;
  font-size: 13px;
}

.btn-lg {
  padding: 15px 26px;
  font-size: 15.5px;
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   8. Cards (spec §13 — four families, not one repeated box)
   -------------------------------------------------------------------------- */
.card,
.spotlight-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), background var(--transition),
    transform var(--transition);
}

.card > p {
  margin-top: var(--sp-2);
}

/* Service and capability cards. Keeping the links on a shared baseline is what
   makes a row of cards read as a row rather than a ragged stack. */
.card-outcome {
  color: var(--text);
  font-weight: 600;
  margin-top: 6px;
}

.card-body {
  margin-top: var(--sp-3);
}

.card-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: auto;
  padding-top: var(--sp-4);
}

.card-cta {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition);
}

.card-cta:hover {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-cta-quiet {
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 400;
}

.card-cta-quiet:hover {
  color: var(--text-2);
}

.card-lg {
  padding: var(--sp-6);
}

.card-quiet {
  background: var(--surface-2);
}

.card-interactive:hover,
.spotlight-card:hover {
  border-color: var(--accent-line);
  background: var(--surface-2);
  transform: translateY(-2px);
}

/* Spec §4.2 / §13: a thin accent border glow on the one featured surface. */
.border-beam-card {
  border-color: var(--accent-line);
  background:
    radial-gradient(ellipse 90% 140% at 50% 0%, rgba(207, 144, 97, 0.09), transparent 62%),
    var(--surface);
}

.cta-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-9) var(--sp-6);
  text-align: center;
  background:
    radial-gradient(ellipse 62% 130% at 50% 100%, rgba(207, 144, 97, 0.13), transparent 66%),
    var(--surface);
}

.cta-box p {
  max-width: 58ch;
  margin-left: auto;
  margin-right: auto;
}

.callout {
  border-left: 2px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--sp-4) var(--sp-5);
}

.callout-warn {
  border-left-color: var(--warn);
}

/* --------------------------------------------------------------------------
   9. Tags, badges, pills
   -------------------------------------------------------------------------- */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  margin-right: 6px;
  margin-bottom: 6px;
}

.tag-subtle {
  border-color: var(--line-soft);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--sp-3);
}

.tag-row .tag {
  margin: 0;
}

/* Spec §55: never convey information by colour alone — each badge carries a
   word as well as a hue. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid currentColor;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge-client { color: var(--accent); }
.badge-live { color: var(--ok); }
.badge-build { color: var(--info); }
.badge-spec { color: var(--warn); }
.badge-concept { color: var(--text-dim); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  margin-bottom: var(--sp-5);
  letter-spacing: 0.3px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(110, 192, 138, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(110, 192, 138, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(110, 192, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(110, 192, 138, 0); }
}

/* --------------------------------------------------------------------------
   10. Capability strip, chips, trust, process (spec §14 HOME 03/06/07/10)
   -------------------------------------------------------------------------- */
.strip-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--sp-4);
}

/* A grid rather than a wrapping flex row: eight items in four columns is two
   even rows, where flex-wrap left a single orphan on the second line. */
.cap-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.cap-strip span {
  padding: 17px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-2);
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
  transition: color var(--transition), background var(--transition);
}

.cap-strip span:nth-child(4n) {
  border-right: none;
}

.cap-strip span:nth-last-child(-n + 4) {
  border-bottom: none;
}

.cap-strip span:hover {
  color: var(--accent);
  background: var(--surface-2);
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
}

.trust-item svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.chip {
  font-size: 13.5px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 9px 17px;
  transition: all var(--transition);
}

.chip:hover {
  border-color: var(--accent-line);
  color: var(--text);
  background: var(--surface-2);
}

/* Numbered process (spec §14 HOME 10, §7 "numbered large typography"). */
.process-list {
  display: grid;
  gap: 0;
  counter-reset: step;
}

.process-step {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: var(--sp-4);
  align-items: start;
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--line-soft);
  counter-increment: step;
}

.process-step:first-child {
  border-top: 1px solid var(--line);
}

.process-step::before {
  content: '0' counter(step);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 300;
  color: var(--accent);
  opacity: 0.65;
  line-height: 1;
  padding-top: 4px;
}

.icon-tile {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--sp-4);
  flex-shrink: 0;
}

.icon-tile-alt {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--text-2);
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: var(--sp-4) 0;
}

.feature-list li {
  position: relative;
  padding: 10px 0 10px 26px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.55;
  border-bottom: 1px solid var(--line-soft);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 19px;
  width: 12px;
  height: 1px;
  background: var(--accent);
}

.def-list {
  display: grid;
  gap: 0;
  margin: var(--sp-4) 0;
}

.def-row {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: var(--sp-4);
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.def-row:last-child {
  border-bottom: none;
}

.def-row dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 3px;
}

.def-row dd {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   11. Industries matrix (spec §14 HOME 06)
   -------------------------------------------------------------------------- */
.matrix {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.matrix-list {
  /* Grid items default to min-width:auto, so without this the rail refuses to
     shrink below its widest label and pushes the page sideways at 320px. */
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--bg);
  padding: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.matrix-list button {
  text-align: left;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  color: var(--text-2);
  padding: 9px 15px;
  font-size: 14.5px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.matrix-list button:hover {
  color: var(--text);
  background: var(--surface-2);
}

.matrix-list button[aria-selected='true'] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 550;
}

.matrix-panel {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.matrix-panel[hidden] {
  display: none;
}

.matrix-panels {
  min-width: 0;
}

.matrix-panel h3 {
  color: var(--text);
}

.matrix-panel > p {
  font-size: 15.5px;
  max-width: 56ch;
}

.matrix-cta {
  margin-top: var(--sp-6);
  align-self: flex-start;
}

.matrix-start {
  font-size: 14.5px;
  max-width: 56ch;
  margin-top: 6px;
}

.matrix-lead {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: var(--sp-5);
}

.matrix-modules {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.matrix-modules span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 12px;
  background: var(--surface-2);
}

/* --------------------------------------------------------------------------
   11b. Contact channels (spec 29 CONTACT 02)
   Each card commits to what the channel is for and what to expect back, so
   the visitor picks once instead of guessing.
   -------------------------------------------------------------------------- */
.channel-grid {
  margin-top: var(--sp-7);
}

.channel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), transform var(--transition),
    background var(--transition);
}

.channel-card:hover {
  border-color: var(--accent-line);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.channel-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--sp-3);
}

.channel-whatsapp .channel-icon {
  color: var(--whatsapp);
  border-color: rgba(69, 194, 101, 0.32);
  background: rgba(69, 194, 101, 0.08);
}

.channel-instagram .channel-icon {
  color: #e1306c;
  border-color: rgba(225, 48, 108, 0.32);
  background: rgba(225, 48, 108, 0.08);
}

.channel-card h3 {
  margin-bottom: 0;
}

.channel-value {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  word-break: break-word;
  margin-bottom: var(--sp-2);
}

.channel-card p {
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
}

.channel-expect {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-soft);
}

.h2-sm {
  font-size: clamp(20px, 1.8vw, 23px);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-3);
}

.form-intro {
  font-size: 14.5px;
  margin-bottom: var(--sp-5);
}

.def-list-wide .def-row {
  grid-template-columns: 236px 1fr;
  padding: 14px 0;
}

.def-list-wide dt {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
  padding-top: 0;
}

.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.text-link:hover {
  color: var(--accent-bright);
}

/* --------------------------------------------------------------------------
   12. Pricing (spec 27)
   -------------------------------------------------------------------------- */
.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-6) var(--sp-5);
  display: flex;
  flex-direction: column;
}

.price-card-featured {
  border-color: var(--accent-line);
  background:
    radial-gradient(ellipse 90% 130% at 50% 0%, rgba(207, 144, 97, 0.09), transparent 62%),
    var(--surface);
}

.price-tagline {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  margin: var(--sp-4) 0 var(--sp-2);
  align-self: flex-start;
}

.price-card .btn {
  margin-top: auto;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  text-align: left;
  padding: 14px 20px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--line-soft);
}

th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface-2);
  border-bottom-color: var(--line);
}

td {
  color: var(--text-2);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   13. FAQ (spec §30)
   -------------------------------------------------------------------------- */
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-bottom: var(--sp-2);
  transition: border-color var(--transition);
}

.faq-item[open] {
  border-color: var(--accent-line);
}

.faq-item summary {
  cursor: pointer;
  padding: 20px 52px 20px 22px;
  position: relative;
  list-style: none;
}

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

.faq-item summary h2 {
  display: inline;
  font-size: 16.5px;
  font-weight: 550;
  letter-spacing: -0.014em;
  line-height: 1.45;
  margin: 0;
  color: var(--text);
}

.faq-item summary::after {
  content: '';
  position: absolute;
  right: 24px;
  top: 28px;
  width: 11px;
  height: 1px;
  background: var(--accent);
}

.faq-item summary::before {
  content: '';
  position: absolute;
  right: 29px;
  top: 23px;
  width: 1px;
  height: 11px;
  background: var(--accent);
  transition: opacity var(--transition), transform var(--transition);
}

.faq-item[open] summary::before {
  opacity: 0;
  transform: rotate(90deg);
}

.faq-body {
  padding: 0 52px 22px 22px;
}

.faq-body p + p {
  margin-top: var(--sp-3);
}

/* --------------------------------------------------------------------------
   14. Forms (spec §48)
   -------------------------------------------------------------------------- */
.form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: var(--sp-6);
}

.form-group {
  margin-bottom: var(--sp-4);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 7px;
}

.form-req {
  color: var(--accent);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control::placeholder {
  color: var(--text-dim);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(207, 144, 97, 0.16);
}

.form-control[aria-invalid='true'] {
  border-color: var(--err);
  box-shadow: 0 0 0 3px rgba(224, 138, 128, 0.14);
}

select.form-control {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%),
    linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 19px) 20px, calc(100% - 14px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 6px;
}

.form-error {
  font-size: 12.5px;
  color: var(--err);
  margin-top: 6px;
  display: none;
}

.form-error.show {
  display: block;
}

.form-consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: var(--sp-5) 0;
}

.form-consent input[type='checkbox'] {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.form-consent label {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  display: none;
  margin-top: var(--sp-4);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.55;
  border-left: 2px solid var(--line-strong);
  background: var(--surface-2);
}

.form-status.show {
  display: block;
}

.form-status-ok {
  border-left-color: var(--ok);
}

.form-status-err {
  border-left-color: var(--err);
}

/* --------------------------------------------------------------------------
   15. Product mockups
   Spec §59: trust comes from honest project statuses. Every drawn panel says
   "Concept" in its own chrome so it is never mistaken for a capture.
   -------------------------------------------------------------------------- */
.mockup-window,
.preview {
  /* These sit inside cards, so they must respond to the card's width rather
     than the viewport's -- a two-column work grid squeezes them at 1024px just
     as hard as a phone does. */
  container-type: inline-size;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: var(--sp-3);
}

.mockup-topbar,
.preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.mockup-dots,
.preview-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.mockup-dot,
.preview-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  display: block;
}

.mockup-title,
.preview-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-right: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-kind {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 2px 9px;
  flex-shrink: 0;
}

/* Muted traffic lights — recognisable as window chrome without shouting. */
.mockup-dot.red { background: rgba(224, 138, 128, 0.5); }
.mockup-dot.yellow { background: rgba(214, 165, 92, 0.5); }
.mockup-dot.green { background: rgba(110, 192, 138, 0.5); }

/* A definite width, not max-width plus auto margins. `container-type:
   inline-size` contains the inline axis, so a box with auto margins and no
   definite width has nothing to size itself from and collapses to a couple of
   pixels -- which stacks the text one character per line. */
.preview-phone {
  width: min(330px, 100%);
  margin-inline: auto;
  border-radius: 22px;
}

.preview-phone .preview-body {
  min-height: 260px;
}

.mockup-body,
.preview-body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 170px;
  background: var(--bg);
}

.mockup-input-bar a {
  white-space: nowrap;
  padding: 4px 0;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}

.mockup-input-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--surface);
}

.mockup-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.clock {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ok);
}

.chat-bubble,
.preview-chat {
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 92%;
  border: 1px solid var(--line);
}

.chat-user,
.preview-chat.q {
  align-self: flex-end;
  background: var(--surface-2);
  color: var(--text);
}

.chat-meyra,
.preview-chat.a {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text-2);
}

.chat-meyra strong,
.preview-chat.a b {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.7px;
  color: var(--accent);
  margin-bottom: 4px;
  text-transform: uppercase;
  font-weight: 500;
}

.preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.preview-row strong {
  font-size: 12.5px;
  font-weight: 550;
  display: block;
  color: var(--text);
}

.preview-row span.sub {
  font-size: 11px;
  color: var(--text-dim);
  display: block;
  margin-top: 1px;
}

.preview-flag {
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--text-dim);
}

.preview-flag.on {
  color: var(--ok);
  border-color: rgba(110, 192, 138, 0.35);
}

.preview-flag.acc {
  color: var(--accent);
  border-color: var(--accent-line);
}

.preview-notch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 15px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.preview-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}

.preview-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 9px 8px;
  text-align: center;
}

.preview-swatch {
  height: 40px;
  border-radius: 4px;
  margin-bottom: 7px;
  background: linear-gradient(140deg, var(--surface-3), var(--surface));
  border: 1px solid var(--line);
}

.preview-tile span {
  font-size: 9.5px;
  color: var(--text-dim);
  display: block;
  line-height: 1.3;
}

/* A real capture, not a drawing. It gets a copper chrome tag rather than the
   grey Concept one, because the difference between evidence and illustration
   is the most important thing this page communicates. */
.preview-real {
  margin: 0 0 var(--sp-3);
}

.preview-real picture,
.preview-real img {
  display: block;
  width: 100%;
  height: auto;
}

.preview-real img {
  /* Matches the capture ratio, so the row keeps its height before the file
     lands and nothing below it jumps. */
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  background: var(--surface-2);
}

.preview-kind.is-real {
  color: var(--accent);
  border-color: var(--accent-line);
}

/* Three strengths of claim, three colours: grey Concept is a drawing, copper
   Screenshot is a frozen moment of the real thing, green Screen recording is
   the real thing moving. The tag is the whole point of the chrome. */
.preview-kind.is-clip {
  color: var(--ok);
  border-color: rgba(110, 192, 138, 0.34);
}

.preview-clip video {
  display: block;
  width: 100%;
  height: auto;
  /* No forced ratio and no crop: the width and height attributes carry the
     real capture shape, which reserves the space and keeps the whole UI in
     frame. Cropping a recording to a tidy 16/10 would cut off the product. */
  background: var(--surface-2);
}

/* The tag and its button are one unit. The bar wraps on a narrow card, and
   without this the button breaks onto a line of its own, orphaned under the
   label it belongs to. */
.preview-chrome-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Motion that starts on its own has to be stoppable (WCAG 2.2.2). This is the
   mechanism, so it lives in the chrome rather than hiding on hover. */
.preview-toggle {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--transition), border-color var(--transition);
}

.preview-toggle:hover {
  color: var(--text);
  border-color: var(--accent-line);
}

.preview-toggle svg {
  display: block;
  fill: currentColor;
}

.preview-toggle .i-play,
.preview-clip.is-paused .preview-toggle .i-pause {
  display: none;
}

.preview-clip.is-paused .preview-toggle .i-play {
  display: block;
}

/* Application shell. A bare list of rows reads as a wireframe; the furniture --
   a side rail, a toolbar, a table -- is what makes a drawing read as software.
   All of it is decorative and aria-hidden, so it stays out of the a11y tree. */
.preview-app {
  display: grid;
  grid-template-columns: 132px 1fr;
  background: var(--bg);
  min-height: 250px;
}

.preview-rail {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 8px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.preview-nav-item {
  font-size: 11px;
  color: var(--text-dim);
  padding: 6px 9px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-nav-item.on {
  color: var(--accent);
  background: var(--accent-soft);
}

.preview-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  flex-wrap: wrap;
}

.preview-search {
  flex: 1;
  min-width: 90px;
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.preview-chip {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.3px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  white-space: nowrap;
}

.preview-chip.on {
  color: var(--ok);
  border-color: rgba(110, 192, 138, 0.35);
}

.preview-chip.acc {
  color: var(--accent);
  border-color: var(--accent-line);
}

.preview-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* A table is the single strongest signal that something is a real tool. */
.preview-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.preview-tr {
  display: grid;
  grid-template-columns: repeat(calc(var(--cols, 3) - 1), minmax(0, 1fr)) minmax(0, 0.85fr);
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
}

.preview-tr:last-child {
  border-bottom: none;
}

.preview-th {
  background: var(--surface-2);
  border-bottom-color: var(--line);
}

.preview-th span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.preview-td {
  font-size: 10.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px 7px;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-pill.on { color: var(--ok); border-color: rgba(110, 192, 138, 0.35); }
.preview-pill.acc { color: var(--accent); border-color: var(--accent-line); }

/* State, never counts. An invented number would be a claim about the business;
   a label is a drawing of the interface. */
.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.preview-stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px 10px;
  min-width: 0;
}

.preview-stat-k {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.preview-stat-v {
  display: block;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-stat-v.on { color: var(--ok); }
.preview-stat-v.acc { color: var(--accent); }

/* Website previews get site furniture rather than app furniture. */
.preview-sitenav {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.preview-sitelogo {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(140deg, var(--accent), var(--accent-bright));
  flex-shrink: 0;
  margin-right: auto;
}

.preview-sitenav .preview-chip {
  margin-left: auto;
}

.preview-hero {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0 2px;
}

.preview-heroline {
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--surface-3), var(--surface-2));
  width: 78%;
}

.preview-heroline.short { width: 46%; }

/* Phone shell: a search field and a tab bar are what make it read as an app. */
.preview-searchbar {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
}

.preview-tabbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.preview-tab {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  padding: 9px 2px;
}

.preview-tab.on { color: var(--accent); }

/* Narrow container: drop the descriptive middle column and keep the two that
   carry the meaning -- what it is, and what state it is in. Clipped text in a
   product shot reads as a bug in the product. */
@container (max-width: 460px) {
  .preview-tr {
    grid-template-columns: repeat(calc(var(--cols, 3) - 2), minmax(0, 1fr)) minmax(0, 0.9fr);
    gap: 6px;
    padding: 6px 8px;
  }

  .preview-tr > :nth-child(2) {
    display: none;
  }

  .preview-td { font-size: 10px; }
  .preview-pill { font-size: 8.5px; padding: 2px 6px; }
  .preview-stats { gap: 5px; }
  .preview-stat { padding: 7px 8px; }
  .preview-stat-v { font-size: 10.5px; }
  .preview-content { padding: 10px; gap: 8px; }
}

@container (max-width: 340px) {
  /* Below this the rail costs more width than the navigation is worth. */
  .preview-app {
    grid-template-columns: 1fr;
  }

  .preview-rail {
    flex-direction: row;
    overflow: hidden;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 7px 8px;
    gap: 4px;
  }

  .preview-nav-item:nth-child(n + 4) {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   16. Portfolio (spec 25)
   -------------------------------------------------------------------------- */
.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: var(--sp-4);
}

.work-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: border-color var(--transition), transform var(--transition);
}

.work-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
}

.work-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
}

.work-card h3 {
  margin-bottom: 3px;
}

.work-card-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.work-card p {
  font-size: 14.8px;
  flex: 1;
}

.work-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-soft);
}

.work-details {
  border-top: 1px solid var(--line-soft);
  padding-top: var(--sp-3);
  margin-top: auto;
}

.work-details summary {
  cursor: pointer;
  list-style: none;
  padding: 5px 0;
  min-height: 24px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition);
}

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

.work-details summary::after {
  content: '+';
  font-size: 14px;
  line-height: 1;
  color: var(--accent);
}

.work-details[open] summary::after {
  content: '\2212';
}

.work-details summary:hover,
.work-details[open] summary {
  color: var(--text-2);
}

.work-details .def-list {
  margin: var(--sp-3) 0 0;
}

.work-details .def-row {
  grid-template-columns: 80px 1fr;
  gap: var(--sp-3);
}

.work-details .def-row dd {
  font-size: 14px;
}

.portrait {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 22%;
  box-shadow: var(--shadow);
}

.portrait-frame {
  position: relative;
}

.portrait-caption {
  margin-top: var(--sp-4);
  font-size: 13.5px;
  color: var(--text-dim);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   17. Breadcrumbs (spec §57)
   -------------------------------------------------------------------------- */
.crumbs {
  margin-bottom: var(--sp-6);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.crumbs li {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 9px;
}

/* 24px minimum target height. Breadcrumb text alone measured 18px. */
.crumbs a,
.crumbs [aria-current='page'] {
  display: inline-block;
  padding: 4px 0;
  min-height: 24px;
}

.crumbs li + li::before {
  content: '/';
  color: var(--line-strong);
}

.crumbs a:hover {
  color: var(--accent);
}

.crumbs [aria-current='page'] {
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   18. Footer (spec §11)
   -------------------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: var(--sp-8) 0 var(--sp-5);
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-7);
}

.footer-col {
  display: block;
  height: auto;
}

.footer-brand p {
  font-size: 14px;
  margin-top: var(--sp-3);
  max-width: 34ch;
  color: var(--text-2);
}

.footer-col-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-2);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-copy {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   19. Motion (spec §8, §51, §52)
   Small vocabulary: reveal, disclosure, page fade. Nothing else.
   -------------------------------------------------------------------------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: none;
}

.no-js .reveal-on-scroll {
  opacity: 1;
  transform: none;
}

/* Spec §51: 40-80ms between children. */
.work-grid > .reveal-on-scroll,
.ecosystem-grid > .reveal-on-scroll,
.grid > .reveal-on-scroll {
  transition-delay: calc(var(--i, 0) * 60ms);
}

.reveal-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease);
}

.reveal-inner {
  overflow: hidden;
  min-height: 0;
}

details[open] > .reveal-wrap {
  grid-template-rows: 1fr;
}

/* Spec §52: subtle fade, max ~250ms, no white flash, no repeated loader. */
main {
  animation: page-in 0.24s var(--ease) both;
}

@keyframes page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mobile-menu.open {
  animation: menu-in 0.2s var(--ease);
}

@keyframes menu-in {
  from { opacity: 0; transform: translate3d(0, -6px, 0); }
  to { opacity: 1; transform: none; }
}

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  z-index: 200;
  pointer-events: none;
}

/* Cursor spotlight (spec §50, desktop only). */
.spotlight-card::before,
.work-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    420px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(207, 144, 97, 0.09),
    transparent 76%
  );
}

.spotlight-card:hover::before,
.work-card:hover::before {
  opacity: 1;
}

.spotlight-card > *,
.work-card > * {
  position: relative;
}

/* --------------------------------------------------------------------------
   20. Header CTA label
   -------------------------------------------------------------------------- */
.cta-short {
  display: none;
}

/* --------------------------------------------------------------------------
   21. Responsive (spec §53, §54)
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  :root { --gutter: 32px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-5);
  }

  .matrix {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 900px) {
  .hero-split,
  .split {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  .ecosystem-grid,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Spec §14 HOME 06 mobile: horizontal selector instead of a two-pane matrix. */
  .matrix {
    grid-template-columns: 1fr;
  }

  .matrix-list {
    border-right: none;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    /* Fade the trailing edge so it is visible that the rail scrolls. Without
       it the row just looks clipped. */
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
    mask-image: linear-gradient(to right, #000 82%, transparent);
    scroll-snap-type: x proximity;
  }

  .matrix-list button {
    scroll-snap-align: start;
  }

  .matrix-list::-webkit-scrollbar {
    display: none;
  }

  .matrix-list button {
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  :root { --gutter: 22px; --nav-h: 62px; --sp-9: 72px; --sp-8: 56px; }

  header nav .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .menu-toggle-label {
    display: none;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .ecosystem-grid,
  .work-grid,
  .form-row,
  .preview-tiles {
    grid-template-columns: 1fr;
  }

  .def-row,
  .def-list-wide .def-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .process-step {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }

  .process-step::before {
    font-size: 18px;
  }

  .cap-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cap-strip span:nth-child(4n) {
    border-right: 1px solid var(--line-soft);
  }

  .cap-strip span:nth-child(2n) {
    border-right: none;
  }

  .cap-strip span:nth-last-child(-n + 4) {
    border-bottom: 1px solid var(--line-soft);
  }

  .cap-strip span:nth-last-child(-n + 2) {
    border-bottom: none;
  }

  .btn-group > .btn {
    width: 100%;
  }

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

  .cta-box {
    padding: var(--sp-7) var(--sp-5);
  }

  .faq-item summary,
  .faq-body {
    padding-right: 46px;
  }
}

@media (max-width: 600px) {
  /* A long CTA label on a 320px screen must fold, not push the page sideways.
     nowrap is only there to stop short labels breaking on desktop. */
  .btn {
    white-space: normal;
    text-wrap: balance;
  }
}

@media (max-width: 480px) {
  .cta-long { display: none; }
  .cta-short { display: inline; }

  header nav { gap: var(--sp-2); }

  .logo-badge { display: none; }

  .card,
  .spotlight-card,
  .form-card,
  .work-card {
    padding: var(--sp-4);
  }
}

/* --------------------------------------------------------------------------
   22. Motion & print preferences (spec §8.4, §55)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }

  .reveal-wrap {
    transition: none;
  }

  .read-progress,
  .spotlight-card::before,
  .work-card::before {
    display: none;
  }

  .btn:hover {
    transform: none;
  }
}

@media print {
  header,
  footer,
  .btn,
  .read-progress,
  .ambient-glow {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  body::after {
    display: none;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }

  .reveal-wrap {
    grid-template-rows: 1fr !important;
  }
}
