:root {
  --paper: #f5f2ea;
  --ink: #1d1b16;
  --green: #2f3a2c;
  --rust: #8c3a1e;
  --muted: #6f6a5d;
  --line: #d8d3c4;
  --line-soft: #e3ded1;
  --sage: #cfd6c6;
  --accent: #c8552f;
  --cream: #fdfbf5;
  --gutter: clamp(16px, 4vw, 24px);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
html, body { margin: 0; padding: 0; background: var(--paper); }
body {
  font-family: Archivo, Helvetica, Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--rust); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.label { font-size: 11px; letter-spacing: 0.14em; color: var(--muted); }
body.lb-open { overflow: hidden; }

/* Top bar: floats over the video with a frosted background, turns solid
   once the video has scrolled away (app.js adds .solid). */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: rgba(20,24,18,0.35); color: var(--paper);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  transition: background-color .2s ease;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px 20px; padding: 10px clamp(14px, 4vw, 28px);
}
.topbar.solid { background: var(--green); }
.topbar-title { display: flex; align-items: center; gap: 10px; }
.brand {
  font-weight: 800; font-size: clamp(15px, 4vw, 17px); letter-spacing: 0.02em;
  text-transform: uppercase; white-space: nowrap;
}
.topbar-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.topbar-nav a { color: var(--paper); white-space: nowrap; }

/* Hero */
.hero {
  position: relative; width: 100%; display: flex; flex-direction: column;
  min-height: min(100vh, 1100px); min-height: min(100svh, 1100px);
}
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(175deg, rgba(16,18,14,0.70) 0%, rgba(16,18,14,0.45) 34%, rgba(16,18,14,0.10) 72%, rgba(16,18,14,0.10) 100%);
}
.hero-inner {
  position: relative; width: 100%; max-width: 1400px; flex: 1;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  /* --topbar-h is set by app.js so content starts below the floating header. */
  padding: calc(var(--topbar-h, 56px) + clamp(20px, 4vw, 44px)) clamp(16px, 4vw, 28px) clamp(28px, 4vw, 44px);
}
.badge {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 10px;
  padding: 8px 14px; background: var(--accent); color: var(--cream);
  font-size: clamp(11px, 2.8vw, 12.5px); letter-spacing: 0.14em; text-transform: uppercase;
}
.hero-text { display: flex; flex-direction: column; gap: clamp(16px, 2.4vw, 24px); text-shadow: 0 1px 12px rgba(0,0,0,0.35); }
.hero h1 {
  margin: 0; font-size: clamp(52px, 12vw, 150px); line-height: 0.84;
  font-weight: 800; letter-spacing: -0.045em; color: var(--cream); text-wrap: balance;
}
.accent { color: var(--accent); }
.hero p {
  margin: 0; max-width: 680px; font-size: clamp(17px, 2vw, 23px);
  line-height: 1.4; font-weight: 500; color: var(--cream); text-wrap: pretty;
  /* Tight shadow for edges plus a wide soft one, so it reads over bright footage. */
  text-shadow: 0 1px 2px rgba(0,0,0,0.7), 0 2px 18px rgba(0,0,0,0.6);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; text-shadow: none; }
.btn-solid, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 26px; font-size: 16px; font-weight: 700; letter-spacing: 0.01em;
}
.btn-solid { background: var(--cream); color: var(--ink); }
.btn-solid:hover { background: var(--accent); color: var(--cream); text-decoration: none; }
.btn-ghost {
  border: 1.5px solid rgba(253,251,245,0.75); color: var(--cream);
  background: rgba(16,18,14,0.28); text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  box-shadow: 0 1px 10px rgba(0,0,0,0.25);
}
.btn-ghost:hover { border-color: var(--cream); background: rgba(16,18,14,0.45); color: var(--cream); text-decoration: none; }

/* Key facts: frosted strip along the bottom of the video */
.facts {
  position: relative; width: 100%; overflow: hidden;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  background: rgba(20,24,18,0.42);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
}
/* Dividers on each cell's top and left; the ones on the outer edge are clipped. */
.fact {
  padding: 22px clamp(16px, 4vw, 28px);
  box-shadow: -1px 0 0 rgba(253,251,245,0.16), 0 -1px 0 rgba(253,251,245,0.16);
}
.fact .label { letter-spacing: 0.16em; color: #c3ceb6; margin-bottom: 10px; }
.fact-main { font-size: 18px; font-weight: 600; line-height: 1.35; color: var(--cream); }
.fact-time { font-size: 18px; font-weight: 700; color: #f4b79c; margin-top: 4px; }
.fact-sub { font-size: 15px; color: #c3ceb6; margin-top: 4px; line-height: 1.45; }
.fact-warn { font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--cream); }

/* Photo library */
.photos-head { padding: 40px var(--gutter) 18px; }
.photos-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.photos-head h2 { margin: 8px 0 0; font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.02em; }
.photos-count { font-size: 12px; color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tab {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.06em;
  min-height: 44px; padding: 10px 14px; border: 1px solid var(--green);
  cursor: pointer; background: transparent; color: var(--green);
}
.tab[aria-selected="true"] { background: var(--green); color: var(--paper); }

.gallery { padding: 0 var(--gutter) 52px; }
.group { margin-bottom: 44px; }
.group-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 18px;
}
.group-head h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.group-head span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr));
  gap: clamp(8px, 2vw, 14px);
}
.tile {
  position: relative; aspect-ratio: 1 / 1; padding: 0; margin: 0;
  border: 1px solid #d3cdbd; background: #e6e0d2; overflow: hidden;
}
button.tile { cursor: pointer; display: block; width: 100%; }
button.tile:hover, button.tile:focus-visible { border-color: var(--green); outline: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
button.tile:hover img { transform: scale(1.03); }
.tile-empty {
  background: repeating-linear-gradient(135deg, #e6e0d2 0 9px, #dbd4c3 9px 18px);
  display: flex; align-items: center; justify-content: center; padding: 10px;
}
.tile-empty span {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.08em;
  color: #8a8474; background: var(--paper); padding: 3px 6px;
}

.more-wrap { padding: 0 var(--gutter) 52px; margin-top: -24px; }
.more-wrap[hidden] { display: none; }
.more-btn {
  width: 100%; min-height: 52px; padding: 14px 18px; cursor: pointer;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--green); color: var(--paper); border: none;
}
.more-btn:hover { background: var(--accent); }

/* Item lists */
.lists {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 1px; background: var(--line); border-top: 1px solid var(--line);
}
.list-col { background: var(--paper); padding: 40px var(--gutter); }
.list-col h2 {
  margin: 0 0 4px; font-size: clamp(26px, 3vw, 38px); font-weight: 800;
  text-decoration: underline; text-underline-offset: 5px; letter-spacing: -0.02em;
}
.numbered { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; }
.numbered li {
  display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 17px; line-height: 1.4;
}
.numbered .n {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #a09a8a;
  padding-top: 4px; min-width: 24px;
}

/* Terms */
.terms { background: var(--green); color: var(--paper); padding: 48px var(--gutter); }
.terms-inner { max-width: 900px; display: flex; flex-direction: column; gap: 10px; font-size: 18px; line-height: 1.5; }
.terms .label { color: var(--sage); margin-bottom: 8px; }
.terms-warn {
  font-size: 22px; font-weight: 800; line-height: 1.3; margin-bottom: 8px;
  text-decoration: underline; text-underline-offset: 4px;
}

/* Footer */
.footer {
  background: var(--ink); color: var(--paper); padding: 30px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: baseline;
}
.brand-lg { font-size: 24px; font-weight: 800; }
.footer-info { font-size: 12.5px; line-height: 1.7; color: #c9c4b6; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(15,16,13,0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; gap: 16px;
}
.lightbox[hidden] { display: none; }
.lb-bar { display: flex; align-items: center; gap: 16px; width: 100%; max-width: 1100px; justify-content: space-between; }
.lb-pos { font-size: 12px; color: #b8b3a5; }
.lb-close {
  font-size: 12px; background: transparent; color: var(--paper); border: 1px solid var(--muted);
  min-height: 44px; padding: 8px 14px; cursor: pointer; white-space: nowrap;
}
.lb-close:hover { border-color: var(--paper); }
.lb-stage {
  margin: 0; width: 100%; max-width: 1100px; flex: 0 1 auto; min-height: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px; touch-action: pan-y;
}
.lb-stage img { max-width: 100%; max-height: calc(100vh - 220px); max-height: calc(100dvh - 220px); object-fit: contain; display: block; }
.lb-stage figcaption { color: #e6e1d4; font-size: 15px; text-align: center; }
.lb-stage figcaption:empty { display: none; }
.lb-nav { display: flex; gap: 10px; }
.lb-btn {
  font-size: 13px; background: var(--paper); color: var(--ink); border: none;
  min-height: 48px; padding: 12px 26px; cursor: pointer; font-weight: 500;
}
.lb-btn:hover { background: var(--sage); }

@media (prefers-reduced-motion: reduce) {
  button.tile img { transition: none; }
}
