:root {
  --bg: #121314;
  --bg-raised: #1b1c1e;
  --line: #2a2b2e;
  --text: #efe9df;
  --muted: #a39e95;
  --accent: #d9b77e;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --topbar-h: 72px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
main { outline: none; min-height: calc(100vh - 160px); }
button { font: inherit; color: inherit; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(18,19,20,.92), rgba(18,19,20,.78));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .3s, border-color .3s;
}
.topbar.over-hero { background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0)); border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.brand {
  font-family: var(--serif); font-weight: 600; font-size: 28px; letter-spacing: .01em;
  text-decoration: none; white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-link, .nav-year {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border: 0; background: none; cursor: pointer;
  font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: var(--text); opacity: .85; border-radius: 6px;
}
.nav-link:hover, .nav-year:hover, .nav-item.open .nav-year { opacity: 1; }
.nav-link.active, .nav-year.active { color: var(--accent); opacity: 1; }
.nav-year .chev { width: 9px; height: 9px; transition: transform .2s; }
.nav-item.open .chev { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translate(-50%, -4px);
  min-width: 230px; padding: 8px;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-item.open .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (hover: hover) and (min-width: 821px) {
  .nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .nav-item:hover .chev { transform: rotate(180deg); }
}
.dropdown a {
  display: flex; justify-content: space-between; gap: 18px; align-items: baseline;
  padding: 9px 12px; border-radius: 6px; text-decoration: none; font-size: 15px;
}
.dropdown a:hover, .dropdown a:focus-visible { background: rgba(255,255,255,.06); }
.dropdown a .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.dropdown .all { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; color: var(--muted); font-size: 13px; }

.menu-toggle { display: none; }

@media (max-width: 820px) {
  :root { --topbar-h: 62px; }
  .brand { font-size: 24px; }
  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 7px;
    width: 44px; height: 44px; padding: 10px; margin-right: -10px;
    background: none; border: 0; cursor: pointer;
  }
  .menu-toggle span { display: block; height: 1.5px; background: var(--text); transition: transform .25s; }
  .menu-open .menu-toggle span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .menu-open .menu-toggle span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .nav {
    position: fixed; inset: var(--topbar-h) 0 0 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gutter) 40px; overflow-y: auto;
    background: var(--bg);
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open .topbar { background: var(--bg); }
  .nav-link, .nav-year {
    width: 100%; justify-content: space-between;
    padding: 16px 0; font-size: 15px; border-bottom: 1px solid var(--line); border-radius: 0;
  }
  .dropdown {
    position: static; transform: none; min-width: 0;
    background: none; border: 0; box-shadow: none; padding: 0 0 8px;
    display: none; opacity: 1; visibility: visible;
  }
  .nav-item.open .dropdown { display: block; transform: none; }
  .dropdown a { padding: 12px 4px; font-size: 17px; }
  .dropdown .all { border-radius: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 480px;
  display: flex; align-items: flex-end;
  padding: 0 var(--gutter) clamp(48px, 9vh, 96px);
  overflow: hidden; background: #000;
}
.hero img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: heroIn 1.6s ease both;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.15) 45%, rgba(0,0,0,0) 70%);
}
.hero-text { position: relative; z-index: 1; max-width: 760px; }
.hero h1 {
  margin: 0; font-family: var(--serif); font-weight: 500;
  font-size: clamp(42px, 7vw, 88px); line-height: 1.02; letter-spacing: -.005em;
}
.hero p { margin: 14px 0 0; font-size: clamp(16px, 1.6vw, 19px); color: rgba(239,233,223,.85); max-width: 520px; }
.hero .scroll-cue {
  position: absolute; right: var(--gutter); bottom: clamp(48px, 9vh, 96px); z-index: 1;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: rgba(239,233,223,.75);
}
@media (max-width: 820px) {
  /* Stack the "Trips" cue below the text so they never overlap on phones. */
  .hero { padding-bottom: 104px; }
  .hero .scroll-cue { right: auto; left: 50%; transform: translateX(-50%); bottom: 36px; white-space: nowrap; }
}
.hero.empty { background: radial-gradient(ellipse at 30% 20%, #2b2a27, #121314 70%); }
@keyframes heroIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

/* ---------- Sections / cards ---------- */
.section { padding: clamp(56px, 8vw, 104px) var(--gutter) 0; max-width: 1600px; margin: 0 auto; }
.page { padding-top: calc(var(--topbar-h) + clamp(32px, 5vw, 64px)); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.section-head h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 4vw, 48px); line-height: 1; }
.section-head a, .section-head span { color: var(--muted); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.section-head a:hover { color: var(--text); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(16px, 2vw, 28px); }
.card { text-decoration: none; display: block; }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-raised); border-radius: 4px; }
.card-credit {
  position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px;
  background: rgba(10,10,11,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 13px; letter-spacing: .02em; color: var(--text);
  opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; pointer-events: none;
}
.card:hover .card-credit, .card:focus-visible .card-credit { opacity: 1; transform: none; }
@media (hover: none) { .card-credit { opacity: 1; transform: none; } }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .4s; }
.card:hover .card-img img { transform: scale(1.035); }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 2px 0; }
.card-meta h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.2; }
.card-meta span { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ---------- Trip page ---------- */
.trip-head { max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter) clamp(24px, 4vw, 40px); }
.crumbs { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.trip-head h1 { margin: 8px 0 6px; font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 6vw, 76px); line-height: 1.02; }
.trip-head p { margin: 0; color: var(--muted); }

.justified { padding: 0 var(--gutter); max-width: 1600px; margin: 0 auto; }
.jrow { display: flex; gap: 8px; margin-bottom: 8px; }
.jrow button { padding: 0; border: 0; background: var(--bg-raised); cursor: zoom-in; overflow: hidden; border-radius: 2px; flex: none; }
.jrow img { width: 100%; height: 100%; object-fit: cover; transition: opacity .4s, transform .5s; opacity: 0; }
.jrow img.loaded { opacity: 1; }
.jrow button:hover img { transform: scale(1.02); }

.trip-pager { display: flex; justify-content: space-between; gap: 16px; max-width: 1600px; margin: 0 auto; padding: 48px var(--gutter) 0; }
.trip-pager a { text-decoration: none; color: var(--muted); font-size: 14px; }
.trip-pager a strong { display: block; color: var(--text); font-family: var(--serif); font-size: 24px; font-weight: 600; }
.trip-pager a:hover strong { color: var(--accent); }
.trip-pager .next { text-align: right; margin-left: auto; }

/* ---------- About ---------- */
.about { max-width: 720px; }
.about h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 6vw, 72px); line-height: 1.02; margin: 0 0 24px; }
.about p { font-size: 18px; color: #d8d2c8; white-space: pre-line; }
.about .contact { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }

.empty-note { color: var(--muted); padding: 40px 0; }

/* ---------- Footer ---------- */
.footer {
  max-width: 1600px; margin: clamp(64px, 9vw, 120px) auto 0; padding: 28px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  color: var(--muted); font-size: 13px; border-top: 1px solid var(--line);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer .links { display: flex; gap: 20px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(8,8,9,.97);
  display: flex; align-items: center; justify-content: center;
  touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.lb-figure img { max-width: calc(100vw - 140px); max-height: calc(100vh - 110px); max-height: calc(100svh - 110px); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-figure figcaption { margin-top: 14px; color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.lb-close, .lb-nav { position: absolute; background: none; border: 0; cursor: pointer; color: rgba(239,233,223,.8); line-height: 1; }
.lb-close:hover, .lb-nav:hover { color: #fff; }
.lb-close { top: 14px; right: 18px; font-size: 40px; padding: 6px 10px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 64px; padding: 20px 18px; }
.lb-prev { left: 4px; }
.lb-next { right: 4px; }
@media (max-width: 820px) {
  .lb-figure img { max-width: 100vw; max-height: calc(100svh - 120px); }
  .lb-nav { display: none; }
}

body.no-scroll { overflow: hidden; }

/* ---------- Flight maps ---------- */
.flightmap { position: relative; margin: 0 0 clamp(24px, 3vw, 36px); min-height: 240px; }
.flightmap svg {
  display: block; width: 100%; height: auto; overflow: hidden;
  /* soft edges so the cropped map fades into the page */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
  mask-composite: intersect;
}
.fm-states { fill: none; stroke: rgba(239, 233, 223, .1); stroke-width: .5; stroke-linejoin: round; }
.fm-coast { fill: none; stroke: rgba(239, 233, 223, .32); stroke-width: .7; stroke-linejoin: round; }
.fm-borders { fill: none; stroke: rgba(239, 233, 223, .16); stroke-width: .5; stroke-linejoin: round; }
.fm-arc { fill: none; stroke: var(--accent); stroke-linecap: round; }
.fm-arc.flight {
  stroke-width: 1.4; opacity: .85;
  stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len);
}
.fm-arc.drive { stroke-width: 1.1; stroke-dasharray: 2 4; opacity: 0; }
.flightmap.drawn .fm-arc.flight { stroke-dashoffset: 0; transition: stroke-dashoffset 1.3s cubic-bezier(.45, 0, .2, 1) calc(var(--i) * 70ms); }
.flightmap.drawn .fm-arc.drive { opacity: .7; transition: opacity .8s ease .2s; }
.flightmap.instant .fm-arc { transition: none !important; }
.fm-dot { cursor: pointer; outline: none; }
.fm-dot .hit { fill: transparent; }
.fm-dot .core { fill: var(--accent); transition: r .15s; }
.fm-dot .halo { fill: var(--accent); opacity: 0; transition: opacity .2s; }
.fm-dot.home .core { fill: var(--bg); stroke: var(--accent); stroke-width: 1.8; }
.fm-dot.on .halo, .fm-dot:hover .halo, .fm-dot:focus-visible .halo { opacity: .25; }
.fm-dot.on .core, .fm-dot:hover .core { r: 5; }
.fm-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 10px; color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.fm-legend { display: inline-flex; align-items: center; gap: 8px; }
.fm-legend .key { display: inline-block; width: 22px; height: 0; border-top: 1.5px solid var(--accent); margin-left: 6px; }
.fm-legend .key.drive { border-top-style: dotted; border-top-width: 2px; margin-left: 14px; }
.fm-places { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.fm-place {
  border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer;
  padding: 5px 11px; border-radius: 999px; font-size: 13px; line-height: 1.3; transition: color .15s, border-color .15s;
}
.fm-place[hidden] { display: none; }
.fm-more { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 5px 8px; font-size: 13px; }
.fm-place span { margin-left: 6px; color: var(--accent); font-size: 12px; }
.fm-place:hover, .fm-place.on, .fm-place:focus-visible { color: var(--text); border-color: var(--accent); outline: none; }
.fm-tip {
  position: absolute; z-index: 2; pointer-events: none; white-space: nowrap;
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
  background: var(--bg-raised); border: 1px solid var(--line); color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
