/* finesse · register=brand · A=paper-proof+ochre-notes · B=typewriter-ledger+handwritten-margin · C=working-draft+project-entries · D=css-paper-texture+proof-lines · E=controlled-offsets+quiet-motion · SOUL=8 SPECTACLE=4 DENSITY=5 */
:root {
  --paper: #FAFAF8;
  --graphite: #1A1A1A;
  --ink-gray: #4A4A4A;
  --ochre: #C4A77D;
  --paper-soft: rgba(250, 250, 248, 0.78);
  --paper-faint: rgba(250, 250, 248, 0.62);
  --line-ink: rgba(26, 26, 26, 0.22);
  --line-strong: rgba(26, 26, 26, 0.58);
  --line-light: rgba(250, 250, 248, 0.28);
  --ochre-wash: rgba(196, 167, 125, 0.22);
  --shadow-ink: rgba(26, 26, 26, 0.16);
  --font-mono: "Special Elite", "Courier New", ui-monospace, monospace;
  --font-note: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --font-serif: "FangSong", "STFangsong", "SimSun", "STSong", serif;
  --font-display: "KaiTi", "STKaiti", "FangSong", serif;
  --text-size: 16px;
  --text-leading: 1.7;
  --display-leading: 1.08;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 5rem;
  --space-8: 7rem;
  --page-pad: clamp(20px, 5vw, 72px);
  --content-width: 1160px;
  --narrow-width: 900px;
  --radius-sm: 2px;
}

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

html {
  overflow-x: clip;
  scroll-behavior: auto;
}

body {
  position: relative;
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-serif);
  font-size: var(--text-size);
  line-height: var(--text-leading);
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.34;
  background-image:
    repeating-linear-gradient(0deg, transparent 0, transparent 5px, var(--line-ink) 5px, transparent 6px),
    repeating-linear-gradient(90deg, transparent 0, transparent 11px, var(--line-ink) 11px, transparent 12px);
  background-size: 100% 17px, 23px 100%;
}

main,
header,
footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a,
button {
  min-height: 44px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--graphite);
  outline-offset: 4px;
}

.hero a:focus-visible {
  outline-color: var(--graphite);
}

.site-footer a:focus-visible {
  outline-color: var(--paper);
}

button {
  font: inherit;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  overflow-wrap: anywhere;
  line-height: var(--display-leading);
}

h1,
h2,
h3,
p,
li {
  max-width: 70ch;
}

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

.page-shell {
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.narrow-shell {
  width: min(100%, var(--narrow-width));
}

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

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border: 1px solid var(--graphite);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--graphite);
  transform: translateY(-180%);
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 72px;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--line-strong);
}

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

.header-inner-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--graphite);
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark[aria-current="page"],
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--ochre);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.36em;
}

.site-nav,
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem 1rem;
}

.site-nav a,
.footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  font-family: var(--font-mono);
  font-size: 0.94rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.footer-nav a:hover,
.inline-link:hover,
.text-action:hover {
  text-decoration: underline;
  text-decoration-color: var(--ochre);
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--paper);
  color: var(--graphite);
  border-bottom: 1px solid var(--line-strong);
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent 18px, var(--ochre-wash) 18px, transparent 19px);
  opacity: 0.3;
}

.hero .page-shell {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px);
  padding-block: clamp(3rem, 8vh, 7rem) clamp(3rem, 7vh, 6rem);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: var(--space-3);
  color: var(--graphite);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 2.3rem;
  height: 2px;
  background: var(--ochre);
  content: "";
}

.eyebrow-dark {
  color: var(--graphite);
}

.hero h1 {
  max-width: 9ch;
  margin-bottom: var(--space-4);
  font-size: clamp(3.25rem, 8.5vw, 7.5rem);
  letter-spacing: -0.045em;
}

.hero-intro {
  max-width: 34rem;
  margin-bottom: 0;
  color: var(--ink-gray);
  font-size: 1.12rem;
}

.delivery-route {
  position: relative;
  min-height: 320px;
  margin-top: var(--space-6);
  padding: 1rem;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper-soft);
  box-shadow: 2px 2px 0 var(--shadow-ink);
}

.route-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.route-svg-mobile {
  display: none;
}

.route-path {
  fill: none;
  stroke: var(--ochre);
  stroke-linecap: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.route-dot {
  fill: var(--paper);
  stroke: var(--graphite);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.route-dot-e {
  fill: var(--ochre);
}

.route-list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  min-height: 290px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding-inline: 0.2rem;
}

.route-item strong {
  color: var(--graphite);
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.route-stage {
  color: var(--ink-gray);
  font-family: var(--font-note);
  font-size: 1.05rem;
}

.route-item-a { margin-top: 0.2rem; }
.route-item-b { margin-top: 2.2rem; }
.route-item-c { margin-top: 5.7rem; }
.route-item-d { margin-top: 10rem; }
.route-item-e { margin-top: 14rem; }

.hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: var(--space-6);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12.5rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--graphite);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.button-light {
  background: var(--graphite);
  color: var(--paper);
  box-shadow: 2px 2px 0 var(--ochre);
}

.button-outline {
  background: transparent;
  color: var(--graphite);
}

.button:hover {
  transform: translate(2px, 2px);
}

.action-note {
  flex-basis: 100%;
  margin: 0.25rem 0 0;
  color: var(--ink-gray);
  font-size: 0.94rem;
}

.content-section {
  position: relative;
  padding-block: clamp(4.25rem, 9vw, 8rem);
  background: var(--paper);
  border-bottom: 1px solid var(--line-ink);
}

.alt-section {
  background: var(--paper);
}

.section-heading {
  position: relative;
  min-width: 0;
}

.section-heading::before {
  display: block;
  width: 2.3rem;
  height: 2px;
  margin-bottom: 0.85rem;
  background: var(--ochre);
  content: "";
}

.section-heading h2 {
  max-width: 18ch;
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.25rem);
  letter-spacing: -0.045em;
}

.section-heading-split {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.section-note {
  align-self: end;
  max-width: 24rem;
  margin-bottom: 0;
  color: var(--ink-gray);
}

.workflow-section .section-heading {
  margin-bottom: var(--space-6);
}

.workflow-ledger {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.workflow-ledger li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--line-strong);
}

.workflow-ledger li:nth-child(2) {
  padding-left: clamp(0px, 4vw, 48px);
}

.workflow-ledger li:nth-child(3) {
  padding-left: clamp(0px, 8vw, 96px);
}

.ledger-index,
.project-number {
  align-self: start;
  color: var(--graphite);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
}

.ledger-index::after,
.project-number::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin-top: 0.35rem;
  background: var(--ochre);
  content: "";
}

.workflow-ledger h3,
.project-row h3 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  letter-spacing: -0.035em;
}

.workflow-ledger p,
.project-row p {
  margin-bottom: 0;
  color: var(--ink-gray);
}

.tools-section {
  background: var(--paper);
}

.project-rows {
  display: grid;
  gap: var(--space-4);
}

.project-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) minmax(11rem, auto);
  align-items: end;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-5) 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.project-row + .project-row {
  border-top: 0;
}

.project-row-short {
  margin-left: clamp(0px, 7vw, 96px);
}

.project-domain {
  margin-bottom: 0.45rem !important;
  color: var(--graphite) !important;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.text-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-height: 44px;
  color: var(--graphite);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-color: var(--ochre);
}

.text-action:hover {
  transform: translate(2px, -1px);
}

.operator-section {
  background: var(--paper);
}

.operator-grid {
  display: grid;
  gap: var(--space-5);
}

.operator-copy {
  max-width: 45rem;
}

.operator-copy > p {
  margin-bottom: var(--space-4);
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  letter-spacing: -0.025em;
}

.operator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

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

.footer-grid {
  display: grid;
  gap: var(--space-5);
  padding-block: clamp(2.75rem, 6vw, 4.75rem);
}

.footer-brand p,
.footer-compliance p {
  margin: 0.5rem 0 0;
  color: var(--paper-soft);
  font-size: 0.92rem;
}

.footer-brand .brand-mark {
  color: var(--paper);
}

.footer-nav {
  justify-content: flex-start;
}

.footer-compliance {
  display: grid;
  gap: 0.35rem;
}

.footer-compliance a {
  width: fit-content;
  min-height: 44px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.inner-hero {
  padding-block: clamp(4.5rem, 11vw, 9rem) clamp(4rem, 8vw, 7rem);
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
}

.inner-hero-grid {
  display: grid;
  gap: var(--space-3);
}

.inner-hero h1 {
  max-width: 14ch;
  margin-bottom: 0;
  font-size: clamp(3rem, 8vw, 6.5rem);
  letter-spacing: -0.045em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.inner-lede {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--ink-gray);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
}

.developer-work {
  padding-top: clamp(4.25rem, 9vw, 8rem);
}

.developer-projects {
  margin-top: var(--space-6);
}

.plain-section,
.fact-section,
.legal-section {
  border-top: 1px solid var(--line-ink);
}

.two-column-copy,
.fact-grid,
.legal-layout {
  display: grid;
  gap: var(--space-5);
}

.manual-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.manual-list li {
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--line-strong);
}

.prose-copy {
  max-width: 48rem;
}

.prose-copy p:last-child {
  margin-bottom: 0;
}

.prose-copy-wide {
  max-width: 55rem;
}

.fact-lede {
  align-self: end;
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  letter-spacing: -0.025em;
}

.fact-links,
.legal-links {
  display: grid;
  gap: 0.5rem;
  align-content: end;
}

.fact-links a {
  width: fit-content;
  color: var(--graphite);
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

.fact-links a,
.inline-link,
.footer-compliance a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.inline-link {
  color: var(--graphite);
  font-family: var(--font-mono);
  font-weight: 700;
}

.last-updated {
  color: var(--ink-gray);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .button:hover,
  .text-action:hover {
    transform: none;
  }
}

@media (max-width: 639px) {
  .site-header,
  .header-inner-shell {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
    padding-block: 0.75rem;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.1rem 0.35rem;
  }

  .site-nav a {
    padding-inline: 0.35rem;
    font-size: 0.875rem;
  }

  .hero-grid {
    min-height: calc(100vh - 122px);
    min-height: calc(100svh - 122px);
    padding-block: 3.5rem 3.25rem;
  }

  .hero h1 {
    max-width: 8ch;
    font-size: clamp(3.25rem, 15vw, 5rem);
  }

  .delivery-route {
    min-height: 350px;
    margin-top: var(--space-5);
  }

  .route-svg-desktop {
    display: none;
  }

  .route-svg-mobile {
    display: block;
    width: 120px;
    height: 350px;
    inset: 0 auto auto 0;
  }

  .route-list {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    min-height: 350px;
    padding-left: 3.25rem;
  }

  .route-item,
  .route-item-a,
  .route-item-b,
  .route-item-c,
  .route-item-d,
  .route-item-e {
    flex-direction: row;
    align-items: baseline;
    gap: 0.8rem;
    margin-top: 0;
    padding: 0.25rem 0;
  }

  .route-item-b { margin-left: 1.5rem; }
  .route-item-c { margin-left: 0.25rem; }
  .route-item-d { margin-left: 1.5rem; }
  .route-item-e { margin-left: 0.25rem; }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
  }

  .action-note {
    flex-basis: auto;
  }

  .workflow-ledger li,
  .workflow-ledger li:nth-child(2),
  .workflow-ledger li:nth-child(3) {
    grid-template-columns: 2.75rem minmax(0, 1fr);
    padding-left: 0;
  }

  .section-heading-split,
  .operator-grid,
  .two-column-copy,
  .fact-grid,
  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-row,
  .project-row-short {
    grid-template-columns: 2.75rem minmax(0, 1fr);
    margin-left: 0;
    padding-block: var(--space-4);
  }

  .project-row .text-action {
    grid-column: 2;
    justify-content: flex-start;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-nav {
    justify-content: flex-start;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
    column-gap: clamp(1.5rem, 4vw, 4rem);
  }

  .hero-copy {
    grid-column: 1 / -1;
  }

  .delivery-route {
    grid-column: 1 / -1;
    min-height: 260px;
  }

  .route-list {
    min-height: 230px;
  }

  .route-item-b { margin-top: 1.6rem; }
  .route-item-c { margin-top: 4.2rem; }
  .route-item-d { margin-top: 7.2rem; }
  .route-item-e { margin-top: 10.25rem; }

  .hero-actions {
    grid-column: 1 / -1;
  }

  .project-row,
  .project-row-short {
    grid-template-columns: 3rem minmax(0, 1fr) minmax(10rem, auto);
    margin-left: 0;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-compliance {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    grid-template-rows: auto auto;
    column-gap: clamp(2rem, 5vw, 6rem);
  }

  .hero-copy {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .hero h1 {
    max-width: none;
  }

  .delivery-route {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin-top: 0;
  }

  .hero-actions {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    margin-top: 0;
  }

  .section-heading-split,
  .operator-grid,
  .two-column-copy,
  .fact-grid,
  .legal-layout {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
  }

  .operator-grid {
    align-items: end;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.7fr) minmax(0, 1fr);
    align-items: start;
  }
}
