@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("fonts/Inter-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f3f0e7;
  --ink: #232923;
  --body: #43493f;
  --muted: #555b4e;
  --rule: #bcbcad;
  --russet: #893d28;
  --dark: #202a25;
  --dark-rule: #506056;
  --light: #f4efe3;
  --light-muted: #cbd2c6;
  --accent: #eec38b;
  --serif: "EB Garamond", Georgia, serif;
  --gutter: clamp(1.125rem, 4.5vw, 4.9rem);
  --section-spacing: clamp(3.5rem, 7vw, 7.25rem);
  --shift: cubic-bezier(.2, .6, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font: 400 1rem/1.58 Inter, system-ui, sans-serif; }
body, h1, h2, h3, p, figure, dl, dd { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
h2 { font-size: clamp(2.75rem, 4.6vw, 4.9rem); line-height: .95; letter-spacing: -.045em; text-wrap: balance; }
h3 { font-size: clamp(2rem, 3.1vw, 3rem); line-height: 1; letter-spacing: -.035em; }
:focus-visible { outline: 2px solid var(--russet); outline-offset: 4px; }
[id] { scroll-margin-block-start: 1.1rem; }
.wrap { width: min(100%, 97rem); padding-inline: var(--gutter); margin-inline: auto; }

.skip-link { position: fixed; z-index: 10; inset: .75rem auto auto 1rem; transform: translateY(-180%); padding: .75rem 1rem; background: var(--ink); color: var(--light); }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 4.625rem; display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; min-height: 2.75rem; }
.brand img { width: clamp(8.7rem, 15vw, 12.15rem); }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(1rem, 3vw, 2.7rem); }
nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .875rem; font-weight: 600; text-decoration: none; }
nav a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; }
.nav-docs { color: var(--russet); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .73fr) minmax(0, 1.25fr);
  gap: clamp(2.25rem, 4.15vw, 4.4rem);
  align-items: center;
  padding-block: clamp(3.1rem, 5.5vw, 5.45rem) clamp(3.4rem, 6vw, 6.3rem);
}
.hero-copy { padding-bottom: 1.15rem; }
.product-kicker, .section-label { color: var(--russet); font-size: .875rem; line-height: 1.32; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.product-kicker { display: flex; align-items: center; gap: .72rem; margin-bottom: 1.15rem; }
.product-kicker span + span { border-left: 1px solid var(--rule); padding-left: .72rem; color: var(--muted); }
.hero h1 { margin-bottom: 1.15rem; font-size: clamp(3.25rem, 6.15vw, 6.35rem); line-height: .88; letter-spacing: -.058em; }
.hero h1 span { display: block; }
.hero-description { max-width: 38ch; color: var(--body); font-size: clamp(1rem, 1.3vw, 1.19rem); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem 1.2rem; margin-top: 1.65rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .7rem 1.05rem; border: 1px solid transparent; font-size: .875rem; font-weight: 600; line-height: 1.2; text-decoration: none; transition: background-color .2s var(--shift), color .2s var(--shift); }
.primary { background: var(--ink); color: var(--light); }
.primary:hover { background: var(--russet); }
.text-link { display: inline-block; color: var(--russet); font-size: .9375rem; font-weight: 600; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }
.hero-spec { display: flex; flex-wrap: wrap; width: fit-content; gap: .55rem; align-items: center; margin-top: 1.75rem; color: var(--muted); font-size: .875rem; text-decoration: none; }
.hero-spec:hover { text-decoration: underline; text-underline-offset: .25em; }
.hero-spec span { color: var(--russet); }

.atlas { min-width: 0; border: 1px solid #26352d; background: var(--dark); color: var(--light); box-shadow: 0 1.15rem 2.8rem #282b1f18; }
.atlas :focus-visible, .rendering :focus-visible { outline-color: var(--accent); }
.atlas-bar { min-height: 3.35rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .3rem .85rem; padding: .25rem .8rem .25rem 1.05rem; }
.atlas-bar h2 { font: 600 .875rem/1.2 Inter, system-ui, sans-serif; letter-spacing: 0; }
.atlas-modes { display: flex; flex-wrap: wrap; gap: .2rem; }
.atlas-mode { display: inline-flex; min-height: 2.75rem; align-items: center; padding-inline: clamp(.38rem, 1vw, .82rem); color: var(--light-muted); font-size: .875rem; font-weight: 600; text-decoration: none; transition: background-color .2s, color .2s; }
.atlas-mode:hover { background: #3b4840; color: var(--light); }
.atlas-mode[aria-pressed="true"] { background: var(--accent); color: var(--dark); }
.atlas-stage { position: relative; background: #40514b; }
.atlas-stage img { width: 100%; }
.atlas-frame figcaption { padding: .65rem 1rem; }
.atlas-footer, .atlas-notes #atlas-pan-help { display: none; }
.atlas-notes { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem; padding: .45rem .9rem .65rem; color: var(--light-muted); font-size: .8125rem; }
.atlas-enhanced .atlas-stage { overflow: hidden; aspect-ratio: 16 / 9; }
.atlas-enhanced .atlas-image { position: absolute; inset: 0; transform: translate(var(--map-x, 0px), var(--map-y, 0px)) scale(var(--map-scale, 1)); transition: transform .32s var(--shift); }
.atlas-enhanced .atlas-frame { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .34s var(--shift), visibility .34s; }
.atlas-enhanced .atlas-frame.is-active { opacity: 1; visibility: visible; }
.atlas-enhanced .atlas-frame img { height: 100%; object-fit: cover; }
.atlas-enhanced .atlas-frame figcaption { display: none; }
.atlas-stage.is-zoomed { cursor: grab; touch-action: none; }
.atlas-stage.is-panning { cursor: grabbing; user-select: none; }
.atlas-stage.is-panning .atlas-image { transition: none; }
.atlas-stage:focus-visible { outline-offset: -4px; z-index: 1; }
.atlas-enhanced .atlas-footer { display: flex; align-items: center; justify-content: space-between; gap: .65rem 1.1rem; padding: .65rem .7rem .3rem .95rem; }
.atlas-caption { color: var(--light-muted); font-size: .875rem; line-height: 1.4; }
.atlas-caption strong { display: block; margin-bottom: .15rem; color: var(--light); font-weight: 600; }
.atlas-zoom { display: flex; align-items: stretch; flex-shrink: 0; }
.atlas-zoom button { padding: 0; width: 2.65rem; min-height: 2.75rem; border: 1px solid var(--dark-rule); background: none; color: var(--light); font-size: 1.15rem; transition: background-color .18s, color .18s; }
.atlas-zoom button + button { border-left: 0; }
.atlas-zoom button[data-zoom="reset"] { width: 3.65rem; font-size: .875rem; font-variant-numeric: tabular-nums; }
.atlas-zoom button:hover { background: #3b4840; }
.atlas-zoom button[aria-disabled="true"] { color: #a8b3a8; cursor: default; background: none; }
.atlas-zoom button:focus-visible { position: relative; z-index: 1; outline-offset: -2px; }
.atlas-enhanced .atlas-notes #atlas-pan-help { display: block; }

.rendering { background: var(--dark); color: var(--light); }
.rendering-inner { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.24fr); align-items: center; gap: clamp(2rem, 5vw, 5.2rem); padding-block: var(--section-spacing); }
.section-label { margin-bottom: .85rem; }
.rendering .section-label, .rendering .text-link { color: var(--accent); }
.rendering-copy > p:not(.section-label), .showcase-copy > p:not(.section-label), .requirements-intro > p { max-width: 36ch; margin: 1.15rem 0; }
.rendering-copy > p:not(.section-label) { color: var(--light-muted); }
.rendering h2 { text-wrap: initial; }
.map-compare { min-width: 0; --compare-reveal: 55%; }
.compare-stage { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #384637; border: 1px solid #658072; }
.compare-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-paper { clip-path: inset(0 calc(100% - var(--compare-reveal)) 0 0); }
.compare-marker { position: absolute; inset: 0 auto 0 var(--compare-reveal); width: 2px; transform: translateX(-50%); background: var(--light); box-shadow: 0 0 0 1px #242a2366; pointer-events: none; }
.compare-marker::after { position: absolute; inset: 50% auto auto 50%; content: ""; width: 1.1rem; height: 1.1rem; border: 2px solid var(--light); border-radius: 50%; transform: translate(-50%, -50%); background: var(--dark); }
.compare-footer { margin-top: .65rem; color: var(--light-muted); font-size: .875rem; }
.compare-controls { display: none; }
.compare-enhanced .compare-controls { display: grid; grid-template-columns: auto minmax(6rem, 1fr) auto max-content; align-items: center; gap: .65rem; margin-top: .4rem; color: var(--light); }
.compare-controls input { width: 100%; min-height: 2.75rem; margin: 0; accent-color: var(--accent); cursor: ew-resize; }
.compare-controls output { min-width: 5.6rem; text-align: right; color: var(--light-muted); font-variant-numeric: tabular-nums; }

.workflows { padding-block: var(--section-spacing); }
.workflow-heading { max-width: 44rem; margin-bottom: clamp(1.55rem, 3.5vw, 3.4rem); }
.workflow-heading h2 { text-wrap: initial; }
.workflow-spread { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.12fr); gap: clamp(1.75rem, 5.5vw, 5.75rem); }
.workflow-tool { display: grid; align-content: start; gap: 1.1rem; }
.workflow-art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #dfdacc; border: 1px solid var(--rule); }
.province-art img { object-fit: contain; padding: clamp(.6rem, 2.2vw, 2.2rem); }
.workflow-art figcaption { margin-top: .46rem; color: var(--muted); font-size: .875rem; }
.workflow-copy { max-width: 42ch; }
.workflow-copy p { margin: .65rem 0 .75rem; color: var(--body); }

.showcase { border-block: 1px solid var(--rule); background: #e9e5d9; }
.showcase-inner { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); align-items: start; gap: clamp(1.9rem, 5.7vw, 6rem); padding-block: var(--section-spacing); }
.showcase-copy { padding-top: .35rem; }
.showcase-copy h2 { text-wrap: initial; }
.showcase-copy > p:not(.section-label), .requirements-intro p { color: var(--body); }
.showcase-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #272d25; border: 1px solid var(--rule); }
.transcript { margin-top: .9rem; color: var(--body); font-size: .875rem; }
.transcript summary { width: fit-content; min-height: 2.75rem; padding-block: .6rem; color: var(--russet); font-weight: 600; cursor: pointer; }
.transcript ol { margin: .4rem 0 0; padding-inline-start: 1.25rem; }
.transcript li + li { margin-top: .45rem; }

.requirements-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.16fr); gap: clamp(2rem, 6vw, 6rem); padding-block: var(--section-spacing); }
.requirements-intro h2 { text-wrap: initial; }
.requirements { border-top: 1px solid var(--rule); }
.requirements > div { display: grid; grid-template-columns: minmax(6.9rem, .7fr) 1fr; gap: .65rem 1rem; border-bottom: 1px solid var(--rule); padding-block: .75rem; }
.requirements dt { font-weight: 600; }
.requirements dd { color: var(--body); }

.site-footer { border-top: 1px solid var(--rule); }
.footer-inner { display: flex; align-items: center; gap: 1.15rem; padding-block: 1.5rem; }
.footer-brand { display: inline-flex; min-width: 2.75rem; min-height: 2.75rem; align-items: center; justify-content: center; }
.footer-brand img { width: 1.9rem; }
.site-footer p { color: var(--muted); font-size: .875rem; }
.site-footer nav { margin-left: auto; }

@media (max-width: 65rem) {
  .hero { grid-template-columns: minmax(0, .78fr) minmax(0, 1fr); gap: 1.8rem; }
  .hero h1 { font-size: clamp(3.25rem, 6.15vw, 5.5rem); }
}

@media (max-width: 52rem) {
  .hero, .rendering-inner, .showcase-inner, .requirements-section { grid-template-columns: 1fr; }
  .hero { padding-top: clamp(2.7rem, 8vw, 4.2rem); }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(3.45rem, 10.5vw, 5.5rem); }
  .hero-description { max-width: 42ch; }
  .hero-spec { margin-top: 1.1rem; }
  .workflows h2 { max-width: 18ch; }
  .showcase-copy p { max-width: 46ch; }
}

@media (max-width: 36rem) {
  .header-inner { min-height: 3.9rem; gap: .65rem; }
  .brand img { width: 8rem; }
  .header-inner nav { gap: .9rem; }
  .nav-trailer { display: none; }
  .hero h1 { font-size: clamp(3.05rem, 10.45vw, 4.7rem); }
  .actions { column-gap: 1rem; }
  .atlas-bar { padding: .4rem .6rem; gap: .35rem .7rem; }
  .atlas-modes { gap: 0; }
  .atlas-mode { padding-inline: .52rem; }
  .atlas-enhanced .atlas-footer { padding-left: .7rem; flex-wrap: wrap; }
  .atlas-notes { padding-inline: .7rem; }
  .atlas-notes #atlas-pan-help { flex-basis: 100%; }
  .compare-enhanced .compare-controls { grid-template-columns: auto minmax(4rem, 1fr) auto; }
  .compare-controls output { grid-column: 1 / -1; text-align: left; margin-top: -.45rem; }
  .workflow-spread { grid-template-columns: 1fr; gap: 2.8rem; }
  .footer-inner { flex-wrap: wrap; gap: .5rem .85rem; }
  .site-footer p { flex: 1; min-width: 13rem; }
  .site-footer nav { margin-left: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .has-scroll-reveal [data-reveal] { transition: opacity .55s var(--shift), transform .55s var(--shift); }
  .has-scroll-reveal [data-reveal]:not(.is-visible, :focus-within, :target) { opacity: 0; transform: translateY(10px); }
  .hero-copy { animation: hero-in .55s var(--shift) both; }
  @keyframes hero-in {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
