@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Libre+Franklin:ital,wght@0,400;0,500;0,600;0,700;0,800;1,700&display=swap");

:root {
  color-scheme: dark;
  --navy: #071727;
  --navy-2: #0b2238;
  --blue: #0e5b87;
  --water: #0f709d;
  --ice: #dcecf0;
  --paper: #f3efe4;
  --red: #e4553f;
  --gold: #f3b94d;
  --line: rgba(220, 236, 240, 0.2);
  --muted: #9fb2bd;
  --mono: "DM Mono", ui-monospace, monospace;
  --sans: "Libre Franklin", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--navy); color: var(--ice); font-family: var(--sans); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0, 0, 0, 0); overflow: hidden; }

.site-header {
  align-items: center; backdrop-filter: blur(18px); background: rgba(7, 23, 39, 0.9);
  border-bottom: 1px solid var(--line); display: flex; height: 72px; justify-content: space-between;
  left: 0; padding: 0 clamp(20px, 4vw, 64px); position: sticky; right: 0; top: 0; z-index: 20;
}
.brand { align-items: center; display: inline-flex; font-size: 14px; font-weight: 800; gap: 11px; letter-spacing: .14em; }
.brand-mark { align-items: center; background: var(--red); border-radius: 50%; color: white; display: inline-flex; font-size: 10px; height: 34px; justify-content: center; letter-spacing: 0; width: 34px; }
nav { align-items: center; display: flex; gap: 30px; }
nav a { color: var(--muted); font-size: 13px; font-weight: 600; }
nav a:hover { color: white; }
.nav-cta { background: transparent; border: 1px solid var(--ice); color: var(--ice); cursor: pointer; padding: 10px 16px; }

.hero {
  align-items: center; background:
    linear-gradient(110deg, rgba(7,23,39,.96) 25%, rgba(7,23,39,.45)),
    repeating-linear-gradient(125deg, transparent 0 27px, rgba(220,236,240,.025) 28px 29px),
    radial-gradient(circle at 78% 50%, #1279a6 0, #0b3e5c 28%, #071727 60%);
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 650px; overflow: hidden;
  padding: 76px clamp(24px, 8vw, 128px); position: relative;
}
.hero::after { border: 1px solid rgba(255,255,255,.08); border-radius: 50%; content: ""; height: 640px; position: absolute; right: -180px; top: 50%; transform: translateY(-50%); width: 640px; }
.hero-copy { max-width: 820px; position: relative; z-index: 2; }
.eyebrow { color: var(--gold); font-family: var(--mono); font-size: 11px; letter-spacing: .16em; line-height: 1.6; margin: 0 0 16px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(45px, 6.3vw, 88px); letter-spacing: -.06em; line-height: .98; margin-bottom: 26px; max-width: 900px; }
h1 em { color: var(--gold); font-style: italic; }
.hero-deck { color: #c0d0d7; font-size: clamp(17px, 2vw, 22px); line-height: 1.55; max-width: 700px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 46px; }
.button { border: 0; cursor: pointer; display: inline-flex; font-weight: 700; justify-content: center; padding: 15px 22px; }
.button-primary { background: var(--red); color: white; }
.button-primary:hover { background: #f0634b; }
.button-quiet { background: rgba(255,255,255,.08); color: white; outline: 1px solid rgba(255,255,255,.16); }
.hero-stats { display: flex; gap: clamp(25px, 5vw, 70px); margin: 0; }
.hero-stats div { border-left: 1px solid var(--line); padding-left: 14px; }
.hero-stats dt { font-family: var(--mono); font-size: 21px; font-weight: 500; }
.hero-stats dd { color: var(--muted); font-size: 11px; margin: 5px 0 0; text-transform: uppercase; }
.hero-seal { align-items: center; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
.hero-seal::before, .hero-seal::after { border: 1px dashed rgba(255,255,255,.2); border-radius: 50%; content: ""; inset: 13px; position: absolute; }
.hero-seal::after { inset: 32px; }
.hero-seal strong { color: var(--paper); font-size: 84px; letter-spacing: -.08em; line-height: 1; }
.hero-seal span { font-family: var(--mono); font-size: 10px; letter-spacing: .22em; z-index: 1; }

.map-section { background: var(--paper); color: var(--navy); padding: 88px clamp(16px, 4vw, 64px); }
.section-heading { align-items: end; display: flex; gap: 40px; justify-content: space-between; margin: 0 auto 28px; max-width: 1500px; }
.section-heading .eyebrow, .preference-section .eyebrow { color: #a53a2e; }
h2 { font-size: clamp(34px, 4vw, 58px); letter-spacing: -.045em; line-height: 1.05; margin-bottom: 0; }
.sector-search { background: white; border: 1px solid #cad1cf; display: flex; min-width: min(100%, 370px); padding: 5px; }
.sector-search input { background: transparent; border: 0; color: var(--navy); min-width: 0; outline: 0; padding: 11px; width: 100%; }
.sector-search button { background: var(--navy); border: 0; color: white; cursor: pointer; padding: 10px 17px; }
.map-experience { display: grid; grid-template-columns: minmax(0, 1fr) 355px; margin: 0 auto; max-width: 1500px; min-height: 650px; }
.map-shell { background: #0b3550; min-height: 650px; overflow: hidden; position: relative; }
#founding-map { cursor: grab; display: block; height: 100%; min-height: 650px; touch-action: none; width: 100%; }
#founding-map.dragging { cursor: grabbing; }
.lake-fill { fill: #167aa2; filter: drop-shadow(0 18px 22px rgba(0,0,0,.25)); }
.lake-outline { fill: none; pointer-events: none; stroke: #d6e7e7; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.sector { cursor: pointer; fill: rgba(243,239,228,.05); stroke: rgba(243,239,228,.45); stroke-width: .75; vector-effect: non-scaling-stroke; }
.sector:hover, .sector:focus { fill: rgba(243,185,77,.48); outline: none; stroke: #ffe0a2; stroke-width: 1.7; }
.sector.collected { fill: rgba(228,85,63,.34); }
.sector.favorite { fill: rgba(243,185,77,.5); }
.sector.selected { fill: rgba(255,255,255,.62); stroke: white; stroke-width: 2.4; }
.place-dot { fill: var(--gold); stroke: var(--navy); stroke-width: 2; vector-effect: non-scaling-stroke; }
.place-label { fill: white; font-family: var(--mono); font-size: 10px; paint-order: stroke; pointer-events: none; stroke: rgba(7,23,39,.9); stroke-width: 3px; }
.map-toolbar { display: flex; gap: 6px; left: 16px; position: absolute; top: 16px; z-index: 3; }
.map-toolbar button { background: rgba(7,23,39,.88); border: 1px solid rgba(255,255,255,.25); color: white; cursor: pointer; min-height: 39px; min-width: 39px; padding: 0 12px; }
.map-key { background: rgba(7,23,39,.82); color: white; display: flex; font-family: var(--mono); font-size: 9px; gap: 12px; padding: 10px 12px; position: absolute; right: 16px; top: 16px; z-index: 3; }
.map-key span { align-items: center; display: flex; gap: 5px; }
.map-key i { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.5); height: 9px; width: 9px; }
.map-key .key-collected { background: rgba(228,85,63,.8); }
.map-key .key-favorite { background: rgba(243,185,77,.85); }
.map-caption { background: rgba(7,23,39,.86); bottom: 0; color: #bcd0d8; display: flex; font-family: var(--mono); font-size: 9px; justify-content: space-between; left: 0; padding: 10px 15px; position: absolute; right: 0; z-index: 3; }
.sector-panel { background: var(--navy); color: var(--ice); padding: 32px; }
.sector-panel-top { display: flex; justify-content: space-between; }
.favorite-button { background: transparent; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); cursor: pointer; font-size: 26px; height: 46px; line-height: 1; width: 46px; }
.favorite-button[aria-pressed="true"] { background: var(--gold); color: var(--navy); }
.sector-panel h3 { font-family: var(--mono); font-size: 40px; letter-spacing: -.06em; margin: 5px 0 5px; }
.sector-region { color: white; font-weight: 700; }
.sector-coordinate { border-bottom: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 10px; padding-bottom: 22px; }
.sector-facts { margin: 22px 0; }
.sector-facts div { display: grid; grid-template-columns: 80px 1fr; padding: 9px 0; }
.sector-facts dt { color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.sector-facts dd { font-size: 13px; font-weight: 600; margin: 0; }
.status-pill { background: rgba(52,174,121,.15); color: #74d3a7; font-family: var(--mono); font-size: 10px; padding: 5px 8px; text-transform: uppercase; }
.status-pill.collected { background: rgba(228,85,63,.18); color: #ff957f; }
.sector-story { color: #bacbd2; font-size: 13px; line-height: 1.55; }
.collector-card { background: rgba(255,255,255,.055); border: 1px solid var(--line); margin: 22px 0; padding: 15px; }
.collector-card label { color: var(--muted); display: block; font-family: var(--mono); font-size: 9px; margin-bottom: 8px; text-transform: uppercase; }
.collector-card div { align-items: center; border-bottom: 1px solid var(--line); display: flex; }
.collector-card div span { color: var(--gold); }
.collector-card input { background: transparent; border: 0; color: white; outline: 0; padding: 8px; width: 100%; }
.collector-card button { background: transparent; border: 0; color: var(--gold); cursor: pointer; font-size: 11px; padding: 12px 0 0; }
.panel-cta { width: 100%; }
.rights-note { color: #718b98; font-size: 9px; line-height: 1.5; margin: 14px 0 0; }

.preference-section { background: var(--paper); color: var(--navy); padding: 60px clamp(24px, 8vw, 128px) 110px; }
.preference-grid { border-top: 1px solid #c8cfca; display: grid; gap: 0; grid-template-columns: repeat(3, 1fr); margin-top: 42px; }
.preference-grid article { border-right: 1px solid #c8cfca; padding: 32px 40px 10px 0; }
.preference-grid article + article { padding-left: 40px; }
.preference-grid article:last-child { border-right: 0; }
.preference-grid span { color: #a53a2e; font-family: var(--mono); font-size: 11px; }
.preference-grid h3 { font-size: 21px; margin: 55px 0 14px; }
.preference-grid p { color: #52636b; font-size: 14px; line-height: 1.65; }
.origin-section { align-items: start; background: var(--red); display: grid; gap: 80px; grid-template-columns: 1fr 1fr; padding: 80px clamp(24px, 8vw, 128px); }
.origin-section .eyebrow { color: #ffd58a; }
.origin-section > p { font-size: 16px; line-height: 1.8; margin: 0; max-width: 650px; }
footer { align-items: center; color: var(--muted); display: flex; font-family: var(--mono); font-size: 9px; justify-content: space-between; padding: 42px clamp(24px, 5vw, 80px); }
footer p { margin: 0; }

dialog { background: var(--paper); border: 0; color: var(--navy); max-width: 510px; padding: 45px; width: calc(100% - 32px); }
dialog::backdrop { backdrop-filter: blur(8px); background: rgba(3,13,22,.78); }
dialog h2 { margin-bottom: 18px; }
dialog > p:not(.eyebrow) { color: #52636b; line-height: 1.6; }
.dialog-close { background: transparent; border: 0; color: var(--navy); cursor: pointer; font-size: 30px; position: absolute; right: 16px; top: 12px; }
dialog form { display: grid; gap: 15px; margin-top: 26px; }
dialog label { font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
dialog input { background: white; border: 1px solid #c8cfca; color: var(--navy); display: block; margin-top: 7px; padding: 13px; width: 100%; }
.form-status { color: #2d7655; font-size: 12px; min-height: 18px; }
.privacy-note { color: #66767d; font-size: 10px; line-height: 1.5; }
.form-trap { display: none !important; }

@media (max-width: 980px) {
  nav a { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-bottom: 90px; }
  .hero-seal { display: none; }
  .map-experience { grid-template-columns: 1fr; }
  .map-shell, #founding-map { min-height: 540px; }
  .sector-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .sector-panel-top, .sector-panel h3, .sector-region, .sector-coordinate { grid-column: 1; }
  .sector-facts, .sector-story, .collector-card, .panel-cta, .rights-note { grid-column: 2; }
  .sector-facts { grid-row: 1 / span 4; margin-top: 34px; }
  .sector-story { margin-top: 12px; }
  .preference-grid { grid-template-columns: 1fr; }
  .preference-grid article, .preference-grid article + article { border-bottom: 1px solid #c8cfca; border-right: 0; padding: 28px 0; }
  .preference-grid h3 { margin-top: 24px; }
  .origin-section { gap: 35px; grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; gap: 14px; }
}

@media (max-width: 640px) {
  .site-header { height: 62px; }
  .nav-cta { font-size: 11px; padding: 8px 10px; }
  .hero { min-height: calc(100vh - 62px); padding: 58px 22px; }
  h1 { font-size: clamp(43px, 13vw, 64px); }
  .hero-stats { gap: 17px; }
  .hero-stats dt { font-size: 17px; }
  .hero-stats dd { font-size: 8px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .sector-search { min-width: 0; }
  .map-section { padding-left: 0; padding-right: 0; }
  .section-heading { padding: 0 20px; }
  .map-shell, #founding-map { min-height: 440px; }
  .map-key { bottom: 38px; left: 12px; right: auto; top: auto; }
  .map-caption span:first-child { display: none; }
  .sector-panel { display: block; padding: 26px 22px; }
  .sector-facts { margin-top: 22px; }
  .preference-section { padding-left: 22px; padding-right: 22px; }
  dialog { padding: 36px 24px; }
}

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