/* Liserys: Responsibilities in writing */

/* Fonts */
@font-face {
  font-family: "Source Serif 4";
  src: url("../assets/uploads/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  src: url("../assets/uploads/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Serif Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 94%;
  ascent-override: 104%;
  descent-override: 34%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Sans Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 103%;
  ascent-override: 103%;
  descent-override: 29%;
  line-gap-override: 0%;
}

/* Tokens */
:root {
  --night: #142436;
  --night-2: #1c3047;
  --ivory: #f4f0e7;
  --ivory-2: #eae4d7;
  --copper: #b87e59;
  --copper-deep: #8a5634;
  --slate: #75818b;
  --slate-deep: #56616a;
  --ivory-muted: #c9cdd1;

  --rule-light: rgba(117, 129, 139, 0.45);
  --rule-dark: rgba(244, 240, 231, 0.16);

  --serif: "Source Serif 4", "Serif Fallback", Georgia, serif;
  --sans: "Manrope", "Sans Fallback", Arial, sans-serif;

  --fs-label: 0.75rem;
  --fs-small: 0.9375rem;
  --fs-body: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  --fs-lead: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
  --fs-h3: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --fs-h2: clamp(2.125rem, 1.6rem + 2.2vw, 3.5rem);
  --fs-h1: clamp(2.5rem, 1.5rem + 4.3vw, 5rem);
  --fs-display: clamp(2.375rem, 1.6rem + 2.6vw, 4rem);

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  --max: 1320px;
  --margin: 20px;
  --gutter: 16px;
  --section-y: 72px;
  --header-h: 64px;

  --radius: 2px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --t-fast: 180ms;
}
@media (min-width: 768px) {
  :root { --margin: 40px; --gutter: 24px; --section-y: 96px; }
}
@media (min-width: 1100px) {
  :root { --margin: 56px; --gutter: 32px; --section-y: 120px; --header-h: 72px; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
body {
  margin: 0;
  background: var(--night);
  color: var(--night);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, 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(--copper); color: var(--night); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 420;
  line-height: 1.08;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
p { text-wrap: pretty; }

.container {
  width: min(100% - 2 * var(--margin), var(--max));
  margin-inline: auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--margin);
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--copper);
  color: var(--night);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* Focus */
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.on-ivory :focus-visible { outline-color: var(--night); }

/* Section scaffolding */
.section { padding-block: var(--section-y); scroll-margin-top: var(--header-h); }
.on-night { background: var(--night); color: var(--ivory); }
.on-ivory { background: var(--ivory); color: var(--night); }
.on-ivory-2 { background: var(--ivory-2); color: var(--night); }

.label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
}
.label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--copper);
  flex: none;
}
.on-night .label { color: var(--ivory-muted); }
.on-ivory .label, .on-ivory-2 .label { color: var(--copper-deep); }

.muted { color: var(--ivory-muted); }
.on-ivory .muted, .on-ivory-2 .muted { color: var(--slate-deep); }

/* Buttons */
.btn {
  --btn-bg: var(--copper);
  --btn-fg: var(--night);
  --btn-bd: var(--copper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn__arrow { width: 14px; height: 14px; flex: none; transition: transform var(--t-fast) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn--primary:hover { --btn-bg: #c99270; --btn-bd: #c99270; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ivory); --btn-bd: rgba(244, 240, 231, 0.42); }
.btn--ghost:hover { --btn-bd: var(--ivory); --btn-bg: rgba(244, 240, 231, 0.06); }
.btn--night { --btn-bg: var(--night); --btn-fg: var(--ivory); --btn-bd: var(--night); }
.btn--night:hover { --btn-bg: var(--night-2); --btn-bd: var(--night-2); }
.btn--sm { min-height: 44px; padding: 10px 18px; font-size: 0.875rem; }

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}
.logo__mark { width: 26px; height: 26px; flex: none; }
.logo__word {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.24em;
  margin-right: -0.24em;
  line-height: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--night);
  box-shadow: 0 -2px 0 var(--night);
  color: var(--ivory);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast) var(--ease);
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--rule-dark); }
.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.site-nav { display: flex; align-items: center; gap: var(--s-6); }
.site-nav__list { display: flex; gap: var(--s-6); }
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ivory);
  text-decoration: none;
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  height: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast) var(--ease);
}
.site-nav__link:hover::after { transform: scaleX(1); }
.menu-toggle { display: none; }

@media (max-width: 899px) {
  .site-nav { display: none; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    min-width: 44px;
    padding: 8px 4px 8px 12px;
    background: none;
    border: 0;
    color: var(--ivory);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
  }
  .menu-toggle__bars { position: relative; width: 20px; height: 10px; }
  .menu-toggle__bars::before, .menu-toggle__bars::after {
    content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
    transition: transform var(--t-fast) var(--ease), top var(--t-fast) var(--ease);
  }
  .menu-toggle__bars::before { top: 0; }
  .menu-toggle__bars::after { top: 8.5px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { top: 4.25px; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { top: 4.25px; transform: rotate(-45deg); }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 49;
  background: var(--night);
  color: var(--ivory);
  border-top: 1px solid var(--rule-dark);
  overflow-y: auto;
  padding: var(--s-6) var(--margin) calc(var(--s-7) + env(safe-area-inset-bottom));
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s linear 220ms;
}
.mobile-menu[data-open="true"] {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s;
}
.mobile-menu__list { border-top: 1px solid var(--rule-dark); }
.mobile-menu__list li { border-bottom: 1px solid var(--rule-dark); }
.mobile-menu__link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  font-family: var(--serif);
  font-size: 1.875rem;
  line-height: 1.15;
  text-decoration: none;
  color: var(--ivory);
}
.mobile-menu__num { font-family: var(--sans); font-size: var(--fs-label); letter-spacing: 0.14em; color: var(--ivory-muted); min-width: 22px; }
.mobile-menu .btn { margin-top: var(--s-6); width: 100%; }
@media (min-width: 900px) { .mobile-menu { display: none; } }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: var(--ivory);
}
.hero__grid { position: relative; z-index: 2; }
.hero__content {
  grid-column: 1 / -1;
  padding-block: var(--s-7) var(--s-7);
}
.hero__eyebrow { margin-bottom: var(--s-5); }
.hero__title {
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.024em;
  max-width: 15ch;
  text-wrap: balance;
}
.hero__text {
  margin-top: var(--s-5);
  max-width: 34rem;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ivory-muted);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}
.hero__note {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule-dark);
  max-width: 34rem;
  font-size: var(--fs-small);
  color: var(--ivory-muted);
}
.hero__note::before { content: ""; width: 6px; height: 6px; background: var(--copper); flex: none; }

.hero__media { position: relative; margin: 0; }
.hero__media picture { display: block; position: relative; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media picture::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (max-width: 899px) {
  .hero__media { border-top: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark); }
  .hero__media picture { height: clamp(280px, 62vw, 460px); }
  .hero__media img { object-position: 60% 50%; }
  .hero__media picture::after {
    background: linear-gradient(to bottom, rgba(20, 36, 54, 0.55) 0%, rgba(20, 36, 54, 0) 18%, rgba(20, 36, 54, 0) 82%, rgba(20, 36, 54, 0.3) 100%);
  }
}
@media (max-width: 599px) {
  .hero__media picture { height: clamp(280px, 78vw, 420px); }
  .hero__media img { object-position: 50% 58%; }
}
@media (max-width: 599px) {
  .hero__title { max-width: none; }
}
@media (max-width: 479px) {
  .hero__content { padding-block: var(--s-6) var(--s-6); }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__note { margin-top: var(--s-6); }
}
@media (min-width: 900px) {
  .hero__content {
    grid-column: 1 / span 7;
    min-height: clamp(600px, calc(100svh - var(--header-h)), 960px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: var(--s-8);
  }
  .hero__media {
    position: absolute;
    top: 0; bottom: 0; right: 0;
    left: 50%;
    z-index: 1;
    border-left: 1px solid rgba(244, 240, 231, 0.18);
  }
  .hero__media picture { position: absolute; inset: 0; }
  .hero__media img { object-position: 62% 50%; }
  .hero__media picture::after {
    background:
      linear-gradient(to right, rgba(20, 36, 54, 0.35) 0%, rgba(20, 36, 54, 0) 30%),
      linear-gradient(to bottom, rgba(20, 36, 54, 0.45) 0%, rgba(20, 36, 54, 0) 26%),
      linear-gradient(to top, rgba(20, 36, 54, 0.6) 0%, rgba(20, 36, 54, 0) 28%);
  }
}
@media (min-width: 900px) and (max-width: 1099px) {
  /* Keep the text column clear of the plate edge on the spine */
  .hero__content { grid-column: 1 / span 6; padding-right: var(--s-5); }
  .hero__title { font-size: 5.4vw; }
}
@media (min-width: 1100px) {
  .hero__content { grid-column: 1 / span 7; }
  /* At least 48px of night between the headline and the spine */
  .hero__title { max-width: min(15ch, calc(min(100vw - 2 * var(--margin), var(--max)) / 2 - 48px)); }
}

/* Hero entrance (only when html.enter is set by the head script) */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.enter [data-enter] { animation: rise 560ms var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 40ms); }
.enter .hero__media { animation: fade 900ms var(--ease) both 80ms; }

/* Services */
.services__head { row-gap: var(--s-5); align-items: end; }
.services__head .label { grid-column: 1 / -1; margin-bottom: var(--s-2); }
.services__title { grid-column: 1 / -1; font-size: var(--fs-h2); }
.services__intro { grid-column: 1 / -1; max-width: 36rem; color: var(--night); }
.service-list { margin-top: var(--s-8); border-bottom: 1px solid var(--rule-light); counter-reset: svc; }
.service {
  counter-increment: svc;
  position: relative;
  padding-block: var(--s-6) var(--s-7);
  row-gap: var(--s-4);
  border-top: 1px solid var(--rule-light);
}
.service::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--ease);
}
.service:hover::before { transform: scaleX(1); }
.service__head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: var(--s-4); }
.service__num {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--copper-deep);
  font-variant-numeric: tabular-nums;
  min-width: 2.2em;
}
.service__title { font-size: var(--fs-h3); font-weight: 450; letter-spacing: -0.012em; }
.service__desc { grid-column: 1 / -1; max-width: 34rem; }
.service__work { grid-column: 1 / -1; }
.service__work-label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-deep);
  margin-bottom: var(--s-2);
}
.service__work ul { border-top: 1px solid var(--rule-light); counter-reset: item; }
.service__work li {
  counter-increment: item;
  display: flex;
  gap: 14px;
  padding-block: 7px;
  border-bottom: 1px solid var(--rule-light);
  font-size: var(--fs-small);
  line-height: 1.45;
}
.service__work li::before {
  content: "";
  width: 10px;
  height: 1px;
  margin-top: 0.74em;
  background: var(--copper);
  flex: none;
}
.service__work li:last-child { border-bottom: 0; }

@media (min-width: 768px) {
  .service__head { grid-column: 1 / span 12; }
  .service__desc { grid-column: 1 / span 6; }
  .service__work { grid-column: 7 / span 6; }
}
@media (min-width: 900px) {
  .services__title { grid-column: 1 / span 5; }
  /* The intro hangs from the document spine (drawn by .has-folio::before) */
  .services__intro {
    grid-column: 7 / span 6;
    margin-left: calc(var(--gutter) / -2);
    padding-left: var(--s-7);
    margin-bottom: -0.35em;
  }
  .service { padding-block: var(--s-6) var(--s-6); align-items: start; }
  .service { grid-template-rows: auto 1fr; }
  .service__head { grid-column: 1 / span 7; grid-row: 1; }
  .service__title { margin-top: -6px; }
  .service__desc { grid-column: 1 / span 6; grid-row: 2; padding-left: calc(var(--fs-label) * 2.2 + var(--s-4)); font-size: var(--fs-lead); line-height: 1.55; max-width: 38rem; }
  .service__work { grid-column: 8 / span 5; grid-row: 1 / span 2; }
  .service__work-label { line-height: 1; margin-bottom: var(--s-3); }
  /* Ledger margin: a hairline hangs from the clause number to the row's closing rule */
  .service::after {
    content: "";
    position: absolute;
    left: 3px;
    top: calc(var(--s-6) + 2rem);
    bottom: 0;
    width: 1px;
    background: var(--rule-light);
  }
}
.nw { white-space: nowrap; }

/* Expertise */
.expertise__head { row-gap: var(--s-5); }
.expertise__head .label { grid-column: 1 / -1; }
.expertise__title { grid-column: 1 / -1; font-size: var(--fs-h2); max-width: 16ch; }
/* The two areas read as a ruled two-column table: heavy top rule, a header row with the clause numbers, display-scale names */
.expertise__areas {
  margin-top: var(--s-8);
  border-top: 1px solid rgba(244, 240, 231, 0.55);
  border-bottom: 1px solid var(--rule-dark);
}
.area { padding-bottom: var(--s-7); }
.area + .area { border-top: 1px solid rgba(244, 240, 231, 0.55); }
.area__name {
  margin-top: var(--s-6);
  font-size: clamp(2.75rem, 1.4rem + 3.6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.area__text { margin-top: var(--s-5); color: var(--ivory-muted); }
@media (min-width: 768px) { .area__text { max-width: 44ch; text-wrap: balance; } }
.scope-note {
  grid-column: 1 / -1;
  padding: var(--s-1) 0 var(--s-1) var(--s-5);
  border-left: 2px solid var(--copper);
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 30rem;
}
@media (min-width: 768px) {
  .expertise__areas { display: grid; grid-template-columns: 1fr 1fr; }
  .area { padding: 0 var(--s-7) 32px 0; }
  .area + .area { border-top: 0; border-left: 1px solid var(--rule-dark); padding-left: var(--s-7); padding-right: 0; }
  .area__name { margin-top: var(--s-7); }
}
@media (min-width: 900px) {
  .expertise__head { align-items: end; }
  .expertise__title { grid-column: 1 / span 6; }
  .scope-note { grid-column: 7 / span 6; margin-left: calc(var(--gutter) / -2); padding-left: calc(var(--s-7) - 2px); padding-block: 0; margin-bottom: -0.3em; }
}
.area__num {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 14px;
  border-bottom: 1px solid var(--rule-dark);
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--copper);
  font-variant-numeric: tabular-nums;
}
.area__num::before { content: ""; width: 6px; height: 6px; background: var(--copper); flex: none; }
@media (min-width: 768px) {
  .area + .area .area__num { margin-left: calc(var(--s-7) * -1); padding-left: var(--s-7); }
  .area:first-child .area__num { margin-right: calc(var(--s-7) * -1); }
}
.label__num { color: var(--ivory); font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.on-ivory .label__num, .on-ivory-2 .label__num { color: var(--night); }

/* Running folio: one sticky marker per section, in the left margin (CSS only) */
.folio { display: none; }
@media (min-width: 1240px) {
  .has-folio { position: relative; }
  .folio {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 40px);
    height: 3rem;
    margin-bottom: -3rem;
    pointer-events: none;
  }
  .folio span {
    position: absolute;
    left: calc((100vw - min(100vw - 2 * var(--margin), var(--max))) / 4 - 8px);
    top: 0;
    font-variant-numeric: tabular-nums;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--slate-deep);
  }
  .on-night .folio span { color: var(--ivory-muted); }
}

/* Plate mark on the hero render */
.hero__fig {
  position: absolute;
  z-index: 2;
  right: var(--margin);
  bottom: var(--s-5);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory);
}
.hero__fig::before { content: ""; width: 40px; height: 1px; background: rgba(244, 240, 231, 0.5); }
/* Phones and tablets: the mark becomes a caption under the band, on the night ground */
@media (max-width: 899px) {
  .hero__fig {
    position: static;
    width: min(100% - 2 * var(--margin), var(--max));
    margin-inline: auto;
    padding-block: 14px;
    color: var(--ivory-muted);
  }
  .hero__fig::before { width: 28px; background: var(--copper); }
}

/* Process */
.process__grid { row-gap: var(--s-7); }
.process__aside { grid-column: 1 / -1; }
.process__title { margin-top: var(--s-5); font-size: var(--fs-h2); max-width: 15ch; }
.stages { grid-column: 1 / -1; position: relative; counter-reset: stage; }
.stages::before {
  content: "";
  position: absolute;
  left: 15px; top: 14px; bottom: 14px;
  width: 1px;
  background: var(--rule-light);
}
.stage { position: relative; padding: 0 0 var(--s-7) 64px; }
.stage:last-child { padding-bottom: 0; }
.stage__num {
  position: absolute;
  left: 0; top: 2px;
  width: 31px;
  padding-block: 6px;
  background: var(--ivory);
  text-align: center;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--copper-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stage__num::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -3px;
  width: 7px; height: 7px;
  transform: translateX(-50%);
  background: var(--copper);
}
.stage__title { font-size: var(--fs-h3); font-weight: 450; }
.stage__text { margin-top: var(--s-3); max-width: 34rem; }
@media (min-width: 1100px) {
  .process__aside { grid-column: 1 / span 5; }
  .process__sticky { position: sticky; top: calc(var(--header-h) + var(--s-7)); }
  .stages { grid-column: 7 / span 6; padding-top: 6px; }
  .stage { padding-bottom: var(--s-8); }
}

/* About */
.about__grid { row-gap: var(--s-6); }
.about__head { grid-column: 1 / -1; }
.about__title { margin-top: var(--s-5); font-size: var(--fs-h2); max-width: 14ch; }
.about__body { grid-column: 1 / -1; display: grid; gap: var(--s-5); max-width: 36rem; }
.about__lead { font-size: var(--fs-lead); line-height: 1.55; }
.bridge {
  grid-column: 1 / -1;
  margin-top: var(--s-6);
  padding-top: var(--s-6);
  border-top: 1px solid var(--rule-light);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
}
.bridge__term {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 0.9rem + 1.6vw, 2.25rem);
  letter-spacing: -0.015em;
  line-height: 1;
  white-space: nowrap;
}
.bridge__line { flex: 1; position: relative; height: 1px; background: var(--copper); min-width: 32px; }
.bridge__line::before, .bridge__line::after {
  content: ""; position: absolute; top: -3px; width: 7px; height: 7px; background: var(--copper);
}
.bridge__line::before { left: 0; }
.bridge__line::after { right: 0; }
@media (min-width: 900px) {
  .about__head { grid-column: 1 / span 6; }
  .about__body { grid-column: 7 / span 6; padding-top: 44px; }
  .bridge { margin-top: var(--s-8); }
}

/* Contact */
.contact__grid { row-gap: var(--s-7); }
.contact__intro { grid-column: 1 / -1; }
.contact__title { margin-top: var(--s-5); font-size: var(--fs-h2); max-width: 13ch; }
.contact__text { margin-top: var(--s-5); max-width: 30rem; color: var(--ivory-muted); }
.contact__panel {
  grid-column: 1 / -1;
  background: var(--ivory);
  color: var(--night);
  border-radius: var(--radius);
  padding: var(--s-6) var(--s-5);
}
@media (min-width: 768px) { .contact__panel { padding: var(--s-7); } }
@media (min-width: 1100px) {
  .contact__intro { grid-column: 1 / span 5; }
  .contact__panel { grid-column: 7 / span 6; }
}

.form { display: grid; gap: var(--s-5); }
.form__row { display: grid; gap: var(--s-5); }
@media (min-width: 600px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: var(--s-2); align-content: start; }
.field__label { font-size: var(--fs-small); font-weight: 600; line-height: 1.35; }
.field__opt { font-weight: 400; color: var(--slate-deep); }
.field__input {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid var(--slate-deep);
  border-radius: var(--radius);
  background: #fbf9f4;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--night);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field__input:hover { border-color: var(--night); }
.field__input:focus { outline: none; border-color: var(--night); box-shadow: 0 0 0 1px var(--night); }
.field__input:focus-visible { outline: 2px solid var(--night); outline-offset: 2px; }
textarea.field__input { min-height: 160px; resize: vertical; }
select.field__input {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23142436' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.field__input[aria-invalid="true"] { border-color: var(--copper-deep); box-shadow: inset 3px 0 0 var(--copper-deep); }
.field__error {
  display: flex;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--copper-deep);
}
.field__error[hidden] { display: none; }
.field__error::before { content: ""; width: 10px; height: 1px; background: currentColor; margin-top: 0.7em; flex: none; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__footer { display: grid; gap: var(--s-4); padding-top: var(--s-2); }
.form__submit { justify-self: start; min-width: 180px; }
.form__submit[aria-busy="true"] { cursor: progress; opacity: 0.85; }
.form__privacy { font-size: 0.875rem; color: var(--slate-deep); }
.form-status {
  padding: var(--s-4) var(--s-4) var(--s-4) var(--s-5);
  border-left: 2px solid var(--copper-deep);
  background: var(--ivory-2);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.5;
}
.form-status[hidden] { display: none; }
.form-success { display: grid; gap: var(--s-4); justify-items: start; }
.form-success[hidden] { display: none; }
.form-success__title { font-size: var(--fs-h3); }

/* Footer */
.site-footer { background: var(--night); color: var(--ivory); }
.site-footer__top {
  padding-block: var(--s-8) var(--s-7);
  border-top: 1px solid var(--rule-dark);
  row-gap: var(--s-6);
  align-items: start;
}
.site-footer__brand { grid-column: 1 / -1; display: grid; gap: var(--s-2); justify-items: start; }
.site-footer__desc { font-size: var(--fs-small); color: var(--ivory-muted); }
.site-footer__nav { grid-column: 1 / -1; }
.site-footer__links { display: flex; flex-wrap: wrap; column-gap: var(--s-5); }
.site-footer__links a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: var(--fs-small); text-decoration: none; color: var(--ivory);
  text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.site-footer__links a:hover { text-decoration: underline; text-decoration-color: var(--copper); }
.site-footer__cta { grid-column: 1 / -1; }
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  padding-block: var(--s-4) var(--s-5);
  border-top: 1px solid var(--rule-dark);
  font-size: 0.875rem;
  color: var(--ivory-muted);
}
.site-footer__bottom a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ivory-muted); text-underline-offset: 5px; }
.site-footer__bottom a:hover { color: var(--ivory); }
@media (min-width: 900px) {
  .site-footer__brand { grid-column: 1 / span 4; }
  .site-footer__nav { grid-column: 5 / span 6; padding-top: 2px; }
  .site-footer__cta { grid-column: 11 / span 2; justify-self: end; }
}

.about__support { color: var(--slate-deep); }

/* The document spine: one hairline traced from the hero plate edge through § 1 to § 5, ending in the form */
.has-folio { position: relative; }
.has-folio::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: calc(var(--margin) / 2);
  width: 1px;
  background: var(--rule-light);
  pointer-events: none;
}
.on-night.has-folio::before { background: rgba(244, 240, 231, 0.2); }
.contact__panel { position: relative; z-index: 1; }
@media (min-width: 900px) {
  .has-folio::before { left: 50%; }
  /* The spine replaces the duplicate borders it runs through */
  .area + .area { border-left: 0; }
  /* § 3: the stage line is the spine itself; numbers sit on it */
  .process__aside { grid-column: 1 / span 5; }
  .process__sticky { position: sticky; top: calc(var(--header-h) + var(--s-7)); }
  .stages { grid-column: 7 / span 6; margin-left: calc(var(--gutter) / -2); padding-top: 6px; }
  .stages::before { display: none; }
  .stage { padding-left: var(--s-7); padding-bottom: var(--s-8); }
  .stage:last-child { padding-bottom: 0; }
  .stage__num { left: -15px; }
  .on-ivory .stage__num { background: var(--ivory); }
  /* § 4: the body hangs from the spine */
  .about__body { margin-left: calc(var(--gutter) / -2); padding-left: var(--s-7); max-width: none; }
  /* § 5: the panel's edge sits on the spine and the line ends inside the form */
  .contact__intro { grid-column: 1 / span 5; }
  .contact__panel { grid-column: 7 / span 6; margin-left: calc(var(--gutter) / -2); border-radius: 0; padding: var(--s-6); }
  .contact.has-folio::before { bottom: var(--section-y); }
}
@media (min-width: 1100px) { .contact__panel { padding: var(--s-7); } }
/* Two-up fields only where the panel is wide enough */
@media (min-width: 900px) and (max-width: 1279px) { .form__row--2 { grid-template-columns: 1fr; } }
/* Optional fields share a baseline even when a label wraps */
.form__row--2:has(#f-topic) { align-items: end; }

/* The spine ends inside the form on every viewport */
.contact.has-folio::before { bottom: var(--section-y); }

/* Phones and small tablets: the clause markers and the panel edge sit on the margin spine */
@media (max-width: 899px) {
  .stages::before { display: none; }
  .stage { padding-left: 0; }
  .stage__num {
    position: static;
    display: block;
    width: auto;
    padding: 0;
    margin-bottom: var(--s-2);
    background: none;
    text-align: left;
  }
  .stage__num::after {
    left: calc(var(--margin) / -2);
    top: 0.35em;
    bottom: auto;
  }
  .contact__panel { margin-left: calc(var(--margin) / -2); border-radius: 0; }
}

@media (min-width: 900px) {
  /* § 4: the bridge crosses the spine at a marked node */
  .bridge { position: relative; }
  .bridge::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(var(--s-6) + (100% - var(--s-6)) / 2);
    width: 9px; height: 9px;
    transform: translate(-50%, -50%);
    background: var(--copper);
    box-shadow: 0 0 0 3px var(--ivory-2);
  }
  /* § 5: the intro stays beside the form while it is filled */
  .contact__intro { position: sticky; top: calc(var(--header-h) + var(--s-7)); align-self: start; }
}

/* Where the running folio is shown, the eyebrow drops its duplicate clause number */
@media (min-width: 1240px) { .has-folio .label__num { display: none; } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
