/* ============================================================
   Cities Analysis — v3
   Senseable City Lab–style landing (replication)
   Black ground · serif mission text · horizontal project strip
   ============================================================ */

:root {
  --bg:      #000000;
  --ink:     #F2F1EC;
  --ink-2:   #9A9A93;   /* muted body / years */
  --ink-3:   #5E5E58;   /* faint */
  --line:    rgba(255,255,255,.22);

  --green:  #5BE8A0;  --heat:   #FF7A5C;  --solar:  #FFC24B;
  --cool:   #5CC8FF;  --equity: #B79CFF;  --teal:   #46E3B6;

  --gutter: clamp(22px, 4vw, 56px);
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--serif); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding: 0 var(--gutter);
}
a { color: inherit; text-decoration: none; }

/* ── masthead ────────────────────────────────────────── */
.masthead {
  display: flex; align-items: flex-start; gap: 22px;
  padding: 26px 0 0;
}
.logo { display: flex; align-items: center; gap: 14px; flex: none; }
.logo .mark {
  width: 46px; height: 46px; flex: none;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 3px;
}
.logo .mark i { background: var(--ink); border-radius: 1px; }
.logo .mark i:nth-child(2), .logo .mark i:nth-child(4), .logo .mark i:nth-child(6), .logo .mark i:nth-child(8) { background: transparent; }
.logo b {
  font-family: var(--sans); font-weight: 500; font-size: 22px; line-height: 1.04;
  letter-spacing: -.02em;
}
.masthead .rule { flex: 1; height: 1px; background: var(--line); margin-top: 22px; }
.masthead .inst {
  flex: none; margin-top: 6px; text-align: right;
  font-family: var(--sans); font-size: 12px; line-height: 1.3; color: var(--ink-2);
}
.masthead .inst b { display: block; color: var(--ink); font-weight: 500; font-size: 15px; }

/* ── intro ───────────────────────────────────────────── */
.intro { padding: clamp(46px, 8vh, 92px) 0 clamp(40px, 7vh, 80px); }
.tagline {
  font-style: italic; font-weight: 400;
  font-size: clamp(22px, 2.6vw, 30px); line-height: 1.28; letter-spacing: -.01em;
  max-width: 30ch; margin-bottom: clamp(36px, 5vh, 60px);
}
.cols {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 64px);
  max-width: 1500px;
}
.cols p { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.5; }
.cols p + p { margin-top: 1em; }
.cols .soft { color: var(--ink-2); }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; gap: 18px; } .cols p { max-width: 60ch; } }

/* ── projects ────────────────────────────────────────── */
.projects { padding-bottom: 30px; }
.proj-head {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 0 22px;
}
.proj-head h2 { font-family: var(--sans); font-weight: 500; font-size: 26px; letter-spacing: -.01em; }
.proj-search {
  display: flex; align-items: center; gap: 10px; flex: 1; max-width: 320px;
  color: var(--ink-3); border-bottom: 1px solid var(--line); padding-bottom: 5px;
}
.proj-search i { font-size: 16px; }
.proj-search input {
  flex: 1; background: none; border: 0; outline: none;
  font-family: var(--sans); font-size: 13px; color: var(--ink);
}
.proj-search input::placeholder { color: var(--ink-3); }

.strip {
  display: flex; gap: clamp(14px, 1.4vw, 22px);
  overflow-x: auto; overflow-y: hidden;
  padding-bottom: 18px; scroll-snap-type: x proximity;
}
.strip::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-track { background: rgba(255,255,255,.05); border-radius: 4px; }
.strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 4px; }

.pcard { flex: none; width: clamp(190px, 22vw, 232px); scroll-snap-align: start; }
.pcover {
  position: relative; aspect-ratio: 1 / 1; border-radius: 3px; overflow: hidden;
  background: #0b0b0b;
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s ease, filter .3s ease;
}
.pcard:hover .pcover { transform: scale(1.012); filter: brightness(1.12); }
.pcover .cnum {
  position: absolute; top: 12px; left: 13px;
  font-family: var(--sans); font-size: 11px; letter-spacing: .12em; color: rgba(255,255,255,.8);
}
.pcover .cph {
  font-family: var(--sans); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.62);
}
.ptitle {
  text-align: center; margin-top: 16px;
  font-size: 18px; font-weight: 400; line-height: 1.2;
}
.pwhere { text-align: center; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.pyear {
  text-align: center; margin-top: 12px;
  font-family: var(--sans); font-size: 13px; color: var(--ink-2);
}

/* ── footer ──────────────────────────────────────────── */
.foot {
  display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between;
  padding: 30px 0 40px; margin-top: 20px;
  font-family: var(--sans); font-size: 12px; color: var(--ink-3);
}
.foot-founder {
  flex-basis: 100%; order: 9;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-top: 14px; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-family: var(--sans); font-size: 12px; color: var(--ink-3);
  letter-spacing: .02em; text-align: center;
}
.foot-founder a {
  color: #c8c2bc; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .22); padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.foot-founder a:hover { color: #f4eeec; border-color: currentColor; }

/* ============================================================
   Cinematic hero (replaces masthead/intro) — "urban questions"
   ============================================================ */
.hero {
  position: relative; min-height: 100vh;
  margin: 0 calc(var(--gutter) * -1) clamp(36px, 6vh, 72px);
  display: flex; flex-direction: column; overflow: hidden;
  background: #0a0907;
}
/* slate base with real terrain contours and a lat/lon graticule (assets/js/hero-topo.js) */
.hero { background: #34525a; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(70% 60% at 60% 40%, #46666e 0%, rgba(70,102,110,0) 70%),
    linear-gradient(180deg, #3a5960 0%, #33515a 60%, #2c474f 100%);
}
.hero-topo { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
  animation: topoDrift 90s ease-in-out infinite alternate; transform-origin: 60% 45%; }
.hero-topo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-sat { position: absolute; left: 0; right: 0; overflow: hidden; opacity: 0; transition: opacity 1.6s ease;
  box-shadow: 0 0 0 1px rgba(232,239,237,.55), 0 18px 50px -20px rgba(0,0,0,.6); }
.hero-sat.on { opacity: 1; }
.hero-sat img { position: absolute; display: block; max-width: none; filter: saturate(.82) contrast(1.06) brightness(.92); }
.hero-sat::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(52,82,90,.35), rgba(52,82,90,0) 18%, rgba(52,82,90,0) 82%, rgba(52,82,90,.35)); }
.hero-sat-cap { position: absolute; right: var(--gutter); top: 6px; z-index: 1; font-family: var(--sans); font-size: 10px;
  letter-spacing: .05em; color: rgba(255,255,255,.85); text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.hero-topo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-topo line { stroke: #e8efed; stroke-opacity: .30; stroke-width: 1; shape-rendering: crispEdges; }
.hero-topo .lbl { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; fill: #e8efed; fill-opacity: .62; letter-spacing: .04em; }
.hero-topo .lbl.h { text-anchor: end; }
.hero-topo .pin { fill: #f4eeec; } .hero-topo .ring { fill: none; stroke: #f4eeec; stroke-opacity: .7; }
@keyframes topoDrift { from { transform: scale(1.0) translate(0, 0); } to { transform: scale(1.05) translate(-1.2%, .8%); } }
@media (prefers-reduced-motion: reduce) { .hero-topo { animation: none; } }
@media (max-width: 720px) {
  .hero .hero-topo-cap { left: var(--gutter); right: var(--gutter); max-width: none; text-align: left; font-size: 9.5px; bottom: 14px; }
  .hero-sat-cap { display: none; }
}
.hero-topo-cap .m { display: none; } @media (max-width: 720px) { .hero-topo-cap .m { display: inline; } }
.hero-topo-cap { position: absolute; right: var(--gutter); bottom: 26px; text-align: right; max-width: 60vw; z-index: 3; pointer-events: none;
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .06em; color: rgba(242,241,236,.6); }
.hero-city {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 22%, #000 56%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 22%, #000 56%, #000 100%);
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(30,46,51,.55) 0%, rgba(30,46,51,0) 22%, rgba(30,46,51,0) 70%, rgba(10,9,7,.9) 100%);
}
.hero-nav, .hero-body { position: relative; z-index: 3; }

.hero-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px var(--gutter); gap: 24px;
}
.hero-nav .brand { font-family: var(--sans); font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.hero-nav .links { display: flex; gap: 30px; flex: 1; justify-content: center; }
.hero-nav .links a {
  font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(242,241,236,.78); transition: color .2s;
}
.hero-nav .links a:hover { color: var(--ink); }
.hero-nav .orb { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; }
.hero-nav .orb i { width: 6px; height: 6px; border: 1px solid rgba(242,241,236,.8); border-radius: 50%; }
@media (max-width: 820px) { .hero-nav .links { display: none; } }

.hero-body { flex: 1; position: relative; }

.hero-box {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -52%);
  width: min(440px, 76vw); padding: clamp(26px, 3vw, 40px);
  border: 1px solid rgba(242,241,236,.42);
  background: rgba(36,56,62,.62); backdrop-filter: blur(6px);
}
.hero-box .eyebrow { font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(242,241,236,.7); }
.hero-box h1 { font-size: clamp(38px, 5vw, 62px); font-weight: 400; line-height: 1.0; letter-spacing: -.01em; margin: 18px 0 0; }
.hero-box .div { width: 46px; height: 1px; background: rgba(242,241,236,.5); margin: 22px 0; }
.hero-box p { font-size: clamp(15px, 1.4vw, 17px); line-height: 1.5; color: rgba(242,241,236,.9); max-width: 30ch; }
.hero-box .verbs { font-family: var(--sans); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(242,241,236,.7); margin-top: 26px; }
.hero-box .down {
  position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%);
  width: 44px; height: 44px; border: 1px solid rgba(242,241,236,.32); border-radius: 50%;
  background: #2c474f; display: grid; place-items: center; color: var(--ink);
}

.hero-index {
  position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 13px;
  font-family: var(--sans); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.hero-index .coords { color: rgba(242,241,236,.6); letter-spacing: .04em; text-transform: none; font-size: 12px; line-height: 1.45; margin-bottom: 10px; }
.hero-index .row { display: flex; align-items: center; gap: 11px; color: rgba(242,241,236,.62); transition: color .2s; }
.hero-index .row:hover { color: var(--ink); }
.hero-index .row b { font-weight: 400; color: rgba(242,241,236,.45); }
.hero-index .row.on { color: var(--ink); }
.hero-index .row.on::after { content: ""; width: 26px; height: 1px; background: rgba(242,241,236,.6); }
@media (max-width: 1080px) { .hero-index { display: none; } }

.hero-labels { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 28px; align-items: flex-end; text-align: right; }
.hero-label .k { font-family: var(--sans); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(242,241,236,.55); }
.hero-label .v { font-family: var(--sans); font-size: 13px; color: rgba(242,241,236,.92); margin-top: 3px; display: flex; align-items: center; gap: 7px; justify-content: flex-end; }
.hero-label .v i { width: 6px; height: 6px; border-radius: 50%; background: var(--lc, var(--green)); }
@media (max-width: 1080px) { .hero-labels { display: none; } }

.hero-scroll {
  position: absolute; left: var(--gutter); bottom: 26px;
  font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(242,241,236,.6); line-height: 1.5;
}
@media (max-width: 1080px) { .hero-scroll { display: none; } }

/* study list sits on the same frosted panel as the title box, so it reads over the satellite row */
.hero-index { background: rgba(36,56,62,.66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(242,241,236,.28); padding: 16px 20px; margin-left: -20px; }

/* ============================================================
   Atlas: one continuous contour map behind the hero and the projects.
   Wide screens: each study sits on its own 2 x 2 block of grid cells (assets/js/hero-topo.js).
   ============================================================ */
.atlas { position: relative; margin: 0 calc(var(--gutter) * -1); overflow: hidden;
  background: linear-gradient(180deg, #3a5960 0%, #34525a 35%, #2f4b53 100%); }
.atlas::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0), #000); }
.atlas .hero { margin: 0; background: transparent; z-index: 1; }
.atlas .hero-topo { inset: auto; top: 0; left: 0; right: 0; height: 100vh; z-index: 0; animation: none; }
#topo-img { position: absolute; inset: auto; max-width: none; object-fit: fill; }
.hero-scrim { background: linear-gradient(180deg, rgba(30,46,51,.55) 0%, rgba(30,46,51,0) 22%); }
.hero-topo .hl rect { fill: none; stroke: #f4f7f6; stroke-width: 1.5; }
.hero-topo .hl path { stroke: #f4f7f6; stroke-width: 2; fill: none; }

.atlas .projects { position: relative; z-index: 1; padding: 10px var(--gutter) 60px; }
.atlas .proj-head h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; }
.atlas .proj-search { color: rgba(242,241,236,.7); border-bottom-color: rgba(242,241,236,.45); }
.atlas .proj-search input::placeholder { color: rgba(242,241,236,.6); }

/* study sheets */
.atlas .pcard { display: flex; flex-direction: column; position: relative;
  background: rgba(30,47,53,.82); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  border: 1px solid rgba(232,239,237,.34); transition: border-color .25s, background .25s, left .45s, top .45s; }
.atlas .pcard:hover { border-color: rgba(244,247,246,.95); background: rgba(30,47,53,.94); }
.atlas .pcover { flex: 1; aspect-ratio: auto; min-height: 0; border-radius: 0; }
.atlas .pcard:hover .pcover { transform: none; filter: brightness(1.1); }
.atlas .pcover .sheet { position: absolute; top: 10px; right: 10px; font-family: ui-monospace, 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: .03em; color: #eef3f1; background: rgba(20,32,36,.72); padding: 3px 6px; }
.atlas .pcover .cnum { background: rgba(20,32,36,.72); padding: 3px 6px; top: 10px; left: 10px; }
.atlas .ptitle { text-align: left; margin: 0; padding: 10px 12px 0; font-size: 19px; line-height: 1.15; }
.atlas .pwhere { text-align: left; padding: 3px 12px 11px; font-family: var(--sans); font-size: 12px; color: rgba(242,241,236,.66); }
.atlas .pyear { position: absolute; right: 12px; bottom: 11px; margin: 0; font-size: 12px; color: rgba(242,241,236,.6); }
.atlas .pcard.off { display: none; }

.atlas.sheets .projects { padding: 0; }
.atlas.sheets .proj-head { position: absolute; padding: 0; align-items: center; justify-content: space-between; }
.atlas.sheets .strip { position: absolute; left: 0; right: 0; top: 0; display: block; overflow: visible; padding: 0; scroll-snap-type: none; }
.atlas.sheets .pcard { position: absolute; width: auto; }
@media (max-width: 899px) {
  .atlas .pcard { width: clamp(220px, 70vw, 280px); }
  .atlas .pcover { aspect-ratio: 1 / 1; flex: none; }
}

.atlas .pwhere { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 52px; }
@media (max-width: 720px) { .hero-scroll { display: none; } }

.atlas .ptitle { font-size: clamp(15px, 1.3vw, 19px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* sliding strip of studies over the atlas (all screen sizes) */
.atlas .strip { padding-bottom: 22px; }
.atlas .pcard { width: clamp(220px, 19vw, 270px); }
.atlas .pcover { aspect-ratio: 1 / 1; flex: none; }
.atlas .strip::-webkit-scrollbar-track { background: rgba(232,239,237,.12); }
.atlas .strip::-webkit-scrollbar-thumb { background: rgba(232,239,237,.5); }
.atlas .projects { padding-top: 40px; }
.atlas .projects { padding-bottom: 130px; }

/* Projects heading: larger, bold, readable over the contours */
.atlas .proj-head { gap: 26px; padding-bottom: 28px; }
.atlas .proj-head h2 { font-size: clamp(40px, 4.4vw, 60px); font-weight: 600; letter-spacing: -.015em; line-height: 1;
  text-shadow: 0 2px 18px rgba(20,32,36,.9), 0 0 2px rgba(20,32,36,.8); }
.atlas .proj-search { max-width: 380px; padding: 9px 14px; border: 1px solid rgba(242,241,236,.45);
  background: rgba(30,47,53,.72); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); color: #eef3f1; }
.atlas .proj-search input { font-size: 15px; }
.atlas .proj-search input::placeholder { color: rgba(242,241,236,.75); }
