@layer reset, base, components, sections, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p, figure, ol { margin: 0; }
  img { display: block; max-width: 100%; height: auto; }
  button, input { font: inherit; }
  a { color: inherit; }
}

@layer base {
  :root {
    --ink: #171811;
    --ink-soft: #2c2d25;
    --paper: #f1ecdf;
    --paper-deep: #e4dccb;
    --cream: #fff9eb;
    --warm: #d7904f;
    --warm-light: #f3c486;
    --moss: #616b50;
    --sage: #aeb59a;
    --line: rgba(23, 24, 17, .18);
    --line-light: rgba(255, 249, 235, .2);
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
    --max: 1280px;
    --pad: clamp(1.25rem, 4vw, 4.5rem);
    --section-y: clamp(5rem, 10vw, 9rem);
  }

  body {
    min-width: 320px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
  }

  body.nav-open { overflow: hidden; }

  ::selection { background: var(--warm); color: var(--ink); }

  h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: .98;
    text-wrap: balance;
  }

  h2 { font-size: clamp(2.8rem, 6vw, 6.2rem); letter-spacing: -.04em; }
  h3 { font-size: clamp(1.75rem, 3vw, 2.7rem); letter-spacing: -.025em; }

  p { text-wrap: pretty; }

  :focus-visible {
    outline: 3px solid var(--warm-light);
    outline-offset: 4px;
  }

  .skip-link {
    position: fixed;
    z-index: 100;
    top: .75rem;
    left: .75rem;
    padding: .7rem 1rem;
    background: var(--cream);
    color: var(--ink);
    transform: translateY(-160%);
    transition: transform .2s ease;
  }
  .skip-link:focus { transform: translateY(0); }
}

@layer components {
  .site-header {
    position: fixed;
    z-index: 50;
    inset: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    padding: .8rem var(--pad);
    border-bottom: 1px solid transparent;
    color: var(--cream);
    transition: background .3s ease, border-color .3s ease, color .3s ease, min-height .3s ease;
  }

  .site-header.is-scrolled {
    min-height: 68px;
    background: rgba(23, 24, 17, .94);
    border-color: var(--line-light);
    backdrop-filter: blur(14px);
  }

  .wordmark {
    display: grid;
    gap: .05rem;
    color: inherit;
    text-decoration: none;
  }

  .wordmark__name {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -.01em;
  }

  .wordmark__place {
    color: var(--sage);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  .site-nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
  .site-nav a {
    padding: .6rem 0;
    color: inherit;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
  }
  .site-nav a:not(.nav-out) { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .2s ease; }
  .site-nav a:not(.nav-out):hover { background-size: 100% 1px; }
  .site-nav .nav-out {
    padding: .7rem 1rem;
    border: 1px solid currentColor;
    transition: background .2s ease, color .2s ease;
  }
  .site-nav .nav-out:hover { background: var(--cream); color: var(--ink); }

  .nav-toggle {
    display: none;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: inherit;
  }

  .section { padding: var(--section-y) var(--pad); }
  .section > * { width: min(100%, var(--max)); margin-inline: auto; }
  .section--dark { background: var(--ink); color: var(--cream); }
  .section--paper { background: var(--paper-deep); }

  .section-heading { max-width: 980px; }
  .section-heading--split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .65fr);
    gap: clamp(2rem, 8vw, 8rem);
    align-items: end;
  }

  .kicker, .eyebrow {
    margin-bottom: 1.2rem;
    color: var(--moss);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
  }
  .kicker--warm { color: var(--warm-light); }
  .eyebrow span { padding-inline: .4rem; color: var(--warm-light); }
  .lede { max-width: 42rem; color: #4b4d41; font-size: clamp(1.05rem, 1.8vw, 1.35rem); line-height: 1.65; }

  .button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: .8rem 1.2rem;
    border: 1px solid transparent;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform .2s ease, background .2s ease, color .2s ease;
  }
  .button:hover { transform: translateY(-2px); }
  .button--light { background: var(--cream); color: var(--ink); }
  .button--light:hover { background: var(--warm-light); }
  .button--warm { background: var(--warm-light); color: var(--ink); }
  .button--warm:hover { background: var(--cream); }

  .text-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: .4rem;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-decoration-thickness: 1px;
    text-underline-offset: .35rem;
    text-transform: uppercase;
  }
  .text-link--light { color: var(--cream); }
}

@layer sections {
  .hero {
    position: relative;
    min-height: max(680px, 100svh);
    display: grid;
    align-items: end;
    overflow: hidden;
    color: var(--cream);
    background: var(--ink);
  }

  .hero__image, .hero__shade { position: absolute; inset: 0; width: 100%; height: 100%; }
  .hero__image { object-fit: cover; object-position: 52% center; }
  .hero__shade {
    background:
      linear-gradient(90deg, rgba(12, 13, 9, .88) 0%, rgba(12, 13, 9, .5) 50%, rgba(12, 13, 9, .12) 80%),
      linear-gradient(0deg, rgba(12, 13, 9, .82) 0%, transparent 50%);
  }

  .hero__content {
    position: relative;
    z-index: 2;
    width: min(100%, var(--max));
    padding: clamp(8rem, 16vh, 13rem) var(--pad) clamp(4rem, 9vh, 7rem);
  }

  .hero h1 {
    max-width: 8ch;
    font-size: clamp(5rem, 13vw, 11rem);
    letter-spacing: -.075em;
    line-height: .72;
    text-shadow: 0 3px 30px rgba(0,0,0,.28);
  }

  .hero__deck {
    max-width: 42rem;
    margin-top: clamp(2rem, 5vw, 3.75rem);
    color: #eee7d7;
    font-family: var(--serif);
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    line-height: 1.35;
  }

  .hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
  .hero .eyebrow { color: var(--cream); text-shadow: 0 1px 16px rgba(0,0,0,.75); }
  .hero__marker {
    position: absolute;
    z-index: 2;
    right: var(--pad);
    bottom: clamp(4rem, 9vh, 7rem);
    display: grid;
    width: 132px;
    aspect-ratio: 1;
    place-content: center;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 50%;
    text-align: center;
    transform: rotate(7deg);
  }
  .hero__marker span { font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
  .hero__marker strong { font-family: var(--serif); font-size: 2rem; font-weight: 500; }

  .orientation { overflow: hidden; }
  .world-map {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: clamp(4rem, 8vw, 7rem);
    padding: 0;
    list-style: none;
  }
  .world-map::before {
    content: "";
    position: absolute;
    top: 27px;
    left: 5%;
    right: 5%;
    height: 1px;
    background: var(--line);
  }
  .world-map li { position: relative; padding: 0 clamp(1rem, 2vw, 2rem) 0 0; }
  .world-map__number {
    position: relative;
    z-index: 1;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin-bottom: 1.5rem;
    border: 1px solid var(--ink);
    border-radius: 50%;
    background: var(--paper);
    font-family: var(--serif);
  }
  .world-map strong { display: block; margin-bottom: .65rem; font-family: var(--serif); font-size: 1.35rem; }
  .world-map p { max-width: 16rem; color: #55574b; font-size: .9rem; }

  .fiction-note {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
    width: min(100%, 760px);
    margin-top: clamp(4rem, 8vw, 7rem);
    padding-top: 2rem;
    border-top: 1px solid var(--line);
  }
  .fiction-note img { width: 74px; }
  .fiction-note p { color: #505246; }
  .fiction-note strong { color: var(--ink); }

  .depot {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .8fr);
    gap: clamp(3rem, 8vw, 8rem);
    align-items: center;
  }
  .depot > * { width: auto; margin: 0; }
  .depot__image-wrap { align-self: stretch; }
  .depot__image-wrap img { width: 100%; height: min(76vh, 820px); object-fit: cover; }
  .image-caption { padding-top: .7rem; color: #d8d1c2; font-size: .75rem; letter-spacing: .04em; }
  .depot__content h2 { max-width: 8ch; }
  .depot__intro { max-width: 40rem; margin-top: 2rem; color: #d3cbbb; font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.55rem); }
  .depot-zones { display: grid; margin-top: 2.5rem; border-top: 1px solid var(--line-light); }
  .depot-zones article {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: .1rem .8rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--line-light);
  }
  .zone-index { grid-row: 1 / span 2; color: var(--warm-light); font-family: var(--serif); font-size: 1.2rem; }
  .depot-zones h3 { font-family: var(--sans); font-size: .82rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
  .depot-zones p { color: #b9b4a8; font-size: .9rem; }

  .texture-strip { display: grid; grid-template-columns: 1.1fr .8fr 1.1fr; background: var(--ink); }
  .texture-strip figure { position: relative; min-height: 420px; overflow: hidden; }
  .texture-strip img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); transition: transform .6s ease, filter .4s ease; }
  .texture-strip figure:hover img { transform: scale(1.025); filter: saturate(1); }
  .texture-strip figcaption {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    padding: .35rem .55rem;
    background: rgba(23,24,17,.84);
    color: var(--cream);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  .people .section-heading { margin-inline: 0; }
  .people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(3rem, 7vw, 6rem); border: 1px solid var(--line); }
  .person-card { padding: clamp(2rem, 5vw, 4rem); }
  .person-card + .person-card { border-left: 1px solid var(--line); }
  .person-card--jack { background: var(--ink); color: var(--cream); }
  .person-card__top { min-height: 160px; }
  .person-card__label { margin-bottom: 1rem; color: var(--moss); font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
  .person-card--jack .person-card__label { color: var(--warm-light); }
  .person-card__real, .person-card__fiction { max-width: 35rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
  .person-card__fiction { margin-top: 1.3rem; }
  .person-card--jack .person-card__real, .person-card--jack .person-card__fiction { border-color: var(--line-light); color: #d3cbbb; }
  .person-card .text-link { margin-top: 2rem; }
  .person-card--jack .text-link { color: var(--cream); }

  .story-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, 4vw, 3.5rem);
    margin-top: clamp(3rem, 7vw, 6rem);
  }
  .story-card { background: var(--paper); border-bottom: 4px solid var(--ink); }
  .story-card--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.18fr .82fr; }
  .story-card--reverse { grid-template-columns: .82fr 1.18fr; }
  .story-card--reverse .story-card__image { order: 2; }
  .story-card--reverse .story-card__body { order: 1; }
  .story-card__image { display: block; min-height: 320px; overflow: hidden; background: var(--ink); }
  .story-card__image img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s ease, opacity .3s ease; }
  .story-card__image:hover img { transform: scale(1.025); opacity: .92; }
  .story-card--wide .story-card__image img { aspect-ratio: auto; }
  .story-card__body { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.5rem, 4vw, 3rem); }
  .story-card__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-bottom: 1.5rem; color: var(--moss); font-size: .67rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
  .story-card h3 a { text-decoration: none; }
  .story-card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3rem; }
  .story-card__body > p:not(.story-card__meta) { max-width: 38rem; margin-top: 1.3rem; color: #55574b; }
  .story-card__read { margin-top: auto; padding-top: 2rem; color: var(--ink); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-underline-offset: .3rem; }

  .nearsight-cta {
    position: relative;
    min-height: 720px;
    display: grid;
    align-items: center;
    overflow: hidden;
    color: var(--cream);
    background: var(--ink);
  }
  .nearsight-cta > * { width: auto; margin: 0; }
  .nearsight-cta__banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .4; }
  .nearsight-cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(23,24,17,.95), rgba(23,24,17,.65) 60%, rgba(23,24,17,.2)); }
  .nearsight-cta__content { position: relative; z-index: 1; width: min(100%, 920px); padding-inline: var(--pad); }
  .nearsight-cta__content p:not(.kicker) { max-width: 38rem; margin-top: 2rem; color: #d3cbbb; font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.5rem); }
  .nearsight-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }

  .site-footer {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 3rem var(--pad);
    border-top: 1px solid var(--line-light);
    background: var(--ink);
    color: #b9b4a8;
  }
  .site-footer > div { max-width: 42rem; }
  .site-footer__name { margin-bottom: .35rem; color: var(--cream); font-family: var(--serif); font-size: 1.4rem; }
  .site-footer nav { display: flex; flex-wrap: wrap; align-items: start; justify-content: flex-end; gap: .8rem 1.5rem; }
  .site-footer a { color: var(--cream); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-underline-offset: .3rem; }
}

@layer responsive {
  @media (max-width: 900px) {
    .nav-toggle { display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; }
    .nav-toggle__lines, .nav-toggle__lines::before, .nav-toggle__lines::after { width: 20px; height: 1px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
    .nav-toggle__lines { position: relative; }
    .nav-toggle__lines::before, .nav-toggle__lines::after { content: ""; position: absolute; left: 0; }
    .nav-toggle__lines::before { top: -6px; }
    .nav-toggle__lines::after { top: 6px; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__lines { background: transparent; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__lines::before { top: 0; transform: rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .nav-toggle__lines::after { top: 0; transform: rotate(-45deg); }

    .site-nav {
      position: fixed;
      inset: 68px 0 0;
      display: grid;
      align-content: center;
      gap: .4rem;
      padding: 2rem var(--pad);
      background: var(--ink);
      transform: translateX(100%);
      transition: transform .3s ease;
    }
    .site-nav.is-open { transform: translateX(0); }
    .site-nav a { padding: .8rem 0; font-family: var(--serif); font-size: clamp(2rem, 9vw, 4rem); font-weight: 500; letter-spacing: -.03em; text-transform: none; }
    .site-nav .nav-out { margin-top: 1rem; padding: .8rem 1rem; font-family: var(--sans); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-align: center; text-transform: uppercase; }

    .hero__marker { display: none; }
    .hero h1 { font-size: clamp(4.5rem, 19vw, 8rem); }
    .section-heading--split, .depot, .story-card--wide, .story-card--reverse { grid-template-columns: 1fr; }
    .story-card--reverse .story-card__image, .story-card--reverse .story-card__body { order: initial; }
    .world-map { grid-template-columns: repeat(2, 1fr); gap: 3rem 1.5rem; }
    .world-map::before { display: none; }
    .depot__image-wrap img { height: min(68vh, 680px); }
    .texture-strip { grid-template-columns: 1fr 1fr; }
    .texture-strip figure:last-child { grid-column: 1 / -1; }
    .people-grid { grid-template-columns: 1fr; }
    .person-card + .person-card { border-left: 0; border-top: 1px solid var(--line); }
  }

  @media (max-width: 620px) {
    :root { --pad: 1.2rem; }
    .site-header { min-height: 68px; }
    .wordmark__place { display: none; }
    .hero { min-height: 760px; }
    .hero__image { object-position: 58% center; }
    .hero__shade {
      background:
        linear-gradient(90deg, rgba(12,13,9,.8) 0%, rgba(12,13,9,.3) 80%, rgba(12,13,9,.1) 100%),
        linear-gradient(0deg, rgba(12,13,9,.94) 0%, rgba(12,13,9,.45) 76%, rgba(12,13,9,.18));
    }
    .hero__content { padding-top: 8rem; }
    .hero h1 { font-size: clamp(4.2rem, 22vw, 6.8rem); line-height: .78; }
    .hero__deck { font-size: 1.2rem; }
    .hero__actions { align-items: flex-start; flex-direction: column; }
    .world-map { grid-template-columns: 1fr; }
    .fiction-note { grid-template-columns: 54px 1fr; }
    .fiction-note img { width: 54px; }
    .texture-strip { grid-template-columns: 1fr; }
    .texture-strip figure, .texture-strip figure:last-child { grid-column: auto; min-height: 320px; }
    .story-grid { grid-template-columns: 1fr; }
    .story-card__image { min-height: 230px; }
    .nearsight-cta { min-height: 650px; }
    .nearsight-cta__banner { object-position: 55% center; }
    .site-footer { flex-direction: column; }
    .site-footer nav { justify-content: flex-start; }
  }

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