:root {
  --navy: #1f3857;
  --navy-deep: #162a43;
  --paper: #fcfbf8;
  --paper-shade: #f4f3ee;
  --figure: #ffffff;
  --ink: #2b2b2b;
  --muted: #5e6873;
  --brass: #8c6934;
  --brass-light: #d2b784;
  --success: #3f6b4f;
  --rule: rgba(31, 56, 87, 0.28);
  --rule-strong: rgba(31, 56, 87, 0.62);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --page: min(calc(100% - 48px), 1480px);
  --content: min(calc(100% - 48px), 1320px);
  --header-height: 88px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

p:last-child {
  margin-bottom: 0;
}

::selection {
  background: rgba(140, 105, 52, 0.22);
  color: var(--navy-deep);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--navy);
  color: var(--paper);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 180ms ease-out;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--navy);
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  background: var(--paper);
}

.header-inner {
  width: var(--page);
  min-height: var(--header-height);
  margin-inline: auto;
  border-bottom: 1px solid var(--navy);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(24px, 4vw, 68px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: clamp(142px, 13vw, 180px);
  min-height: 48px;
}

.brand img {
  width: 100%;
  height: auto;
}

.primary-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 52px);
}

.primary-nav a,
.footer-meta a {
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  transition: color 180ms ease-out, text-decoration-color 180ms ease-out;
}

.primary-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.footer-meta a:hover,
.footer-meta a:focus-visible {
  color: var(--navy);
  text-decoration-color: currentColor;
}

.button {
  min-height: 56px;
  width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--navy);
  border-radius: 0;
  padding: 14px 24px;
  background: var(--navy);
  color: var(--paper);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 180ms ease-out, color 180ms ease-out;
}

.button:hover,
.button:focus-visible {
  background: transparent;
  color: var(--navy);
}

.button--compact {
  min-height: 46px;
  padding: 11px 20px;
  font-size: 15px;
  white-space: nowrap;
}

.button--light {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--navy-deep);
}

.button--light:hover,
.button--light:focus-visible {
  background: transparent;
  color: var(--paper);
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--navy);
  isolation: isolate;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: var(--content);
  min-height: calc(100svh - var(--header-height));
  margin-inline: auto;
  padding-block: clamp(72px, 9vw, 130px);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(360px, 5fr);
  align-items: center;
  gap: clamp(54px, 8vw, 132px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker,
.workflow-title,
.step-number,
.method-sequence span {
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: clamp(28px, 4vw, 46px);
}

h1,
h2,
h3 {
  color: var(--navy);
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: clamp(26px, 3vw, 40px);
  font-size: clamp(53px, 5.35vw, 88px);
  line-height: 1.06;
}

.hero-deck {
  max-width: 590px;
  margin-bottom: 32px;
  color: #39414a;
  font-size: clamp(19px, 1.5vw, 23px);
  line-height: 1.52;
  text-wrap: pretty;
}

@media (min-width: 901px) {
  .hero::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    background:
      linear-gradient(
        90deg,
        var(--paper) 0%,
        var(--paper) 36%,
        rgba(252, 251, 248, 0.96) 45%,
        rgba(252, 251, 248, 0.72) 54%,
        rgba(252, 251, 248, 0.24) 66%,
        rgba(252, 251, 248, 0) 76%
      ),
      url("assets/hero-helm-engraving.webp") right center / auto 100% no-repeat;
    opacity: 0.9;
    pointer-events: none;
  }
}

.section {
  width: var(--content);
  margin-inline: auto;
  padding-block: clamp(104px, 10vw, 160px);
}

.section-heading {
  border-top: 1px solid var(--navy);
  padding-top: 24px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 24px;
}

.folio {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 31px;
  line-height: 1;
}

.folio::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 13px;
  background: var(--brass);
}

.section-kicker {
  margin-bottom: 10px;
}

.section-heading h2 {
  max-width: 950px;
  margin-bottom: 0;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.08;
}

.section-deck {
  max-width: 790px;
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.5;
  text-wrap: pretty;
}

.scrolly {
  padding-bottom: clamp(64px, 7vw, 108px);
}

.scrolly-grid {
  margin-top: clamp(36px, 4vw, 56px);
}

/*
 * Pinned mode, added by script only when the story can actually run. The copy
 * and the chart are one unit: both stay put and change together on scroll.
 * Without the class this is an ordinary stacked list, which is what mobile,
 * reduced motion, and no-JS all get.
 */
.scrolly-grid.is-pinned {
  height: 240svh;
}

.is-pinned .scrolly-stage {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  min-height: calc(100svh - var(--header-height) - 40px);
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: clamp(10px, 1.5vh, 24px);
}

.is-pinned .workflow {
  order: -1;
}

/* A second hairline gives the data figure a clear editorial frame. */
.workflow {
  margin: 0;
  border: 1px solid var(--rule-strong);
  outline: 1px solid var(--rule);
  outline-offset: 3px;
  background: var(--figure);
}

.workflow figcaption {
  border-bottom: 1px solid var(--rule);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.workflow-title {
  white-space: nowrap;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.14em;
}

.workflow-legend {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
}

.workflow-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.legend-key {
  width: 24px;
  border-top: 2px solid var(--brass);
}

.workflow svg {
  width: 100%;
  height: auto;
  padding: 26px 32px 30px;
}

/* Keeps the whole unit inside the viewport on short screens. */
.is-pinned .workflow svg {
  max-height: calc(100svh - var(--header-height) - 330px);
}

.diagram-stage {
  opacity: 0;
  transition: opacity 420ms ease-out;
}

.diagram-stage.is-visible {
  opacity: 1;
}

.day,
.tick,
.tick-halo,
.system,
.stem,
.drop,
.callout {
  vector-effect: non-scaling-stroke;
}

/* The only object the reader follows. One path, all three states. */
.day {
  fill: none;
  stroke: var(--brass);
  stroke-width: 3.5;
}

/* The halo cuts the brass line so each claim on the day reads as a real break. */
.tick-halo {
  fill: none;
  stroke: var(--figure);
  stroke-width: 7;
}

.tick {
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.5;
}

/*
 * Each tick carries its own --dx/--dy to a slot on the system track, and --i
 * staggers the movement left to right. States 0 and 2 share those positions,
 * so entering 01.2 from either direction uses the same wave. The two marked
 * --dx:0 stay on the day: the things that still need a person.
 */
.tick {
  transition: transform 900ms ease-in-out;
  transition-delay: calc(var(--i, 0) * 9ms);
}

.workflow[data-state="0"] .tick,
.workflow[data-state="2"] .tick {
  transform: translate(calc(var(--dx, 0) * 1px), calc(var(--dy, 0) * 1px));
}

.workflow[data-state="2"] .success-tick {
  stroke: var(--success);
}

.stem,
.drop {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.system {
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.75;
}

.arrow-head {
  fill: var(--navy);
}

.stamp-mark {
  fill: var(--navy);
}

/* Annotations follow the chart rather than decorating it: small spaced caps
 * for the heading, italic serif marginalia for labels. */
.diagram-note,
.node-label {
  fill: var(--navy);
  font-family: var(--serif);
}

/*
 * Font sizes are viewBox units, so they scale with the panel width. These are
 * tuned for the full-bleed panel (~1.8x); the breakpoints below retune them.
 */
.diagram-note {
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.node-label {
  fill: var(--muted);
  font-size: 9px;
  font-style: italic;
}

.story-steps {
  max-width: 720px;
  margin: clamp(36px, 4vw, 64px) auto 0;
}

.story-step {
  border-top: 1px solid var(--rule);
  padding-block: 42px;
}

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

/* Pinned: every step occupies the same cell, so the copy swaps without reflow. */
.is-pinned .story-steps {
  display: grid;
  width: 100%;
  max-width: 760px;
  /* Shares the chart's left edge so the two read as one block. */
  margin: 0;
}

.is-pinned .story-step {
  grid-area: 1 / 1;
  border: 0;
  padding-block: 0;
  opacity: 0;
  transition: opacity 400ms ease-out;
}

.is-pinned .story-step.is-active {
  opacity: 1;
}

.step-number {
  margin-bottom: 18px;
  color: var(--brass);
}

.is-pinned .step-number {
  margin-bottom: 10px;
}

.story-step h3 {
  max-width: 500px;
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: clamp(31px, 3.1vw, 45px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.13;
}

.story-step > p:last-child {
  max-width: 470px;
  color: var(--muted);
  font-size: 18px;
  text-wrap: pretty;
}

.method {
  border-top: 1px solid transparent;
}

.method-intro {
  margin-top: clamp(64px, 8vw, 112px);
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
  gap: clamp(52px, 8vw, 132px);
  align-items: end;
}

.method-statement {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(35px, 4.25vw, 60px);
  letter-spacing: -0.032em;
  line-height: 1.14;
  text-wrap: balance;
}

.method-intro > p:last-child {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 19px;
  text-wrap: pretty;
}

.method-sequence {
  margin: clamp(76px, 9vw, 126px) 0 0;
  border-top: 1px solid var(--navy);
  border-bottom: 1px solid var(--navy);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}

.method-sequence li {
  min-height: 310px;
  padding: 30px clamp(22px, 2.6vw, 38px) 34px;
}

.method-sequence li + li {
  border-left: 1px solid var(--rule);
}

.method-sequence span {
  display: block;
  margin-bottom: 56px;
  color: var(--brass);
}

.method-sequence h3 {
  min-height: 58px;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.method-sequence p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  text-wrap: pretty;
}

.about {
  padding-top: clamp(76px, 8vw, 124px);
}

.about-grid {
  margin-top: clamp(68px, 8vw, 118px);
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(58px, 9vw, 150px);
  align-items: start;
}

.about-portrait {
  width: 100%;
  max-width: 430px;
  margin: 0;
}

.about-portrait img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule-strong);
  background: var(--paper-shade);
}

.about-portrait figcaption {
  margin-top: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.portrait-credit {
  display: grid;
  gap: 2px;
}

.portrait-credit strong {
  color: var(--navy);
  font-weight: 600;
}

.about-portrait figcaption > span:last-child {
  text-align: right;
}

.about-copy > p:first-child {
  max-width: 790px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(29px, 3.35vw, 48px);
  letter-spacing: -0.028em;
  line-height: 1.2;
  text-wrap: pretty;
}

.about-note {
  max-width: 620px;
  margin-top: clamp(36px, 5vw, 64px);
  border-top: 1px solid var(--rule-strong);
  padding-top: 20px;
  color: var(--muted);
  font-size: 18px;
  text-wrap: pretty;
}

.closing {
  margin-top: clamp(48px, 7vw, 100px);
  background: var(--navy-deep);
  color: var(--paper);
}

.closing-inner {
  width: var(--content);
  margin-inline: auto;
  padding-block: clamp(80px, 9vw, 132px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(60px, 10vw, 170px);
  align-items: end;
}

.closing .section-kicker {
  color: var(--brass-light);
}

.closing h2 {
  max-width: 850px;
  margin: 0;
  color: var(--paper);
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.08;
}

.closing-action p {
  max-width: 430px;
  margin-bottom: 30px;
  color: rgba(252, 251, 248, 0.78);
  font-size: 18px;
}

.site-footer {
  background: var(--paper);
}

.footer-inner {
  width: var(--content);
  min-height: 144px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  width: 18px;
  height: 18px;
}

.footer-brand p,
.footer-meta p,
.footer-meta a {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 28px;
}

.footer-meta a {
  padding-block: 4px;
}

@media (max-width: 1120px) {
  :root {
    --header-height: 78px;
  }

  .primary-nav {
    gap: 22px;
  }

  .header-inner {
    gap: 22px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    gap: 54px;
  }

  .diagram-note {
    font-size: 9.5px;
  }

  .node-label {
    font-size: 11px;
  }

}

@media (max-width: 900px) {
  :root {
    --page: min(calc(100% - 32px), 760px);
    --content: min(calc(100% - 40px), 760px);
    --header-height: 72px;
  }

  .primary-nav {
    display: none;
  }

  .header-inner {
    grid-template-columns: auto 1fr;
  }

  .header-inner > .button {
    justify-self: end;
  }

  .brand {
    width: 136px;
  }

  .hero-inner {
    min-height: 0;
    padding-block: 72px 90px;
    grid-template-columns: 1fr;
    gap: 66px;
  }

  .hero-copy {
    max-width: 700px;
  }

  /* Below this width the day line cannot hold its fidelity. */
  .workflow {
    display: none;
  }

  .scrolly-grid {
    margin-top: 8px;
  }

  .story-steps {
    margin-top: 0;
  }

  .story-step {
    padding-block: 52px;
  }

  .method-intro,
  .about-grid,
  .closing-inner {
    grid-template-columns: 1fr;
  }

  .method-intro,
  .about-grid,
  .closing-inner {
    gap: 48px;
  }

  .method-intro > p:last-child {
    max-width: 580px;
  }

  .method-sequence {
    grid-template-columns: 1fr;
  }

  .method-sequence li {
    min-height: 0;
    padding: 30px 4px 36px;
  }

  .method-sequence li + li {
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

  .method-sequence span {
    margin-bottom: 30px;
  }

  .method-sequence h3 {
    min-height: 0;
  }

  .footer-inner {
    min-height: 180px;
    padding-block: 38px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
  }

  .footer-meta {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px 24px;
  }
}

@media (max-width: 620px) {
  :root {
    --content: min(calc(100% - 32px), 560px);
  }

  body {
    font-size: 17px;
  }

  .header-inner > .button {
    min-width: 44px;
    width: 48px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
    white-space: nowrap;
  }

  .header-inner > .button::after {
    content: "Book";
    color: var(--paper);
    font-size: 13px;
  }

  .header-inner > .button:hover::after,
  .header-inner > .button:focus-visible::after {
    color: var(--navy);
  }

  .hero-inner {
    padding-block: 56px 72px;
  }

  .eyebrow {
    margin-bottom: 26px;
    font-size: 13px;
  }

  h1 {
    font-size: clamp(44px, 13vw, 64px);
  }

  .hero-deck {
    font-size: 19px;
  }

  .hero-copy > .button,
  .closing-action .button {
    width: 100%;
  }

  .section {
    padding-block: 78px;
  }

  .section-heading {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding-top: 18px;
  }

  .folio {
    font-size: 25px;
  }

  .section-heading h2,
  .closing h2 {
    font-size: clamp(37px, 11vw, 50px);
  }

  .story-step h3 {
    font-size: 34px;
  }

  .footer-brand {
    align-items: flex-start;
  }

  .footer-meta {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
