/* ==========================================================================
   WebDesignerPR — Core Stylesheet
   Design system, layout, and components.
   --------------------------------------------------------------------------
   EDIT THE :root BLOCK BELOW TO RE-SKIN THE ENTIRE SITE.
   Every colour, space, radius and type ramp on every page reads from here.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   THEME: LIGHT (default)
   The site ships light. Dark is opt-in via [data-theme="dark"] on <html>,
   set by the toggle in the header and remembered in localStorage.
   Change these values to re-skin the entire light theme.
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  /* --- Surfaces --------------------------------------------------------- */
  --color-background:      #faf7f1;   /* Warm Paper — page canvas            */
  --color-surface:         #ffffff;   /* Raised panels / cards               */
  --color-surface-2:       #f1ebe0;   /* Hover + nested surfaces             */

  /* --- Text ------------------------------------------------------------- */
  --color-text:            #14120e;   /* Warm Ink — primary text             */
  --color-text-muted:      #5f5b53;   /* Secondary text, captions            */
  --color-text-faint:      #736e64;   /* Indices, metadata                   */

  /* --- Brand ------------------------------------------------------------
     --color-primary       the Flamboyán coral, used for FILLS and marks
     --color-primary-on-bg the accent shade that is legible as TEXT here
     --color-on-primary    the text colour legible ON a coral fill
     Keeping these three separate is what lets one accent work in both
     themes without ever dropping below AA.                                */
  --color-primary:         #d63a19;
  --color-primary-on-bg:   #c0320f;
  --color-on-primary:      #ffffff;

  --color-secondary:       #0c7f63;   /* Sea Glass, darkened for light       */
  --color-accent:          #8a6420;   /* Warm Sand, darkened for light       */

  /* --- Hairlines -------------------------------------------------------- */
  --color-line:            rgba(20, 18, 14, 0.15);
  --color-line-soft:       rgba(20, 18, 14, 0.07);
  --color-line-strong:     rgba(20, 18, 14, 0.30);

  /* --- Theme-dependent effects ------------------------------------------ */
  --header-bg:             rgba(250, 247, 241, 0.78);
  --glow-primary:          rgba(214, 58, 25, 0.30);
  --glow-secondary:        rgba(12, 127, 99, 0.18);
  --grain-opacity:         0.05;
  --grain-blend:           multiply;
  --scrim:                 rgba(20, 18, 14, 0.86);   /* image overlays       */
  --cursor-fill:           rgba(20, 18, 14, 0.07);
  --row-hover:             rgba(214, 58, 25, 0.08);
  --tint-accent:           rgba(138, 100, 32, 0.05);
  --tint-primary-border:   rgba(214, 58, 25, 0.40);
  --tint-secondary-border: rgba(12, 127, 99, 0.40);
  --tint-accent-border:    rgba(138, 100, 32, 0.45);
  --wordmark-stroke:       rgba(20, 18, 14, 0.22);

  /* Hero canvas dots — read by js/main.js at runtime */
  --canvas-dot:            20, 18, 14;
  --canvas-dot-active:     214, 58, 25;

  /* --- Inverted section (used for high-contrast breaks) ------------------ */
  --color-invert-bg:       #14120e;
  --color-invert-text:     #faf7f1;

}

/* --------------------------------------------------------------------------
   THEME: DARK
   Applied when <html data-theme="dark">. Only the colour tokens change —
   every layout, type and spacing value is shared with the light theme.
   -------------------------------------------------------------------------- */

:root[data-theme="dark"] {
  color-scheme: dark;

  --color-background:      #08090b;   /* Midnight Ink                        */
  --color-surface:         #0e1013;
  --color-surface-2:       #15181c;

  --color-text:            #f2efe9;   /* Bone                                */
  --color-text-muted:      #8e8d88;
  --color-text-faint:      #828179;

  --color-primary:         #ff4d2e;   /* Flamboyán at full strength          */
  --color-primary-on-bg:   #ff7a60;
  --color-on-primary:      #08090b;

  --color-secondary:       #6fe3c4;
  --color-accent:          #e8c89a;

  --color-line:            rgba(242, 239, 233, 0.12);
  --color-line-soft:       rgba(242, 239, 233, 0.06);
  --color-line-strong:     rgba(242, 239, 233, 0.24);

  --header-bg:             rgba(8, 9, 11, 0.72);
  --glow-primary:          rgba(255, 77, 46, 0.55);
  --glow-secondary:        rgba(111, 227, 196, 0.32);
  --grain-opacity:         0.045;
  --grain-blend:           normal;
  --scrim:                 rgba(8, 9, 11, 0.86);
  --cursor-fill:           rgba(242, 239, 233, 0.08);
  --row-hover:             rgba(255, 77, 46, 0.10);
  --tint-accent:           rgba(232, 200, 154, 0.03);
  --tint-primary-border:   rgba(255, 77, 46, 0.40);
  --tint-secondary-border: rgba(111, 227, 196, 0.40);
  --tint-accent-border:    rgba(232, 200, 154, 0.45);
  --wordmark-stroke:       rgba(242, 239, 233, 0.24);

  --canvas-dot:            242, 239, 233;
  --canvas-dot-active:     255, 77, 46;

  --color-invert-bg:       #faf7f1;
  --color-invert-text:     #08090b;
}

/* Everything below this line is shared by both themes.
   -------------------------------------------------------------------------- */

:root {

  /* --- Typography ------------------------------------------------------- */
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-sans:    "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Fluid type ramp — scales between 360px and 1600px viewports */
  --fs-mono:      clamp(0.625rem, 0.58rem + 0.18vw, 0.75rem);
  --fs-xs:        clamp(0.75rem,  0.72rem + 0.15vw, 0.875rem);
  --fs-sm:        clamp(0.875rem, 0.84rem + 0.2vw,  1rem);
  --fs-body:      clamp(1rem,     0.95rem + 0.3vw,  1.175rem);
  --fs-lead:      clamp(1.125rem, 1rem + 0.7vw,     1.625rem);
  --fs-h4:        clamp(1.25rem,  1.1rem + 0.8vw,   1.875rem);
  --fs-h3:        clamp(1.75rem,  1.4rem + 1.7vw,   3rem);
  --fs-h2:        clamp(2.5rem,   1.7rem + 3.8vw,   5.25rem);
  --fs-h1:        clamp(3rem,     1.6rem + 6.6vw,   9rem);
  --fs-mega:      clamp(4rem,     1.4rem + 12vw,    16rem);

  --lh-tight:     0.92;
  --lh-snug:      1.08;
  --lh-normal:    1.45;
  --lh-relaxed:   1.65;

  --tracking-mono:  0.16em;
  --tracking-tight: -0.03em;

  /* --- Spacing ---------------------------------------------------------- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-section: clamp(5.5rem, 10vw, 11rem);

  --gutter:      clamp(1.25rem, 4vw, 4.5rem);
  --max-width:   1560px;
  --measure:     62ch;

  /* --- Form ------------------------------------------------------------- */
  --border-radius:    2px;
  --border-radius-lg: 4px;
  --border-radius-pill: 999px;

  /* --- Motion ----------------------------------------------------------- */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.76, 0, 0.24, 1);
  --dur-fast:   0.25s;
  --dur-base:   0.5s;
  --dur-slow:   0.9s;

  --header-height: 76px;
  --z-grain: 9000;
  --z-cursor: 9500;
  --z-menu: 850;
  --z-header: 900; /* above the drawer, so the close button stays reachable */
  --z-loader: 9800;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Offset anchor jumps so content never hides behind the fixed header */
  scroll-padding-top: calc(var(--header-height) + 2rem);
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  font-weight: 350;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

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

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

button, input, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}
button { cursor: pointer; }

ul, ol { list-style: none; }

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

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

/* Skip link — first stop for keyboard users */
.skip-link {
  position: absolute;
  top: -100px; left: var(--gutter);
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 1rem; }

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

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY PRIMITIVES
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
  text-wrap: balance;
}

.display-1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
.display-2 { font-size: var(--fs-h2); line-height: var(--lh-snug); }
.display-3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
.display-4 { font-size: var(--fs-h4); line-height: 1.2; }
.display-mega { font-size: var(--fs-mega); line-height: 0.82; }

/* Italic serif is used as emphasis throughout — a rhetorical device, not decoration */
.italic { font-style: italic; }
.accent-text { color: var(--color-primary-on-bg); }
.muted { color: var(--color-text-muted); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.42;
  font-weight: 300;
  color: var(--color-text);
  max-width: 34ch;
  letter-spacing: -0.015em;
}

.prose {
  max-width: var(--measure);
  color: var(--color-text-muted);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
}
.prose p + p { margin-top: 1.25em; }
.prose strong { color: var(--color-text); font-weight: 500; }

/* Mono label — the system's connective tissue */
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.label::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  flex: none;
}
.label--plain::before { display: none; }
.label--accent { color: var(--color-primary-on-bg); }

/* Section index number, e.g. "02" */
.index-num {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  color: var(--color-text-faint);
}

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */

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

.section { position: relative; padding-block: var(--space-section); }
.section--tight { padding-block: clamp(3.5rem, 6vw, 6rem); }
.section--flush-top { padding-top: 0; }

/* Section header: index + eyebrow on the left, heading on the right */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: var(--space-md) var(--gutter);
  align-items: start;
  padding-bottom: var(--space-xl);
}
.section-head__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding-top: 0.6rem;
}
.section-head__title { max-width: 18ch; }
.section-head__aside {
  margin-top: var(--space-md);
  max-width: 44ch;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}

/* Hairline rules */
.rule {
  height: 1px;
  background: var(--color-line);
  border: 0;
  width: 100%;
}

/* Decorative vertical column rules — the site's structural signature.
   Purely visual, so hidden from assistive tech. */
.column-rules {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.column-rules span {
  border-left: 1px solid var(--color-line-soft);
}
.column-rules span:last-child {
  border-right: 1px solid var(--color-line-soft);
}

/* Everything that isn't the rules sits above them */
.site-header, .site-main, .site-footer { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   5. TEXTURE — film grain + noise
   -------------------------------------------------------------------------- */

.grain {
  position: fixed;
  inset: -150%;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("../images/backgrounds/noise.svg");
  background-size: 180px 180px;
  will-change: transform;
  animation: grain-shift 6s steps(6) infinite;
}

/* Ambient radial glow used behind hero and CTA blocks */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
.glow--primary   { background: radial-gradient(circle, var(--glow-primary), transparent 68%); }
.glow--secondary { background: radial-gradient(circle, var(--glow-secondary), transparent 68%); }

/* --------------------------------------------------------------------------
   6. BUTTONS & LINKS
   -------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  padding: 1.05em 1.9em;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  border-radius: var(--border-radius-pill);
  border: 1px solid transparent;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  min-height: 48px; /* touch target */
}
/* Wipe fill, revealed from the bottom on hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--dur-base) var(--ease-inout);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }

/* The label span wraps text + arrow. Without this it relies on the
   [data-magnetic] rule to stay on one line, which breaks on any button that
   isn't magnetic (the 404 page, for one). */
.btn > span {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.btn__arrow {
  width: 1em; height: 1em;
  flex: none;
  transition: transform var(--dur-base) var(--ease-out);
}
.btn:hover .btn__arrow { transform: translate(0.25em, -0.25em); }

.btn--primary {
  background: var(--color-primary);
  /* --color-on-primary is whichever of ink/white clears AA on this theme */
  color: var(--color-on-primary);
}
.btn--primary::before { background: var(--color-secondary); }
.btn--primary:hover, .btn--primary:focus-visible { color: var(--color-on-primary); }

.btn--ghost {
  border-color: var(--color-line-strong);
  color: var(--color-text);
}
.btn--ghost::before { background: var(--color-text); }
.btn--ghost:hover, .btn--ghost:focus-visible {
  color: var(--color-background);
  border-color: var(--color-text);
}

.btn--invert { background: var(--color-invert-text); color: var(--color-invert-bg); }
.btn--invert::before { background: var(--color-primary); }
.btn--invert:hover, .btn--invert:focus-visible { color: var(--color-on-primary); }

.btn--lg { padding: 1.3em 2.4em; }

/* Underline that draws in from the left on hover */
.link-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease-inout);
}
.link-underline:hover::after,
.link-underline:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Arrow link used for "read more" affordances */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-text);
}
.link-arrow svg { width: 0.9em; height: 0.9em; transition: transform var(--dur-base) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(0.35em); }
.link-arrow:hover { color: var(--color-primary-on-bg); }

/* --------------------------------------------------------------------------
   7. HEADER & NAVIGATION
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: transform var(--dur-base) var(--ease-out),
              background-color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--color-line-soft);
}
/* Hides on scroll-down, returns on scroll-up */
.site-header.is-hidden { transform: translateY(-101%); }

.site-header__inner {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
}
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__mark path, .brand__mark circle { transition: fill var(--dur-base) var(--ease-out); }
.brand__text {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand__text em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--color-primary-on-bg);
}
.brand:hover .brand__mark { transform: rotate(45deg); }
.brand__mark { transition: transform var(--dur-slow) var(--ease-inout); }

.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.4vw, 2.5rem); }
.nav__link {
  position: relative;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-block: 0.5rem;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease-inout);
}
.nav__link:hover { color: var(--color-text); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current="page"] { color: var(--color-text); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: var(--space-sm); }

/* --------------------------------------------------------------------------
   THEME + LANGUAGE CONTROLS
   -------------------------------------------------------------------------- */

.controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}

/* --- Theme toggle ------------------------------------------------------- */

.theme-toggle {
  position: relative;
  width: 44px; height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  color: var(--color-text-muted);
  overflow: hidden;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
.theme-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-line-strong);
  background: var(--color-surface-2);
}
.theme-toggle svg {
  grid-area: 1 / 1;
  width: 17px; height: 17px;
  transition: transform var(--dur-base) var(--ease-inout),
              opacity var(--dur-fast) var(--ease-out);
}
/* Light theme shows the moon (click = go dark); dark shows the sun. */
.theme-toggle__sun  { opacity: 0; transform: rotate(-90deg) scale(0.4); }
.theme-toggle__moon { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="dark"] .theme-toggle__sun  { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="dark"] .theme-toggle__moon { opacity: 0; transform: rotate(90deg) scale(0.4); }

/* --- Language switch ---------------------------------------------------- */

.lang-switch {
  display: inline-flex;
  align-items: center;
  flex: none;
  border: 1px solid var(--color-line);
  border-radius: var(--border-radius-pill);
  overflow: hidden;
  height: 44px;
}
.lang-switch__opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 100%;
  padding-inline: 0.7em;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  transition: color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
.lang-switch__opt:hover { color: var(--color-text); background: var(--color-surface-2); }
.lang-switch__opt[aria-current="true"] {
  background: var(--color-text);
  color: var(--color-background);
}
.lang-switch__opt[aria-current="true"]:hover { color: var(--color-background); }

/* --- Drawer variants ---------------------------------------------------- */

.mobile-menu__controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.mobile-menu__controls .control-label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-right: 0.25rem;
}

/* Hamburger — three rules that fold into an X */
.menu-toggle {
  display: none;
  position: relative;
  width: 48px; height: 48px;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 1px solid var(--color-line);
  border-radius: 50%;
}
.menu-toggle__bars { position: relative; width: 18px; height: 10px; }
.menu-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%; height: 1.5px;
  background: var(--color-text);
  transition: transform var(--dur-base) var(--ease-inout),
              opacity var(--dur-fast) var(--ease-out);
}
.menu-toggle__bars span:nth-child(1) { top: 0; }
.menu-toggle__bars span:nth-child(2) { top: 50%; width: 70%; }
.menu-toggle__bars span:nth-child(3) { bottom: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

/* While the drawer is open the header stays transparent so the two don't
   visually stack. */
body.is-locked .site-header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

/* Full-screen mobile drawer */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--color-background);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-height) + 2rem) var(--gutter) calc(var(--gutter) + 1rem);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease-inout);
  visibility: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; }

.mobile-menu__nav { display: flex; flex-direction: column; gap: 0.35rem; }
.mobile-menu__item { overflow: hidden; }
.mobile-menu__link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 11vw, 4rem);
  line-height: 1.12;
  letter-spacing: var(--tracking-tight);
  transform: translateY(105%);
  transition: transform 0.7s var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.mobile-menu.is-open .mobile-menu__link { transform: translateY(0); }
.mobile-menu__link:hover, .mobile-menu__link[aria-current="page"] { color: var(--color-primary-on-bg); }
.mobile-menu__link .index-num { font-size: 0.7rem; }
.mobile-menu__foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-line);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out) 0.35s;
}
.mobile-menu.is-open .mobile-menu__foot { opacity: 1; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  z-index: calc(var(--z-header) + 1);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   8. PRELOADER
   -------------------------------------------------------------------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  background: var(--color-background);
  display: grid;
  place-items: center;
  gap: var(--space-md);
}
.loader__inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); width: min(340px, 70vw); }
.loader__word {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  letter-spacing: var(--tracking-tight);
}
.loader__bar { width: 100%; height: 1px; background: var(--color-line); overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0; background: var(--color-primary); }
.loader__count {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  color: var(--color-text-faint);
}
.loader.is-done { pointer-events: none; }

/* --------------------------------------------------------------------------
   9. CUSTOM CURSOR (pointer-fine devices only — see responsive.css)
   -------------------------------------------------------------------------- */

.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: var(--z-cursor);
  pointer-events: none;
  display: none;
}
.cursor__dot,
.cursor__ring {
  position: absolute;
  top: 0; left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor__dot {
  width: 6px; height: 6px;
  background: var(--color-primary);
}
.cursor__ring {
  width: 38px; height: 38px;
  border: 1px solid var(--color-line-strong);
  display: grid;
  place-items: center;
  transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out),
              background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.cursor__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-on-primary);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  white-space: nowrap;
}
.cursor.is-hover .cursor__ring {
  width: 56px; height: 56px;
  background: var(--cursor-fill);
  border-color: var(--color-text);
}
.cursor.is-view .cursor__ring {
  width: 88px; height: 88px;
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.cursor.is-view .cursor__dot { opacity: 0; }
.cursor.is-view .cursor__label { opacity: 1; transform: scale(1); }

/* --------------------------------------------------------------------------
   10. HERO
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: var(--space-lg);
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.85;
}
.hero__glow-a { width: 46vw; height: 46vw; top: -12%; right: -8%; }
.hero__glow-b { width: 34vw; height: 34vw; bottom: -14%; left: -6%; }

.hero__inner { position: relative; z-index: 2; width: 100%; }

.hero__title {
  font-size: var(--fs-h1);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-lg);
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: block; }
.hero__title .indent { padding-left: clamp(0rem, 12vw, 9rem); }

.hero__meta {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-lg) var(--gutter);
  align-items: end;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-line);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: var(--space-xl);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.hero__scroll-line {
  display: block;
  width: 56px; height: 1px;
  background: var(--color-line-strong);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-primary);
  animation: scroll-sweep 2.4s var(--ease-inout) infinite;
}

/* Rotating word in the hero headline */
.rotator {
  display: inline-grid;
  vertical-align: bottom;
  overflow: hidden;
  text-align: left;
}
.rotator__item {
  grid-area: 1 / 1;
  font-style: italic;
  color: var(--color-primary-on-bg);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   11. MARQUEE
   -------------------------------------------------------------------------- */

.marquee {
  position: relative;
  display: flex;
  overflow: hidden;
  padding-block: var(--space-md);
  border-block: 1px solid var(--color-line);
  user-select: none;
}
.marquee__track {
  display: flex;
  flex: none;
  gap: var(--space-lg);
  padding-right: var(--space-lg);
  align-items: center;
  will-change: transform;
}
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-lg);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.6vw, 3rem);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
  color: var(--color-text-muted);
}
.marquee__item em { font-style: italic; color: var(--color-text); }
.marquee__star { color: var(--color-primary); flex: none; width: 0.5em; height: 0.5em; }

/* --------------------------------------------------------------------------
   12. WORK / PORTFOLIO
   -------------------------------------------------------------------------- */

.work-list { display: flex; flex-direction: column; }

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

.work-item__link {
  display: grid;
  grid-template-columns: 5rem minmax(0, 5fr) minmax(0, 4fr) auto;
  gap: var(--space-md) var(--gutter);
  align-items: center;
  padding-block: clamp(1.5rem, 3vw, 2.75rem);
  position: relative;
  transition: padding-inline var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}
.work-item__link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--row-hover), transparent 70%);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  pointer-events: none;
}
.work-item__link:hover { padding-inline: clamp(0.5rem, 2vw, 2rem); }
.work-item__link:hover::before { opacity: 1; }

.work-item__title {
  font-size: clamp(1.5rem, 3.4vw, 2.75rem);
  line-height: 1.05;
  transition: color var(--dur-base) var(--ease-out);
}
.work-item__link:hover .work-item__title { color: var(--color-primary-on-bg); }
.work-item__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.work-item__year { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--color-text-faint); }

/* Floating preview that follows the cursor over the work list */
.work-preview {
  position: fixed;
  top: 0; left: 0;
  width: 300px; height: 380px;
  z-index: 400;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  transform: translate(-50%, -50%) scale(0.85);
  display: none;
}
.work-preview img, .work-preview__slide {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
}

/* Tag chip */
.tag {
  display: inline-block;
  padding: 0.35em 0.85em;
  border: 1px solid var(--color-line);
  border-radius: var(--border-radius-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.tag--concept {
  border-color: var(--tint-primary-border);
  color: var(--color-primary-on-bg);
}

/* Portfolio grid cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 5rem) var(--gutter);
}
.project-card { position: relative; }
/* Stagger the second column downward for an asymmetric rhythm */
.project-card:nth-child(even) { transform: translateY(clamp(1.5rem, 6vw, 6rem)); }

.project-card__media {
  display: block; /* it's an <a> — without this, aspect-ratio is ignored */
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
  border: 1px solid var(--color-line-soft);
}
.project-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out), filter 0.8s var(--ease-out);
  will-change: transform;
}
.project-card:hover .project-card__media img { transform: scale(1.06); }

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--scrim) 0%, color-mix(in srgb, var(--scrim) 14%, transparent) 55%, transparent 100%);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
}
.project-card:hover .project-card__overlay { opacity: 1; }
.project-card__overlay .link-arrow { transform: translateY(12px); transition: transform var(--dur-base) var(--ease-out); }
.project-card:hover .project-card__overlay .link-arrow { transform: translateY(0); }

.project-card__body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  padding-top: var(--space-md);
}
.project-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex: none;
}
.project-card__title { font-size: var(--fs-h4); line-height: 1.15; }
.project-card__desc {
  margin-top: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  max-width: 38ch;
  line-height: 1.55;
}

/* Filter bar */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: var(--space-xl);
}
.filter-btn {
  padding: 0.7em 1.35em;
  border: 1px solid var(--color-line);
  border-radius: var(--border-radius-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
  min-height: 44px;
}
.filter-btn:hover { color: var(--color-text); border-color: var(--color-line-strong); }
.filter-btn[aria-pressed="true"] {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-background);
}
.project-card.is-filtered-out { display: none; }

.filter-empty {
  padding-block: var(--space-xl);
  text-align: center;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   13. SERVICES
   -------------------------------------------------------------------------- */

.service-row { border-top: 1px solid var(--color-line); }
.service-row:last-of-type { border-bottom: 1px solid var(--color-line); }

.service-row__head {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  gap: var(--space-md);
  align-items: center;
  width: 100%;
  text-align: left;
  padding-block: clamp(1.4rem, 2.6vw, 2.25rem);
  transition: color var(--dur-base) var(--ease-out);
}
.service-row__head:hover { color: var(--color-primary-on-bg); }
.service-row__title { font-size: clamp(1.375rem, 3.2vw, 2.5rem); line-height: 1.08; }

.service-row__toggle {
  position: relative;
  width: 44px; height: 44px;
  flex: none;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.service-row__toggle::before,
.service-row__toggle::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform var(--dur-base) var(--ease-inout), opacity var(--dur-fast) linear;
}
.service-row__toggle::before { width: 13px; height: 1px; }
.service-row__toggle::after  { width: 1px; height: 13px; }
.service-row__head:hover .service-row__toggle { border-color: currentColor; transform: rotate(90deg); }
.service-row__head[aria-expanded="true"] .service-row__toggle::after { transform: scaleY(0); }
.service-row__head[aria-expanded="true"] .service-row__toggle {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
}

.service-row__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s var(--ease-inout);
}
.service-row__panel > div { overflow: hidden; }
.service-row.is-open .service-row__panel { grid-template-rows: 1fr; }

.service-row__content {
  display: grid;
  grid-template-columns: 5rem minmax(0, 6fr) minmax(0, 5fr);
  gap: var(--space-lg) var(--space-md);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}
.service-row__deliverables { display: flex; flex-direction: column; gap: 0.75rem; }
.service-row__deliverables li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-line-soft);
}
.service-row__deliverables li::before {
  content: "→";
  color: var(--color-primary);
  flex: none;
}

/* Service capability cards */
/* The 1px gap is filled by each card's own ring rather than a container
   background — otherwise a row that doesn't fill leaves a lit empty cell. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
}
.card {
  position: relative;
  box-shadow: 0 0 0 1px var(--color-line);
  background: var(--color-background);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-height: 260px;
  overflow: hidden;
  transition: background-color var(--dur-base) var(--ease-out);
}
.card::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-inout);
}
.card:hover { background: var(--color-surface); }
.card:hover::after { transform: scaleX(1); }
.card__icon { width: 34px; height: 34px; color: var(--color-primary); }
.card__title { font-size: var(--fs-h4); line-height: 1.15; margin-top: auto; }
.card__text { font-size: var(--fs-sm); color: var(--color-text-muted); line-height: 1.55; }

/* --------------------------------------------------------------------------
   14. PROCESS (horizontal scroll track)
   -------------------------------------------------------------------------- */

.process { overflow: hidden; }
.process__viewport { position: relative; }
.process__track {
  display: flex;
  gap: var(--gutter);
  will-change: transform;
}
.process__step {
  flex: none;
  width: min(420px, 78vw);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border: 1px solid var(--color-line);
  border-radius: var(--border-radius-lg);
  background: linear-gradient(160deg, var(--color-surface), var(--color-background));
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-height: 380px;
  transition: border-color var(--dur-base) var(--ease-out);
}
.process__step:hover { border-color: var(--color-line-strong); }
.process__num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.85;
}
.process__title { font-size: var(--fs-h4); }
.process__text { font-size: var(--fs-sm); color: var(--color-text-muted); line-height: 1.6; }
.process__meta {
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-line-soft);
}

/* --------------------------------------------------------------------------
   15. STATS / COUNTERS
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-lg) var(--gutter);
}
.stat { display: flex; flex-direction: column; gap: 0.5rem; padding-top: var(--space-md); border-top: 1px solid var(--color-line); }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
}
.stat__value sup { font-size: 0.4em; vertical-align: super; color: var(--color-primary); }
.stat__label { font-size: var(--fs-sm); color: var(--color-text-muted); max-width: 22ch; line-height: 1.45; }

/* --------------------------------------------------------------------------
   16. TESTIMONIALS
   -------------------------------------------------------------------------- */

/* Honest labelling: these are layout demonstrations, not real client quotes. */
.sample-note {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 1em;
  border: 1px dashed var(--tint-accent-border);
  border-radius: var(--border-radius-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
}
.quote {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border: 1px solid var(--color-line);
  border-radius: var(--border-radius-lg);
  background: var(--color-surface);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.quote:hover { transform: translateY(-6px); border-color: var(--color-line-strong); }
.quote__mark { font-family: var(--font-display); font-size: 3rem; line-height: 0.6; color: var(--color-primary); }
.quote__text { font-family: var(--font-display); font-size: var(--fs-h4); line-height: 1.32; }
.quote__author {
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-line-soft);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.quote__name { font-size: var(--fs-sm); font-weight: 500; }
.quote__role { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-faint); }

/* --------------------------------------------------------------------------
   17. TECH / CAPABILITIES
   -------------------------------------------------------------------------- */

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1px;
}
.tech-item {
  box-shadow: 0 0 0 1px var(--color-line-soft);
  background: var(--color-background);
  padding: var(--space-md) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
  transition: background-color var(--dur-fast) var(--ease-out);
  min-height: 110px;
  justify-content: center;
}
.tech-item:hover { background: var(--color-surface-2); }
.tech-item__name { font-size: var(--fs-sm); font-weight: 500; }
.tech-item__cat { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-faint); }

/* --------------------------------------------------------------------------
   18. SPLIT / EDITORIAL BLOCKS
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-lg) var(--gutter);
  align-items: center;
}
.split__media { grid-column: span 6; }
.split__body  { grid-column: span 5 / -1; }
.split--reverse .split__media { order: 2; }

.media-frame {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-line-soft);
  background: var(--color-surface);
}
.media-frame img { width: 100%; display: block; will-change: transform; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--tall img { height: 100%; object-fit: cover; }
.media-frame--crop { aspect-ratio: 16 / 10; }
.media-frame--crop img { height: 100%; object-fit: cover; }

/* Numbered value list */
.value-list { display: flex; flex-direction: column; }
.value-item {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: var(--space-md);
  padding-block: var(--space-md);
  border-top: 1px solid var(--color-line);
}
.value-item:last-child { border-bottom: 1px solid var(--color-line); }
.value-item__title { font-size: var(--fs-h4); margin-bottom: 0.4rem; }
.value-item__text { font-size: var(--fs-sm); color: var(--color-text-muted); line-height: 1.6; max-width: 56ch; }

/* --------------------------------------------------------------------------
   19. PAGE HEADER (inner pages)
   -------------------------------------------------------------------------- */

.page-header {
  position: relative;
  padding-top: calc(var(--header-height) + clamp(4rem, 10vw, 9rem));
  padding-bottom: clamp(3rem, 6vw, 6rem);
  overflow: hidden;
}
.page-header__glow { width: 40vw; height: 40vw; top: -20%; right: -10%; }
.page-header__title { margin-block: var(--space-md) var(--space-lg); }
.page-header__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: var(--space-lg) var(--gutter);
  align-items: end;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.breadcrumb a:hover { color: var(--color-text); }

/* --------------------------------------------------------------------------
   20. CTA BLOCK
   -------------------------------------------------------------------------- */

.cta {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--color-line);
}
.cta__glow { width: 55vw; height: 40vw; bottom: -30%; left: 50%; transform: translateX(-50%); }
/* Orbit rings drifting behind the closing call to action */
.cta__orbit {
  position: absolute;
  top: 50%; left: 50%;
  width: min(760px, 92vw);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
}

.cta__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  padding-block: clamp(5rem, 12vw, 10rem);
}
.cta__title { max-width: 16ch; }
.cta__title em { font-style: italic; color: var(--color-primary-on-bg); }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; margin-top: var(--space-md); }
.cta__meta { display: flex; flex-wrap: wrap; gap: var(--space-md); justify-content: center; margin-top: var(--space-lg); }

/* --------------------------------------------------------------------------
   21. FORMS
   -------------------------------------------------------------------------- */

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2.5rem, 6vw, 6rem) var(--gutter);
  align-items: start;
}

.form { display: flex; flex-direction: column; gap: var(--space-lg); }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); }

.field { position: relative; display: flex; flex-direction: column; gap: 0.5rem; }
.field__label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: flex;
  gap: 0.4em;
}
.field__label .req { color: var(--color-primary-on-bg); }

.field__input,
.field__textarea,
.field__select {
  width: 100%;
  padding: 0.9rem 0 0.85rem;
  border-bottom: 1px solid var(--color-line);
  background: transparent;
  color: var(--color-text);
  font-size: var(--fs-body);
  font-weight: 350;
  transition: border-color var(--dur-fast) var(--ease-out);
  border-radius: 0; /* iOS Safari rounds inputs by default */
  -webkit-appearance: none;
  appearance: none;
}
.field__textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.field__input::placeholder, .field__textarea::placeholder { color: var(--color-text-faint); }
.field__input:focus, .field__textarea:focus, .field__select:focus {
  outline: none;
  border-bottom-color: var(--color-primary);
}
.field__select { cursor: pointer; padding-right: 2rem; }
.field__select option { background: var(--color-surface); color: var(--color-text); }

.field__select-wrap { position: relative; }
.field__select-wrap::after {
  content: "";
  position: absolute;
  right: 0.35rem; top: 50%;
  width: 7px; height: 7px;
  border-right: 1px solid var(--color-text-muted);
  border-bottom: 1px solid var(--color-text-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.field__error {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  color: var(--color-primary-on-bg);
  min-height: 1em;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.field.has-error .field__error { opacity: 1; transform: translateY(0); }
.field.has-error .field__input,
.field.has-error .field__textarea,
.field.has-error .field__select { border-bottom-color: var(--color-primary); }

/* Chip-style radio group for budget */
.chip-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; }
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.chip span {
  display: block;
  padding: 0.7em 1.25em;
  border: 1px solid var(--color-line);
  border-radius: var(--border-radius-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  transition: all var(--dur-fast) var(--ease-out);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.chip input:hover + span { border-color: var(--color-line-strong); color: var(--color-text); }
.chip input:checked + span {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-background);
}
.chip input:focus-visible + span { outline: 2px solid var(--color-secondary); outline-offset: 3px; }

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-line);
}

/* Form status messages */
.form-status {
  padding: var(--space-md);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  font-size: var(--fs-sm);
  line-height: 1.6;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status--success { border-color: var(--tint-secondary-border); }
.form-status--success strong { color: var(--color-secondary); }
.form-status--error { border-color: var(--tint-primary-border); }
.form-status--error strong { color: var(--color-primary-on-bg); }

/* Backend integration notice — set apart so it can't be mistaken for UI copy */
.notice {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px dashed var(--color-line-strong);
  border-radius: var(--border-radius-lg);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
  background: var(--tint-accent);
}
.notice__icon { flex: none; width: 20px; height: 20px; color: var(--color-accent); margin-top: 0.2rem; }
.notice strong { color: var(--color-accent); font-weight: 500; }

/* Contact side panel */
.contact-aside { display: flex; flex-direction: column; gap: var(--space-lg); }
.contact-block { display: flex; flex-direction: column; gap: 0.5rem; padding-top: var(--space-md); border-top: 1px solid var(--color-line); }
.contact-block__value { font-family: var(--font-display); font-size: var(--fs-h4); line-height: 1.25; }
.contact-block__value a:hover { color: var(--color-primary-on-bg); }
.contact-block__note { font-size: var(--fs-sm); color: var(--color-text-muted); line-height: 1.55; }

/* FAQ */
.faq-item { border-top: 1px solid var(--color-line); }
.faq-item:last-child { border-bottom: 1px solid var(--color-line); }
.faq-item__q {
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding-block: var(--space-md);
  font-size: var(--fs-h4);
  font-family: var(--font-display);
  line-height: 1.25;
  transition: color var(--dur-fast) var(--ease-out);
}
.faq-item__q:hover { color: var(--color-primary-on-bg); }
.faq-item__icon { flex: none; width: 20px; height: 20px; position: relative; }
.faq-item__icon::before, .faq-item__icon::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  background: currentColor;
  transition: transform var(--dur-base) var(--ease-inout);
}
.faq-item__icon::before { width: 100%; height: 1px; }
.faq-item__icon::after { width: 1px; height: 100%; }
.faq-item__q[aria-expanded="true"] .faq-item__icon::after { transform: scaleY(0); }
.faq-item__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease-inout); }
.faq-item__a > div { overflow: hidden; }
.faq-item.is-open .faq-item__a { grid-template-rows: 1fr; }
.faq-item__a p { padding-bottom: var(--space-md); max-width: 62ch; color: var(--color-text-muted); font-size: var(--fs-sm); line-height: 1.7; }

/* --------------------------------------------------------------------------
   22. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--color-line);
  padding-top: var(--space-2xl);
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr));
  gap: var(--space-lg) var(--gutter);
  padding-bottom: var(--space-2xl);
}
.footer-brand { display: flex; flex-direction: column; gap: var(--space-md); max-width: 34ch; }
.footer-col { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer-col__title {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-text-faint);
  padding-bottom: var(--space-2xs);
}
.footer-col a, .footer-col span { font-size: var(--fs-sm); color: var(--color-text-muted); transition: color var(--dur-fast) var(--ease-out); }
.footer-col a:hover { color: var(--color-text); }

/* Oversized wordmark that bleeds off the bottom */
.footer-wordmark {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 16.5vw, 17rem);
  line-height: 0.78;
  letter-spacing: -0.045em;
  color: transparent;
  -webkit-text-stroke: 1px var(--wordmark-stroke);
  text-align: center;
  user-select: none;
  white-space: nowrap;
  transition: color 0.8s var(--ease-out);
}
.footer-wordmark:hover { color: var(--color-surface-2); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  justify-content: space-between;
  align-items: center;
  padding-block: var(--space-md);
  border-top: 1px solid var(--color-line);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
}
.footer-bottom a:hover { color: var(--color-text); }
.footer-social { display: flex; gap: var(--space-md); }

/* Back-to-top */
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
}
.to-top svg { width: 0.9em; height: 0.9em; transition: transform var(--dur-base) var(--ease-out); }
.to-top:hover svg { transform: translateY(-0.3em); }

/* --------------------------------------------------------------------------
   23. UTILITIES
   -------------------------------------------------------------------------- */

.u-flow > * + * { margin-top: var(--space-md); }
.u-mt-sm { margin-top: var(--space-sm); }
.u-mt-md { margin-top: var(--space-md); }
.u-mt-lg { margin-top: var(--space-lg); }
.u-mt-xl { margin-top: var(--space-xl); }
.u-mb-lg { margin-bottom: var(--space-lg); }
.u-center { text-align: center; }
.u-relative { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   24. 404
   Served for any unmatched path, so it carries its own minimal layout and
   shows both languages.
   -------------------------------------------------------------------------- */

.notfound {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: var(--space-2xl);
  overflow: hidden;
}
.notfound__glow {
  width: 55vw; height: 55vw;
  top: -20%; right: -15%;
}
.notfound .container { position: relative; z-index: 1; }
.notfound__code {
  font-family: var(--font-display);
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px var(--color-line-strong);
  margin-block: var(--space-lg) var(--space-xl);
  user-select: none;
}
.notfound__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl) var(--gutter);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-line);
}
.notfound__block .hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

@media (max-width: 768px) {
  .notfound__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .notfound__grid .notfound__block + .notfound__block {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-line);
  }
  .notfound__block .hero__actions .btn { flex: 1 1 100%; }
}
