/* ==========================================================================
   KM Solutions — brochure stylesheet

   Visual thesis: a printed brochure rendered on screen. Warm uncoated paper,
   near-black warm ink, burnt orange as the only accent, one serif display
   face carrying every headline, and an asymmetric twelve-column grid whose
   left margin holds the running folio.

   Rules kept deliberately tight:
     • two typefaces only (serif display + system grotesk)
     • no cards, no shadows, no radii — hierarchy comes from scale and rules
     • every utility label is small-caps grotesk; every figure is tabular
   ========================================================================== */

/* --- 1. Tokens ------------------------------------------------------------ */
:root {
  --font-display: ui-serif, "Charter", "Iowan Old Style", "Palatino Linotype",
                  "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Paper stock & ink */
  --paper:      #fbf8f3;
  --paper-2:    #f3ece2;
  --ink:        #1b1613;
  --ink-2:      #5c5147;
  --ink-3:      #756753;

  /* Rules — the primary structural device */
  --rule:        rgba(27, 22, 19, 0.16);
  --rule-strong: rgba(27, 22, 19, 0.42);

  --accent:       #c2410c;
  --accent-hover: #9a3412;
  --accent-soft:  rgba(194, 65, 12, 0.07);

  --header-bg: rgba(251, 248, 243, 0.86);

  /* Metrics */
  --container: 1280px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --header-h: 3.75rem;
  --section-pad: clamp(4rem, 9vw, 8rem);
  --ease: cubic-bezier(0.22, 0.68, 0.16, 1);
}

[data-theme="dark"] {
  --paper:      #100f0d;
  --paper-2:    #191714;
  --ink:        #f6f1ea;
  --ink-2:      #b6aa9c;
  --ink-3:      #91867a;

  --rule:        rgba(246, 241, 234, 0.16);
  --rule-strong: rgba(246, 241, 234, 0.4);

  --accent:       #f97316;
  --accent-hover: #fb923c;
  --accent-soft:  rgba(249, 115, 22, 0.1);

  --header-bg: rgba(16, 15, 13, 0.86);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #100f0d;
    --paper-2:    #191714;
    --ink:        #f6f1ea;
    --ink-2:      #b6aa9c;
    --ink-3:      #91867a;

    --rule:        rgba(246, 241, 234, 0.16);
    --rule-strong: rgba(246, 241, 234, 0.4);

    --accent:       #f97316;
    --accent-hover: #fb923c;
    --accent-soft:  rgba(249, 115, 22, 0.1);

    --header-bg: rgba(16, 15, 13, 0.86);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 200;
  padding: 0.7rem 1.05rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
}
.skip-link:focus { top: 0.75rem; }

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

/* Anchors must clear the sticky header */
section[id] { scroll-margin-top: calc(var(--header-h) + 0.5rem); }

/* Shared utility voice: small tracked caps */
.hero-band-item,
.folio,
.pipeline-label,
.toolkit-label,
.discipline-meta,
.person-role,
.imprint dt,
.footer-copy,
.footer-nav a {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.95em;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.theme-light-only { display: block; }
.theme-dark-only  { display: none; }
[data-theme="dark"] .theme-light-only { display: none; }
[data-theme="dark"] .theme-dark-only  { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-light-only { display: none; }
  :root:not([data-theme="light"]) .theme-dark-only  { display: block; }
}

/* --- 3. Header ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}

.brand-link {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
}

.brand-logo-img { height: 1.6rem; width: auto; }

.nav-desktop { display: none; }

.nav-desktop a {
  position: relative;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  padding-block: 0.8rem;
  transition: color 0.24s var(--ease);
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.15rem;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease);
}

.nav-desktop a:hover,
.nav-desktop a.active { color: var(--ink); }

.nav-desktop a:hover::after,
.nav-desktop a.active::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.header-cta {
  display: none;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  padding: 0.85rem 0 0.6rem;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.header-cta:hover { color: var(--accent); border-color: var(--accent); }

.btn-theme-toggle {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  border: 0;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.24s var(--ease);
}
.btn-theme-toggle:hover { color: var(--accent); }

.btn-theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

/* Burger: two rules that cross on open */
.mobile-menu-toggle {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.65rem;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.burger,
.burger::before,
.burger::after {
  display: block;
  width: 1.35rem;
  height: 1px;
  background: currentColor;
  transition: transform 0.32s var(--ease), opacity 0.2s linear;
}

.burger { position: relative; }
.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 0;
}
.burger::before { top: -5px; }
.burger::after  { top: 5px; }

.mobile-menu-toggle[aria-expanded="true"] .burger { background: transparent; }
.mobile-menu-toggle[aria-expanded="true"] .burger::before { transform: translateY(5px) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] .burger::after  { transform: translateY(-5px) rotate(-45deg); }

/* Contents drawer — a printed contents page */
.mobile-drawer {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 6vw, 2.5rem) var(--gutter) calc(2rem + env(safe-area-inset-bottom));
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.75rem);
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease), visibility 0.32s;
}

.mobile-drawer.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.drawer-contents {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
}

.drawer-contents a {
  display: flex;
  align-items: baseline;
  gap: 1.15rem;
  padding: clamp(0.85rem, 3vw, 1.1rem) 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 9vw, 2.6rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  transition: color 0.2s var(--ease);
}

.drawer-contents a:active { color: var(--accent); }

.drawer-num {
  flex: none;
  width: 2.2rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.drawer-foot {
  display: flex;
  flex-direction: column;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.drawer-foot a { padding-block: 0.6rem; }

/* --- 4. Shared link with arrow -------------------------------------------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  letter-spacing: 0.005em;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.24s var(--ease);
}

.link-arrow::after {
  content: "→";
  color: var(--accent);
  transition: transform 0.32s var(--ease);
}

.link-arrow:hover { color: var(--accent); }
.link-arrow:hover::after { transform: translateX(5px); }

/* --- 5. Hero — the poster ------------------------------------------------- */
.hero {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.hero-shell {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: clamp(2.5rem, 7vw, 5rem);
  padding-top: clamp(1.5rem, 5vw, 3rem);
  /* Auto cross-axis margins defeat align-items:stretch inside the column flex
     parent, which would leave this box content-sized and narrower than every
     other .container. Keep it full width so the poster aligns to the grid. */
  width: 100%;
}

.hero-band {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  justify-content: space-between;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-3);
  animation: fadeIn 1s var(--ease) 0.1s both;
}

.hero-band-end { font-variant-numeric: tabular-nums; }

.hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(2rem, 6vw, 3.5rem);
}

/* The masthead is the loudest thing on the site.
   Its cap is set so the longest word ("Solutions", ≈3.6× the font size)
   always fits the column left of the aside at every desktop width. */
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.6rem, 12vw, 12rem);
  line-height: 0.88;
  letter-spacing: -0.05em;
  text-indent: -0.02em;
}

.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em;
}

.hero-title .line > span {
  display: block;
  animation: lineRise 1.15s var(--ease) both;
}

.hero-title .line:nth-child(1) > span { animation-delay: 0.12s; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.24s; }

.hero-title .line:nth-child(2) { color: var(--accent); }

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  animation: fadeIn 1s var(--ease) 0.5s both;
}

.hero-claim {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5.2vw, 2.35rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.025em;
  max-width: 22ch;
}

.hero-note {
  max-width: 34ch;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
}

/* Imprint strip replaces a four-up stat grid */
.hero-imprint {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  list-style: none;
  border-top: 1px solid var(--rule-strong);
  padding-top: clamp(0.85rem, 2vw, 1.15rem);
  color: var(--ink-2);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  animation: fadeIn 1s var(--ease) 0.75s both;
}

.hero-imprint li { padding: 0.35rem 0; }

@keyframes lineRise {
  from { transform: translateY(105%); }
  to   { transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* --- 6. Premise spread ---------------------------------------------------- */
.premise {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  padding-block: var(--section-pad);
}

.premise-grid { display: grid; gap: clamp(2rem, 5vw, 3rem); }

.premise-quote {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 5.6vw, 4.15rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  max-width: 24ch;
  text-wrap: balance;
}

.premise-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule-strong);
}

.premise-note {
  max-width: 34ch;
  color: var(--ink-2);
}

.premise-pillars {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* --- 7. Section shell ----------------------------------------------------- */
.section {
  padding-block: var(--section-pad);
  border-top: 1px solid var(--rule);
}

.split { display: grid; gap: clamp(1.75rem, 5vw, 2.5rem); }

.body { min-width: 0; }

/* Running folio in the left margin */
.folio {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--ink-3);
}

.folio-num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 6.4vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.038em;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

/* --- 8. Practice ---------------------------------------------------------- */
.disciplines { list-style: none; counter-reset: none; }

.discipline {
  display: grid;
  gap: 0.45rem;
  padding-block: clamp(1.5rem, 3.6vw, 2.25rem);
  border-top: 1px solid var(--rule);
}

.discipline:last-child { border-bottom: 1px solid var(--rule); }

.discipline-num {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.discipline-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.6vw, 2.15rem);
  line-height: 1.14;
  letter-spacing: -0.028em;
}

.discipline-body {
  max-width: 38ch;
  color: var(--ink-2);
}

.discipline-meta { color: var(--ink-3); }

.toolkit {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 62ch;
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--ink-2);
}

.toolkit-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink-3);
}

/* --- 9. Work — inverted spread -------------------------------------------- */
.spread-invert {
  --surface: #1b1613;
  --fg:      #fbf8f3;
  --fg-2:    rgba(251, 248, 243, 0.72);
  --fg-3:    rgba(251, 248, 243, 0.5);
  --hair:        rgba(251, 248, 243, 0.2);
  --hair-strong: rgba(251, 248, 243, 0.45);
  --spot:    #fb923c;
  --soft:    rgba(251, 248, 243, 0.06);

  background: var(--surface);
  color: var(--fg);
  border-top: 0;
}

[data-theme="dark"] .spread-invert {
  --surface: #f3ece2;
  --fg:      #1b1613;
  --fg-2:    rgba(27, 22, 19, 0.72);
  --fg-3:    rgba(27, 22, 19, 0.52);
  --hair:        rgba(27, 22, 19, 0.2);
  --hair-strong: rgba(27, 22, 19, 0.45);
  --spot:    #c2410c;
  --soft:    rgba(27, 22, 19, 0.05);
}

.spread-invert .folio { color: var(--fg-3); }
.spread-invert .folio-num { color: var(--spot); }

.work-head { margin-bottom: clamp(2.25rem, 5vw, 3.25rem); }

.work-head .section-title { margin-bottom: 1.15rem; }

.work-lede {
  max-width: 38ch;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--fg-2);
}

.facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hair-strong);
  margin-bottom: clamp(2.5rem, 6vw, 3.75rem);
}

.fact {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--hair);
}

.fact dt {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.6vw, 2.65rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.fact dd {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* Pipeline accordion */
.pipeline-label { color: var(--fg-3); margin-bottom: 1rem; }

.pipeline-steps { border-top: 1px solid var(--hair-strong); }

.arch-step-node {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  column-gap: 1rem;
  row-gap: 0.4rem;
  padding: 1.15rem 0.6rem 1.15rem 0;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
  transition: background 0.28s var(--ease), padding-left 0.28s var(--ease);
}

.arch-step-node:hover { background: var(--soft); }

.arch-step-node.active { padding-left: 0.75rem; }

.stage-num {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
  transition: color 0.28s var(--ease);
}

.arch-step-node.active .stage-num { color: var(--spot); }

.stage-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 3.2vw, 1.75rem);
  line-height: 1.16;
  letter-spacing: -0.028em;
}

.stage-tech {
  grid-column: 2;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.arch-step-detail {
  grid-column: 2;
  max-width: 46ch;
  color: var(--fg-2);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.44s var(--ease), opacity 0.32s ease, margin-top 0.32s ease;
}

.arch-step-node.active .arch-step-detail {
  max-height: 14rem;
  opacity: 1;
  margin-top: 0.65rem;
}

/* --- 10. People ----------------------------------------------------------- */
.people {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.person {
  padding: clamp(1.35rem, 3.4vw, 2rem) 0;
  border-bottom: 1px solid var(--rule);
}

.person-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4.2vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.person-role { color: var(--accent); margin-top: 0.35rem; }

.person-body {
  margin-top: 0.85rem;
  max-width: 36ch;
  color: var(--ink-2);
}

/* --- 11. Documents register ---------------------------------------------- */
.register { border-top: 1px solid var(--rule); }

.doc-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  column-gap: 0.85rem;
  padding: clamp(1rem, 2.6vw, 1.4rem) 0;
  border-bottom: 1px solid var(--rule);
}

.doc-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.2rem, 3.2vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: -0.028em;
}

/* Dotted leader — taken straight from a printed index */
.doc-leader {
  min-width: 1.25rem;
  border-bottom: 1px dotted var(--rule-strong);
  transform: translateY(-0.3em);
}

.doc-link {
  white-space: nowrap;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  padding-block: 0.7rem;
  transition: color 0.24s var(--ease);
}

.doc-link:hover { color: var(--ink); }

.doc-meta {
  color: var(--ink-3);
  text-transform: none;
  letter-spacing: 0.02em;
}

.doc-note {
  grid-column: 1 / -1;
  margin-top: 0.4rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

/* --- 12. Contact ---------------------------------------------------------- */
.section-contact { background: var(--paper-2); }

.contact-grid { display: grid; gap: clamp(2.5rem, 6vw, 4rem); }

.imprint-name {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.4vw, 1.75rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.028em;
  max-width: 30ch;
}

.imprint-alt {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--ink-3);
}

.imprint {
  margin-top: clamp(1.5rem, 3.5vw, 2rem);
  border-top: 1px solid var(--rule-strong);
}

.imprint-row {
  display: grid;
  gap: 0.25rem 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.imprint dt { color: var(--ink-3); }

.imprint dd { font-size: 1rem; }
.imprint dd.mono { color: var(--accent); font-size: 1.0625rem; }

.imprint a {
  display: inline-block;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--rule-strong);
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}

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

.contact-info .btn-copy-info { margin-top: 1.5rem; }

/* Form */
.form-group { margin-bottom: 1.5rem; }

.form-group label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0 0.85rem;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  transition: border-color 0.24s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

.form-control::placeholder { color: var(--ink-3); }
.form-control:focus { outline: none; border-color: var(--accent); }

textarea.form-control { resize: vertical; min-height: 5.5rem; line-height: 1.6; }

select.form-control {
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 12px) 52%, calc(100% - 7px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.btn-submit {
  margin-top: 0.35rem;
  padding: 0.95rem 2rem;
  border: 0;
  border-radius: 1px;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.24s var(--ease);
}

[data-theme="dark"] .btn-submit { color: #160f09; }
.btn-submit:hover { background: var(--accent-hover); }

/* --- 13. Footer ----------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2rem, 5vw, 3rem);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.footer-mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.footer-copy { color: var(--ink-3); }

.footer-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }

.footer-nav a {
  color: var(--ink-2);
  padding-block: 0.8rem;
  transition: color 0.24s var(--ease);
}
.footer-nav a:hover { color: var(--accent); }

/* --- 14. Toast ------------------------------------------------------------ */
.toast-notification {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  z-index: 300;
  width: max-content;
  max-width: calc(100vw - 2rem);
  transform: translate(-50%, 1rem);
  padding: 0.85rem 1.35rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  border-radius: 1px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}

.toast-notification.show { opacity: 1; transform: translate(-50%, 0); }

/* --- 15. Scroll reveal ---------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.72s var(--ease), transform 0.72s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.in { opacity: 1; transform: none; }

@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;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   16. Responsive
   ========================================================================== */
@media (min-width: 600px) {
  .hero-imprint {
    display: flex;
    flex-wrap: wrap;
    column-gap: 0;
  }

  .hero-imprint li {
    padding: 0 1.35rem;
    border-left: 1px solid var(--rule-strong);
  }

  .hero-imprint li:first-child { padding-left: 0; border-left: 0; }
  .hero-imprint li:last-child { padding-right: 0; }

  .imprint-row { grid-template-columns: 7rem 1fr; }
}

@media (min-width: 768px) {
  :root { --header-h: 4.25rem; }

  .nav-desktop { display: flex; gap: 2rem; }
  .header-cta { display: inline-block; }
  .mobile-menu-toggle { display: none; }
  .mobile-drawer { display: none; }

  .premise-grid {
    grid-template-columns: 1.35fr 1fr;
    column-gap: clamp(2rem, 5vw, 4rem);
    align-items: end;
  }

  .premise-side {
    border-top: 0;
    border-left: 1px solid var(--rule-strong);
    padding: 0.4rem 0 0.4rem clamp(1.5rem, 3vw, 2.5rem);
  }

  .facts {
    grid-template-columns: repeat(3, 1fr);
    column-gap: clamp(1.5rem, 4vw, 3rem);
  }

  .fact { border-bottom: 0; padding-bottom: 0; }
  .fact + .fact { border-left: 1px solid var(--hair); padding-left: clamp(1.5rem, 4vw, 3rem); }

  .people {
    grid-template-columns: repeat(3, 1fr);
    column-gap: clamp(1.5rem, 4vw, 3rem);
    border-bottom: 1px solid var(--rule);
  }

  .person {
    border-bottom: 0;
    padding-top: clamp(1.5rem, 3vw, 2rem);
  }

  .person + .person {
    border-left: 1px solid var(--rule);
    padding-left: clamp(1.5rem, 4vw, 3rem);
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }

  .footer-inner {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  /* Asymmetric editorial grid: folio in the margin, matter to the right */
  .split {
    grid-template-columns: repeat(12, 1fr);
    column-gap: clamp(1.5rem, 3vw, 3rem);
    row-gap: 0;
  }

  .split > .aside {
    grid-column: 1 / 3;
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
    align-self: start;
  }

  .split > .body { grid-column: 4 / 13; }

  .discipline {
    grid-template-columns: 3.5rem 20rem 1fr;
    column-gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
    row-gap: 0.5rem;
  }

  .discipline-title { grid-column: 2; }
  .discipline-num { grid-row: 1; }
  .discipline-body { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
  .discipline-meta { grid-column: 2; }

  .hero-body { flex-direction: row; align-items: flex-end; gap: clamp(2rem, 4vw, 3rem); }
  .hero-title { flex: 1 1 auto; min-width: 0; }
  /* flex-shrink lets the aside yield width if a substitute serif is wider */
  .hero-aside { flex: 0 1 clamp(17rem, 24vw, 21rem); padding-bottom: 0.5rem; }

  .arch-step-node {
    grid-template-columns: 3.5rem 1fr 12rem;
    column-gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: baseline;
  }

  .stage-tech { grid-column: 3; grid-row: 1; text-align: right; }
  .arch-step-detail { grid-column: 2; }
}

/* Short viewports (small phones, phones in landscape): compress the poster
   rather than pushing the imprint line off-screen. */
@media (max-height: 680px) {
  .hero-shell { gap: 1.25rem; padding-top: 1rem; }
  .hero-body { gap: 1.5rem; }
  .hero-aside { gap: 0.9rem; }
  .hero-title { font-size: clamp(2.75rem, 12vw, 4.5rem); }
  .hero-claim { font-size: clamp(1.25rem, 4.4vw, 1.75rem); }
  .hero-imprint { font-size: 0.8125rem; padding-top: 0.75rem; }
  .hero-imprint li { padding-block: 0.25rem; }
}

/* ==========================================================================
   17. Print — a brochure should print well
   ========================================================================== */
@media print {
  .site-header, .mobile-drawer, .toast-notification,
  .rfp-form, .btn-copy-info, .btn-theme-toggle { display: none !important; }

  body { background: #fff; color: #000; font-size: 10.5pt; }

  .hero { min-height: 0; }
  .section, .premise { padding-block: 1.25rem; border-top: 0.5pt solid #999; page-break-inside: avoid; }
  .spread-invert { background: none; color: #000; border: 0.5pt solid #999; padding-inline: 1rem; }
  .spread-invert .folio, .spread-invert .work-lede, .spread-invert .fact dd,
  .spread-invert .stage-tech, .spread-invert .arch-step-detail, .spread-invert .folio-num,
  .spread-invert .stage-num { color: #000; }
  .arch-step-detail { max-height: none; opacity: 1; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
