@view-transition {
  navigation: auto;
}

:root {
  --ink: #211c18;
  --paper: #f2dfb7;
  --paper-light: #fff6df;
  --kraft: #b9763d;
  --brick: #bd4935;
  --moss: #426751;
  --sky: #9ec8bd;
  --chalk: #fffaf0;
  --rule: 3px solid var(--ink);
  --shadow: 9px 10px 0 rgba(33, 28, 24, 0.18);
  --display: "Avenir Next Condensed", "Arial Narrow", Impact, sans-serif;
  --body: Avenir, "Trebuchet MS", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper-light);
  color: var(--ink);
  font-family: var(--body);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(62, 47, 33, 0.035) 1px, transparent 1px) 0 0 / 100% 7px,
    var(--paper-light);
  line-height: 1.55;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.13em;
  text-underline-offset: 0.18em;
}

a:focus-visible {
  outline: 4px solid var(--chalk);
  box-shadow: 0 0 0 8px var(--ink);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border: var(--rule);
  background: var(--chalk);
  font-weight: 800;
  transform: translateY(-180%);
}

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

.street-head {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(12rem, 0.65fr) minmax(0, 1.35fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1rem clamp(1rem, 4vw, 4.5rem);
  border-bottom: var(--rule);
  background: rgba(255, 246, 223, 0.96);
}

.wordmark {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  width: max-content;
  text-decoration: none;
}

.wordmark-mark {
  width: 2.5rem;
  aspect-ratio: 1;
  border: var(--rule);
  background:
    linear-gradient(90deg, transparent 42%, var(--ink) 42% 52%, transparent 52%),
    linear-gradient(0deg, transparent 42%, var(--ink) 42% 52%, transparent 52%),
    var(--brick);
  box-shadow: 4px 4px 0 var(--sky);
  transform: rotate(-3deg);
}

.wordmark strong,
.wordmark small {
  display: block;
}

.wordmark strong {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  letter-spacing: 0.025em;
  line-height: 0.95;
  text-transform: uppercase;
}

.wordmark small {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.street-head nav,
footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem 1.25rem;
}

.street-head nav a {
  padding-block: 0.25rem;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
}

.street-head nav a:hover,
.street-head nav a[aria-current] {
  border-color: var(--brick);
}

.block-gate {
  display: grid;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(20rem, 1.1fr);
  grid-template-areas:
    "image copy"
    "image note";
  min-height: min(48rem, calc(100svh - 5.5rem));
  border-bottom: var(--rule);
  background: var(--sky);
}

.gate-image {
  grid-area: image;
  min-height: 42rem;
  margin: 0;
  border-right: var(--rule);
  clip-path: polygon(0 0, 96% 0, 100% 7%, 97% 100%, 0 100%);
}

.gate-copy {
  grid-area: copy;
  align-self: end;
  padding: clamp(2rem, 7vw, 7rem) clamp(1.5rem, 6vw, 6rem) 2rem;
}

.route-label,
.plain-label {
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gate-copy h1,
.policy-cover h1 {
  max-width: 13ch;
  margin-bottom: 1.25rem;
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 7rem);
  letter-spacing: -0.035em;
  line-height: 0.86;
  text-transform: uppercase;
}

.lead {
  max-width: 44rem;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.paper-button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border: var(--rule);
  background: var(--paper-light);
  box-shadow: 5px 6px 0 var(--ink);
  font-weight: 900;
  text-decoration: none;
  transform: rotate(-1deg);
}

.paper-button:hover {
  transform: translate(2px, 2px) rotate(0);
  box-shadow: 3px 4px 0 var(--ink);
}

.paper-button.dark {
  background: var(--ink);
  color: var(--chalk);
  box-shadow: 5px 6px 0 var(--brick);
}

.gate-note {
  grid-area: note;
  align-self: end;
  margin: 0 clamp(1.5rem, 6vw, 6rem) 2rem;
  padding-top: 1rem;
  border-top: 2px dashed var(--ink);
  font-weight: 750;
}

.atlas-spread,
.boundary-yard,
.kit-table,
.decision-corner,
.drawer-route,
.closing-block,
.streetbook {
  padding: clamp(3rem, 8vw, 8rem) clamp(1rem, 5vw, 5rem);
}

.atlas-spread {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  background: var(--paper);
}

.atlas-intro {
  grid-column: 1 / span 5;
  align-self: center;
  padding-right: 1rem;
}

.atlas-intro h2,
.boundary-yard h2,
.kit-table h2,
.decision-corner h2,
.drawer-route h2,
.closing-block h2 {
  margin-bottom: 1rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 5.5rem);
  letter-spacing: -0.025em;
  line-height: 0.92;
  text-transform: uppercase;
}

.atlas-piece {
  container-type: inline-size;
  margin: 0;
  border: var(--rule);
  background: var(--paper-light);
  box-shadow: var(--shadow);
}

.atlas-piece img {
  min-height: 19rem;
  max-height: 37rem;
}

.atlas-piece figcaption,
.atlas-piece > div {
  padding: 1rem;
}

.atlas-map {
  grid-column: 7 / -1;
  transform: rotate(1.25deg);
}

.survey-card {
  grid-column: 2 / span 5;
  transform: rotate(-1deg);
}

.ordinary-card {
  grid-column: 8 / span 4;
  margin-top: 5rem;
  transform: rotate(1.8deg);
}

.block-number {
  display: inline-grid;
  place-items: center;
  width: 3.2rem;
  aspect-ratio: 1;
  margin-bottom: 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sky);
  font-weight: 950;
}

.atlas-piece h3 {
  margin-bottom: 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.6rem, 12cqi, 3rem);
  line-height: 1;
  text-transform: uppercase;
}

.boundary-yard {
  background: var(--ink);
  color: var(--chalk);
}

.boundary-yard > header {
  display: grid;
  grid-template-columns: 0.7fr 2fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.6rem;
  background: var(--chalk);
}

.boundary {
  position: relative;
  min-height: 32rem;
  margin: 0;
  overflow: hidden;
  border: 3px solid var(--ink);
  color: var(--ink);
}

.boundary img {
  transition: transform 400ms ease;
}

.boundary:hover img {
  transform: scale(1.025);
}

.boundary figcaption {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border-top: 3px solid var(--ink);
  background: rgba(255, 250, 240, 0.94);
}

.boundary strong {
  font-family: var(--display);
  font-size: 1.55rem;
  text-transform: uppercase;
}

.kit-table {
  display: grid;
  grid-template-columns: 1.05fr 0.8fr 0.65fr;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: stretch;
  background: var(--moss);
  color: var(--chalk);
}

.kit-copy {
  align-self: center;
}

.tool-list {
  display: grid;
  gap: 0.7rem;
  padding: 0;
  list-style: none;
}

.tool-list li {
  padding: 0.7rem 0.8rem 0.7rem 2.7rem;
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
}

.tool-list li::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0.9rem;
  width: 0.85rem;
  aspect-ratio: 1;
  border: 2px solid currentColor;
  transform: rotate(8deg);
}

.kit-image,
.buddy-image {
  margin: 0;
  border: 3px solid var(--chalk);
  box-shadow: 7px 8px 0 rgba(0, 0, 0, 0.28);
}

.buddy-image {
  align-self: end;
  height: 82%;
  transform: rotate(1.3deg);
}

.buddy-image figcaption {
  padding: 0.85rem;
  background: var(--chalk);
  color: var(--ink);
}

.decision-corner {
  background: var(--chalk);
}

.decision-corner > header {
  max-width: 68rem;
  margin-bottom: 2.5rem;
}

.decision-visuals {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  align-items: end;
}

.decision-visuals figure {
  margin: 0;
  border: var(--rule);
  background: var(--paper);
}

.decision-visuals figure:first-child {
  min-height: 35rem;
  transform: rotate(-0.75deg);
}

.decision-visuals figure:last-child {
  min-height: 29rem;
  transform: translateY(3rem) rotate(1deg);
}

.decision-visuals figcaption {
  padding: 0.8rem;
  border-top: var(--rule);
  font-weight: 800;
}

.decision-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 5.5rem 0 0;
  padding: 0;
  border: var(--rule);
  list-style: none;
}

.decision-list li {
  min-height: 11rem;
  padding: 1rem;
  border-right: var(--rule);
}

.decision-list li:last-child {
  border-right: 0;
}

.decision-list li:nth-child(1) { background: var(--sky); }
.decision-list li:nth-child(2) { background: var(--paper); }
.decision-list li:nth-child(3) { background: #e8a05b; }
.decision-list li:nth-child(4) { background: #ddb2a4; }

.decision-list b,
.decision-list span {
  display: block;
}

.decision-list b {
  margin-bottom: 1rem;
  font-family: var(--display);
  font-size: 2rem;
  text-transform: uppercase;
}

.drawer-route {
  display: grid;
  grid-template-columns: 0.7fr 1.1fr 0.72fr;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
  background:
    repeating-linear-gradient(90deg, transparent 0 14%, rgba(33, 28, 24, 0.06) 14% 14.5%),
    var(--paper);
}

.route-image,
.drawer-image {
  margin: 0;
  border: var(--rule);
  background: var(--chalk);
  box-shadow: var(--shadow);
}

.route-image {
  transform: rotate(-2deg);
}

.drawer-image {
  transform: rotate(2deg);
}

.drawer-image figcaption {
  padding: 0.8rem;
  border-top: var(--rule);
}

.closing-block {
  display: grid;
  grid-template-columns: 0.65fr 1fr;
  gap: clamp(1.25rem, 5vw, 5rem);
  align-items: center;
  background: var(--brick);
  color: var(--chalk);
}

.closing-block figure {
  margin: 0;
  border: 3px solid var(--chalk);
}

.closing-panorama {
  grid-column: 1 / -1;
  height: min(55vw, 42rem);
  margin-top: 1rem !important;
  clip-path: polygon(0 3%, 29% 0, 61% 4%, 100% 0, 98% 95%, 57% 100%, 20% 95%, 0 100%);
}

footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 2rem clamp(1rem, 5vw, 5rem);
  border-top: var(--rule);
  background: var(--ink);
  color: var(--chalk);
}

/* Privacy streetbook: long leaves, clipped margins, and one visible route index. */
.policy-route body {
  background: var(--paper);
}

.policy-head {
  background: var(--paper);
}

.streetbook {
  max-width: 96rem;
  margin-inline: auto;
}

.policy-cover {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(12rem, 0.5fr);
  column-gap: 3rem;
  align-items: end;
  padding-bottom: clamp(2rem, 6vw, 6rem);
  border-bottom: var(--rule);
}

.policy-cover .route-label,
.policy-cover h1 {
  grid-column: 1;
}

.policy-cover h1 {
  max-width: 15ch;
  font-size: clamp(2.8rem, 6.5vw, 6.6rem);
}

.policy-cover > p:not(.route-label):not(.effective-date) {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  padding: 1rem;
  border: var(--rule);
  background: var(--sky);
  box-shadow: var(--shadow);
}

.effective-date {
  grid-column: 2;
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.policy-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-block: clamp(2rem, 6vw, 6rem);
  border: var(--rule);
  background: var(--paper-light);
  box-shadow: var(--shadow);
}

.policy-index > div {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  min-height: 12rem;
  padding: 1rem;
  border-right: 2px dashed var(--ink);
  border-bottom: 2px dashed var(--ink);
}

.policy-index > div:nth-child(3n) {
  border-right: 0;
}

.policy-index > div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.policy-index span {
  margin-bottom: 0.35rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
}

.policy-index a {
  width: fit-content;
  font-size: 0.9rem;
}

.policy-leaves {
  display: grid;
  gap: clamp(2rem, 6vw, 6rem);
}

.policy-section {
  container-type: inline-size;
  position: relative;
  display: grid;
  grid-template-columns: minmax(4.25rem, 0.14fr) minmax(18rem, 0.9fr) minmax(16rem, 1fr);
  grid-template-areas: "number copy image";
  gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
  min-height: 28rem;
  padding: clamp(1rem, 3vw, 3rem);
  border: var(--rule);
  background: var(--paper-light);
  box-shadow: var(--shadow);
}

.policy-number {
  grid-area: number;
  align-self: start;
  display: grid;
  place-items: center;
  width: 3.8rem;
  aspect-ratio: 1;
  border: var(--rule);
  background: var(--brick);
  color: var(--chalk);
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 950;
  transform: rotate(-4deg);
}

.policy-copy {
  grid-area: copy;
  max-width: 46rem;
}

.policy-copy h2 {
  margin-bottom: 0.8rem;
  font-family: var(--display);
  font-size: clamp(2rem, 8cqi, 4.25rem);
  letter-spacing: -0.02em;
  line-height: 0.95;
  text-transform: uppercase;
}

.policy-section figure {
  grid-area: image;
  min-height: 23rem;
  max-height: 38rem;
  margin: 0;
  overflow: hidden;
  border: var(--rule);
}

.policy-section.image-right {
  margin-left: clamp(0rem, 6vw, 6rem);
}

.policy-section.image-left {
  grid-template-columns: minmax(16rem, 1fr) minmax(4.25rem, 0.14fr) minmax(18rem, 0.9fr);
  grid-template-areas: "image number copy";
  margin-right: clamp(0rem, 6vw, 6rem);
}

.policy-section.image-wide {
  grid-template-columns: minmax(4.25rem, 0.12fr) minmax(18rem, 0.7fr) minmax(20rem, 1.2fr);
  background: var(--sky);
}

.policy-section.margin-image {
  grid-template-columns: minmax(4.25rem, 0.14fr) minmax(18rem, 1fr) minmax(9rem, 0.42fr);
  margin-inline: clamp(0rem, 3vw, 3rem) clamp(0rem, 9vw, 9rem);
  background: #efd19d;
}

.policy-section.margin-image figure {
  min-height: 18rem;
  max-height: 26rem;
  transform: rotate(2deg);
}

.policy-section.text-leaf {
  grid-template-columns: minmax(4.25rem, 0.14fr) minmax(0, 1fr);
  grid-template-areas: "number copy";
  min-height: 0;
  margin-left: clamp(0rem, 15vw, 15rem);
  background: var(--paper);
}

.policy-section.contact-leaf {
  background: var(--moss);
  color: var(--chalk);
}

[data-arrive] {
  opacity: 0;
  transform: translateY(1.25rem) rotate(0.2deg);
  transition: opacity 520ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-arrive].arrived {
  opacity: 1;
  transform: none;
}

@supports (animation-timeline: view()) {
  .closing-panorama {
    animation: map-unfold linear both;
    animation-timeline: view();
    animation-range: entry 15% cover 55%;
  }

  @keyframes map-unfold {
    from { clip-path: polygon(12% 12%, 32% 8%, 58% 12%, 90% 8%, 88% 88%, 58% 92%, 25% 88%, 12% 92%); }
    to { clip-path: polygon(0 3%, 29% 0, 61% 4%, 100% 0, 98% 95%, 57% 100%, 20% 95%, 0 100%); }
  }
}

@container (max-width: 31rem) {
  .atlas-piece h3,
  .policy-copy h2 {
    font-size: 2rem;
  }
}

@media (max-width: 900px) {
  .street-head {
    grid-template-columns: 1fr;
  }

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

  .block-gate {
    grid-template-columns: 1fr;
    grid-template-areas: "image" "copy" "note";
  }

  .gate-image {
    min-height: 65svh;
    border-right: 0;
    border-bottom: var(--rule);
    clip-path: none;
  }

  .atlas-intro,
  .atlas-map,
  .survey-card,
  .ordinary-card {
    grid-column: 1 / -1;
    margin-top: 0;
    transform: none;
  }

  .boundary-yard > header,
  .policy-cover {
    grid-template-columns: 1fr;
  }

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

  .kit-table,
  .drawer-route {
    grid-template-columns: 1fr 1fr;
  }

  .kit-copy,
  .drawer-copy {
    grid-column: 1 / -1;
  }

  .decision-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .decision-list li:nth-child(2) {
    border-right: 0;
  }

  .decision-list li:nth-child(-n + 2) {
    border-bottom: var(--rule);
  }

  .closing-block,
  footer {
    grid-template-columns: 1fr;
  }

  .policy-cover > p:not(.route-label):not(.effective-date),
  .effective-date {
    grid-column: 1;
    grid-row: auto;
  }

  .policy-index {
    grid-template-columns: repeat(2, 1fr);
  }

  .policy-index > div:nth-child(3n) {
    border-right: 2px dashed var(--ink);
  }

  .policy-index > div:nth-child(2n) {
    border-right: 0;
  }

  .policy-index > div:nth-last-child(-n + 3) {
    border-bottom: 2px dashed var(--ink);
  }

  .policy-index > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .policy-section,
  .policy-section.image-left,
  .policy-section.image-wide,
  .policy-section.margin-image {
    grid-template-columns: minmax(3.5rem, 0.14fr) minmax(0, 1fr);
    grid-template-areas: "number copy" "image image";
    margin-inline: 0;
  }
}

@media (max-width: 560px) {
  .street-head {
    position: static;
  }

  .street-head nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .boundary-grid,
  .kit-table,
  .decision-visuals,
  .drawer-route,
  .decision-list,
  .policy-index {
    grid-template-columns: 1fr;
  }

  .boundary {
    min-height: 26rem;
  }

  .buddy-image {
    height: auto;
  }

  .decision-visuals figure:last-child {
    transform: none;
  }

  .decision-list li,
  .decision-list li:nth-child(2) {
    border-right: 0;
    border-bottom: var(--rule);
  }

  .decision-list li:last-child {
    border-bottom: 0;
  }

  .policy-index > div,
  .policy-index > div:nth-child(3n),
  .policy-index > div:nth-last-child(-n + 3) {
    min-height: 0;
    border-right: 0;
    border-bottom: 2px dashed var(--ink);
  }

  .policy-index > div:last-child {
    border-bottom: 0;
  }

  .policy-section,
  .policy-section.image-left,
  .policy-section.image-wide,
  .policy-section.margin-image,
  .policy-section.text-leaf {
    grid-template-columns: 1fr;
    grid-template-areas: "number" "copy" "image";
    padding: 1rem;
    margin-left: 0;
  }

  .policy-section.text-leaf {
    grid-template-areas: "number" "copy";
  }
}

@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;
  }

  [data-arrive] {
    opacity: 1;
    transform: none;
  }
}
