:root {
  --bg: #11100e; --bg-2: #1a1815; --paper: #f3eee5; --muted: #a59d90; --line: #ffffff17;
  --accent: #d39b6a; --gutter: clamp(16px, 4.5vw, 64px);
  --font-head: "Instrument Serif", Georgia, serif; --font-body: "Hanken Grotesk", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--paper); font: 400 1rem/1.6 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: italic; color: var(--accent); }
h1, h2 { font-family: var(--font-head); font-weight: 400; letter-spacing: -0.01em; }
h2 { font-size: clamp(2.6rem, 6.5vw, 5.6rem); line-height: 0.95; }
.kicker { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.topbar {
  position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter); transition: background 0.4s, padding 0.4s;
}
body.scrolled .topbar { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); padding-block: 0.8rem; }
.brand { font: 400 1.6rem var(--font-head); text-decoration: none; }
.topbar nav { display: flex; gap: clamp(14px, 2.5vw, 32px); font-size: 0.92rem; }
.topbar nav a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.topbar nav a:hover { color: var(--paper); }

.pinned { position: relative; height: var(--height, 300vh); }
.screen { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

.tunnel { position: absolute; inset: 0; perspective: 900px; perspective-origin: 50% 50%; z-index: 0; }
.flight-shade { z-index: 1; }
.flight-text { z-index: 2; }
.flight-final { border-radius: 2px; }
.world { position: absolute; inset: 0; transform-style: preserve-3d; }
.flight-photo {
  position: absolute; left: 50%; top: 50%; width: var(--w); aspect-ratio: 3 / 2; margin: calc(var(--w) / -2) 0 0 calc(var(--w) / -2);
  margin-top: calc(var(--w) / -3); border-radius: 4px; overflow: hidden; backface-visibility: hidden;
  box-shadow: 0 30px 80px -20px #000c; opacity: 0;
}
.flight-photo img { width: 100%; height: 100%; object-fit: cover; }
.flight-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, #11100e55 0%, #11100e00 35%, #11100ecc 100%); pointer-events: none; }
.flight-text {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 var(--gutter); pointer-events: none;
}
.flight-text h1 { font-size: clamp(3.4rem, 11vw, 10.5rem); line-height: 0.88; max-width: 11ch; text-shadow: 0 6px 60px #000a; }
.flight-text h1 em { display: block; }
.flight-tagline { max-width: 40ch; margin-top: 1.6rem; color: #e9e2d6; font-size: clamp(1rem, 1.4vw, 1.15rem); text-shadow: 0 2px 20px #000; }
.hint { position: absolute; bottom: 28px; left: 50%; translate: -50% 0; font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.hint::after { content: ""; display: block; width: 1px; height: 38px; margin: 10px auto 0; background: linear-gradient(var(--muted), transparent); animation: baja 2s ease-in-out infinite; }
@keyframes baja { 0%, 100% { transform: scaleY(0.3); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } }

.figures {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line);
  border-block: 1px solid var(--line); margin-top: -1px; position: relative; z-index: 2;
}
.figures div { background: var(--bg); padding: clamp(36px, 6vw, 80px) var(--gutter); }
.figures strong { display: block; font: 400 clamp(3rem, 7vw, 6.4rem)/1 var(--font-head); font-variant-numeric: tabular-nums; }
.figures span { color: var(--muted); font-size: 0.95rem; }

.manifesto { padding: clamp(110px, 20vw, 260px) var(--gutter); max-width: 1300px; margin: 0 auto; }
.manifesto p { font: 400 clamp(2rem, 4.6vw, 4.2rem)/1.12 var(--font-head); }
.manifesto .word { opacity: 0.14; transition: opacity 0.25s; }
.manifesto .word.lit { opacity: 1; }

#featured .screen { display: flex; flex-direction: column; justify-content: center; gap: clamp(24px, 4vh, 48px); }
.carousel-head { padding: 0 var(--gutter); }
.track { display: flex; gap: clamp(18px, 2.5vw, 36px); padding: 0 var(--gutter); width: max-content; will-change: transform; perspective: 1400px; }
.featured { width: clamp(270px, 34vw, 520px); flex: none; text-decoration: none; display: block; transform-style: preserve-3d; }
.featured .frame { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; position: relative; box-shadow: 0 40px 80px -30px #000; }
.featured img { width: 118%; height: 100%; max-width: none; object-fit: cover; margin-left: -9%; transition: filter 0.4s; filter: saturate(0.9); }
.featured:hover img { filter: saturate(1.05); }
.featured .score { position: absolute; top: 14px; right: 14px; background: #11100ecc; backdrop-filter: blur(6px); border-radius: 99px; padding: 4px 11px; font-size: 0.85rem; font-weight: 600; }
.featured .place { display: block; margin-top: 16px; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.featured strong { display: block; font: 400 clamp(1.6rem, 2.4vw, 2.3rem)/1.05 var(--font-head); margin-top: 6px; }
.carousel-progress { margin: 0 var(--gutter); height: 1px; background: var(--line); }
.carousel-progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }
.unpinned { height: auto !important; }
.unpinned .screen { position: relative; height: auto; padding: clamp(80px, 12vw, 140px) 0; }
.unpinned .carousel-progress { display: none; }

.directory { padding: clamp(90px, 12vw, 160px) var(--gutter) 100px; max-width: 1500px; margin: 0 auto; }
.directory-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.search input {
  font: inherit; color: var(--paper); background: var(--bg-2); border: 1px solid var(--line); border-radius: 99px;
  padding: 12px 20px; width: min(360px, 100%); outline: none; transition: border-color 0.2s;
}
.search { width: min(360px, 100%); }
.search input:focus { border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.chips button {
  font: inherit; font-size: 0.85rem; color: var(--muted); background: transparent; border: 1px solid var(--line);
  border-radius: 99px; padding: 6px 14px; cursor: pointer; transition: all 0.2s;
}
.chips button:hover { color: var(--paper); border-color: #ffffff40; }
.chips button.active { background: var(--paper); color: var(--bg); border-color: var(--paper); }
.chips small { opacity: 0.6; margin-left: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(28px, 3vw, 44px) clamp(18px, 2vw, 28px); }
.card { text-decoration: none; display: block; opacity: 0; transform: translateY(40px); transition: opacity 0.7s, transform 0.7s cubic-bezier(.2, .7, .2, 1); }
.card.seen { opacity: 1; transform: none; }
.card .frame { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: var(--bg-2); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(.2, .7, .2, 1); }
.card:hover img { transform: scale(1.05); }
.card .place { display: flex; justify-content: space-between; margin-top: 14px; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.card .place b { color: var(--paper); font-weight: 600; letter-spacing: 0; }
.card strong { display: block; font: 400 1.7rem/1.1 var(--font-head); margin-top: 4px; }
.card p { color: var(--muted); font-size: 0.92rem; margin-top: 6px; }
.empty { color: var(--muted); padding: 40px 0; }
.more { text-align: center; margin-top: 56px; }
.more button {
  font: inherit; font-weight: 500; color: var(--paper); background: transparent; border: 1px solid #ffffff40;
  border-radius: 99px; padding: 13px 30px; cursor: pointer; transition: all 0.2s;
}
.more button:hover { background: var(--paper); color: var(--bg); }

.site-footer { border-top: 1px solid var(--line); padding: 48px var(--gutter); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 0.85rem; }
.footer-brand { font: 400 1.6rem var(--font-head); color: var(--paper); }
.footer-legal { width: 100%; font-size: 0.75rem; opacity: 0.7; }
.footer-legal a { color: inherit; text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .topbar nav { display: none; }
  .figures { grid-template-columns: 1fr; }
  .figures div { padding-block: 32px; }
}
