/* ==========================================================================
   Marcel Films — Design System v2
   Modern, premium, inviting. Warm rounded surfaces, soft depth, pill
   actions. Same five brand colors throughout — no new hues added.
   ========================================================================== */

:root {
  /* Brand color (fixed — do not add new hues) */
  --ink: #14201E;
  --pine: #0E3B36;
  --pine-dark: #092623;
  --moss: #2F6F63;
  --paper: #EFF2EF;
  --line: #D7DAD4;

  /* Derived tints — blends of the tokens above only */
  --canvas: #E6E9E4;              /* page background, paper+line blend */
  --surface: var(--paper);        /* card surfaces, sit above canvas */
  --pine-wash: rgba(14, 59, 54, 0.06);
  --pine-wash-strong: rgba(14, 59, 54, 0.12);
  --moss-wash: rgba(47, 111, 99, 0.1);
  --ink-wash: rgba(20, 32, 30, 0.06);

  /* Type */
  --font-display: 'Hanken Grotesk', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --container: 1280px;
  --gutter: clamp(1.5rem, 4vw, 3.5rem);
  --section-space: clamp(4.5rem, 9vw, 8rem);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  /* Motion — one shared vocabulary, reused everywhere rather than
     per-component timing, so interactions read as one system. */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.22s;   /* immediate feedback — hover, press, chip/dash state */
  --duration-base: 0.5s;    /* reveals — cards, stats, process steps entering */
  --duration-slow: 0.85s;   /* the diagram and other larger constructions */
  --shadow-soft: 0 24px 48px -28px rgba(20, 32, 30, 0.28);
  --shadow-lift: 0 32px 64px -24px rgba(20, 32, 30, 0.32);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Shared reveal-on-scroll ----
   JS only ever adds .will-reveal to elements when IntersectionObserver
   exists, so a visitor without it (or with JS off) simply sees every
   element in its normal, fully-visible state — nothing depends on this
   to be readable. One fade+rise language, reused for every repeating
   group on the page (cards, stats, process steps) so they read as one
   system rather than separate effects per section. */
.will-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-base) var(--ease), transform var(--duration-base) var(--ease);
}
.will-reveal.is-visible { opacity: 1; transform: translateY(0); }

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top var(--duration-fast) var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---- Type scale ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 650;
  color: var(--ink);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.75rem, 5.2vw, 4.75rem); font-weight: 650; letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 3.4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 650; }
h4 { font-size: 1.0625rem; font-weight: 700; font-family: var(--font-body); }

p { max-width: 62ch; }
p.lede {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--moss);
  max-width: none;
  margin-top: 0.85rem;
}

.text-muted { color: var(--moss); }
.text-small { font-size: 0.875rem; }
.tag { color: var(--pine); }

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

.section { padding-bottom: var(--section-space); }

/* Sections normally rely on the section above's bottom padding for
   gap, with no top padding of their own — invisible on a shared
   background, but a section with its own tinted background is a
   visible box, so it needs breathing room at its own top edge too. */
.section-tint {
  background: var(--pine-wash);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

/* Same problem, different cause: .page-hero draws its own visible
   border-bottom as a divider, so the section right after it needs its
   own top padding too, instead of sitting flush against that line. */
.page-hero + .section { padding-top: clamp(2.5rem, 5vw, 4rem); }

/* And the mirror of the .section-tint fix above: a tinted section's
   own bottom edge is just as visible a boundary as its top edge, so
   whatever plain section follows it needs the same top padding —
   otherwise all the breathing room sits hidden inside the tinted box
   and the next heading still lands flush against the color change. */
.section-tint + .section { padding-top: clamp(2.5rem, 5vw, 4rem); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head > div { max-width: 75%; }
.section-head h2 { max-width: 30ch; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--moss);
  margin-bottom: 1rem;
}
.kicker::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--moss);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 1rem 1.85rem;
  border-radius: var(--radius-pill);
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease),
              border-color var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--pine);
  color: var(--paper);
  box-shadow: 0 16px 32px -14px var(--pine-wash-strong);
}
.btn-primary:hover { background: var(--pine-dark); box-shadow: 0 20px 36px -12px rgba(14,59,54,0.35); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--pine); color: var(--pine); }

.btn-ghost-light {
  background: transparent;
  color: var(--paper);
  border: 1.5px solid rgba(239, 242, 239, 0.35);
}
.btn-ghost-light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.text-link {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--pine);
  border-bottom: 1.5px solid var(--pine-wash-strong);
  padding-bottom: 0.2em;
  transition: border-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}
.text-link:hover { border-color: var(--pine); }
.text-link-light { color: var(--paper); border-color: rgba(239,242,239,0.35); }
.text-link-light:hover { border-color: var(--paper); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: clamp(0.75rem, 2vw, 1.25rem);
}

.header-bar {
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--container);
  margin-inline: auto;
  background: rgba(239, 242, 239, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(215, 218, 212, 0.8);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.6rem 0.5rem 1.4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.brand img { height: 30px; width: auto; }
.brand-word {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-primary > ul {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 1vw, 0.5rem);
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}
.nav-link:hover { background: var(--pine-wash); color: var(--pine); }

.has-dropdown { position: relative; }

.dropdown-toggle { display: inline-flex; align-items: center; gap: 0.35rem; }
.dropdown-toggle svg { width: 9px; height: 9px; transition: transform var(--duration-fast) var(--ease); }
.has-dropdown:hover .dropdown-toggle svg,
.has-dropdown:focus-within .dropdown-toggle svg { transform: rotate(180deg); }

.dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 340px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 0.6rem;
  display: grid;
  gap: 0.15rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease), visibility var(--duration-fast);
}
.has-dropdown:hover .dropdown-panel,
.has-dropdown:focus-within .dropdown-panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.dropdown-cat {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--duration-fast) var(--ease);
}
.dropdown-cat:hover { background: var(--pine-wash); }
.dropdown-panel .cat-name { display: block; font-weight: 700; font-size: 0.9375rem; margin-bottom: 0.2rem; }
.dropdown-panel .cat-name:hover { color: var(--pine); }
.dropdown-panel .cat-sub { display: block; font-size: 0.8125rem; color: var(--moss); font-weight: 500; }
.dropdown-panel .cat-sub a { color: var(--moss); }
.dropdown-panel .cat-sub a:hover { color: var(--pine); text-decoration: underline; }

.header-cta { display: flex; align-items: center; gap: 0.5rem; }
.header-cta .btn { padding: 0.85rem 1.5rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--ink-wash);
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 16px;
  margin-inline: auto;
  border-radius: 2px;
  background: var(--ink);
  transition: transform var(--duration-fast) var(--ease), opacity var(--duration-fast) var(--ease);
}

/* ---- Mobile nav overlay ---- */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--ink);
  color: var(--paper);
  z-index: 150;
  padding: clamp(1.25rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform var(--duration-base) var(--ease);
  overflow-y: auto;
}
.mobile-nav.is-open { transform: translateY(0); }

.mobile-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
}
.mobile-nav-top .brand-word { color: var(--paper); }
.mobile-nav-close { background: rgba(239,242,239,0.1); }
.mobile-nav-close span { background: var(--paper); }
.mobile-nav-close span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-nav-close span:nth-child(2) { opacity: 0; }
.mobile-nav-close span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav-list { flex: 1; }
.mobile-nav-list > li + li { margin-top: 0.25rem; }
.mobile-nav-list a, .mobile-nav-list .m-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2.125rem);
  font-weight: 650;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  width: 100%;
  text-align: left;
  transition: background-color var(--duration-fast) var(--ease);
}
.mobile-nav-list a:active, .mobile-nav-list .m-toggle:active { background: rgba(239,242,239,0.08); }

.mobile-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-base) var(--ease);
  padding-left: 1rem;
}
.mobile-sub.is-open { max-height: 640px; }
.mobile-sub li a { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; color: rgba(239,242,239,0.72); padding: 0.6rem 1rem; }
.mobile-sub .mobile-sub-links { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; padding: 0 1rem 0.75rem; }
.mobile-sub .mobile-sub-links a { display: inline; font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; color: rgba(239,242,239,0.65); padding: 0; }
.mobile-sub .mobile-sub-links a:hover { color: rgba(239,242,239,0.85); }

.mobile-nav-foot {
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}
.mobile-nav-foot .btn { width: 100%; }

/* ==========================================================================
   Hero — Split Diagonal
   ========================================================================== */
.hero { position: relative; }

.hero-split {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  min-height: clamp(420px, 58vh, 620px);
}

.hero-split-light {
  padding-block: clamp(3rem, 6vw, 5rem);
  padding-right: clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--pine);
  color: var(--paper);
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  white-space: nowrap;
}

.hero-split-light h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.hero-sub {
  font-size: 1.0625rem;
  color: var(--moss);
  max-width: 40ch;
  margin-bottom: 2rem;
}

.hero-split-dark {
  background: var(--pine);
  color: var(--paper);
  clip-path: polygon(9% 0, 100% 0, 100% 100%, 0% 100%);
  margin-left: -8%;
  padding: clamp(3rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem) clamp(4.5rem, 9vw, 6.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-split-dark h2 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.03;
  margin: 0;
  color: var(--paper);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.hero-trust-wrap {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--moss);
  font-weight: 600;
}
.hero-trust-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}

.typewriter { display: inline-flex; align-items: baseline; color: var(--pine); font-weight: 700; }
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 2px;
  background: currentColor;
  animation: cursor-blink 0.9s steps(1) infinite;
}
@keyframes cursor-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .typewriter-cursor { animation: none; opacity: 0; }
}

/* ==========================================================================
   Stat strip
   ========================================================================== */
.stat-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.stat-strip .stat .num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--pine);
  letter-spacing: -0.02em;
}
.stat-strip .stat .label { font-size: 0.875rem; color: var(--moss); font-weight: 600; margin-top: 0.25rem; }

/* ==========================================================================
   Value props
   ========================================================================== */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
.value-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}
.value-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow-soft);
  border-color: transparent;
}
.value-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--pine-wash);
  color: var(--pine);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease-pop);
}
.value-icon svg { width: 24px; height: 24px; }
.value-card:hover .value-icon,
.service-card:hover .value-icon {
  background: var(--pine);
  color: var(--paper);
  transform: scale(1.1) rotate(-6deg);
}
.value-card h3 { margin-bottom: 0.6rem; }
.value-card p { font-size: 0.9375rem; color: var(--moss); }

/* ==========================================================================
   Services
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.5rem);
}
.services-grid > :nth-child(4) { grid-column: span 1; }

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}
.service-card:hover { transform: translateY(-6px) scale(1.015); box-shadow: var(--shadow-soft); border-color: transparent; }

.service-card .value-icon { background: var(--moss-wash); color: var(--moss); }
.service-card h3 { margin-bottom: 0.5rem; }
.service-card > p { font-size: 0.9375rem; color: var(--moss); margin-bottom: 1.5rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; }
.chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--canvas);
  color: var(--ink);
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease-pop);
}
.chip:hover { background: var(--pine); color: var(--paper); transform: scale(1.06); }

.service-card.is-cta { background: var(--pine); color: var(--paper); border-color: transparent; }
.service-card.is-cta .value-icon { background: rgba(239, 242, 239, 0.15); color: var(--paper); }
.service-card.is-cta:hover .value-icon { background: var(--paper); color: var(--pine); }
.service-card.is-cta h3 { color: var(--paper); }
.service-card.is-cta > p { color: rgba(239, 242, 239, 0.75); }
.service-card.is-cta .btn { margin-top: auto; align-self: flex-start; }

/* ==========================================================================
   Interconnected system
   ========================================================================== */
.system-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.system-copy .kicker { margin-bottom: 1.25rem; }
.system-copy h2 { margin-bottom: 1.25rem; max-width: 16ch; }
.system-copy .lede { margin-bottom: 1.75rem; max-width: 52ch; }

.system-diagram {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
  margin-inline: auto;
}

.system-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.system-lines line { stroke-dasharray: 1px; stroke-dashoffset: 0; }

.system-hub {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--pine);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.system-nodes {
  position: absolute;
  inset: 0;
}
.system-nodes li {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 116px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.system-nodes li .text-muted { display: block; font-weight: 500; font-size: 0.6875rem; margin-top: 0.1rem; }

/* Entrance animation — JS adds .will-animate on load (only if IntersectionObserver
   exists), so a no-JS visitor always sees the finished, fully visible state. */
.system-diagram.will-animate .system-hub,
.system-diagram.will-animate .system-nodes li {
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease), transform var(--duration-slow) var(--ease-pop);
}
.system-diagram.will-animate .system-hub { transform: translate(-50%, -50%) scale(0.7); }
.system-diagram.will-animate .system-nodes li { transform: translate(-50%, -50%) scale(0.85); }
.system-diagram.will-animate .system-lines line {
  stroke-dashoffset: 1px;
  transition: stroke-dashoffset var(--duration-slow) var(--ease);
}

.system-diagram.will-animate.is-visible .system-hub {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.system-diagram.will-animate.is-visible .system-nodes li {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.system-diagram.will-animate.is-visible .system-lines line { stroke-dashoffset: 0; }

.system-diagram.will-animate .system-nodes li:nth-child(1) { transition-delay: 0.2s; }
.system-diagram.will-animate .system-nodes li:nth-child(2) { transition-delay: 0.29s; }
.system-diagram.will-animate .system-nodes li:nth-child(3) { transition-delay: 0.38s; }
.system-diagram.will-animate .system-nodes li:nth-child(4) { transition-delay: 0.47s; }
.system-diagram.will-animate .system-nodes li:nth-child(5) { transition-delay: 0.56s; }
.system-diagram.will-animate .system-nodes li:nth-child(6) { transition-delay: 0.65s; }
.system-diagram.will-animate .system-nodes li:nth-child(7) { transition-delay: 0.74s; }
.system-diagram.will-animate .system-hub { transition-delay: 0.08s; }

/* ==========================================================================
   Process
   ========================================================================== */
.process-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  position: relative;
}
.process-step { position: relative; }
.process-step .step-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--pine);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}
.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 24px;
  left: 48px;
  width: calc(100% - 24px);
  height: 2px;
  background: repeating-linear-gradient(to right, var(--line) 0 6px, transparent 6px 12px);
  z-index: 1;
}

/* Sequenced construction, keyed off the same .is-visible the reveal
   system adds — the number pops in a beat after the card rises, then
   the dashed line draws toward the next step, so a whole row reads as
   one thing assembling rather than four cards fading in separately. */
.process-step.will-reveal .step-num {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--duration-base) var(--ease) 0.15s, transform var(--duration-base) var(--ease-pop) 0.15s;
}
.process-step.will-reveal.is-visible .step-num { opacity: 1; transform: scale(1); }
.process-step.will-reveal:not(:last-child)::after {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--duration-slow) var(--ease) 0.35s;
}
.process-step.will-reveal.is-visible:not(:last-child)::after { transform: scaleX(1); }

.process-step h3 { margin-bottom: 0.5rem; }
.process-step p { font-size: 0.9375rem; color: var(--moss); }

/* ==========================================================================
   Case studies
   ========================================================================== */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.5rem);
}
.case-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}
.case-card:hover { transform: translateY(-6px) scale(1.015); box-shadow: var(--shadow-lift); }
.case-body { padding: clamp(1.75rem, 3vw, 2rem); }
.case-body .case-client { font-size: 0.8125rem; font-weight: 700; color: var(--moss); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.5rem; display: block; }
.case-body h3 { margin-bottom: 0.6rem; }
.case-body p { font-size: 0.9375rem; color: var(--moss); margin-bottom: 1.25rem; }

/* ==========================================================================
   Testimonials — video carousel
   ========================================================================== */
.testimonial-stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.testimonial-slide {
  display: none;
  grid-template-columns: 1fr 1fr;
}
.testimonial-slide.is-active { display: grid; }

.testimonial-video {
  position: relative;
  aspect-ratio: 3 / 2;
  background: linear-gradient(155deg, var(--pine) 0%, var(--pine-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-video .play-btn {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(239,242,239,0.16);
  border: 1.5px solid rgba(239,242,239,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(239,242,239,0.9);
  transition: background-color var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}
.testimonial-video .play-btn svg { width: 20px; height: 20px; margin-left: 3px; }
.testimonial-video:hover .play-btn { background: rgba(239,242,239,0.26); transform: scale(1.06); }

.testimonial-video .duration-badge {
  position: absolute;
  bottom: 1.1rem;
  right: 1.1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--paper);
  background: rgba(20,32,30,0.55);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}

.testimonial-info {
  padding: clamp(2rem, 4vw, 3.25rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.testimonial-info .video-caption {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 2rem;
}

.testimonial-attribution { display: flex; align-items: center; gap: 0.85rem; }
.avatar-frame {
  width: 44px; height: 44px;
  clip-path: url(#marcel-c-clip);
  background: var(--moss-wash);
  flex-shrink: 0;
}
.testimonial-attribution .name { font-weight: 700; font-size: 0.9375rem; }
.testimonial-attribution .role { font-size: 0.875rem; color: var(--moss); }

.testimonial-dashes {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.testimonial-dashes .dash {
  width: 40px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--line);
  transition: background-color var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease-pop);
}
.testimonial-dashes .dash:hover { background: var(--moss); transform: scaleY(1.6); }
.testimonial-dashes .dash.is-active { background: var(--pine); }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band-wrap { padding-block: clamp(1rem, 3vw, 2rem); }
.cta-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(3rem, 7vw, 5rem) clamp(2rem, 6vw, 4rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: var(--paper); max-width: 16ch; }
.cta-band p { color: rgba(239,242,239,0.7); max-width: 40ch; margin-top: 0.75rem; }
.cta-band-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { padding-block: clamp(3.5rem, 7vw, 5rem) 2rem; }

.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr 0.7fr 0.7fr 0.9fr;
  gap: 2rem;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.footer-brand .brand { margin-bottom: 1.25rem; }
.footer-brand p { font-size: 0.9375rem; color: var(--moss); max-width: 30ch; }

.footer-col h4 { margin-bottom: 1.25rem; }
.footer-col ul li { margin-bottom: 0.7rem; }
.footer-col a { font-size: 0.9375rem; color: var(--ink); }
.footer-col a:hover { color: var(--pine); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--moss);
}
.footer-bottom a:hover { color: var(--pine); }
.footer-legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ==========================================================================
   Interior pages — shared components
   ========================================================================== */
.page-hero {
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.page-hero .kicker { margin-bottom: 1.25rem; }
.page-hero h1 { max-width: 22ch; margin-bottom: 1.25rem; }
.page-hero p.lede { margin: 0; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--moss);
  margin-bottom: 1.5rem;
}
.breadcrumb a:hover { color: var(--pine); }
.breadcrumb .sep { opacity: 0.5; }

/* Long-form content (blog posts, legal pages) — the global reset zeroes
   margins and list styles everywhere else, so re-establish real article
   typography scoped to this one class rather than fighting it globally. */
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-top: 2.5rem; margin-bottom: 1rem; }
/* A heading right after a kicker is the start of its section, not a
   subheading inside running text — the kicker's own margin already
   spaces it, so the general h2 top margin above only applies once
   there's real prose above it. */
.prose .kicker + h2, .section-head .kicker + h2 { margin-top: 0; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.prose p { margin-bottom: 1.25rem; color: var(--ink); }
.prose p.lede { color: var(--moss); }
.prose ul, .prose ol { margin-bottom: 1.25rem; padding-left: 1.25rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.5rem; color: var(--ink); }
.prose a { color: var(--pine); text-decoration: underline; text-decoration-color: var(--pine-wash-strong); text-underline-offset: 0.15em; }
.prose a:hover { text-decoration-color: var(--pine); }
.prose blockquote {
  border-left: 3px solid var(--pine);
  padding-left: 1.25rem;
  margin: 1.75rem 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}
.prose strong { font-weight: 700; }
.prose img { border-radius: var(--radius-md); margin-block: 1.5rem; width: 100%; }

/* ---- Pricing ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
  align-items: stretch;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.pricing-card.is-featured { background: var(--pine); color: var(--paper); border-color: transparent; box-shadow: var(--shadow-lift); }
.pricing-card .badge-popular {
  align-self: flex-start;
  font-size: 0.75rem; font-weight: 700; color: var(--paper); background: var(--moss);
  padding: 0.35rem 0.75rem; border-radius: var(--radius-pill); margin-bottom: 1rem;
}
.pricing-card .plan-name { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--moss); margin-bottom: 0.75rem; }
.pricing-card.is-featured .plan-name { color: rgba(239,242,239,0.7); }
.pricing-card .plan-price { display: flex; align-items: baseline; gap: 0.35rem; margin-bottom: 0.5rem; }
.pricing-card .plan-price .amount { font-family: var(--font-display); font-size: clamp(2.25rem, 3.4vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; }
.pricing-card .plan-price .period { font-size: 0.9375rem; color: var(--moss); }
.pricing-card.is-featured .plan-price .period { color: rgba(239,242,239,0.7); }
.pricing-card .plan-desc { font-size: 0.9375rem; color: var(--moss); margin-bottom: 1.75rem; }
.pricing-card.is-featured .plan-desc { color: rgba(239,242,239,0.75); }
.pricing-card .plan-features { flex: 1; margin-bottom: 2rem; }
.pricing-card .plan-features li {
  display: flex; align-items: flex-start; gap: 0.65rem;
  font-size: 0.9375rem; padding-block: 0.65rem;
  border-top: 1px solid var(--line);
}
.pricing-card .plan-features li:first-child { border-top: none; }
.pricing-card.is-featured .plan-features li { border-top-color: rgba(239,242,239,0.15); }
.pricing-card .plan-features svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 0.15em; color: var(--pine); }
.pricing-card.is-featured .plan-features svg { color: var(--paper); }
.pricing-card .btn { width: 100%; justify-content: center; }
.pricing-card.is-featured .btn-ghost { background: var(--paper); color: var(--ink); border-color: transparent; }

/* ---- FAQ accordion ---- */
.faq-list { max-width: 62ch; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.5rem; text-align: left;
  font-family: var(--font-display); font-weight: 650; font-size: 1.0625rem; color: var(--ink);
}
.faq-question svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--pine); transition: transform var(--duration-fast) var(--ease); }
.faq-item.is-open .faq-question svg { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--duration-base) var(--ease); }
.faq-answer p { padding-bottom: 1.5rem; color: var(--moss); font-size: 0.9375rem; max-width: 60ch; }
.faq-item.is-open .faq-answer { max-height: 320px; }

/* ---- Team / careers ---- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.25rem, 2.5vw, 1.5rem); }
.team-photo { aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1rem; background: var(--line); }
.team-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-card h3 { font-size: 1.0625rem; margin-bottom: 0.2rem; }
.team-card .role { font-size: 0.875rem; color: var(--moss); font-weight: 600; }

.job-list { border-top: 1px solid var(--line); }
.job-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.75rem; border-bottom: 1px solid var(--line);
  transition: background-color var(--duration-fast) var(--ease);
}
.job-row:hover { background: var(--pine-wash); }
.job-row h3 { font-size: 1.125rem; margin-bottom: 0.35rem; }
.job-meta { display: flex; flex-wrap: wrap; font-size: 0.8125rem; color: var(--moss); font-weight: 600; }
.job-meta span:not(:last-child)::after { content: '\00b7'; margin: 0 0.6rem; opacity: 0.6; }

/* ---- Blog ---- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 2.5vw, 1.5rem); }
.blog-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.blog-thumb { aspect-ratio: 16 / 10; background: var(--line); overflow: hidden; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-body { padding: clamp(1.5rem, 2.5vw, 1.75rem); display: flex; flex-direction: column; flex: 1; }
.blog-body .blog-tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--moss); margin-bottom: 0.75rem; }
.blog-body h3 { font-size: 1.1875rem; margin-bottom: 0.6rem; }
.blog-body p { font-size: 0.9375rem; color: var(--moss); margin-bottom: 1.25rem; }
.blog-body .blog-meta { margin-top: auto; font-size: 0.8125rem; color: var(--moss); padding-top: 1rem; border-top: 1px solid var(--line); }

.blog-post-header { max-width: 68ch; }
.blog-post-header .blog-meta { font-size: 0.875rem; color: var(--moss); font-weight: 600; margin-bottom: 1.25rem; }
.blog-post-cover { aspect-ratio: 21 / 9; border-radius: var(--radius-lg); overflow: hidden; margin-block: 2.5rem; background: var(--line); }
.blog-post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.form-field { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.875rem; font-weight: 700; color: var(--ink); }
.form-field input, .form-field textarea, .form-field select {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.85rem 1rem; font-size: 0.9375rem; color: var(--ink); width: 100%;
  transition: border-color var(--duration-fast) var(--ease);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--pine); }
.form-field input:focus:not(:focus-visible), .form-field textarea:focus:not(:focus-visible), .form-field select:focus:not(:focus-visible) { outline: none; }
.form-field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.8125rem; color: var(--moss); margin-top: 1rem; }
.form-success, .form-error {
  border-radius: var(--radius-md); padding: 1.25rem 1.5rem; margin-bottom: 2rem; font-size: 0.9375rem; font-weight: 600;
}
.form-success { background: var(--moss-wash); color: var(--pine); border: 1px solid var(--moss); }
.form-error { background: rgba(148, 64, 51, 0.08); color: #7a3a2f; border: 1px solid rgba(148, 64, 51, 0.35); }

/* ---- Simple text testimonials (used alongside the video carousel) ---- */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 2.5vw, 1.5rem); }
.quote-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.75rem, 3vw, 2.25rem); }
.quote-card .quote-mark { font-family: var(--font-display); font-size: 2.5rem; color: var(--pine); line-height: 1; margin-bottom: 0.75rem; display: block; }
.quote-card p { font-size: 0.9375rem; color: var(--ink); margin-bottom: 1.5rem; }
.quote-card .name { font-weight: 700; font-size: 0.9375rem; }
.quote-card .role { font-size: 0.8125rem; color: var(--moss); }

/* ---- Tech stack ---- */
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stack-item {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
}
.stack-item .value-icon { margin-bottom: 0; }
.stack-item h4 { font-size: 0.9375rem; }
.stack-item p { font-size: 0.8125rem; color: var(--moss); }

/* ==========================================================================
   Work dropdown (narrow variant)
   ========================================================================== */
.dropdown-panel-narrow { min-width: 300px; }
.dropdown-panel-narrow .dropdown-cat { position: relative; }
.dropdown-panel-narrow .cat-name::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-sm); }

/* ==========================================================================
   Portfolio
   One shared hover/focus state (:hover or .is-active, which JS sets for
   keyboard focus) drives the row highlight, the icon tile and its own
   animation, so every row reads as one interaction.
   ========================================================================== */
.pf-hero h1 { text-wrap: balance; }
.pf-note {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.75rem;
  padding: 0.6rem 1.15rem 0.6rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--moss-wash);
  color: var(--pine);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}
.pf-note svg { width: 18px; height: 18px; flex-shrink: 0; }

.pf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}
.pf-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pf-filter {
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  white-space: nowrap;
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease),
              border-color var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}
.pf-filter:hover { border-color: var(--pine); color: var(--pine); }
.pf-filter:active { transform: scale(0.96); }
.pf-filter[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: var(--paper); }
.pf-count { font-size: 0.8125rem; font-weight: 600; color: var(--moss); font-variant-numeric: tabular-nums; }

.pf-list { border-top: 1px solid var(--line); }
.pf-item { border-bottom: 1px solid var(--line); transition: opacity var(--duration-fast) var(--ease); }
.pf-item[hidden] { display: none; }
.pf-list.is-hovering .pf-item:not(.is-active):not(.is-open) { opacity: 0.4; }

.pf-row {
  display: grid;
  grid-template-columns: 2.25rem 56px minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 1.75rem);
  padding: clamp(1rem, 1.8vw, 1.3rem) clamp(0.5rem, 1.5vw, 1rem);
  border-radius: var(--radius-md);
  transition: background-color var(--duration-fast) var(--ease);
}
.pf-item:hover .pf-row, .pf-item.is-active .pf-row { background: var(--pine-wash); }

.pf-num {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--moss);
  font-variant-numeric: tabular-nums;
}

.pf-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  background: var(--moss-wash);
  color: var(--moss);
  display: grid;
  place-items: center;
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease),
              transform var(--duration-fast) var(--ease-pop);
}
.pf-item:hover .pf-icon, .pf-item.is-active .pf-icon { background: var(--pine); color: var(--paper); transform: scale(1.08) rotate(-6deg); }

.pf-name { font-size: clamp(1.25rem, 2.2vw, 1.75rem); letter-spacing: -0.02em; line-height: 1.1; }
.pf-desc { font-size: 0.9375rem; color: var(--moss); margin-top: 0.3rem; }

.pf-tag {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--canvas);
  color: var(--ink);
  white-space: nowrap;
  transition: background-color var(--duration-fast) var(--ease);
}
.pf-item:hover .pf-tag, .pf-item.is-active .pf-tag { background: var(--surface); }

.pf-go {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  color: var(--pine);
  display: grid;
  place-items: center;
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease),
              border-color var(--duration-fast) var(--ease);
}
.pf-go svg { width: 16px; height: 16px; transition: transform var(--duration-base) var(--ease); }
.pf-item:hover .pf-go, .pf-item.is-active .pf-go { background: var(--pine); border-color: var(--pine); color: var(--paper); }
.pf-item:hover .pf-go svg, .pf-item.is-active .pf-go svg { transform: translate(2px, -2px); }

/* ---- Preview stage: a fixed panel beside the list ----
   Only on wide screens with a mouse. It lives in its own column, so it never
   covers a row, and it stays put (sticky) while the list scrolls. */
.pf-layout { display: block; }
.pf-stage { display: none; }
@media (min-width: 1080px) and (hover: hover) and (pointer: fine) {
  .pf-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(380px, 34vw, 470px);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
  }
  .pf-stage { display: block; position: sticky; top: 7.5rem; }
  .pf-layout .pf-tag, .pf-layout .pf-go { display: none; }
  .pf-layout .pf-row { grid-template-columns: 2.25rem 56px minmax(0, 1fr); }
  .pf-layout .pf-name { font-size: clamp(1.2rem, 1.7vw, 1.5rem); }
}
.pf-stage-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--moss);
  margin-bottom: 0.85rem;
}
.pf-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.pf-frame-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
}
.pf-frame-bar > span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.pf-frame-url {
  margin-left: 0.6rem;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--moss);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-frame-screen { position: relative; aspect-ratio: 16 / 10; background: var(--pine-wash); }
.pf-frame-screen img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(0.8);
  transition: opacity var(--duration-base) var(--ease);
}
.pf-frame-screen img.is-on { opacity: 0.92; }
.pf-frame-screen::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 58%, var(--surface) 100%);
  pointer-events: none;
}
.pf-stage-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
}
.pf-stage-name { font-family: var(--font-display); font-weight: 650; font-size: 1.125rem; letter-spacing: -0.01em; }
.pf-stage-tag { font-size: 0.8125rem; font-weight: 600; color: var(--moss); white-space: nowrap; }

/* ---- Touch: the same faded hero opens inline instead ---- */
.pf-inline { display: none; }
.pf-touch .pf-inline {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-base) var(--ease);
}
.pf-touch .pf-item.is-open .pf-inline { grid-template-rows: 1fr; }
.pf-inline-inner { overflow: hidden; min-height: 0; }
.pf-inline-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--pine-wash);
}
.pf-inline-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.66; filter: saturate(0.72); }
.pf-inline-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, var(--canvas) 100%);
}
.pf-inline .btn { margin: 1rem 0 1.5rem; }
.pf-touch .pf-item.is-open .pf-row { background: var(--pine-wash); }
.pf-touch .pf-go svg { transform: rotate(135deg); }
.pf-touch .pf-item.is-open .pf-go { background: var(--pine); border-color: var(--pine); color: var(--paper); }
.pf-touch .pf-item.is-open .pf-go svg { transform: rotate(-45deg); }

/* ---- Icons ----
   Each icon has an entrance (outlines draw in once, via the shared reveal),
   a slow idle motion, and a livelier hover motion. Parts that move are
   wrapped in groups so the draw animation never conflicts with them. */
.pf-icon svg {
  width: 32px; height: 32px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pf-icon svg * { transform-box: fill-box; transform-origin: center; }
.pf-item.will-reveal .pf-icon .d { stroke-dasharray: 1; stroke-dashoffset: 1; }
.pf-item.will-reveal.is-visible .pf-icon .d { animation: pf-draw 1.1s var(--ease) 0.15s forwards; }

@keyframes pf-draw { to { stroke-dashoffset: 0; } }
@keyframes pf-twinkle { 0%, 100% { scale: 0.4; opacity: 0.15; rotate: 0deg; } 50% { scale: 1.1; opacity: 1; rotate: 45deg; } }
@keyframes pf-rise { 0% { scale: 1 0.25; } 100% { scale: 1 1; } }
@keyframes pf-spin { to { rotate: 360deg; } }
@keyframes pf-swing { 0%, 100% { rotate: -4deg; } 50% { rotate: 4deg; } }
@keyframes pf-bob { 0%, 100% { translate: 0 0; rotate: -2deg; } 50% { translate: 0 1.2px; rotate: 2deg; } }
@keyframes pf-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2.5px; } }

/* roof — chimney smoke drifts up; roofline lifts on hover */
.ic-smoke { fill: currentColor; stroke: none; animation: pf-smoke 3.2s ease-in infinite; }
@keyframes pf-smoke { 0% { translate: 0 0; opacity: 0; scale: 0.6; } 25% { opacity: 0.9; } 100% { translate: 2px -7px; opacity: 0; scale: 1.4; } }
.pf-item:hover .ic-smoke, .pf-item.is-active .ic-smoke { animation-duration: 1.4s; }
.pf-item:hover .ic-roof-top, .pf-item.is-active .ic-roof-top { animation: pf-roof 0.7s var(--ease-pop); }
@keyframes pf-roof { 0%, 100% { translate: 0 0; } 40% { translate: 0 -3px; } }

/* dental — sparkle twinkles; tooth pops */
.ic-spark { stroke-width: 1.4; animation: pf-twinkle 2.8s ease-in-out infinite; }
.ic-spark.s2 { animation-delay: 1.3s; }
.pf-item:hover .ic-tooth, .pf-item.is-active .ic-tooth { animation: pf-pop 0.6s var(--ease-pop); }
@keyframes pf-pop { 0% { scale: 1; } 40% { scale: 1.14; } 100% { scale: 1; } }

/* law — columns breathe; rise on hover */
.ic-col { transform-origin: 50% 100%; animation: pf-colbreath 4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.35s); }
@keyframes pf-colbreath { 0%, 100% { scale: 1 1; } 50% { scale: 1 0.86; } }
.pf-item:hover .ic-col, .pf-item.is-active .ic-col { animation: pf-rise 0.7s var(--ease-pop) both; animation-delay: calc(var(--i, 0) * 0.08s); }

/* property — windows light up in turn */
.ic-win { stroke-width: 2.6; animation: pf-blink 4.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.55s); }
@keyframes pf-blink { 0%, 100% { opacity: 0.25; } 40%, 60% { opacity: 1; } }
.pf-item:hover .ic-win, .pf-item.is-active .ic-win { animation-duration: 1.6s; }

/* auto — speed lines stream; wheels spin on hover */
.ic-speed { animation: pf-speed 1.8s linear infinite; }
@keyframes pf-speed { 0% { translate: 5px 0; opacity: 0; } 30% { opacity: 1; } 100% { translate: -5px 0; opacity: 0; } }
.pf-item:hover .ic-wheel, .pf-item.is-active .ic-wheel { animation: pf-spin 0.6s linear infinite; }
.pf-item:hover .ic-car, .pf-item.is-active .ic-car { animation: pf-nudge 0.5s var(--ease-pop); }
@keyframes pf-nudge { 0% { translate: 0 0; } 40% { translate: 2px 0; } 100% { translate: 0 0; } }

/* dining — flame flickers, embers rise */
.ic-flame { transform-origin: 50% 100%; animation: pf-flicker 1.7s ease-in-out infinite; }
@keyframes pf-flicker {
  0%, 100% { scale: 1 1; rotate: 0deg; }
  25% { scale: 0.96 1.05; rotate: -2deg; }
  50% { scale: 1.03 0.97; rotate: 1.5deg; }
  75% { scale: 0.98 1.04; rotate: -1deg; }
}
.ic-ember { fill: currentColor; stroke: none; opacity: 0; animation: pf-ember 2.6s ease-out infinite; animation-delay: calc(var(--i, 0) * 1.1s); }
@keyframes pf-ember { 0% { translate: 0 4px; opacity: 0; } 25% { opacity: 1; } 100% { translate: 1px -6px; opacity: 0; } }
.pf-item:hover .ic-flame, .pf-item.is-active .ic-flame { animation-duration: 0.7s; }

/* jewelry — facets glint */
.ic-glint { stroke-width: 2; opacity: 0; }
.pf-item:hover .ic-glint, .pf-item.is-active .ic-glint { animation: pf-glint 0.9s var(--ease) both; }
@keyframes pf-glint { 0% { translate: -7px 7px; opacity: 0; } 40% { opacity: 0.9; } 100% { translate: 7px -7px; opacity: 0; } }
.pf-item:hover .ic-gem, .pf-item.is-active .ic-gem { animation: pf-pop 0.6s var(--ease-pop); }

/* safari — sun pulses, canopy sways; sun rises on hover */
.ic-sun { fill: currentColor; stroke: none; animation: pf-pulse 3.4s ease-in-out infinite; }
@keyframes pf-pulse { 0%, 100% { scale: 1; opacity: 0.85; } 50% { scale: 1.2; opacity: 1; } }
.ic-canopy { transform-origin: 50% 100%; animation: pf-sway 4.4s ease-in-out infinite; }
@keyframes pf-sway { 0%, 100% { rotate: -1.5deg; } 50% { rotate: 1.5deg; } }
.pf-item:hover .ic-sun, .pf-item.is-active .ic-sun { animation: pf-sunrise 1s var(--ease) both; }
@keyframes pf-sunrise { 0% { translate: 0 8px; opacity: 0; } 100% { translate: 0 0; opacity: 1; } }

/* yacht — hull bobs, waves drift, sail flutters on hover */
.ic-boat { animation: pf-bob 3.2s ease-in-out infinite; }
.ic-wave { animation: pf-wave 2.4s ease-in-out infinite alternate; }
@keyframes pf-wave { from { translate: -1.5px 0; } to { translate: 1.5px 0; } }
.ic-sail { transform-origin: 0 100%; }
.pf-item:hover .ic-sail, .pf-item.is-active .ic-sail { animation: pf-flutter 0.5s ease-in-out infinite alternate; }
@keyframes pf-flutter { from { scale: 0.92 1; } to { scale: 1.03 1; } }
.pf-item:hover .ic-boat, .pf-item.is-active .ic-boat { animation-duration: 1.4s; }

/* travel — needle wobbles; spins and settles on hover */
.ic-needle { animation: pf-wobble 5s ease-in-out infinite; }
@keyframes pf-wobble { 0%, 100% { rotate: -14deg; } 50% { rotate: 14deg; } }
.pf-item:hover .ic-needle, .pf-item.is-active .ic-needle { animation: pf-settle 1.3s var(--ease) both; }
@keyframes pf-settle { 0% { rotate: 0deg; } 100% { rotate: 405deg; } }

/* fashion — hanger swings */
.ic-hanger { transform-origin: 50% 0; animation: pf-swing 3.6s ease-in-out infinite; }
.pf-item:hover .ic-hanger, .pf-item.is-active .ic-hanger { animation-duration: 1.1s; }

/* furniture — pillow settles, seat squashes on hover */
.ic-pillow { animation: pf-float 3.4s ease-in-out infinite; }
.ic-seat { transform-origin: 50% 100%; }
.pf-item:hover .ic-seat, .pf-item.is-active .ic-seat { animation: pf-squash 0.7s var(--ease-pop); }
@keyframes pf-squash { 0% { scale: 1 1; } 35% { scale: 1.04 0.92; } 100% { scale: 1 1; } }

/* software — a dot travels the workflow */
.ic-dot { fill: currentColor; stroke: none; opacity: 0; transform-box: view-box; transform-origin: 0 0; }
@supports (offset-path: path('M0 0')) {
  .ic-dot { opacity: 1; offset-path: path('M7 10H25L16 23Z'); offset-rotate: 0deg; animation: pf-travel 3.2s linear infinite; }
  .pf-item:hover .ic-dot, .pf-item.is-active .ic-dot { animation-duration: 1.3s; }
}
@keyframes pf-travel { to { offset-distance: 100%; } }

/* fitness — the bell lifts */
.ic-bell { animation: pf-float 2.4s ease-in-out infinite; }
.pf-item:hover .ic-bell, .pf-item.is-active .ic-bell { animation-duration: 0.9s; }

/* architecture — the door swings, the dimension line pulses */
.ic-door { transform-box: view-box; transform-origin: 14px 16px; animation: pf-door 4.2s ease-in-out infinite; }
@keyframes pf-door { 0%, 100% { rotate: 0deg; } 35%, 65% { rotate: -72deg; } }
.ic-dim { animation: pf-dim 3s ease-in-out infinite; }
@keyframes pf-dim { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.pf-item:hover .ic-door, .pf-item.is-active .ic-door { animation-duration: 1.6s; }

/* ---- Portfolio: small screens ---- */
@media (max-width: 720px) {
  .pf-toolbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .pf-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .pf-filters::-webkit-scrollbar { display: none; }
  .pf-filter { flex: none; }
  .pf-count { order: -1; }
  .pf-row { grid-template-columns: 48px minmax(0, 1fr) 40px; gap: 1rem; padding-inline: 0.25rem; }
  .pf-num, .pf-tag { display: none; }
  .pf-icon { width: 48px; height: 48px; }
  .pf-icon svg { width: 26px; height: 26px; }
  .pf-go { width: 40px; height: 40px; }
  .pf-note { border-radius: var(--radius-md); align-items: flex-start; }
  .pf-note svg { margin-top: 0.15rem; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .nav-primary, .header-cta .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
  .header-cta .btn-primary { display: none; }

  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-flow { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .process-step:nth-child(2)::after { display: none; }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-slide.is-active { grid-template-columns: 1fr; }
  .testimonial-video { aspect-ratio: 16 / 10; }

  .system-section { grid-template-columns: 1fr; }

  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .quote-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: 1; }

  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }

  .hero-split { grid-template-columns: 1fr; }
  .hero-split-light { padding-right: 0; }
  .hero-split-dark {
    clip-path: none;
    margin-left: 0;
    padding: clamp(2.5rem, 6vw, 3.5rem) var(--gutter);
  }
}

@media (max-width: 720px) {
  .header-bar { padding: 0.4rem 0.4rem 0.4rem 1.1rem; }
  .brand img { height: 38px; }
  .hero-results-link, .services-view-all-link { display: none; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .value-grid, .services-grid, .case-grid { grid-template-columns: 1fr; }
  .process-flow { grid-template-columns: 1fr; }
  .process-step::after { display: none !important; }
  .footer-top { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; text-align: left; }

  .team-grid, .blog-grid, .stack-grid, .quote-grid { grid-template-columns: 1fr; }
  .job-row { flex-direction: column; align-items: flex-start; }

  .system-diagram { max-width: 340px; }
  .system-hub { width: 68px; height: 68px; font-size: 0.75rem; }
  .system-nodes li { width: 92px; padding: 0.4rem 0.5rem; font-size: 0.625rem; }
  .system-nodes li .text-muted { font-size: 0.5625rem; }
}

@media (max-width: 420px) {
  .system-diagram { max-width: 280px; }
  .system-hub { width: 56px; height: 56px; font-size: 0.625rem; }
  .system-nodes li { width: 76px; padding: 0.3rem 0.4rem; font-size: 0.5625rem; }
  .system-nodes li .text-muted { font-size: 0.5rem; }
}
