/* ==========================================================================
   Markitly Design System v2
   Neo-Industrial x Swiss Editorial x Creative Studio Monograph
   ========================================================================== */

:root {
  /* Core palette harmonized with Markitly wordmark (#151D42) + PRD 7.3 */
  --paper: #f3f2ed;
  --paper-hi: #faf9f6;
  --stone: #e8e6df;
  --ink: #151d42;
  --ink-body: #2a2f47;
  --obsidian: #151722;
  --obsidian-2: #1e2130;
  --cobalt: #3157d5;
  --cobalt-deep: #2243b4;
  --cobalt-light: #90aaff;
  --cobalt-tint: rgba(49, 87, 213, 0.08);
  --spectrum: linear-gradient(90deg, #ad45af 0%, #635ab7 52%, #498dd0 100%);
  --muted: #5b6072;
  --muted-dark: #a4aac2;
  --rule: #d5d4ce;
  --rule-strong: #bbb9b0;
  --rule-dark: rgba(243, 242, 237, 0.14);
  --danger: #b8261e;
  --ok: #146c3b;

  /* Typography */
  --f-head: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Layout rhythm */
  --gutter: clamp(20px, 4vw, 60px);
  --max: 1440px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-fast: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.03rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--cobalt); color: #fff; }

.mono {
  font-family: var(--f-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -64px;
  background: var(--obsidian); color: var(--paper);
  padding: 10px 18px; z-index: 400; text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 14px; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
.process :focus-visible, .block--night :focus-visible, .page-hero--night :focus-visible,
.page-hero--cobalt :focus-visible, .split-pane--business :focus-visible,
.cta :focus-visible, .site-footer :focus-visible { outline-color: var(--cobalt-light); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(68px, 8.5vw, 132px); }

/* ---------- Typography ---------- */
.h-xl, .h-large, .hero-title, .page-title {
  font-family: var(--f-head);
  font-weight: 800;
  font-stretch: 104%;
  letter-spacing: -0.032em;
  line-height: 1.0;
}
.h-xl { font-size: clamp(2.6rem, 6.8vw, 6rem); line-height: 0.96; }
.h-large { font-size: clamp(1.9rem, 3.8vw, 3.35rem); line-height: 1.04; }
.section-label {
  color: var(--cobalt);
  display: block;
  margin-bottom: 16px;
  font-weight: 500;
}
.section-head { margin-bottom: clamp(32px, 4.5vw, 60px); }
.section-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
}
.section-head-aside { display: grid; gap: 14px; justify-items: start; color: var(--muted); }
.section-head-aside p { max-width: 48ch; font-size: 0.98rem; }
.fine { font-size: 0.88rem; color: var(--muted); max-width: 64ch; margin-top: 24px; }
mark { background: none; color: var(--cobalt); }

/* ---------- Buttons & Links ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper); --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  font-family: var(--f-body); font-weight: 600; font-size: 0.96rem;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn .arrow { transition: transform 0.28s var(--ease); }
.btn:hover .arrow, .btn:focus-visible .arrow { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn--primary { --bg: var(--cobalt); --bd: var(--cobalt); --fg: #fff; }
.btn--primary:hover { --bg: var(--ink); --bd: var(--ink); }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--rule-strong); }
.btn--ghost:hover { --bg: var(--ink); --fg: var(--paper); --bd: var(--ink); }
.btn--outline { --bg: transparent; --fg: var(--ink); --bd: var(--ink); }
.btn--outline:hover { --bg: var(--ink); --fg: var(--paper); }
.btn--outline-dark { --bg: transparent; --fg: var(--paper); --bd: var(--rule-dark); }
.btn--outline-dark:hover { --bg: var(--paper); --fg: var(--obsidian); --bd: var(--paper); }
.btn--paper { --bg: var(--paper); --fg: var(--ink); --bd: var(--paper); }
.btn--paper:hover { --bg: transparent; --fg: var(--paper); --bd: var(--paper); }
.btn--ink { --bg: var(--ink); --fg: var(--paper); --bd: var(--ink); }
.btn--ink:hover { --bg: var(--cobalt); --bd: var(--cobalt); }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.88rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.96rem; text-decoration: none;
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  transition: background-size 0.3s var(--ease), color 0.2s;
}
.link-arrow:hover { background-size: 0 1.5px; background-position: 100% 100%; }
.link-arrow .arrow { transition: transform 0.28s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(4px); }
.link-arrow--light { color: #fff; }
.link-quiet {
  color: var(--muted); text-decoration: none;
  border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.link-quiet:hover { color: var(--cobalt); border-color: var(--cobalt); }

/* ---------- Header & Reading Progress ---------- */
.site-header {
  position: sticky; top: 0; z-index: 120;
  background: rgba(243, 242, 237, 0.96);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(243, 242, 237, 0.98);
  border-bottom-color: var(--rule-strong);
  box-shadow: 0 8px 28px rgba(21, 29, 66, 0.06);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--gutter);
  max-width: var(--max); margin-inline: auto;
}
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 42px; width: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(18px, 2.5vw, 38px); }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 28px); }
.nav-links a {
  position: relative;
  font-weight: 500; font-size: 0.94rem; text-decoration: none;
  padding: 6px 0; color: var(--ink-body);
  transition: color 0.2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--cobalt); transform: scaleX(0); transform-origin: right;
  transition: transform 0.28s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-end { display: flex; align-items: center; gap: 16px; }
.nav-secondary {
  font-size: 0.9rem; font-weight: 500; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}
.nav-secondary:hover { color: var(--cobalt); }
.nav-cta { min-height: 42px; padding: 0 18px; font-size: 0.9rem; }
.nav-drawer-foot { display: none; }
.menu-toggle { display: none; }

.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.scroll-progress span {
  display: block; height: 100%; width: 100%;
  background: var(--spectrum);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.08s linear;
}

/* ==========================================================================
   Homepage — Editorial Hero with Interactive Studio Showcase
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  min-height: clamp(640px, calc(100svh - var(--header-h)), 820px);
  border-bottom: 1px solid var(--rule);
  max-width: 1680px;
  margin-inline: auto;
}
.hero-copy {
  padding: clamp(36px, 4.5vw, 68px) clamp(24px, 3.6vw, 56px) 0 var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-width: 0;
}
.hero-top { max-width: 620px; margin-block: auto; min-width: 0; }
.eyebrow {
  color: var(--cobalt);
  display: block;
  margin-bottom: 18px;
  font-weight: 500;
}
.hero-title {
  font-size: clamp(2.55rem, 4.45vw, 4.55rem);
  font-stretch: 100%;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.hero-title span { display: block; color: var(--cobalt); margin-top: 0.08em; }
.hero-lede {
  margin-top: 24px;
  max-width: 50ch;
  font-size: 1.08rem;
  color: var(--ink-body);
}
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  margin-inline: calc(var(--gutter) * -1) calc(clamp(24px, 3.6vw, 56px) * -1);
}
.hero-tab {
  position: relative;
  text-align: left;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--rule);
  padding: 18px 20px 20px;
  display: grid; gap: 3px;
  cursor: pointer;
  transition: background 0.25s var(--ease);
}
.hero-tab:first-child { padding-left: var(--gutter); }
.hero-tab:last-child { border-right: 0; }
.hero-tab::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2.5px;
  background: var(--spectrum);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.hero-tab .mono { color: var(--muted); font-size: 0.7rem; transition: color 0.2s; }
.hero-tab strong { font-family: var(--f-head); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.hero-tab small { font-size: 0.8rem; color: var(--muted); }
.hero-tab:hover { background: var(--stone); }
.hero-tab.is-active { background: var(--paper-hi); }
.hero-tab.is-active::before { transform: scaleX(1); }
.hero-tab.is-active .mono { color: var(--cobalt); }

/* Hero Studio Showcase Stage */
.hero-stage {
  position: relative;
  background: var(--stone);
  border-left: 1px solid var(--rule);
  min-width: 0;
  display: grid;
}
.hero-plate {
  grid-area: 1 / 1;
  display: flex; flex-direction: column;
  padding: clamp(16px, 2vw, 28px);
  gap: 14px;
  min-width: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0.45s;
}
.hero-plate.is-active {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
}
.hero-plate-grid {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 14px;
}
.plate-primary {
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  background: var(--paper-hi);
  min-height: 360px;
}
.plate-primary img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.hero-plate.is-active:hover .plate-primary img { transform: scale(1.025); }
.plate-secondary { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; min-height: 0; }
.plate-thumb {
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  background: var(--obsidian);
  min-height: 180px;
}
.plate-thumb img { width: 100%; height: 100%; object-fit: cover; }
.plate-note {
  background: var(--paper-hi);
  border: 1px solid var(--rule);
  padding: 20px;
  display: grid; gap: 10px; align-content: start;
}
.plate-note .mono { color: var(--cobalt); font-size: 0.72rem; }
.plate-note p { font-size: 0.9rem; color: var(--ink-body); line-height: 1.55; }
.plate-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rule-strong);
  color: var(--muted);
}
.plate-stamp {
  border: 1px solid var(--rule-strong);
  padding: 3px 9px;
  font-size: 0.68rem;
  color: var(--ink);
  background: var(--paper);
}

/* ---------- Intro & Pillars ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: baseline;
}
.intro-label-col { grid-column: 1 / span 3; }
.intro-main-col { grid-column: 4 / -1; }
.statement {
  font-family: var(--f-head);
  font-weight: 600;
  font-stretch: 100%;
  font-size: clamp(1.55rem, 3.1vw, 2.7rem);
  line-height: 1.18;
  letter-spacing: -0.022em;
}
.pillars {
  margin-top: clamp(44px, 6vw, 76px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}
.pillar {
  padding: 28px 28px 12px 0;
  border-right: 1px solid var(--rule);
  display: grid; gap: 10px; align-content: start;
}
.pillar:not(:first-child) { padding-left: 28px; }
.pillar:last-child { border-right: 0; padding-right: 0; }
.pillar-num { color: var(--cobalt); }
.pillar h3 {
  font-family: var(--f-head); font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.015em;
}
.pillar p { color: var(--muted); font-size: 0.96rem; max-width: 36ch; }

/* ---------- Interactive Service Divisions ---------- */
.directory {
  background: var(--stone);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.divisions-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.divisions-list { border-top: 1px solid var(--ink); }
.div-item { border-bottom: 1px solid var(--rule-strong); transition: background 0.25s var(--ease); }
.div-item.is-active { background: var(--paper-hi); border-bottom-color: var(--ink); }
.div-trigger {
  width: 100%;
  text-align: left;
  background: none; border: 0;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 36px 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  cursor: pointer;
}
.div-num { color: var(--cobalt); font-weight: 500; }
.div-icon { color: var(--ink); display: grid; place-items: center; transition: color 0.25s; }
.div-item.is-active .div-icon { color: var(--cobalt); }
.div-head-text { display: grid; gap: 4px; }
.div-name {
  font-family: var(--f-head); font-weight: 800; font-stretch: 104%;
  font-size: clamp(1.35rem, 2.3vw, 2.05rem); letter-spacing: -0.025em; line-height: 1.05;
}
.div-tags { font-size: 0.88rem; color: var(--muted); }
.div-count { color: var(--muted); font-size: 0.7rem; }

.div-body {
  display: none;
  padding: 0 20px 26px 92px;
}
.div-item.is-active .div-body { display: grid; gap: 18px; }
.div-summary { color: var(--ink-body); max-width: 54ch; font-size: 0.98rem; }
.div-sublist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}
.div-sublist a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--rule);
  background: var(--paper);
  text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.div-sublist a:hover { border-color: var(--cobalt); color: var(--cobalt); background: #fff; }
.div-mobile-media { display: none; }
.div-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding-top: 4px; }

.divisions-stage {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  display: grid;
}
.div-stage-slide {
  grid-area: 1 / 1;
  background: var(--paper-hi);
  border: 1px solid var(--rule-strong);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s;
}
.div-stage-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.div-stage-frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--obsidian); }
.div-stage-frame img { width: 100%; height: 100%; object-fit: cover; }
.specimen-badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(21, 23, 34, 0.84); color: var(--paper);
  padding: 4px 10px; font-size: 0.66rem;
}
.div-stage-cap {
  padding: 20px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--rule);
}
.div-stage-meta { display: grid; gap: 4px; }
.div-stage-meta .mono { color: var(--cobalt); font-size: 0.7rem; }
.div-stage-meta strong { font-size: 0.95rem; font-weight: 600; line-height: 1.4; }

/* ---------- Managed Process (Obsidian Dark) ---------- */
.process { background: var(--obsidian); color: var(--paper); }
.process .section-label { color: var(--cobalt-light); }
.process-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.process-rail {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  display: grid; gap: 28px;
}
.process-head { display: grid; gap: 16px; }
.process-head p { color: var(--muted-dark); max-width: 44ch; }

.flow-diagram {
  border: 1px solid var(--rule-dark);
  background: var(--obsidian-2);
  padding: 20px;
  display: grid; gap: 0;
}
.flow-node {
  padding: 14px 16px;
  border: 1px solid var(--rule-dark);
  display: grid; gap: 2px;
}
.flow-node .mono { font-size: 0.68rem; color: var(--muted-dark); }
.flow-node strong { font-family: var(--f-head); font-weight: 700; font-size: 1.02rem; }
.flow-node small { font-size: 0.82rem; color: var(--muted-dark); }
.flow-node--hub {
  border-color: var(--cobalt);
  background: rgba(49, 87, 213, 0.14);
}
.flow-node--hub .mono { color: var(--cobalt-light); }
.flow-bridge { display: grid; place-items: center; height: 22px; }
.flow-bridge span { width: 1.5px; height: 100%; background: var(--cobalt-light); }

.role-legend { display: flex; flex-wrap: wrap; gap: 10px; }
.role-pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px; font-size: 0.66rem;
  width: fit-content;
}
.role-pill--client { background: var(--cobalt); color: #fff; }
.role-pill--managed { border: 1px solid var(--rule-dark); color: var(--muted-dark); }

.steps { border-top: 1px solid var(--rule-dark); }
.step {
  display: grid;
  grid-template-columns: clamp(64px, 7.5vw, 108px) minmax(0, 1fr);
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule-dark);
  transition: background 0.25s var(--ease);
}
.step-num {
  font-family: var(--f-head); font-weight: 900;
  font-size: clamp(2.4rem, 4.4vw, 4rem); line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1.25px rgba(144, 170, 255, 0.55);
  transition: color 0.3s, -webkit-text-stroke-color 0.3s;
}
.step--client .step-num { -webkit-text-stroke-color: var(--cobalt-light); }
.step:hover .step-num { color: var(--cobalt-light); }
.step-body { display: grid; gap: 8px; }
.step h3 {
  font-family: var(--f-head); font-weight: 700;
  font-size: clamp(1.22rem, 1.8vw, 1.55rem);
  letter-spacing: -0.015em; line-height: 1.18;
}
.step p { color: var(--muted-dark); max-width: 52ch; font-size: 0.96rem; }

/* ---------- Dual-Audience Architectural Split ---------- */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--rule);
}
.split-pane {
  padding: clamp(44px, 5.5vw, 84px) var(--gutter);
  display: grid; gap: 28px; align-content: space-between;
}
.split-top { display: grid; gap: 16px; }
.split-top p:not(.section-label) { max-width: 48ch; }
.split-points {
  display: grid; gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 20px;
}
.split-points li {
  position: relative; padding-left: 18px; font-size: 0.95rem;
}
.split-points li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; background: currentColor;
}
.split-points--light { border-top-color: var(--rule); color: var(--ink-body); }
.split-points--light li::before { background: var(--cobalt); }
.split-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.split-pane--business { background: var(--cobalt); color: #fff; }
.split-pane--business .section-label { color: #dbe3ff; }
.split-pane--business .split-top p:not(.section-label) { color: #e9edff; }
.split-pane--freelancer { background: var(--paper); border-left: 1px solid var(--rule); }
.split-pane--freelancer .split-top p:not(.section-label) { color: var(--ink-body); }

/* ---------- Curated Concept Studies (Asymmetric Masonry) ---------- */
.work-note { font-size: 0.94rem; color: var(--muted); }
.work-note strong { color: var(--ink); }
.cases-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
}
.case { min-width: 0; }
.case--tall { grid-column: span 5; }
.case--wide { grid-column: span 7; }
.case-trigger {
  width: 100%; height: 100%;
  text-align: left; background: var(--paper-hi);
  border: 1px solid var(--rule);
  padding: 0; cursor: pointer;
  display: flex; flex-direction: column;
  transition: border-color 0.28s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.case-trigger:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(21, 29, 66, 0.08);
}
.case-media {
  position: relative;
  overflow: hidden;
  background: var(--stone);
  aspect-ratio: 16 / 10;
}
.case--tall .case-media { aspect-ratio: 4 / 3; }
.case-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.65s var(--ease);
}
.case-trigger:hover .case-media img { transform: scale(1.04); }
.case-badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule-strong);
  padding: 4px 10px; font-size: 0.66rem;
}
.case-inspect {
  position: absolute; right: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--obsidian); color: var(--paper);
  padding: 6px 12px; font-size: 0.68rem;
  opacity: 0.92;
  transition: background 0.25s, transform 0.25s;
}
.case-trigger:hover .case-inspect { background: var(--cobalt); transform: translateY(-2px); }
.case-meta { padding: 22px 24px 24px; display: grid; gap: 8px; }
.case-kicker { color: var(--cobalt); }
.case-meta h3 {
  font-family: var(--f-head); font-weight: 700;
  font-size: clamp(1.22rem, 1.8vw, 1.55rem); letter-spacing: -0.02em; line-height: 1.15;
}
.case-meta p { font-size: 0.94rem; color: var(--muted); line-height: 1.55; max-width: 52ch; }

/* Slide-over Concept Drawer */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(15, 18, 32, 0.56);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.drawer-backdrop.is-open { opacity: 1; }
.case-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 260;
  width: min(560px, 100vw);
  background: var(--paper);
  border-left: 1px solid var(--ink);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  transform: translateX(100%);
  transition: transform 0.38s var(--ease);
}
.case-drawer.is-open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px; border-bottom: 1px solid var(--rule); background: var(--paper-hi);
}
.drawer-head .mono { color: var(--cobalt); }
.drawer-close {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--rule-strong);
  padding: 6px 12px; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.drawer-close:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.drawer-body { overflow-y: auto; padding: 24px; display: grid; gap: 22px; align-content: start; }
.drawer-media { border: 1px solid var(--rule); background: var(--stone); }
.drawer-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.drawer-media figcaption { padding: 8px 12px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.68rem; }
.drawer-body h2 { font-family: var(--f-head); font-weight: 800; font-size: 1.8rem; letter-spacing: -0.025em; line-height: 1.08; }
.drawer-summary { color: var(--ink-body); }
.drawer-section { border-top: 1px solid var(--rule); padding-top: 16px; display: grid; gap: 10px; }
.drawer-section h3 { color: var(--cobalt); }
.drawer-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-tools li { border: 1px solid var(--rule-strong); padding: 5px 11px; font-size: 0.84rem; background: var(--paper-hi); }
.drawer-foot {
  padding: 18px 24px; border-top: 1px solid var(--rule); background: var(--paper-hi);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
}

/* ---------- Studio Anchor & Why Matrix ---------- */
.why { background: var(--stone); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.studio-anchor {
  border: 1px solid var(--rule-strong);
  background: var(--paper-hi);
  margin-bottom: clamp(44px, 6vw, 76px);
  overflow: hidden;
}
.studio-anchor--flush { margin-bottom: clamp(48px, 6vw, 80px); }
.studio-anchor img { width: 100%; max-height: 460px; object-fit: cover; object-position: center 55%; }
.studio-anchor figcaption {
  padding: 18px 24px;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px;
}
.studio-anchor figcaption .mono { color: var(--cobalt); }
.studio-anchor figcaption strong { font-family: var(--f-head); font-weight: 700; font-size: 1.08rem; }

.why-layout {
  display: grid;
  grid-template-columns: minmax(0, 4.5fr) minmax(0, 7.5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.why-head { display: grid; gap: 16px; }
.why-head p { color: var(--ink-body); max-width: 40ch; }
.why-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.why-cell {
  background: var(--paper-hi);
  padding: 28px;
  display: grid; gap: 12px; align-content: start;
}
.why-icon { color: var(--cobalt); }
.why-cell h3 {
  font-family: var(--f-head); font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.015em;
}
.why-cell p { font-size: 0.94rem; color: var(--muted); line-height: 1.55; }

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4.5fr) minmax(0, 7.5fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.faq-head { position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 16px; }
.faq-lead { color: var(--muted); max-width: 36ch; }
.faq-direct {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: grid; gap: 4px;
}
.faq-direct .mono { color: var(--muted); font-size: 0.7rem; }
.faq-direct a { font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; color: var(--cobalt); text-decoration: none; }
.faq-direct a:hover { text-decoration: underline; }

.faq-list { border-top: 1px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  cursor: pointer; list-style: none;
  padding: 22px 48px 22px 0;
  font-family: var(--f-head); font-weight: 700;
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
  letter-spacing: -0.015em; position: relative;
  transition: color 0.2s;
}
.faq-list summary:hover { color: var(--cobalt); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before, .faq-list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 18px; height: 1.8px; background: var(--cobalt);
  transition: transform 0.28s var(--ease);
}
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0); }
.faq-answer { padding: 0 40px 24px 0; color: var(--ink-body); max-width: 60ch; }

/* ---------- Final CTA ---------- */
.cta {
  background: var(--cobalt);
  color: #fff;
  padding-block: clamp(68px, 8.5vw, 128px);
}
.cta .section-label { color: #dbe3ff; }
.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
}
.cta-actions { display: grid; gap: 20px; justify-items: start; }
.cta-actions p { font-size: 1.08rem; max-width: 38ch; color: #e8ecff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--obsidian); color: var(--paper); }
.footer-top {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(56px, 6.5vw, 92px) var(--gutter) 52px;
  display: grid;
  grid-template-columns: 1.65fr 0.9fr 1.05fr 1.2fr;
  gap: 40px;
}
.footer-logo-link { display: inline-block; margin-bottom: 18px; }
.footer-brand img { width: 175px; height: auto; }
.footer-brand p { color: var(--muted-dark); max-width: 36ch; font-size: 0.94rem; }
.footer-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.footer-col h2 { color: var(--cobalt-light); margin-bottom: 16px; font-weight: 500; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a {
  text-decoration: none; color: var(--paper); font-size: 0.94rem;
  opacity: 0.88; transition: opacity 0.2s, color 0.2s;
}
.footer-col a:hover { opacity: 1; color: var(--cobalt-light); }
.footer-contact a { display: block; width: fit-content; margin-bottom: 10px; overflow-wrap: anywhere; }
.footer-bottom {
  max-width: var(--max); margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--rule-dark);
  font-size: 0.85rem; color: var(--muted-dark);
}

/* ==========================================================================
   Inner Pages
   ========================================================================== */
.page-hero {
  border-bottom: 1px solid var(--rule);
  padding: clamp(52px, 7vw, 108px) 0 clamp(44px, 5.5vw, 76px);
}
.page-hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px; row-gap: 24px;
}
.page-hero .section-label { grid-column: 1 / -1; margin-bottom: 0; }
.page-title { grid-column: 1 / span 10; font-size: clamp(2.4rem, 5.6vw, 5.2rem); }
.page-lede { grid-column: 1 / span 7; font-size: 1.12rem; color: var(--ink-body); max-width: 56ch; }
.page-hero-side { grid-column: 8 / -1; align-self: end; display: grid; gap: 14px; justify-items: start; }
.page-hero-side .fine { margin: 0; }
.page-hero--cobalt { background: var(--cobalt); color: #fff; border-bottom: 0; padding-bottom: 0; }
.page-hero--cobalt .section-label { color: #dbe3ff; }
.page-hero--cobalt .page-lede { color: #e8ecff; }
.page-hero--cobalt .page-hero-grid { padding-bottom: clamp(44px, 5vw, 68px); }
.page-hero--night { background: var(--obsidian); color: var(--paper); border-bottom-color: var(--rule-dark); }
.page-hero--night .section-label { color: var(--cobalt-light); }
.page-hero--night .page-lede { color: var(--muted-dark); }
.page-hero--stone { background: var(--stone); }

.hero-strip { border-top: 1px solid rgba(255, 255, 255, 0.2); background: rgba(14, 18, 48, 0.16); }
.hero-strip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hero-strip-grid > div {
  padding: 18px 20px 18px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  display: flex; align-items: baseline; gap: 12px;
}
.hero-strip-grid > div:not(:first-child) { padding-left: 20px; }
.hero-strip-grid > div:last-child { border-right: 0; }
.hero-strip-grid .mono { color: #cbd6ff; font-size: 0.72rem; }
.hero-strip-grid strong { font-family: var(--f-head); font-weight: 700; font-size: 1rem; }

/* ---------- Services Filter & Directory ---------- */
.filter-bar {
  position: sticky; top: var(--header-h); z-index: 90;
  background: var(--paper-hi);
  border-bottom: 1px solid var(--rule);
}
.filter-bar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding-block: 12px; flex-wrap: wrap;
}
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tab {
  background: transparent; border: 1px solid var(--rule-strong);
  padding: 8px 14px; font-weight: 600; font-size: 0.88rem;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-tab .mono { font-size: 0.7rem; color: var(--cobalt); }
.filter-tab:hover { border-color: var(--ink); }
.filter-tab.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-tab.is-active .mono { color: var(--cobalt-light); }

.filter-search { flex: 1 1 260px; max-width: 380px; }
.filter-search input {
  width: 100%; min-height: 40px; padding: 8px 14px;
  background: var(--paper); border: 1px solid var(--rule-strong);
  font-size: 0.92rem;
}
.filter-search input:focus { outline: none; border-color: var(--cobalt); background: #fff; }

.services-layout {
  max-width: var(--max); margin-inline: auto;
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
}
.services-rail {
  position: sticky; top: calc(var(--header-h) + 65px);
  align-self: start;
  padding: 36px 24px 36px var(--gutter);
  border-right: 1px solid var(--rule);
  display: grid; gap: 36px;
}
.rail-title { color: var(--muted); display: block; margin-bottom: 8px; }
.services-index { display: grid; gap: 2px; }
.services-index a {
  text-decoration: none; font-family: var(--f-head); font-weight: 700; font-size: 0.98rem;
  padding: 11px 10px; display: flex; align-items: baseline; gap: 10px;
  border-left: 2px solid transparent; color: var(--ink-body);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.services-index a span { color: var(--cobalt); font-family: var(--f-mono); font-weight: 400; font-size: 0.75rem; }
.services-index a:hover, .services-index a.is-current {
  color: var(--ink); border-left-color: var(--cobalt); background: var(--stone);
}
.rail-box {
  border-top: 1px solid var(--rule); padding-top: 20px;
  display: grid; gap: 10px; font-size: 0.88rem; color: var(--muted);
}
.rail-box .mono { color: var(--ink); }

.division { border-bottom: 1px solid var(--rule); }
.division:nth-child(even) { background: var(--stone); }
.division-banner {
  padding: clamp(36px, 4.5vw, 56px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px; align-items: center;
}
.division-banner-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.division-num {
  background: var(--cobalt); color: #fff;
  padding: 4px 10px; font-weight: 500;
}
.division-icon { color: var(--ink); }
.division-count { color: var(--muted); }
.division-banner h2 {
  font-family: var(--f-head); font-weight: 800; font-stretch: 104%;
  font-size: clamp(1.85rem, 3.4vw, 3rem); letter-spacing: -0.03em; line-height: 1.02;
  margin-bottom: 12px;
}
.division-banner p { color: var(--ink-body); max-width: 52ch; }
.division-banner-media { border: 1px solid var(--rule-strong); background: var(--paper-hi); }
.division-banner-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.division-banner-media figcaption { padding: 8px 12px; color: var(--muted); font-size: 0.68rem; border-top: 1px solid var(--rule); }

.svc {
  display: grid;
  grid-template-columns: minmax(0, 4.5fr) minmax(0, 7.5fr);
  gap: 24px clamp(24px, 3.5vw, 52px);
  padding: 32px var(--gutter);
  border-top: 1px solid var(--rule);
  transition: background 0.2s;
}
.svc:hover { background: rgba(255, 255, 255, 0.55); }
.svc-left { display: grid; gap: 10px; align-content: start; }
.svc-index { color: var(--cobalt); }
.svc h3 {
  font-family: var(--f-head); font-weight: 700;
  font-size: clamp(1.35rem, 2vw, 1.7rem); letter-spacing: -0.02em; line-height: 1.1;
}
.svc-desc { font-size: 0.96rem; color: var(--ink-body); }
.svc-includes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.svc-includes li {
  border: 1px solid var(--rule-strong); background: var(--paper-hi);
  padding: 3px 10px; font-size: 0.82rem; font-weight: 500;
}
.svc-right { display: grid; gap: 20px; align-content: start; }
.svc-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.svc-specs dt { color: var(--muted); margin-bottom: 6px; font-size: 0.7rem; }
.svc-specs dd { font-size: 0.92rem; color: var(--ink-body); line-height: 1.55; }
.svc-specs ul { display: grid; gap: 5px; }
.svc-specs li { padding-left: 14px; position: relative; }
.svc-specs li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 4px; height: 4px; background: var(--cobalt); }
.svc-foot { border-top: 1px solid var(--rule); padding-top: 16px; }
.svc-foot .btn { white-space: normal; text-align: left; line-height: 1.3; padding-block: 10px; max-width: 100%; }
.services-body, .division, .svc, .svc-left, .svc-right { min-width: 0; }

.filter-empty { padding: 64px var(--gutter); display: grid; gap: 14px; justify-items: start; }
.filter-empty h3 { font-family: var(--f-head); font-size: 1.5rem; }
.filter-empty p { color: var(--muted); max-width: 50ch; }

/* ---------- Shared Inner Sections ---------- */
.block { border-bottom: 1px solid var(--rule); padding-block: clamp(56px, 7vw, 104px); }
.block--stone { background: var(--stone); }
.block--night { background: var(--obsidian); color: var(--paper); border-bottom-color: var(--rule-dark); }
.block--night .section-label { color: var(--cobalt-light); }
.block-grid {
  display: grid; grid-template-columns: minmax(0, 4.5fr) minmax(0, 7.5fr);
  gap: clamp(32px, 5.5vw, 96px); align-items: start;
}
.block-grid--spaced { margin-top: 12px; }
.block-head { position: sticky; top: calc(var(--header-h) + 32px); }
.prose { display: grid; gap: 18px; max-width: 62ch; color: var(--ink-body); }
.block--night .prose { color: var(--muted-dark); }
.prose-subhead { color: var(--cobalt-light); margin-top: 8px; }

.rows { border-top: 1px solid var(--ink); }
.rows li {
  display: grid; grid-template-columns: minmax(0, 4.5fr) minmax(0, 7.5fr);
  gap: 14px 28px; padding: 24px 0; border-bottom: 1px solid var(--rule);
}
.rows h3 {
  font-family: var(--f-head); font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.015em; line-height: 1.2;
  display: flex; align-items: baseline; gap: 12px;
}
.row-idx { color: var(--cobalt); font-size: 0.74rem; }
.rows p { color: var(--ink-body); max-width: 54ch; font-size: 0.96rem; }
.block--night .rows { border-top-color: var(--rule-dark); }
.block--night .rows li { border-bottom-color: var(--rule-dark); }
.block--night .rows p { color: var(--muted-dark); }
.block--night .row-idx { color: var(--cobalt-light); }

/* Aligned Capability Grid (replaces ragged flex cloud) */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.cap-grid--roles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cap-cell {
  position: relative;
  background: var(--paper-hi);
  padding: 22px 22px 24px;
  text-decoration: none;
  display: grid; gap: 6px; align-content: start;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.cap-div { color: var(--cobalt); font-size: 0.7rem; }
.cap-name {
  font-family: var(--f-head); font-weight: 700; font-size: 1.12rem;
  letter-spacing: -0.015em; line-height: 1.2; padding-right: 22px;
}
.cap-sub { font-size: 0.85rem; color: var(--muted); }
.cap-go {
  position: absolute; top: 20px; right: 18px;
  color: var(--muted); transition: transform 0.25s var(--ease), color 0.25s;
}
.cap-cell:hover { background: var(--ink); color: var(--paper); }
.cap-cell:hover .cap-div, .cap-cell:hover .cap-go { color: var(--cobalt-light); }
.cap-cell:hover .cap-sub { color: var(--muted-dark); }
.cap-cell:hover .cap-go { transform: translate(2px, -2px); }

.checklist { display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 26px; font-size: 0.98rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.45em;
  width: 12px; height: 7px;
  border-left: 2.2px solid var(--cobalt); border-bottom: 2.2px solid var(--cobalt);
  transform: rotate(-45deg);
}
.block--night .checklist li::before { border-color: var(--cobalt-light); }
.notice {
  border-left: 3px solid var(--cobalt);
  padding: 12px 18px; background: var(--paper-hi);
  max-width: 62ch; font-weight: 500; font-size: 0.95rem;
}
.notice--dark { background: var(--obsidian-2); border-left-color: var(--cobalt-light); color: var(--paper); }

/* Model Diagram (About) */
.model {
  display: grid; grid-template-columns: 1fr auto 1.15fr auto 1fr;
  border: 1px solid var(--rule-strong); background: var(--paper-hi);
}
.model-node { padding: 30px 26px; display: grid; gap: 10px; align-content: start; }
.model-node--mid { background: var(--obsidian); color: var(--paper); }
.model-node h3 { font-family: var(--f-head); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; }
.model-node p { font-size: 0.94rem; color: var(--muted); }
.model-node--mid p { color: var(--muted-dark); }
.model-node .mono { color: var(--cobalt); }
.model-node--mid .mono { color: var(--cobalt-light); }
.model-link {
  display: grid; place-items: center; padding: 0 14px;
  border-inline: 1px solid var(--rule); background: var(--stone); color: var(--cobalt);
}

/* Contact Routing Strip */
.route-strip { border-bottom: 1px solid var(--rule); background: var(--paper-hi); }
.route-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--rule);
  border-inline: 1px solid var(--rule);
}
.route-card {
  background: var(--paper-hi); padding: 28px 26px;
  text-decoration: none; display: grid; gap: 10px; align-content: start;
  transition: background 0.25s var(--ease);
}
.route-card .mono { color: var(--cobalt); font-size: 0.72rem; }
.route-card strong { font-family: var(--f-head); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.015em; }
.route-card p { font-size: 0.92rem; color: var(--muted); }
.route-go {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.92rem; color: var(--ink);
}
.route-card:hover { background: var(--stone); }
.route-card:hover .route-go { color: var(--cobalt); }

/* ---------- Upgraded Forms ---------- */
.form-wrap, .contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 4.2fr) minmax(0, 7.8fr);
  gap: clamp(32px, 5.5vw, 88px);
  align-items: start;
}
.form-side { position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 20px; }
.form-side p { color: var(--ink-body); max-width: 40ch; }
.form-expect { border-top: 1px solid var(--rule-strong); display: grid; }
.form-expect li {
  padding: 14px 0; border-bottom: 1px solid var(--rule);
  font-size: 0.92rem; color: var(--ink-body); display: grid; gap: 2px;
}
.form-expect .mono { color: var(--cobalt); font-size: 0.68rem; }
.form-expect strong { color: var(--ink); }

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  background: #fff;
  border: 1px solid var(--rule-strong);
  padding: clamp(24px, 3.6vw, 48px);
  position: relative;
}
.form .full { grid-column: 1 / -1; }
.form-group-head {
  display: flex; align-items: baseline; gap: 12px;
  padding-top: 8px; padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.form-group-head:not(:first-of-type) { margin-top: 12px; }
.form-group-head .mono { color: var(--cobalt); font-weight: 500; }
.form-group-head h3 { font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.form-group-head .opt { font-family: var(--f-body); font-weight: 400; font-size: 0.85rem; color: var(--muted); }

.chip-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.chip {
  background: var(--paper); border: 1px solid var(--rule-strong);
  padding: 6px 11px; font-size: 0.8rem; font-weight: 500; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { border-color: var(--cobalt); color: var(--cobalt); }
.chip.is-selected { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }

.field { display: grid; gap: 7px; align-content: start; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.char-meter { font-size: 0.68rem; color: var(--muted); }
.char-meter.is-ready { color: var(--ok); }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.field label .req { color: var(--cobalt); margin-left: 3px; }
.field .opt { font-weight: 400; color: var(--muted); font-size: 0.82rem; margin-left: 6px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  background: var(--paper-hi); border: 1px solid var(--rule-strong); border-radius: 0;
  font-size: 0.98rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input::placeholder, .field textarea::placeholder { color: #8c90a1; }
.field textarea { min-height: 140px; resize: vertical; }
.textarea--compact { min-height: 92px !important; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cobalt);
  box-shadow: 0 0 0 3px var(--cobalt-tint); background: #fff;
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%;
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 38px;
}
.field .error { color: var(--danger); font-size: 0.84rem; font-weight: 500; }
.field.has-error input, .field.has-error select, .field.has-error textarea {
  border-color: var(--danger); box-shadow: 0 0 0 2px rgba(184, 38, 30, 0.14);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; font-weight: 500; font-size: 0.94rem; }
.form-status.is-error { color: var(--danger); border-left: 3px solid var(--danger); padding-left: 14px; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding-top: 6px; }

.success { display: none; grid-column: 1 / -1; gap: 14px; padding: 16px 0; justify-items: start; }
.success h3 { font-family: var(--f-head); font-weight: 800; font-size: clamp(1.6rem, 2.8vw, 2.3rem); letter-spacing: -0.02em; line-height: 1.1; }
.success p { max-width: 50ch; color: var(--ink-body); }
.success .tick { width: 52px; height: 52px; background: var(--cobalt); position: relative; }
.success .tick::after { content: ""; position: absolute; left: 15px; top: 14px; width: 22px; height: 12px; border-left: 3.5px solid #fff; border-bottom: 3.5px solid #fff; transform: rotate(-45deg); }
.form.is-done > :not(.success) { display: none; }
.form.is-done .success { display: grid; }

/* Contact list */
.contact-list { border-top: 1px solid var(--ink); }
.contact-list > div { padding: 18px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 4px; }
.contact-list dt { color: var(--muted); font-size: 0.72rem; }
.contact-list dd { font-family: var(--f-head); font-weight: 700; font-size: clamp(1.05rem, 1.5vw, 1.32rem); overflow-wrap: anywhere; }
.contact-list a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.contact-list a:hover { color: var(--cobalt); }

/* Legal & 404 */
.legal { max-width: 72ch; display: grid; gap: 16px; }
.legal h2 { font-family: var(--f-head); font-weight: 700; font-size: 1.45rem; margin-top: 18px; letter-spacing: -0.015em; }
.legal ul { list-style: disc; padding-left: 22px; display: grid; gap: 6px; }
.nf { min-height: 60svh; display: grid; align-content: center; gap: 22px; padding-block: 80px; }

/* ---------- Controlled Scroll Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ==========================================================================
   Responsive Recomposition (Tablet -> Mobile 430 / 390 / 360)
   ========================================================================== */
@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 40px var(--gutter) 0; }
  .hero-switcher { margin-inline: calc(var(--gutter) * -1); }
  .hero-stage { border-left: 0; border-top: 1px solid var(--rule); }
  .divisions-grid { grid-template-columns: 1fr; }
  .divisions-stage { display: none; }
  .div-mobile-media { display: grid; gap: 6px; border: 1px solid var(--rule-strong); background: var(--paper); }
  .div-mobile-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
  .div-mobile-media span { padding: 6px 12px; color: var(--muted); font-size: 0.68rem; }
  .services-layout { grid-template-columns: 1fr; }
  .services-rail { display: none; }
  .division-banner { grid-template-columns: 1fr; }
  .cap-grid--roles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .model { grid-template-columns: 1fr; }
  .model-link { padding: 10px; border-inline: 0; border-block: 1px solid var(--rule); }
  .model-link .arrow { transform: rotate(90deg); }
  .nav-secondary { display: none; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .brand img { height: 36px; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 42px; padding: 0 6px 0 12px;
    background: transparent; border: 1px solid var(--ink); cursor: pointer;
  }
  .menu-bars { display: grid; gap: 5px; width: 30px; padding: 0 6px; }
  .menu-bars i { display: block; height: 1.8px; background: var(--ink); transition: transform 0.28s var(--ease); }
  .menu-toggle[aria-expanded="true"] .menu-bars i:first-child { transform: translateY(3.4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-bars i:last-child { transform: translateY(-3.4px) rotate(-45deg); }

  .js .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: var(--paper);
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 24px;
    padding: 24px var(--gutter) 40px;
    overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
  }
  .js .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a {
    display: block; padding: 16px 0;
    font-family: var(--f-head); font-weight: 700; font-size: 1.65rem;
    border-bottom: 1px solid var(--rule); color: var(--ink);
  }
  .nav-links a::after { display: none; }
  .nav-links a[aria-current="page"] { color: var(--cobalt); }
  .nav-end { flex-direction: column; align-items: stretch; gap: 12px; }
  .nav-secondary { display: inline-flex; justify-content: center; padding: 12px; border: 1px solid var(--rule-strong); color: var(--ink); }
  .nav-cta { min-height: 52px; font-size: 1rem; }
  .nav-drawer-foot {
    display: grid; gap: 6px; margin-top: auto;
    padding-top: 20px; border-top: 1px solid var(--rule); font-size: 0.9rem; color: var(--muted);
  }
  .nav-drawer-foot a { text-decoration: none; color: var(--ink); font-weight: 500; }

  .intro-label-col, .intro-main-col, .page-title, .page-lede, .page-hero-side { grid-column: 1 / -1; }
  .section-head--split, .pillars, .process-grid, .split, .why-layout, .faq-grid,
  .block-grid, .form-wrap, .contact-grid, .cta-grid, .route-grid, .svc { grid-template-columns: 1fr; }
  .process-rail, .faq-head, .block-head, .form-side { position: static; }
  .pillar { border-right: 0; border-bottom: 1px solid var(--rule); padding: 20px 0 !important; }
  .pillar:last-child { border-bottom: 0; }
  .split-pane--freelancer { border-left: 0; border-top: 1px solid var(--rule); }
  .case--tall, .case--wide { grid-column: span 12; }
  .hero-strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-strip-grid > div { border-bottom: 1px solid rgba(255, 255, 255, 0.16); padding: 14px 14px !important; }
  .cap-grid, .cap-grid--roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-specs { grid-template-columns: 1fr; gap: 16px; }
  .rows li { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 0.98rem; }
  .btn { white-space: normal; }
  .hero-title { font-size: clamp(2.15rem, 9.6vw, 3rem); overflow-wrap: break-word; }
  .hero-actions .btn { width: 100%; justify-content: space-between; }
  .hero-switcher { grid-template-columns: 1fr; }
  .hero-tab {
    border-right: 0; border-bottom: 1px solid var(--rule);
    padding: 14px var(--gutter) !important;
    grid-template-columns: 28px auto minmax(0, 1fr); align-items: baseline; gap: 10px;
  }
  .hero-tab:last-child { border-bottom: 0; }
  .hero-tab small { justify-self: end; text-align: right; }
  .hero-plate-grid { grid-template-columns: 1fr; }
  .plate-primary { min-height: 250px; aspect-ratio: 4 / 3; }
  .plate-thumb { display: none; }
  .div-trigger { grid-template-columns: 28px minmax(0, 1fr); padding: 18px 14px; gap: 12px; }
  .div-icon, .div-count { display: none; }
  .div-body { padding: 0 14px 20px; }
  .div-sublist { grid-template-columns: 1fr; }
  .step { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; }
  .why-matrix, .cap-grid, .cap-grid--roles, .footer-top, .form { grid-template-columns: 1fr; }
  .split-actions .btn, .cta-actions .btn, .form-actions .btn { width: 100%; justify-content: space-between; }
  .form { padding: 20px 16px; }
  .studio-anchor img { max-height: 240px; }
  .filter-bar { position: static; }
  .hero-strip-grid { grid-template-columns: 1fr; }
  .hero-strip-grid > div { border-right: 0; }
}
