/* ============================================================
   REDPLUM TECHNOLOGIES - DESIGN SYSTEM
   ============================================================ */

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Palette */
  --warm-white:   #FFFFFF;
  --light-surface:#F5F4F2;
  --parchment:    #F0EDE8;
  --charcoal:     #1A1A1A;
  --obsidian:     #0D0D0D;
  --ink:          #111111;
  --body-color:   #444444;
  --muted:        #555555;
  --subdued:      #9A9690;
  --plum-red:     #C8102E;
  --harvest-gold: #D4A843;
  --border:       #E8E8E8;

  /* Typography */
  --font-serif:   'Instrument Serif', Georgia, serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  /* Spacing - 8px grid */
  --sp-1:  8px;
  --sp-2:  16px;
  --sp-3:  24px;
  --sp-4:  32px;
  --sp-5:  40px;
  --sp-6:  48px;
  --sp-8:  64px;
  --sp-10: 80px;
  --sp-12: 96px;
  --sp-16: 128px;
  --sp-20: 160px;

  /* Layout */
  --container-max: none;
  --container-px:  clamp(20px, 4vw, 80px);
  --section-py:    clamp(80px, 10vw, 140px);

  /* Motion */
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast:   160ms;
  --dur-base:   280ms;
  --dur-slow:   480ms;
}


/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--warm-white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul { list-style: none; }
input, button { font-size: inherit; }


/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

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


/* ── Typography Primitives ────────────────────────────────── */
.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--plum-red);
  margin-bottom: var(--sp-3);
}

/* Gold labels only on dark sections; plum red reads better on light ones */
.final-cta .label,
.home-engine .label { color: var(--harvest-gold); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 3px;
  padding: 14px 28px;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: var(--plum-red);
  color: #fff;
}
.btn--primary:hover {
  background: #a80d25;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(200, 16, 46, 0.28);
}
.btn--primary:active { transform: translateY(0); box-shadow: none; }

.btn--outline {
  background: transparent;
  color: var(--plum-red);
  border: 1.5px solid var(--plum-red);
}
.btn--outline:hover {
  background: var(--plum-red);
  color: #fff;
  transform: translateY(-1px);
}


/* ── Link Styles ──────────────────────────────────────────── */
.link-secondary {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--body-color);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  padding-bottom: 2px;
}
.link-secondary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(1);
  transform-origin: left;
  transition: opacity var(--dur-base) var(--ease);
  opacity: 0.4;
}
.link-secondary:hover::after { opacity: 1; }

.link-arrow {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--plum-red);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--dur-fast) var(--ease);
}
.link-arrow:hover { gap: 8px; }


/* ── Scroll-enter Animations ──────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease);
}
[data-animate][data-delay="1"] { transition-delay: 80ms; }
[data-animate][data-delay="2"] { transition-delay: 160ms; }
[data-animate][data-delay="3"] { transition-delay: 240ms; }
[data-animate][data-delay="4"] { transition-delay: 320ms; }
[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-animate] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ============================================================
   01 - NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  /* Transparent over the hero; turns solid once the page scrolls (main.js adds .nav--scrolled) */
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}

.nav--scrolled,
.nav:has(.nav__links.open) {
  background: var(--warm-white);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 24px rgba(0,0,0,0.06);
}

.nav__inner {
  display: flex;
  align-items: center;
  height: 72px;
  gap: var(--sp-8);
}

/* Logo shared */
.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--plum-red);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 400;
  color: #fff;
  line-height: 1;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}

/* Nav logo */
.nav__logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav__logo-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav__logo-sub {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--subdued);
}

/* Nav links */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex: 1;
}

.nav__item { position: relative; }

.nav__link {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 3px;
  transition: color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
  display: flex;
  align-items: center;
  gap: 5px;
}
.nav__link:hover,
.nav__link--btn:hover { background: var(--light-surface); }

.nav__link--btn {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background var(--dur-fast) var(--ease);
}

.nav__chevron {
  transition: transform var(--dur-fast) var(--ease);
  opacity: 0.5;
}
.nav__item--has-dropdown.open .nav__chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.nav__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--warm-white);
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
  min-width: 200px;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              visibility var(--dur-fast) var(--ease);
  pointer-events: none;
}

.nav__item--has-dropdown.open .nav__dropdown,
.nav__item--has-dropdown:focus-within .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.nav__dropdown-link {
  display: block;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--body-color);
  padding: 10px 18px;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.nav__dropdown-link:hover {
  background: var(--light-surface);
  color: var(--ink);
}

.nav__dropdown-link--overview {
  color: var(--plum-red);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

/* Actions */
.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: auto;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
}
.nav__hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease),
              opacity var(--dur-base) var(--ease);
  transform-origin: center;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(7.25px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7.25px) rotate(-45deg); }


/* ============================================================
   02 - HOME
   ============================================================ */

/* ── Delivery OS console ────────────────────────────── */
.hero-console {
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  font-family: var(--font-mono);
  overflow: hidden;
}

.hero-console__bar,
.hero-console__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 12px var(--sp-3);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subdued);
}
.hero-console__bar  { border-bottom: 1px solid rgba(255,255,255,0.06); }
.hero-console__foot { border-top: 1px solid rgba(255,255,255,0.06); }
.hero-console__foot strong { font-weight: 400; color: var(--parchment); }

.hero-console__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-console__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--plum-red);
  box-shadow: 0 0 0 0 rgba(200,16,46,0.6);
  animation: console-pulse 2s var(--ease) infinite;
}
@keyframes console-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(200,16,46,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(200,16,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(200,16,46,0); }
}

/* New lines enter at the bottom; older lines scroll off the top under a fade */
.hero-console__log {
  height: 300px;
  padding: var(--sp-2) var(--sp-3);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, var(--ink) 72px);
          mask-image: linear-gradient(to bottom, transparent 0, var(--ink) 72px);
}

.hero-console__line {
  display: grid;
  grid-template-columns: auto 13ch minmax(0, 1fr);
  column-gap: 12px;
  flex-shrink: 0;
  padding-block: 5px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--parchment);
  overflow: hidden;
  /* backwards fill only: the max-height cap must not persist after entry */
  animation: console-line-in var(--dur-base) var(--ease) backwards;
}
@keyframes console-line-in {
  from { max-height: 0; opacity: 0; padding-block: 0; }
  to   { max-height: 6em; opacity: 1; }
}

.hero-console__time  { color: var(--subdued); opacity: 0.6; }
.hero-console__agent { color: var(--harvest-gold); white-space: nowrap; }
.hero-console__agent--skill { color: var(--plum-red); }
.hero-console__result { display: block; color: var(--subdued); }
.hero-console__result[hidden] { display: none; }
.hero-console__result::before { content: "✓ "; color: var(--harvest-gold); }

/* Typing caret on the line currently being written */
.hero-console__line--typing .hero-console__msg::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--parchment);
  animation: console-caret 1s steps(1) infinite;
}
@keyframes console-caret { 50% { opacity: 0; } }

@media (max-width: 1024px) {
  .hero-console { max-width: 560px; }
}

@media (max-width: 480px) {
  .hero-console__log { height: 260px; padding-inline: var(--sp-2); }
  .hero-console__line { grid-template-columns: 14ch minmax(0, 1fr); font-size: 12px; }
  .hero-console__time { display: none; }
  .hero-console__bar,
  .hero-console__foot { padding-inline: var(--sp-2); }
}


/* Site design system (set by the home page): one small radius for every box, one
   large radius for the chat surfaces (composer, chips, estimator), one shadow
   reserved for dark panels. The home-* components below are shared by every page. */
:root {
  --radius:       3px;
  --radius-chat:  20px;
  --shadow-panel: 0 32px 64px -28px rgba(0,0,0,0.4);
  --fs-display:   clamp(61px, 7.6vw, 114px);
  --fs-page:      clamp(54px, 6.4vw, 100px);
  --fs-h2:        clamp(45px, 5.62vw, 86px);
  --fs-statement: clamp(29px, 3.6vw, 50px);
}

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

/* ── Shared type ──────────────────────────────────────────── */
.home-h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: clamp(40px, 5vw, 72px);
}
.home-h2 em,
.home-hero__accent,
.home-final__title em { font-style: italic; color: var(--plum-red); }
.home-h2--light { color: var(--parchment); margin-bottom: var(--sp-4); }

.home-lead {
  font-size: 19px;
  line-height: 1.75;
  color: var(--body-color);
  max-width: 560px;
}

/* One micro-label style for every small mono caption on the page */
.home-calc__label,
.home-calc__result-label,
.home-composer__hint,
.home-tracker__day-label,
.home-tracker__day-total,
.home-vs__label,
.home-vs__who,
.home-vs__axis {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subdued);
}

/* ── Centred section heads (full-width sections) ──────────── */
:is(.home-problem, .home-compare, .home-steps, .work, .pg-center) .container > :is(.label, .home-h2, .home-scrub, .home-statement) {
  display: block;
  text-align: center;
  margin-inline: auto;
}
:is(.home-problem, .home-compare, .home-steps, .work, .pg-center) .container > .home-h2 { max-width: 1100px; }
.work .container > .link-secondary { display: flex; width: fit-content; margin-inline: auto; }
.work .container > .home-lead { text-align: center; margin-inline: auto; }

/* ── Shared card ──────────────────────────────────────────── */
.home-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
}
.home-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.home-card,
.home-calc__box,
.work-card {
  background: var(--light-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.home-card {
  --card-pad: clamp(24px, 3vw, 36px);
  padding: var(--card-pad);
  transition: border-color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.home-card:hover { border-color: var(--plum-red); transform: translateY(-3px); }
.home-card__num {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 36px;
  line-height: 1;
  color: var(--plum-red);
  margin-bottom: var(--sp-3);
}
.home-card__title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: var(--sp-1);
}
.home-card__body { font-size: 17px; line-height: 1.7; color: var(--muted); }

/* ── Sections: white, divided by a rule; two dark sections ── */
.home-compare,
.home-steps,
.home-catch,
.work,
.home-calc,
.home-team {
  background: var(--warm-white);
  border-top: 1px solid var(--border);
}
.home-problem { background: var(--warm-white); }

/* ── Hero (full bleed) ────────────────────────────────────── */
.home-hero {
  position: relative;
  min-height: 100svh;
  padding-top: calc(72px + clamp(40px, 5vw, 72px));
  display: flex;
  flex-direction: column;
  background: var(--warm-white);
  overflow: hidden;
  isolation: isolate;
}

.home-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.home-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 0%, transparent 75%);
  opacity: 1;
}
/* Cursor spotlight: a darker copy of the grid, visible only around the pointer (js/home.js) */
.home-hero__spot {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,16,46,0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,16,46,0.32) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(circle 260px at var(--mx, 50%) var(--my, 50%), #000 0%, transparent 100%);
          mask-image: radial-gradient(circle 260px at var(--mx, 50%) var(--my, 50%), #000 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
[data-spotlight].is-pointer .home-hero__spot { opacity: 1; }

.home-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 800px) minmax(380px, 500px);
  justify-content: center;
  column-gap: clamp(40px, 5vw, 96px);
  align-items: start;
  width: 100%;
  flex: 1;
  padding-inline: var(--container-px);
}
.home-hero__copy { display: contents; }
.home-hero__eyebrow,
.home-hero__title,
.home-hero__sub,
.home-hero__ctas { grid-column: 1; }
/* Top of the panel lines up with the cap height of the headline's first line */
.home-tracker { grid-column: 2; grid-row: 2 / span 3; align-self: start; margin-top: calc(var(--fs-display) * 0.14); }

/* Load-in sequence */
.home-hero__eyebrow,
.home-hero__sub,
.home-hero__ctas,
.home-tracker {
  opacity: 0;
  animation: home-fade-up 0.9s var(--ease) forwards;
}
.home-hero__eyebrow          { animation-delay: 0.05s; }
.home-hero__sub              { animation-delay: 0.75s; }
.home-hero__ctas             { animation-delay: 0.9s; }
.home-tracker                { animation-delay: 1.15s; }
@keyframes home-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.home-hero__title,
.home-final__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 0.94;
  letter-spacing: -0.035em;
}
.home-hero__title { color: var(--ink); margin-bottom: clamp(24px, 3vw, 40px); }
.home-line {
  display: block;
  overflow: hidden;
  /* Room for descenders (g, y) inside the reveal mask */
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}
/* Extra room on the last line so the scribble under "runway." isn't clipped */
.home-line:last-child { padding-bottom: 0.24em; margin-bottom: -0.24em; }
.home-line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: home-rise 1s var(--ease) forwards;
}
.home-line:nth-child(1) > span { animation-delay: 0.1s; }
.home-line:nth-child(2) > span { animation-delay: 0.2s; }
.home-line:nth-child(3) > span { animation-delay: 0.32s; }
.home-line:nth-child(4) > span { animation-delay: 0.44s; }
@keyframes home-rise { to { transform: translateY(0); } }

.home-hero__accent { position: relative; }
.home-hero__scribble {
  position: absolute;
  left: 0;
  bottom: -0.02em;
  width: 100%;
  height: 0.18em;
  overflow: visible;
}
.home-hero__scribble path {
  fill: none;
  stroke: var(--harvest-gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: home-draw 1.1s var(--ease) 1.2s forwards;
}
@keyframes home-draw { to { stroke-dashoffset: 0; } }

.home-hero__sub {
  font-size: clamp(19px, 1.57vw, 22px);
  line-height: 1.65;
  color: var(--body-color);
  max-width: 640px;
  margin-bottom: var(--sp-5);
}
.home-hero__sub strong { color: var(--ink); font-weight: 600; }
.home-hero__ctas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  margin-bottom: var(--sp-8);
}
.home-hero__btn { padding: 18px 34px; font-size: 17px; }

/* ── Estimate section (the composer gets the whole stage) ─── */
.home-estimate {
  background: var(--light-surface);
  scroll-margin-top: 72px;
}
.home-estimate__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.home-estimate .home-h2 { margin-bottom: var(--sp-3); }
.home-estimate__lead { margin-bottom: clamp(32px, 4vw, 56px); max-width: 620px; }
.home-estimate__box { width: 100%; max-width: 900px; text-align: left; }
.home-estimate .home-composer {
  max-width: none;
  padding: 22px 22px 16px 28px;
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.28);
}
.home-estimate .home-composer__input { font-size: 20px; min-height: 88px; }
.home-estimate .home-composer__send { width: 48px; height: 48px; }
.home-estimate .home-chips { justify-content: center; margin-bottom: 0; }
.home-estimate__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-6);
  list-style: none;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.home-estimate__facts li::before { content: "✓ "; color: var(--plum-red); }

/* ── Chat composer (hero + estimator) ─────────────────────── */
.home-composer {
  max-width: 720px;
  background: var(--warm-white);
  border: 1px solid #D9D6D1;
  border-radius: var(--radius-chat);
  box-shadow: 0 8px 28px -12px rgba(0,0,0,0.18);
  padding: 16px 16px 12px 20px;
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.home-composer:focus-within {
  border-color: var(--ink);
  box-shadow: 0 12px 36px -12px rgba(0,0,0,0.25);
}
.home-composer__input {
  display: block;
  width: 100%;
  min-height: 52px;
  max-height: 200px;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
}
.home-composer__input::placeholder { color: var(--subdued); }
.home-composer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: 8px;
}
.home-composer__send {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--plum-red);
  color: #fff;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.home-composer__send:hover { background: #a80d25; transform: translateY(-1px); }
.home-composer__send:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.home-composer.is-shake { animation: home-shake 0.4s var(--ease); }
@keyframes home-shake {
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: var(--sp-6);
}
.home-chip {
  font-size: 15px;
  color: var(--body-color);
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-chat);
  padding: 8px 14px;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.home-chip:hover { border-color: var(--ink); color: var(--ink); }

.home-stats { background: var(--charcoal); }
.home-stats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.home-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding-block: clamp(56px, 7vw, 112px);
  text-align: center;
}
.home-stats__item + .home-stats__item { border-left: 1px solid rgba(255,255,255,0.08); }
.home-stats__val {
  font-family: var(--font-serif);
  font-size: clamp(88px, 11vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--parchment);
  font-variant-numeric: tabular-nums;
}
.home-stats__item:nth-child(2) .home-stats__val { color: #E0324C; }
.home-stats__label {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subdued);
}

/* ── Dark panels (tracker + console share one look) ───────── */
.home-tracker,
.home-engine .hero-console {
  --panel-px: clamp(20px, 2.2vw, 32px);
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
}
.home-tracker__head,
.home-tracker__foot,
.home-engine .hero-console__bar,
.home-engine .hero-console__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2);
  padding: 18px var(--panel-px);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subdued);
}
.home-tracker__head,
.home-engine .hero-console__bar { border-bottom: 1px solid rgba(255,255,255,0.06); }
.home-tracker__foot,
.home-engine .hero-console__foot { border-top: 1px solid rgba(255,255,255,0.06); }
.home-tracker__foot strong,
.home-engine .hero-console__foot strong { font-weight: 400; color: var(--parchment); }

/* Bigger Delivery OS console on the home page */
.home-engine .hero-console__log { height: clamp(380px, 34vw, 500px); padding: var(--sp-3) var(--panel-px); }
.home-engine .hero-console__line {
  grid-template-columns: 9ch 15ch minmax(0, 1fr);
  column-gap: 16px;
  padding-block: 7px;
  font-size: 15px;
}
.home-tracker { color: var(--parchment); overflow: hidden; }
.home-tracker__body { padding: var(--sp-4) var(--panel-px); }
.home-tracker__live { display: inline-flex; align-items: center; gap: 8px; }
.home-tracker__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--plum-red);
  animation: console-pulse 2s var(--ease) infinite;
}
.home-tracker.is-live .home-tracker__dot { background: var(--harvest-gold); }
.home-tracker.is-live .home-tracker__live { color: var(--harvest-gold); }

.home-tracker__day { display: flex; align-items: baseline; gap: 12px; padding-bottom: var(--sp-3); }
.home-tracker__day-num {
  font-family: var(--font-serif);
  font-size: clamp(96px, 9vw, 150px);
  line-height: 0.85;
  color: var(--parchment);
  font-variant-numeric: tabular-nums;
}
.home-tracker__bar {
  height: 6px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin-bottom: var(--sp-4);
}
.home-tracker__bar span {
  display: block;
  height: 100%;
  width: 10%;
  background: var(--plum-red);
  transition: width 0.6s var(--ease);
}
.home-tracker__list { display: flex; flex-direction: column; gap: 16px; list-style: none; }
.home-tracker__list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: rgba(240,237,232,0.38);
  transition: color var(--dur-base) var(--ease);
}
.home-tracker__list li::before {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: var(--radius);
  border: 1.5px solid rgba(255,255,255,0.18);
  transition: background var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.home-tracker__list li.is-done { color: var(--parchment); }
.home-tracker__list li.is-done::before {
  background: var(--plum-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
  border-color: var(--plum-red);
}

/* Trigger marquee */
.home-marquee {
  margin-top: auto;
  background: var(--charcoal);
  overflow: hidden;
  padding-block: 22px;
}
.home-marquee__track { display: flex; width: max-content; animation: home-marquee 40s linear infinite; }
.home-marquee__track span {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--parchment);
  white-space: nowrap;
}
.home-marquee__track span::after { content: "✦"; color: var(--plum-red); margin-inline: 28px; }
@keyframes home-marquee { to { transform: translateX(-50%); } }

/* ── Problem ──────────────────────────────────────────────── */
.home-scrub,
.home-statement {
  font-family: var(--font-serif);
  font-size: var(--fs-statement);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.home-scrub { max-width: 1000px; margin-bottom: clamp(56px, 7vw, 104px); }
.home-scrub .w { opacity: 0.14; transition: opacity 0.35s var(--ease); }
.home-scrub .w.is-lit { opacity: 1; }

/* ── Comparison: two matched cards ───────────────────────── */
.home-statement { max-width: 820px; margin-bottom: clamp(48px, 6vw, 80px); }
.home-vs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}
.home-vs__card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: clamp(24px, 3vw, 44px);
  background: var(--light-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.home-vs__card--us {
  background: var(--charcoal);
  border-color: rgba(255,255,255,0.08);
  box-shadow: var(--shadow-panel);
}
.home-vs__who {
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}
.home-vs__card--us .home-vs__who { color: var(--parchment); border-color: rgba(255,255,255,0.08); }
.home-vs__metric { display: flex; flex-direction: column; gap: 10px; }
.home-vs__val {
  font-family: var(--font-serif);
  font-size: clamp(36px, 3.6vw, 56px);
  line-height: 1;
  color: var(--ink);
}
.home-vs__card--us .home-vs__val { color: var(--parchment); }
.home-vs__card--us .home-vs__label,
.home-vs__card--us .home-vs__axis { color: rgba(240,237,232,0.55); }
.home-vs__bar {
  height: 10px;
  margin-top: 6px;
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
.home-vs__card--us .home-vs__bar { background: rgba(255,255,255,0.1); }
.home-vs__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--subdued);
  transition: width 1.8s var(--ease);
}
.home-vs__card--us .home-vs__bar span { background: var(--plum-red); transition-delay: 0.25s; }
.home-vs.is-in .home-vs__bar span { width: var(--w); }
.home-vs__axis { display: flex; justify-content: space-between; }

/* ── Steps ────────────────────────────────────────────────── */
.home-steps__wrap { position: relative; --p: 0; }
.home-steps__line {
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
}
.home-steps__line span {
  display: block;
  height: 100%;
  background: var(--plum-red);
  transform-origin: left;
  transform: scaleX(var(--p));
}
.home-steps__list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  list-style: none;
}
.home-step__badge {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  /* Equal white padding both sides so the progress line stops short of each dot;
     the negative margin keeps the dot aligned with the card edge */
  padding-inline: 16px;
  margin-left: -16px;
  background: var(--warm-white);
  color: var(--plum-red);
  margin-bottom: var(--sp-4);
}
.home-step__badge::before {
  content: "";
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--plum-red);
  box-shadow: 0 0 0 4px var(--warm-white);
}
.home-step__title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: var(--sp-1);
}
.home-step__body { font-size: 17px; line-height: 1.7; color: var(--muted); }

/* Step card: illustration on top, copy below. Illustrations play once when the list reveals. */
.home-step { display: flex; flex-direction: column; }
.home-step__card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--light-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), border-color var(--dur-base) var(--ease);
  transition-delay: calc(var(--n, 0) * 0.25s);
}
.home-step:nth-child(2) { --n: 1; }
.home-step:nth-child(3) { --n: 2; }
.home-step.is-in .home-step__card { opacity: 1; transform: none; }
.home-step__card:hover { border-color: var(--plum-red); }

.home-step__visual {
  position: relative;
  height: 150px;
  margin-bottom: var(--sp-4);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
}
/* Each illustration starts after its card has landed */
.home-step__visual { --t: calc(var(--n, 0) * 0.25s + 0.6s); }

/* 1: idea typed into a composer, then emailed */
.vis-idea {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
  padding: 0 var(--sp-3);
  background: var(--warm-white);
  border: 1px solid var(--border);
}
.vis-idea__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 12px 12px 16px;
  border: 1px solid #D9D6D1;
  border-radius: var(--radius-chat);
  color: var(--ink);
}
.vis-idea__text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  border-right: 2px solid var(--ink);
}
.vis-idea__send {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--plum-red);
  color: #fff;
  opacity: 0.35;
}
.vis-idea__tag {
  padding: 6px 12px;
  border-radius: var(--radius-chat);
  background: var(--ink);
  color: var(--parchment);
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateY(8px);
}
.is-in .vis-idea__text { animation: vis-type 1.6s steps(23) var(--t) forwards, vis-caret 0.8s steps(1) var(--t) 3; }
.is-in .vis-idea__send { animation: vis-press 0.5s var(--ease) calc(var(--t) + 1.8s) forwards; }
.is-in .vis-idea__tag { animation: vis-pop 0.5s var(--ease) calc(var(--t) + 2.3s) forwards; }
@keyframes vis-type { to { width: 23ch; border-right-color: transparent; } }
@keyframes vis-caret { 50% { border-right-color: transparent; } }
@keyframes vis-press { 40% { transform: scale(0.85); } 100% { opacity: 1; transform: none; } }
@keyframes vis-pop { to { opacity: 1; transform: none; } }

/* 2: ten-day build strip */
.vis-build {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 0 var(--sp-3);
  background: var(--charcoal);
  color: var(--subdued);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}
.vis-build__head,
.vis-build__axis { display: flex; justify-content: space-between; }
.vis-build__live { color: var(--harvest-gold); opacity: 0; }
.vis-build__days { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.vis-build__days span {
  height: 34px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
}
.is-in .vis-build__days span { animation: vis-fill 0.3s var(--ease) calc(var(--t) + var(--i) * 0.18s) forwards; }
.is-in .vis-build__live { animation: vis-pop 0.4s var(--ease) calc(var(--t) + 1.9s) forwards; }
@keyframes vis-fill { to { background: var(--plum-red); } }

/* 3: one codebase growing from MVP to v2 */
.vis-grow {
  background: var(--warm-white);
  border: 1px solid var(--border);
}
.vis-grow__svg { position: absolute; left: 0; right: 0; top: 34px; width: 100%; height: 64px; }
.vis-grow__line {
  fill: none;
  stroke: var(--plum-red);
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.vis-grow__nodes {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 48px;
  display: flex;
  justify-content: space-between;
}
.vis-grow__node {
  display: grid;
  place-items: center;
  width: 44px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--parchment);
  font-size: 12px;
  opacity: 0;
  transform: scale(0.6);
}
.vis-grow__node:first-child { background: var(--plum-red); color: #fff; }
.vis-grow__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--subdued);
  opacity: 0;
}
.is-in .vis-grow__line { animation: home-draw 1.4s var(--ease) var(--t) forwards; }
.is-in .vis-grow__node { animation: vis-pop 0.4s var(--ease) calc(var(--t) + var(--i) * 0.55s) forwards; }
.is-in .vis-grow__caption { animation: vis-pop 0.4s var(--ease) calc(var(--t) + 1.5s) forwards; }

@media (prefers-reduced-motion: reduce) {
  .home-step__card { opacity: 1; transform: none; transition: none; }
  .vis-idea__text { width: 23ch; border-right-color: transparent; }
  .vis-idea__send, .vis-idea__tag, .vis-build__live, .vis-grow__node, .vis-grow__caption { opacity: 1; transform: none; }
  .vis-build__days span { background: var(--plum-red); }
  .vis-grow__line { stroke-dashoffset: 0; }
}

/* ── Questions (accordion) ────────────────────────────────── */
.home-faq {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 900px);
  justify-content: center;
  gap: clamp(40px, 6vw, 112px);
  align-items: start;
}
.home-faq__head { position: sticky; top: calc(72px + var(--sp-5)); }
.home-faq__head .home-h2 { margin-bottom: 0; }
.home-faq__list { border-bottom: 1px solid var(--border); }
.home-faq__item { border-top: 1px solid var(--border); }
.home-faq__q {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 28px;
  gap: var(--sp-2);
  align-items: baseline;
  padding-block: clamp(22px, 2.4vw, 32px);
  cursor: pointer;
  list-style: none;
}
.home-faq__q::-webkit-details-marker { display: none; }
.home-faq__num,
.home-faq__text {
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.15;
}
.home-faq__num { font-style: italic; color: var(--plum-red); }
.home-faq__text {
  color: var(--ink);
  transition: color var(--dur-fast) var(--ease);
}
.home-faq__q:hover .home-faq__text { color: var(--plum-red); }
.home-faq__icon {
  position: relative;
  width: 20px;
  height: 20px;
  align-self: center;
}
.home-faq__icon::before,
.home-faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  margin-top: -1px;
  background: var(--ink);
  transition: transform var(--dur-base) var(--ease);
}
.home-faq__icon::after { transform: rotate(90deg); }
.home-faq__item[open] .home-faq__icon::after { transform: rotate(0deg); }
.home-faq__a {
  padding: 0 calc(28px + var(--sp-2)) clamp(24px, 2.6vw, 36px) calc(64px + var(--sp-2));
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 720px;
}
.home-faq__item[open] .home-faq__a { animation: home-fade-up 0.4s var(--ease); }

/* ── Engine (the AI explanation, placed after the offer) ──── */
.home-engine { background: var(--obsidian); color: var(--parchment); }
.home-engine__layout {
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(0, 780px);
  justify-content: center;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.home-engine__body { font-size: 19px; line-height: 1.75; color: var(--subdued); max-width: 540px; margin-bottom: var(--sp-4); }
.home-engine__body strong,
.home-engine__list strong { color: var(--parchment); font-weight: 600; }
.home-engine__list { display: flex; flex-direction: column; gap: var(--sp-2); list-style: none; margin-bottom: var(--sp-5); }
.home-engine__list li { position: relative; padding-left: 28px; font-size: 17px; line-height: 1.65; color: var(--subdued); }
.home-engine__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 2px;
  background: var(--plum-red);
}
.home-engine__link { color: var(--parchment); }


/* ── Cost calculator ──────────────────────────────────────── */
.home-calc__layout {
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(0, 620px);
  justify-content: center;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.home-calc__copy .home-h2 { margin-bottom: var(--sp-4); }
.home-calc__box { padding: clamp(24px, 3vw, 40px); }
.home-calc__label,
.home-calc__result-label { display: block; margin-bottom: 8px; }
.home-calc__input-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: var(--sp-4);
  font-family: var(--font-serif);
  font-size: 50px;
  color: var(--subdued);
}
.home-calc__input-wrap:focus-within { border-color: var(--plum-red); }
.home-calc__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 50px;
  color: var(--ink);
}
.home-calc__result { margin-bottom: var(--sp-4); }
.home-calc__result-val {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(58px, 5.62vw, 81px);
  line-height: 1;
  color: var(--plum-red);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.home-calc__result-save { font-size: 16px; color: var(--muted); }
.home-calc__cta { width: 100%; justify-content: center; white-space: normal; text-align: center; }

/* ── Team ─────────────────────────────────────────────────── */
.home-team__layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(0, 640px);
  justify-content: center;
  gap: clamp(40px, 7vw, 112px);
  align-items: stretch;
}
.home-team__copy .home-h2 { margin-bottom: var(--sp-4); }
/* Photo stretches to the height of the copy beside it */
.home-team__photo {
  min-height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light-surface);
}
.home-team__photo { position: relative; }
.home-team__photo img { position: absolute; inset: 0; width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.home-team__copy { align-self: center; padding-block: var(--sp-4); }
.home-team__body { font-size: 19px; line-height: 1.75; color: var(--body-color); margin-bottom: var(--sp-5); max-width: 520px; }

/* ── Final CTA ────────────────────────────────────────────── */
.home-final { position: relative; overflow: hidden; isolation: isolate; }
.home-final .final-cta__inner { max-width: var(--container-max); }
.home-final__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 85% 30%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 80% at 85% 30%, #000 0%, transparent 75%);
}
.home-final__spot {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(224,50,76,0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224,50,76,0.55) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(circle 260px at var(--mx, 50%) var(--my, 50%), #000 0%, transparent 100%);
          mask-image: radial-gradient(circle 260px at var(--mx, 50%) var(--my, 50%), #000 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.home-final.is-pointer .home-final__spot { opacity: 1; }
.home-final__title { color: var(--parchment); margin-bottom: var(--sp-5); }

/* ── Estimator (chat dialog) ──────────────────────────────── */
.estimator {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: var(--sp-2);
}
.estimator[hidden] { display: none; }
.estimator__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13,13,13,0.55);
  backdrop-filter: blur(4px);
  animation: est-fade 0.3s var(--ease);
}
.estimator__panel {
  position: relative;
  width: min(760px, 100%);
  height: min(780px, calc(100svh - 32px));
  display: flex;
  flex-direction: column;
  background: var(--warm-white);
  border-radius: var(--radius-chat);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  animation: est-rise 0.45s var(--ease);
}
.estimator__panel:focus { outline: none; }
@keyframes est-fade { from { opacity: 0; } }
@keyframes est-rise { from { opacity: 0; transform: translateY(24px) scale(0.98); } }

.estimator__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--border);
}
.estimator__title { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; color: var(--ink); }
.estimator__mark,
.est-msg__avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--plum-red);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1;
}
.estimator__close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
}
.estimator__close:hover { background: var(--light-surface); color: var(--ink); }

.estimator__thread {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4) clamp(16px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.estimator__composer {
  margin: 0 clamp(12px, 3vw, 32px) clamp(12px, 3vw, 24px);
  max-width: none;
  opacity: 1;
  animation: none;
}
.estimator__composer[hidden] { display: none; }

/* Empty state: intro, composer and example ideas as one centred group */
.estimator.is-empty .estimator__panel { height: auto; }
.estimator.is-empty .estimator__thread { flex: none; padding-top: clamp(40px, 6vw, 64px); padding-bottom: var(--sp-4); }
.estimator.is-empty .estimator__composer { margin-bottom: var(--sp-2); }
.estimator__chips { justify-content: center; margin: 0 clamp(12px, 3vw, 32px) clamp(28px, 4vw, 40px); }
.estimator:not(.is-empty) .estimator__chips { display: none; }

.est-intro { text-align: center; }
.est-intro .label { margin-bottom: var(--sp-2); }
.est-intro__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(38px, 4.6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
}
.est-intro__title em { font-style: italic; color: var(--plum-red); }
.est-intro__body { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 480px; margin-inline: auto; }

/* Header progress */
.estimator__steps {
  display: flex;
  gap: 6px;
  list-style: none;
  margin-left: auto;
  margin-right: var(--sp-2);
  counter-reset: est-step;
}
.estimator__steps li {
  counter-increment: est-step;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-chat);
  font-size: 13px;
  font-weight: 500;
  color: var(--subdued);
  transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.estimator__steps li::before {
  content: counter(est-step);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 11px;
}
.estimator__steps li.is-active { background: var(--light-surface); color: var(--ink); }
.estimator__steps li.is-active::before { background: var(--plum-red); border-color: var(--plum-red); color: #fff; }
.estimator__steps li.is-done { color: var(--ink); }
.estimator__steps li.is-done::before { content: "✓"; background: var(--ink); border-color: var(--ink); color: #fff; }

.est-msg { display: flex; gap: 12px; align-items: flex-start; animation: est-rise 0.4s var(--ease); }
.est-msg--user { justify-content: flex-end; }
.est-msg__bubble {
  max-width: 82%;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.est-msg--user .est-msg__bubble {
  background: var(--light-surface);
  border-radius: var(--radius-chat);
  padding: 12px 18px;
}
.est-msg--bot .est-msg__bubble { padding-top: 3px; max-width: 100%; flex: 1; }

.est-steps { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.est-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--subdued);
}
.est-steps li::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  border-top-color: var(--plum-red);
  animation: est-spin 0.8s linear infinite;
}
.est-steps li.is-done { color: var(--ink); }
.est-steps li.is-done::before { animation: none; border-color: var(--plum-red); background: var(--plum-red); }
.est-steps li.is-wait::before { animation: none; border-top-color: var(--border); }
@keyframes est-spin { to { transform: rotate(360deg); } }

.est-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: var(--sp-3);
  background: var(--light-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.est-form__field { display: flex; flex-direction: column; gap: 6px; }
.est-form__field--full,
.est-form__actions { grid-column: 1 / -1; }
.est-form label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.est-form input {
  font-family: var(--font-sans);
  font-size: 17px;
  padding: 11px 12px;
  border: 1px solid #D9D6D1;
  border-radius: var(--radius);
  background: var(--warm-white);
  color: var(--ink);
  outline: none;
}
.est-form input:focus { border-color: var(--ink); }
.est-form input[aria-invalid="true"] { border-color: var(--plum-red); }
.est-form__error { min-height: 1em; font-size: 15px; color: var(--plum-red); }
.est-form__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.est-form__note { font-size: 14px; color: var(--subdued); max-width: 340px; }
.est-form[hidden] { display: none; }
.est-form__code { font-family: var(--font-mono); font-size: 24px; letter-spacing: 0.3em; max-width: 14ch; }
.est-form__links { display: flex; gap: 16px; flex-wrap: wrap; }
.est-form__link {
  padding: 0;
  font: inherit;
  font-size: 15px;
  color: var(--muted);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.est-form__link:hover { color: var(--ink); }
.est-form__link:disabled { opacity: 0.5; cursor: default; }

.est-typing { display: inline-flex; gap: 4px; padding-top: 6px; }
.est-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--subdued); animation: est-bounce 1s var(--ease) infinite; }
.est-typing span:nth-child(2) { animation-delay: 0.15s; }
.est-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes est-bounce { 0%, 60%, 100% { transform: none; opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

.est-msg__sub { margin-top: 6px; font-size: 15px; color: var(--muted); }

/* ── Home: responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .home-hero__layout { grid-template-columns: minmax(0, 1fr); }
  .home-tracker { grid-column: 1; grid-row: auto; width: 100%; max-width: 640px; margin: 0 0 var(--sp-8); }
  .home-engine .hero-console { max-width: none; }
  .home-engine__layout,
  .home-calc__layout { grid-template-columns: minmax(0, 1fr); }
  .home-cards { grid-template-columns: minmax(0, 1fr); }
  .home-faq { grid-template-columns: minmax(0, 1fr); }
  .home-faq__head { position: static; }
}

@media (max-width: 768px) {
  :root { --fs-display: clamp(52px, 14.62vw, 90px); --fs-page: clamp(46px, 12vw, 76px); }
  .home-cards--2 { grid-template-columns: minmax(0, 1fr); }
  .home-vs { grid-template-columns: minmax(0, 1fr); }
  .home-stats__grid { grid-template-columns: minmax(0, 1fr); }
  .home-stats__item { padding-block: var(--sp-6); }
  .home-stats__item + .home-stats__item { border-left: none; border-top: 1px solid rgba(255,255,255,0.08); }
  /* Forced desktop line breaks leave one-word orphans on narrow screens */
  .home-h2 br { display: none; }
  .home-faq__a { padding-right: 0; }
  .home-steps__line { top: 0; bottom: 0; left: 5px; right: auto; width: 2px; height: auto; }
  .home-steps__line span { width: 100%; height: 100%; transform-origin: top; transform: scaleY(var(--p)); }
  .home-steps__list { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  /* Stacked cards reveal one at a time as they scroll in, so no stagger */
  .home-step:nth-child(n) { --n: 0; }
  .home-team__layout { grid-template-columns: minmax(0, 1fr); }
  .home-team__photo { aspect-ratio: 3 / 2; min-height: 0; }
  .home-composer__hint { display: none; }
  .home-composer__bar { justify-content: flex-end; }
  .est-form { grid-template-columns: minmax(0, 1fr); }
  .estimator { padding: 0; }
  .estimator__panel { height: 100svh; border-radius: 0; }
  .estimator.is-empty .estimator__panel { height: 100svh; }
  /* Keep intro, composer and chips together, centred in the free space below the header */
  .estimator.is-empty .estimator__thread { margin-top: auto; }
  .estimator.is-empty .estimator__chips { margin-bottom: auto; padding-bottom: var(--sp-4); }
  .estimator__title { font-size: 0; gap: 0; }
  .estimator__steps li { white-space: nowrap; }
  .estimator__steps li:not(.is-active) { font-size: 0; gap: 0; padding: 4px; }
  .estimator__steps li:not(.is-active)::before { font-size: 11px; }
}

@media (max-width: 480px) {
  .home-engine .hero-console__log { height: 340px; }
  .home-tracker__head,
  .home-tracker__foot,
  .home-engine .hero-console__bar,
  .home-engine .hero-console__foot { font-size: 11px; letter-spacing: 0.04em; white-space: nowrap; }
  .home-engine .hero-console__line { grid-template-columns: 14ch minmax(0, 1fr); column-gap: 12px; font-size: 13px; }
  .home-tracker__list li { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-line > span,
  .home-hero__eyebrow,
  .home-hero__sub,
  .home-hero__ctas,
  .home-tracker { animation: none; opacity: 1; transform: none; }
  .home-hero__scribble path { animation: none; stroke-dashoffset: 0; }
  .home-marquee__track { animation: none; }
  .home-scrub .w { opacity: 1; }
  .home-vs__bar span { transition: none; }
}


/* ============================================================
   03 - PAGE KIT (inner pages)
   Every inner page opens with .pg-hero, composes its body from the shared
   home-* components plus the pg-* blocks below, then closes with
   .pg-magnet (the page's lead magnet) and .home-final (the estimate CTA).
   ============================================================ */

/* ── Section surfaces ─────────────────────────────────────── */
.section--rule    { background: var(--warm-white); border-top: 1px solid var(--border); }
.section--surface { background: var(--light-surface); border-top: 1px solid var(--border); }
.section--dark    { background: var(--obsidian); color: var(--parchment); }
.section--dark .label { color: var(--harvest-gold); }
.section--dark .home-h2 { color: var(--parchment); }
.section--dark :is(.home-lead, .home-statement) { color: var(--subdued); }
.section--dark .home-lead strong { color: var(--parchment); font-weight: 600; }
.section--dark .home-card { background: var(--charcoal); border-color: rgba(255,255,255,0.08); }
.section--dark .home-card__title { color: var(--parchment); }
.section--dark .home-card__body { color: var(--subdued); }
.section--dark .link-secondary { color: var(--parchment); }

/* Head block: label + h2 + lead, kept together above section content */
.pg-head { max-width: 1100px; margin-bottom: clamp(40px, 5vw, 72px); }
.pg-head .home-h2 { margin-bottom: var(--sp-3); }
.pg-center > .pg-head { text-align: center; margin-inline: auto; }
.pg-center > .pg-head .home-lead { margin-inline: auto; }

/* ── Hero ─────────────────────────────────────────────────── */
.pg-hero {
  position: relative;
  min-height: 100svh;
  padding-top: calc(72px + clamp(40px, 5vw, 72px));
  display: flex;
  flex-direction: column;
  background: var(--warm-white);
  overflow: hidden;
  isolation: isolate;
}
.pg-hero--short { min-height: 78svh; }
.pg-hero--short .pg-hero__layout { padding-bottom: clamp(56px, 7vw, 104px); }

.pg-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) minmax(380px, 500px);
  justify-content: center;
  column-gap: clamp(40px, 5vw, 96px);
  align-items: center;
  width: 100%;
  flex: 1;
  padding-inline: var(--container-px);
  padding-bottom: var(--sp-8);
}
.pg-hero--solo .pg-hero__layout { grid-template-columns: minmax(0, 1320px); }
.pg-hero__copy { min-width: 0; }
/* Thank-you page: one hero copy per action, the rest hidden (js/main.js picks) */
.pg-hero__copy[data-ty][hidden] { display: none; }

.pg-hero__back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--dur-fast) var(--ease);
}
.pg-hero__back:hover { color: var(--plum-red); }

.pg-hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--fs-page);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: clamp(24px, 3vw, 40px);
}
.pg-hero__title em { font-style: italic; color: var(--plum-red); }
.pg-hero--solo .pg-hero__title { max-width: 1200px; }

.pg-hero__sub {
  font-size: clamp(19px, 1.57vw, 22px);
  line-height: 1.65;
  color: var(--body-color);
  max-width: 660px;
  margin-bottom: var(--sp-5);
}
.pg-hero__sub strong { color: var(--ink); font-weight: 600; }
.pg-hero__ctas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
}

/* Load-in sequence, same timing as the home hero */
.pg-hero__back,
.pg-hero .label,
.pg-hero__sub,
.pg-hero__ctas,
.pg-panel--hero {
  opacity: 0;
  animation: home-fade-up 0.9s var(--ease) forwards;
}
.pg-hero__back,
.pg-hero .label   { animation-delay: 0.05s; }
.pg-hero__sub     { animation-delay: 0.6s; }
.pg-hero__ctas    { animation-delay: 0.75s; }
.pg-panel--hero   { animation-delay: 0.95s; }

/* ── Dark panel (same look as the home tracker) ───────────── */
.pg-panel {
  --panel-px: clamp(20px, 2.2vw, 32px);
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  color: var(--parchment);
  overflow: hidden;
  min-width: 0;
}
.pg-panel__head,
.pg-panel__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2);
  padding: 18px var(--panel-px);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subdued);
}
.pg-panel__head { border-bottom: 1px solid rgba(255,255,255,0.06); }
.pg-panel__foot { border-top: 1px solid rgba(255,255,255,0.06); }
.pg-panel__foot strong { font-weight: 400; color: var(--parchment); }
.pg-panel__live { display: inline-flex; align-items: center; gap: 8px; color: var(--harvest-gold); }
.pg-panel__live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--harvest-gold);
  animation: console-pulse 2s var(--ease) infinite;
}
.pg-panel__body { padding: var(--sp-4) var(--panel-px); }

.pg-panel__big {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pg-panel__big-val {
  font-family: var(--font-serif);
  font-size: clamp(80px, 7vw, 124px);
  line-height: 0.85;
  color: var(--parchment);
  font-variant-numeric: tabular-nums;
}
.pg-panel__big-val em { font-style: normal; color: #E0324C; }
.pg-panel__big-unit {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subdued);
}

/* Checklist that ticks itself off once the hero has loaded */
.pg-panel__list { display: flex; flex-direction: column; gap: 16px; list-style: none; }
.pg-panel__list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.4;
  color: rgba(240,237,232,0.38);
  animation: pg-done-text 0.4s var(--ease) forwards;
}
.pg-panel__list li::before {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: var(--radius);
  border: 1.5px solid rgba(255,255,255,0.18);
  animation: pg-done-box 0.4s var(--ease) forwards;
}
.pg-panel__list li,
.pg-panel__list li::before { animation-delay: calc(1.5s + var(--i, 0) * 0.45s); }
.pg-panel__list li:nth-child(2) { --i: 1; }
.pg-panel__list li:nth-child(3) { --i: 2; }
.pg-panel__list li:nth-child(4) { --i: 3; }
.pg-panel__list li:nth-child(5) { --i: 4; }
.pg-panel__list li:nth-child(6) { --i: 5; }
.pg-panel__list li:nth-child(7) { --i: 6; }
.pg-panel__list li:nth-child(8) { --i: 7; }
@keyframes pg-done-text { to { color: var(--parchment); } }
@keyframes pg-done-box {
  to {
    background: var(--plum-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
    border-color: var(--plum-red);
  }
}

/* Key / value rows */
.pg-panel__rows { display: flex; flex-direction: column; }
.pg-panel__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-2);
  padding-block: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pg-panel__row:last-child { border-bottom: none; }
.pg-panel__row dt {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subdued);
}
.pg-panel__row dd {
  font-family: var(--font-serif);
  font-size: clamp(22px, 1.9vw, 28px);
  line-height: 1.15;
  text-align: right;
  color: var(--parchment);
}

/* ── Hero variants: each page picks a layout and a visual so heroes don't repeat ── */

/* Centred: big centred type, the visual sits underneath as a wide strip */
.pg-hero--center .pg-hero__layout { grid-template-columns: minmax(0, 1200px); justify-items: center; align-content: center; text-align: center; }
.pg-hero--center .pg-hero__sub { margin-inline: auto; max-width: 780px; }
.pg-hero--center .pg-hero__ctas { justify-content: center; }
.pg-hero--center .pg-panel--hero,
.pg-hero--center .pg-hero__visual { width: 100%; max-width: 1100px; margin-top: var(--sp-6); text-align: left; }

/* Wide: the headline spans the full width, sub + CTAs and the visual share the row below */
.pg-hero--wide .pg-hero__layout {
  grid-template-columns: minmax(0, 640px) minmax(0, 660px);
  align-items: end;
  align-content: center;
  row-gap: var(--sp-6);
}
.pg-hero--wide .pg-hero__copy { display: contents; }
.pg-hero--wide :is(.pg-hero__back, .label, .pg-hero__title) { grid-column: 1 / -1; justify-self: start; }
.pg-hero--wide .pg-hero__title { max-width: 1320px; margin-bottom: 0; }
.pg-hero--wide .pg-hero__lower { grid-column: 1; align-self: start; }
.pg-hero--wide :is(.pg-panel--hero, .pg-hero__visual) { grid-column: 2; grid-row: 3 / span 2; align-self: start; }

/* A non-panel visual slot (photo, phone, browser) */
.pg-hero__visual { min-width: 0; opacity: 0; animation: home-fade-up 0.9s var(--ease) 0.95s forwards; }

/* Light panel: same frame as .pg-panel, white surface */
.pg-panel--light { background: var(--warm-white); border-color: var(--border); color: var(--ink); box-shadow: 0 32px 64px -32px rgba(0,0,0,0.22); }
.pg-panel--light :is(.pg-panel__head, .pg-panel__foot) { border-color: var(--border); }
.pg-panel--light .pg-panel__foot strong { color: var(--ink); }
.pg-panel--light .pg-panel__live { color: var(--plum-red); }
.pg-panel--light .pg-panel__row { border-color: var(--border); }
.pg-panel--light .pg-panel__row dt { color: var(--muted); }
.pg-panel--light .pg-panel__row dd { color: var(--ink); }
.pg-panel--light .pg-panel__live::before { background: var(--plum-red); }

/* Staggered entry for the pieces inside a hero visual */
.pg-seq > * { opacity: 0; transform: translateY(10px); animation: vis-pop 0.5s var(--ease) forwards; animation-delay: calc(1.3s + var(--i, 0) * 0.4s); }
.pg-seq > :nth-child(2) { --i: 1; } .pg-seq > :nth-child(3) { --i: 2; } .pg-seq > :nth-child(4) { --i: 3; }
.pg-seq > :nth-child(5) { --i: 4; } .pg-seq > :nth-child(6) { --i: 5; } .pg-seq > :nth-child(7) { --i: 6; }

/* Chat: an idea goes in, a reply comes back */
.pg-chat { display: flex; flex-direction: column; gap: 14px; }
.pg-chat__msg { max-width: 86%; padding: 12px 16px; font-size: 16px; line-height: 1.5; border-radius: var(--radius-chat); }
.pg-chat__msg--user { align-self: flex-end; background: var(--light-surface); color: var(--ink); }
.pg-chat__msg--bot { align-self: flex-start; border: 1px solid var(--border); color: var(--body-color); }
.pg-panel:not(.pg-panel--light) .pg-chat__msg--user { background: rgba(255,255,255,0.08); color: var(--parchment); }
.pg-panel:not(.pg-panel--light) .pg-chat__msg--bot { border-color: rgba(255,255,255,0.12); color: var(--parchment); }
.pg-chat__meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--subdued); }

/* Browser window mock */
.pg-browser { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 32px 64px -32px rgba(0,0,0,0.25); overflow: hidden; }
.pg-browser__bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--light-surface); border-bottom: 1px solid var(--border); }
.pg-browser__dots { display: flex; gap: 6px; }
.pg-browser__dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.pg-browser__url { flex: 1; padding: 6px 12px; border-radius: var(--radius-chat); background: var(--warm-white); border: 1px solid var(--border); font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.pg-browser__body { display: grid; grid-template-columns: 120px minmax(0, 1fr); min-height: 300px; }
.pg-browser__side { display: flex; flex-direction: column; gap: 10px; padding: 18px 14px; border-right: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.pg-browser__side span:first-child { color: var(--plum-red); font-weight: 600; }
.pg-browser__main { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.pg-browser__title { font-family: var(--font-serif); font-size: 28px; line-height: 1.1; color: var(--ink); }
.pg-browser__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; color: var(--ink); }
.pg-browser__row em { font-style: normal; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--plum-red); }

/* Phone mock */
.pg-phone { width: min(300px, 100%); margin-inline: auto; padding: 12px; background: var(--charcoal); border-radius: 40px; box-shadow: var(--shadow-panel); }
.pg-phone__screen { display: flex; flex-direction: column; gap: 12px; min-height: 520px; padding: 36px 18px 20px; border-radius: 30px; background: var(--warm-white); position: relative; }
.pg-phone__screen::before { content: ""; position: absolute; top: 12px; left: 50%; width: 80px; height: 20px; margin-left: -40px; border-radius: 12px; background: var(--charcoal); }
.pg-phone__title { font-family: var(--font-serif); font-size: 30px; line-height: 1.05; color: var(--ink); }
.pg-phone__card { padding: 14px; border-radius: 14px; background: var(--light-surface); font-size: 14px; color: var(--ink); }
.pg-phone__card strong { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.pg-phone__btn { margin-top: auto; padding: 14px; border-radius: 14px; background: var(--plum-red); color: #fff; text-align: center; font-weight: 600; font-size: 15px; }

/* Integration flow: nodes joined by a moving line */
.pg-flow { display: flex; flex-direction: column; gap: 0; }
.pg-flow__node { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); font-family: var(--font-mono); font-size: 15px; color: var(--parchment); }
.pg-flow__node em { font-style: normal; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--harvest-gold); }
.pg-flow__node--core { background: var(--plum-red); border-color: var(--plum-red); color: #fff; }
.pg-flow__node--core em { color: rgba(255,255,255,0.8); }
.pg-flow__link { position: relative; height: 22px; margin-left: 28px; width: 2px; background: rgba(255,255,255,0.12); overflow: hidden; }
.pg-flow__link::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--harvest-gold); animation: pg-flow 1.6s linear infinite; }
@keyframes pg-flow { to { top: 100%; } }

/* Code / payload */
.pg-code { margin: 0; font-family: var(--font-mono); font-size: 14px; line-height: 1.75; color: var(--parchment); white-space: pre-wrap; overflow-wrap: anywhere; }
.pg-code .k { color: var(--harvest-gold); }
.pg-code .s { color: #E0324C; }
.pg-code .c { color: var(--subdued); }
.pg-code .add { display: block; background: rgba(212,168,67,0.1); }

/* Event feed: timestamped events, newest last */
.pg-feed { display: flex; flex-direction: column; list-style: none; }
.pg-feed li { display: grid; grid-template-columns: 7ch minmax(0, 1fr); gap: 14px; padding-block: 12px; border-bottom: 1px solid rgba(255,255,255,0.06); font-family: var(--font-mono); font-size: 14px; line-height: 1.5; color: var(--parchment); }
.pg-feed li:last-child { border-bottom: none; }
.pg-feed time { color: var(--subdued); }
.pg-feed b { font-weight: 400; color: var(--harvest-gold); }

/* Metric grid: 2x2 big numbers */
.pg-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,0.08); }
.pg-metrics > div { display: flex; flex-direction: column; gap: 6px; padding: 22px var(--panel-px, 24px); background: var(--charcoal); }
.pg-metrics__val { font-family: var(--font-serif); font-size: clamp(44px, 4vw, 64px); line-height: 0.95; color: var(--parchment); }
.pg-metrics__val em { font-style: normal; color: #E0324C; }
.pg-metrics__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--subdued); }

/* Comparison bars: label, value, growing bar */
.pg-bars { display: flex; flex-direction: column; gap: 22px; }
.pg-bars__row { display: flex; flex-direction: column; gap: 8px; }
.pg-bars__top { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--subdued); }
.pg-bars__top strong { font-weight: 400; color: var(--parchment); }
.pg-bars__track { height: 10px; border-radius: var(--radius); background: rgba(255,255,255,0.08); overflow: hidden; }
.pg-bars__track span { display: block; height: 100%; width: 0; background: var(--subdued); animation: pg-grow 1.6s var(--ease) 1.4s forwards; }
.pg-bars__row--us .pg-bars__track span { background: var(--plum-red); animation-delay: 1.7s; }
@keyframes pg-grow { to { width: var(--w); } }

/* Ten-day timeline strip */
.pg-days { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.pg-days span { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 120px; padding: 8px; border-radius: var(--radius); background: rgba(255,255,255,0.06); font-family: var(--font-mono); font-size: 11px; color: var(--subdued); animation: pg-day 0.35s var(--ease) forwards; animation-delay: calc(1.3s + var(--d, 0) * 0.18s); }
.pg-days span b { font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
@keyframes pg-day { to { background: var(--plum-red); color: #fff; } }

/* Photo card */
.pg-photo { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-panel); background: var(--light-surface); }
.pg-photo img { width: 100%; height: 100%; object-fit: cover; }
.pg-photo__tag { position: absolute; left: 16px; bottom: 16px; padding: 8px 12px; border-radius: var(--radius); background: var(--charcoal); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--parchment); }

/* Chips row inside a hero (industries, roles) */
.pg-hero__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--sp-6); }
.pg-hero--center .pg-hero__chips { justify-content: center; }
.pg-hero__chips a,
.pg-hero__chips span { padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius-chat); background: var(--warm-white); font-size: 15px; color: var(--ink); transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.pg-hero__chips a:hover { border-color: var(--plum-red); color: var(--plum-red); }

@media (max-width: 1024px) {
  .pg-hero--wide .pg-hero__layout { grid-template-columns: minmax(0, 1fr); }
  .pg-hero--wide :is(.pg-panel--hero, .pg-hero__visual) { grid-column: 1; grid-row: auto; }
  .pg-hero__visual { width: 100%; max-width: 640px; }
  .pg-photo { aspect-ratio: 3 / 2; }
}
@media (max-width: 768px) {
  .pg-hero--center .pg-hero__layout { text-align: left; justify-items: start; }
  .pg-hero--center .pg-hero__ctas,
  .pg-hero--center .pg-hero__chips { justify-content: flex-start; }
  .pg-browser__body { grid-template-columns: minmax(0, 1fr); }
  .pg-browser__side { display: none; }
  .pg-days { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pg-days span { height: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-hero__visual, .pg-seq > * { animation: none; opacity: 1; transform: none; }
  .pg-bars__track span { animation: none; width: var(--w); }
  .pg-flow__link::after { animation: none; }
}

/* ── Two-column split ─────────────────────────────────────── */
.pg-split {
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(0, 720px);
  justify-content: center;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.pg-split--center { align-items: center; }
.pg-split .home-h2 { margin-bottom: var(--sp-4); }
.pg-split__copy > .home-lead + .home-lead { margin-top: var(--sp-3); }
.pg-split__copy > .link-secondary,
.pg-split__copy > .btn { margin-top: var(--sp-5); }
.pg-split__copy > :is(.pg-ticks, .pg-tags) { margin-top: var(--sp-4); }

/* ── Tick list ────────────────────────────────────────────── */
.pg-ticks { display: flex; flex-direction: column; gap: var(--sp-2); list-style: none; }
.pg-ticks li {
  position: relative;
  padding-left: 36px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--body-color);
}
.pg-ticks li strong { color: var(--ink); font-weight: 600; }
.pg-ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 20px;
  height: 20px;
  border-radius: var(--radius);
  background: var(--plum-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.section--dark .pg-ticks li { color: var(--subdued); }
.section--dark .pg-ticks li strong { color: var(--parchment); }

/* ── Link tiles (cards that go somewhere) ─────────────────── */
.pg-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
}
.pg-tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pg-tiles--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
a.home-card,
button.home-card { display: flex; flex-direction: column; }
button.home-card { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.home-card__link {
  margin-top: auto;
  padding-top: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum-red);
}
.home-card__tag {
  display: block;
  margin-bottom: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subdued);
}
/* Blog card thumbnail, bled to the card edges */
.home-card__media {
  margin: calc(var(--card-pad) * -1) calc(var(--card-pad) * -1) var(--sp-3);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--border);
  background: var(--border);
}
.home-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-slow) var(--ease); }
a.home-card:hover .home-card__media img { transform: scale(1.04); }

/* ── Tags (stack, skills) ─────────────────────────────────── */
.pg-tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.pg-tag {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.section--dark .pg-tag { color: var(--parchment); background: var(--charcoal); border-color: rgba(255,255,255,0.08); }

/* ── Pull quote ───────────────────────────────────────────── */
.pg-quote {
  max-width: 1100px;
  margin-inline: auto;
  text-align: center;
}
.pg-quote blockquote {
  font-family: var(--font-serif);
  font-size: var(--fs-statement);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: var(--sp-4);
}
.pg-quote blockquote em { font-style: italic; color: var(--plum-red); }
.pg-quote cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subdued);
}
.section--dark .pg-quote blockquote { color: var(--parchment); }

/* ── Lead magnet band (each page's secondary action) ─────── */
.pg-magnet { background: var(--light-surface); border-top: 1px solid var(--border); }
.pg-magnet .home-card { background: var(--warm-white); }
.pg-magnet__box {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 40px);
}
.pg-magnet__kind {
  display: block;
  margin-bottom: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subdued);
}
.pg-magnet__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(30px, 2.6vw, 40px);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: var(--sp-3);
}
.pg-magnet__box .pg-ticks { margin-bottom: var(--sp-4); }
.pg-magnet__box .pg-ticks li { font-size: 17px; }
.pg-magnet__box .btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }
.pg-magnet__note {
  margin-top: var(--sp-2);
  font-size: 14px;
  color: var(--subdued);
  text-align: center;
}

/* ── Prose (legal and long-form text) ─────────────────────── */
.pg-prose { max-width: 760px; }
.pg-prose h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(30px, 2.6vw, 40px);
  line-height: 1.15;
  color: var(--ink);
  margin: var(--sp-8) 0 var(--sp-2);
  scroll-margin-top: 96px;
}
.pg-prose h2:first-child { margin-top: 0; }
.pg-prose h3 { font-size: 20px; font-weight: 700; color: var(--ink); margin: var(--sp-4) 0 var(--sp-1); }
.pg-prose p,
.pg-prose li { font-size: 18px; line-height: 1.75; color: var(--body-color); }
.pg-prose p + p,
.pg-prose :is(ul, address) + p,
.pg-prose p + address { margin-top: var(--sp-2); }
.pg-prose address { font-style: normal; font-size: 18px; line-height: 1.75; color: var(--body-color); }
.pg-prose ul { list-style: none; margin-top: var(--sp-2); display: flex; flex-direction: column; gap: 8px; }
.pg-prose ul li { position: relative; padding-left: 28px; }
.pg-prose ul li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 12px; height: 2px; background: var(--plum-red); }
.pg-prose figure { margin: var(--sp-5) 0; }
.pg-prose figure img { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: var(--radius); background: var(--light-surface); }
.pg-prose figcaption { margin-top: var(--sp-1); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; line-height: 1.6; color: var(--subdued); }
.pg-prose a { color: var(--plum-red); text-decoration: underline; text-underline-offset: 3px; }
.pg-prose strong { color: var(--ink); }

/* Sticky contents list beside long prose */
.pg-doc {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 760px);
  justify-content: center;
  gap: clamp(40px, 6vw, 112px);
  align-items: start;
}
.pg-doc__toc { position: sticky; top: calc(72px + var(--sp-5)); }
/* Blog post cover: spans the contents list and the prose */
.pg-doc:has(> .pg-doc__cover) { row-gap: clamp(32px, 4vw, 56px); }
.pg-doc__cover { grid-column: 1 / -1; }
.pg-doc__toc ol { list-style: none; display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--border); }
.pg-doc__toc a {
  display: block;
  padding-left: var(--sp-2);
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 15px;
  color: var(--muted);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.pg-doc__toc a:hover { color: var(--plum-red); border-left-color: var(--plum-red); }

/* ── Form ─────────────────────────────────────────────────── */
.pg-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  padding: clamp(24px, 3vw, 40px);
  background: var(--light-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pg-form__field { display: flex; flex-direction: column; gap: 8px; }
.pg-form__field--full,
.pg-form__actions { grid-column: 1 / -1; }
.pg-form label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pg-form :is(input, select, textarea) {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 17px;
  padding: 13px 14px;
  border: 1px solid #D9D6D1;
  border-radius: var(--radius);
  background: var(--warm-white);
  color: var(--ink);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease);
}
.pg-form textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.pg-form :is(input, select, textarea):focus { border-color: var(--ink); }
.pg-form__actions { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.pg-form__note { font-size: 14px; color: var(--subdued); max-width: 380px; }

/* ── Filter chips (blog, work) ────────────────────────────── */
.pg-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 4vw, 56px); }
.pg-filter .home-chip.is-active,
.pg-filter .home-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--parchment); }

/* ── Grid modifiers for shared components ─────────────────── */
.home-stats__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-steps__list--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-steps__list--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.work__grid.work__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section--surface .home-step__badge { background: var(--light-surface); }
.section--surface .home-step__badge::before { box-shadow: 0 0 0 4px var(--light-surface); }
.section--surface .home-card,
.section--surface .home-step__card { background: var(--warm-white); }

/* ── Page kit: responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
  .pg-hero__layout { grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-6); }
  .pg-panel--hero { width: 100%; max-width: 640px; }
  .pg-split,
  .pg-doc { grid-template-columns: minmax(0, 1fr); }
  .pg-tiles,
  .pg-tiles--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-doc__toc { position: static; }
  .home-stats__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-stats__grid--4 .home-stats__item:nth-child(3) { border-left: none; }
  .home-stats__grid--4 .home-stats__item:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,0.08); }
  .home-steps__list--4,
  .home-steps__list--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--sp-6); }
  .home-steps__list--4 ~ .home-steps__line,
  .home-steps__wrap:has(.home-steps__list--4, .home-steps__list--5) .home-steps__line { display: none; }
}

@media (max-width: 768px) {
  .pg-hero { min-height: auto; }
  .pg-hero__title br,
  .pg-head .home-h2 br { display: none; }
  .pg-form { grid-template-columns: minmax(0, 1fr); }
  .pg-tiles,
  .pg-tiles--2,
  .pg-tiles--4 { grid-template-columns: minmax(0, 1fr); }
  .work__grid.work__grid--2 { grid-template-columns: minmax(0, 1fr); }
  .home-steps__list--4,
  .home-steps__list--5 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .home-stats__grid--4 { grid-template-columns: minmax(0, 1fr); }
  .home-stats__grid--4 .home-stats__item + .home-stats__item { border-left: none; border-top: 1px solid rgba(255,255,255,0.08); }
  .pg-panel__head,
  .pg-panel__foot { font-size: 11px; letter-spacing: 0.04em; }
  .pg-panel__list li { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .pg-hero__back,
  .pg-hero .label,
  .pg-hero__sub,
  .pg-hero__ctas,
  .pg-panel--hero { animation: none; opacity: 1; transform: none; }
  .pg-panel__list li,
  .pg-panel__list li::before { animation-delay: 0s; }
}


/* ============================================================
   08 - CASE STUDIES
   ============================================================ */
.work__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.work-card {
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.work-card:hover { transform: translateY(-3px); border-color: var(--plum-red); }

.work-card__image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.work-card__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(200,16,46,0.04) 0%,
    transparent 60%
  );
}

.work-card__content {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.work-card__tag {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subdued);
}

.work-card__title {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.work-card__result {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--plum-red);
  line-height: 1.5;
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border, rgba(0,0,0,0.08));
}

.work-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.work-card__image::after { z-index: 1; }

.work-card { display: flex; flex-direction: column; }
.work-card[hidden] { display: none; }
.work-card__content { flex: 1; }
.work-card__content .link-arrow { margin-top: auto; }

.work-card__desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.work-card__status {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum-red);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 10px;
}

.work__grid.work__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.work__more { margin-top: clamp(56px, 7vw, 96px); }


/* ── Project detail pages ── */
.pj-media {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--obsidian);
}
.pj-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pj-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
}
.pj-gallery figure { margin: 0; }
.pj-gallery__frame {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--parchment);
}
/* contain, not cover: gallery mixes phone screens, portrait renders and wide dashboards */
.pj-gallery__frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pj-gallery figcaption,
.pj-shot figcaption {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--subdued);
  margin-top: var(--sp-2);
}

.pj-shot { margin: 0; justify-self: center; width: min(100%, 320px); }
.pj-shot img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--parchment);
}

@media (max-width: 1024px) {
  .work__grid.work__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .pj-gallery { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .work__grid.work__grid--4 { grid-template-columns: minmax(0, 1fr); }
}


/* ============================================================
   11 - FINAL CTA
   ============================================================ */
.final-cta {
  background: var(--obsidian);
  padding-block: var(--section-py);
}

.final-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 780px;
}

.final-cta__body {
  font-family: var(--font-sans);
  font-size: 18px;
  color: var(--subdued);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: var(--sp-6);
}

.final-cta__sub {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--subdued);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--sp-3);
  opacity: 0.6;
}


/* ============================================================
   12 - FOOTER
   ============================================================ */
.footer {
  background: var(--charcoal);
  padding-block: var(--sp-12);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer__inner { display: flex; flex-direction: column; gap: var(--sp-10); }

.footer__top {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp-12);
}

.footer__logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.footer__logo .logo-mark {
  background: var(--plum-red);
}
.footer__logo-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--parchment);
}
.footer__logo-sub {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240,237,232,0.4);
}

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

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subdued);
  margin-bottom: var(--sp-3);
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.footer__col a {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--subdued);
  transition: color var(--dur-fast) var(--ease);
}
.footer__col a:hover { color: var(--parchment); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,0.06);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--subdued);
}

.footer__legal {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.footer__legal a {
  color: var(--subdued);
  transition: color var(--dur-fast) var(--ease);
}
.footer__legal a:hover { color: var(--parchment); }
.footer__legal span { opacity: 0.4; }


/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}
.modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  background: var(--warm-white);
  max-width: 480px;
  width: 100%;
  padding: var(--sp-8) var(--sp-8);
  transform: translateY(12px) scale(0.98);
  transition: transform var(--dur-base) var(--ease);
}
.modal.open .modal__content {
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--subdued);
  padding: 4px;
  transition: color var(--dur-fast) var(--ease);
}
.modal__close:hover { color: var(--ink); }

.modal__title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: var(--sp-2);
  line-height: 1.2;
}

.modal__desc {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--body-color);
  margin-bottom: var(--sp-5);
  line-height: 1.6;
}

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

.modal__input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--light-surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease);
}
.modal__input:focus { border-color: var(--plum-red); }
.modal__input[aria-invalid="true"] { border-color: var(--plum-red); }
.modal__content { border-radius: var(--radius); }
.modal__input::placeholder { color: var(--subdued); }

.modal__note {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--subdued);
  letter-spacing: 0.08em;
  margin-top: var(--sp-2);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet - 1024px */
@media (max-width: 1024px) {
  .work__grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: var(--sp-8); }
}

/* Mobile - 768px */
@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--warm-white);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--sp-5) var(--container-px);
    gap: var(--sp-1);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--dur-base) var(--ease);
    border-top: 1px solid var(--border);
  }
  .nav__links.open { transform: translateX(0); }

  .nav__item { width: 100%; }
  .nav__link,
  .nav__link--btn { width: 100%; padding: 12px 0; }

  .nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--light-surface);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dur-base) var(--ease);
    border-radius: 3px;
    margin-top: 4px;
  }
  .nav__item--has-dropdown.open .nav__dropdown {
    max-height: 400px;
    pointer-events: all;
  }
  .nav__dropdown-link { padding: 10px 14px; }

  .nav__hamburger { display: flex; }
  .nav__actions .btn--primary { display: none; }

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

  .footer__nav { grid-template-columns: repeat(2, 1fr); }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }

  .modal__content { padding: var(--sp-6) var(--sp-4); }
}

/* Small mobile - 480px */
@media (max-width: 480px) {
  .footer__nav { grid-template-columns: 1fr; }
  /* Long button labels wrap instead of overflowing at the larger type scale */
  .btn { white-space: normal; text-align: center; justify-content: center; }
}


/* ============================================================
   NAV - ACTIVE STATE
   ============================================================ */
.nav__link--active {
  color: var(--plum-red) !important;
}


/* ── Home: featured work showcase ─────────────────────────── */
.home-show__head {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--sp-5);
  align-items: end;
  margin-bottom: var(--sp-6);
}
.home-show__head .home-h2 { margin-bottom: 0; }
.home-show__intro { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
.home-show__intro .home-lead { margin: 0; }

.home-show__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
}
.home-show__card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.home-show__card:hover,
.home-show__card:focus-visible { border-color: var(--plum-red); box-shadow: var(--shadow-panel); transform: translateY(-3px); }
.home-show__card:focus-visible { outline: 2px solid var(--plum-red); outline-offset: 3px; }

.home-show__card--feature { background: var(--obsidian); border-color: var(--obsidian); }

.home-show__media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--light-surface); }
.home-show__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 700ms var(--ease);
}
.home-show__card:hover .home-show__media img { transform: scale(1.04); }

.home-show__body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: var(--sp-4); min-width: 0; }

.home-show__meta { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--subdued); }
.home-show__num { color: var(--plum-red); }
.home-show__tag { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; }
.home-show__card--feature .home-show__tag { border-color: rgba(255,255,255,0.18); color: rgba(240,237,232,0.7); }

.home-show__title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(28px, 2.4vw, 36px); line-height: 1.05; color: var(--ink); }
.home-show__card--feature .home-show__title { color: var(--parchment); }
.home-show__desc { font-size: 16px; line-height: 1.6; color: var(--muted); }
.home-show__card--feature .home-show__desc { color: rgba(240,237,232,0.72); }

.home-show__foot { margin-top: auto; padding-top: var(--sp-2); border-top: 1px solid var(--border); display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-2); }
.home-show__card--feature .home-show__foot { border-top-color: rgba(255,255,255,0.12); }
.home-show__stat { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.home-show__stat strong { font-family: var(--font-serif); font-weight: 400; font-style: italic; font-size: clamp(32px, 3vw, 44px); line-height: 1; color: var(--plum-red); }
.home-show__stat span { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subdued); }
.home-show__card--feature .home-show__stat span { color: rgba(240,237,232,0.6); }

.home-show__go {
  flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); color: var(--ink); font-size: 18px;
  transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.home-show__card--feature .home-show__go { border-color: rgba(255,255,255,0.25); color: var(--parchment); }
.home-show__card:hover .home-show__go { background: var(--plum-red); border-color: var(--plum-red); color: #fff; transform: translateX(3px); }

@media (max-width: 1024px) {
  .home-show__head { grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--sp-3); }
  .home-show__grid { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
}
@media (max-width: 640px) {
  .home-show__body { padding: var(--sp-3); }
}
@media (prefers-reduced-motion: reduce) {
  .home-show__card, .home-show__media img, .home-show__go { transition: none; }
  .home-show__card:hover { transform: none; }
  .home-show__card:hover .home-show__media img { transform: none; }
}
