/* Explore the Mountain: 3D hero, launch list, glance band. */
.hero { background: var(--ground); }
.terrain { position: relative; height: min(calc(100svh - 64px), 920px); min-height: 520px; overflow: hidden;
  background: linear-gradient(180deg, rgb(177 211 238 / .8) 0%, rgb(177 211 238 / .55) 40%, rgb(177 211 238 / .55) 100%), #fff; isolation: isolate; }
:root[data-theme="dark"] .terrain { background: linear-gradient(180deg, #0f1d33 0%, #1a2a44 60%, #232c3c 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .terrain { background: linear-gradient(180deg, #0f1d33 0%, #1a2a44 60%, #232c3c 100%); } }
.terrain__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; z-index: 0; }
.terrain__canvas:active { cursor: grabbing; }
.terrain:focus-visible { outline-offset: -4px; }
.terrain__overlay { position: absolute; inset: 0; pointer-events: none; z-index: 2; }

/* Headline over the model */
.hero__copy { position: absolute; z-index: 3; left: max(16px, env(safe-area-inset-left, 0px)); top: var(--space-8); max-width: 520px;
  padding: var(--space-6); border-radius: 4px; background: color-mix(in srgb, var(--surface) 62%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: var(--shadow-1); display: grid; gap: var(--space-3); }
.hero__eyebrow { margin: 0; }
.hero__title { margin: 0; font: 800 clamp(68px, 10vw, 124px)/.88 var(--font-display); letter-spacing: -0.01em; text-wrap: balance; }
.hero__title { display: inline-flex; flex-direction: column; width: fit-content; max-width: 100%; align-self: flex-start; }
.hero__sub { display: flex; justify-content: space-between; margin-top: .22em; padding-inline: .3em; font: 600 clamp(20px, 2.4vw, 30px)/1 var(--font-sans); }
.hero__gap { width: .5em; }
.hero__lede { margin: 0 0 var(--space-2); font-size: 18px; line-height: 28px; color: var(--ink-muted); }
.hero__help { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2) var(--space-6); padding-block: var(--space-3); }
.hero__help p { margin: 0; max-width: 92ch; }

.terrain__status { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-2); }
.terrain[data-state="ready"] .terrain__status { display: none; }

/* Panels over the model */
.tpanel { position: absolute; z-index: 5; right: max(16px, env(safe-area-inset-right, 0px)); top: var(--space-4); width: 240px;
  background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-2); font-size: 14px; line-height: 20px; }
.tpanel summary { cursor: pointer; padding: var(--space-3) var(--space-4); font: 700 13px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; list-style: none; display: flex; justify-content: space-between; }
.tpanel summary::-webkit-details-marker { display: none; }
.tpanel summary::after { content: "+"; font-size: 18px; line-height: 16px; }
.tpanel[open] summary::after { content: "–"; }
.tpanel fieldset { border: 0; margin: 0; padding: 0 var(--space-4) var(--space-2); display: grid; gap: var(--space-1); }
.tpanel label { display: flex; align-items: center; gap: var(--space-2); min-height: 32px; cursor: pointer; }
.tpanel label small { color: var(--ink-muted); }
.tpanel input { width: 18px; height: 18px; accent-color: var(--storm); margin: 0; }
.tpanel__row { display: grid; gap: var(--space-1); padding: var(--space-2) var(--space-4) var(--space-3); border-top: 1px solid var(--line); }
.tpanel__label { font: 700 12px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.tpanel .seg { justify-self: start; }
.key { width: 14px; height: 14px; flex: none; display: inline-block; border: 1.5px solid var(--ink); }
.key--launch { background: #DDE64F; clip-path: polygon(50% 0, 100% 100%, 0 100%); border: 0; }
.key--lz { background: var(--sky); border-radius: 50%; }
.key--road { height: 4px; border: 0; background: var(--storm-violet); border-radius: 2px; }
.key--contour { height: 2px; border: 0; background: var(--storm); box-shadow: 0 4px 0 var(--line-strong); }
.key--place { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); border: 0; margin-inline: 3px; }

.tnav { position: absolute; z-index: 5; right: max(16px, env(safe-area-inset-right, 0px)); bottom: var(--space-12); display: grid; gap: var(--space-2); justify-items: center; }
.tnav__group { display: grid; background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-1); overflow: hidden; }
.tnav__group button + button { border-top: 1px solid var(--line); }
.tnav button { width: 44px; height: 40px; border: 0; background: var(--surface); color: var(--ink); font: 600 20px/1 var(--font-sans); cursor: pointer; }
.tnav button:hover { background: var(--cloud); }
.tnav__reset { border-radius: var(--radius-md); box-shadow: var(--shadow-1); font-size: 12px !important; font-weight: 700 !important; letter-spacing: .04em; text-transform: uppercase; width: auto !important; padding: 0 10px; }
.compass { width: 52px !important; height: 52px !important; border-radius: 50%; padding: 4px; box-shadow: var(--shadow-1); }
.compass svg { width: 100%; height: 100%; display: block; overflow: visible; }
.compass__ring { fill: var(--surface); stroke: var(--line); }
.compass__n { fill: var(--grounded); }
.compass__s { fill: var(--line-strong); }
.compass text { font: 700 7px/1 var(--font-sans); fill: var(--ink); }

.tattr { position: absolute; z-index: 4; left: max(16px, env(safe-area-inset-left, 0px)); bottom: var(--space-3); right: 90px; margin: 0;
  font-size: 11px; line-height: 16px; color: var(--ink-muted); }
.tattr > * { pointer-events: auto; }
.tattr { justify-self: start; }
.tattr { right: auto; max-width: calc(100% - 110px); padding: 4px 10px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--surface) 84%, transparent); color: var(--ink); }
.tattr a { color: var(--link); }

.tlock { position: absolute; z-index: 4; left: 50%; bottom: 72px; transform: translateX(-50%); min-height: 44px; padding: 0 var(--space-4);
  border: 0; border-radius: var(--radius-pill); background: var(--storm); color: var(--on-storm); font: 600 14px/1 var(--font-sans); box-shadow: var(--shadow-2); cursor: pointer; }

/* Pins */
.pin { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 6px; transform-origin: 0 0;
  margin: 0; padding: 0; border: 0; background: none; cursor: pointer; font: 600 13px/1 var(--font-sans); color: var(--ink); white-space: nowrap; will-change: transform; }
.pin__dot { position: absolute; left: -9px; bottom: 0; width: 18px; height: 18px; }
.pin__label { position: absolute; left: 0; bottom: 26px; transform: translateX(-50%); padding: 6px 10px; border-radius: var(--radius-pill); background: var(--surface); box-shadow: var(--shadow-1); border: 2px solid transparent; }
.pin__stem { position: absolute; left: -1px; bottom: 6px; width: 2px; height: 22px; background: var(--ink); }
.pin--launch .pin__label { background: #DDE64F; color: #263247; }
.pin--launch .pin__dot { background: #DDE64F; border: 2px solid var(--ink); border-radius: 50%; width: 14px; height: 14px; left: -7px; bottom: 0; }
.pin--historic .pin__label { background: var(--surface); color: var(--ink); border-color: var(--ink); border-style: dashed; }
.pin--lz .pin__label { background: var(--lilac); color: var(--on-lime); border-color: #fff; }
.pin--lz .pin__dot { background: var(--lilac); border: 2px solid var(--ink); border-radius: 50%; width: 14px; height: 14px; left: -7px; }
.pin--lz-main .pin__label { background: var(--lilac); color: var(--on-lime); }
.pin--lz-main .pin__dot { background: var(--lilac); }
.pin[aria-pressed="true"] .pin__label { border-color: var(--storm-violet); border-style: solid; box-shadow: 0 0 0 3px var(--surface), var(--shadow-2); }
.pin:focus-visible { outline: none; }
.pin:focus-visible .pin__label { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pin.is-occluded { opacity: .5; }
.pin.is-occluded .pin__stem { opacity: .3; }
.place { position: absolute; left: 0; top: 0; pointer-events: none; transform-origin: 0 0; will-change: transform; }
.place span { position: absolute; transform: translate(-50%, -100%); padding-bottom: 6px; font: 700 12px/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  text-shadow: 0 0 4px var(--surface), 0 0 2px var(--surface), 0 0 1px var(--surface); white-space: nowrap; }
.place span::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--ink); }
.place--peak span { letter-spacing: .04em; text-transform: none; font-size: 12px; transform: translate(-50%, 0); padding: 8px 0 0; }
.place--peak span::after { top: 0; bottom: auto; }
.place.is-occluded { opacity: .45; }

/* Selected launch panel */
.tinfo { position: absolute; z-index: 6; right: max(16px, env(safe-area-inset-right, 0px)); top: var(--space-4); width: min(380px, calc(100% - 32px));
  max-height: calc(100% - 32px); overflow: auto; overscroll-behavior: contain; background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-2); }
.tinfo:focus { outline: none; }
.tinfo__head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: start; gap: var(--space-3); padding: var(--space-4) var(--space-4) var(--space-3); background: var(--surface); border-bottom: 1px solid var(--line); }
.tinfo__head h2 { margin: var(--space-1) 0 0; font: 800 34px/1 var(--font-display); }
.tinfo__close { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.tinfo__body { display: grid; gap: var(--space-4); padding: var(--space-4); }
.tinfo__body p { margin: 0; font-size: 15px; line-height: 23px; }

/* Launch cards (shared by the panel and the list) */
.ldetail { display: grid; gap: var(--space-4); }
.ldetail .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ldetail .facts .facts__wide { grid-column: 1 / -1; order: 3; }
.ldetail .facts dd { font-size: 16px; line-height: 22px; }
.ldetail__photo { margin: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-sunken); }
.ldetail__photo img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.ldetail__photo figcaption { padding: var(--space-2) var(--space-3); font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.ldetail__nophoto { margin: 0; padding: var(--space-3); border-radius: var(--radius-md); border: 1px dashed var(--line-strong); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.ldetail__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.launch-list { display: grid; gap: var(--space-6); }
.lcard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--space-6); padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.lcard__title { display: grid; gap: var(--space-2); align-content: start; }
.lcard__title h3 { font-size: 40px; line-height: 1; }
.lcard__title p { margin: 0; color: var(--ink-muted); }
.lcard--historic { background: var(--cloud); }
@media (max-width: 860px) { .lcard { grid-template-columns: 1fr; padding: var(--space-4); } }

.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; background: rgba(255,255,255,.18); border-radius: var(--radius-md); overflow: hidden; }
@media (max-width: 900px) { .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .glance { grid-template-columns: 1fr; } }
.glance > div { background: var(--storm); padding: var(--space-4) var(--space-6); }
.glance dt { font: 700 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--sky); }
.glance dd { margin: var(--space-2) 0 0; font: 800 44px/1 var(--font-display); }
.glance dd small { display: block; margin-top: var(--space-2); font: 400 13px/18px var(--font-sans); color: rgba(255,255,255,.78); }
.glance__src { margin-top: var(--space-4); color: rgba(255,255,255,.75); }
.glance__src a { color: #fff; }
.glance .elev-pub::after { vertical-align: 12px; }
.glance .elev-dem::after { vertical-align: 12px; background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }

.lzcard { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.lzcard h3 { font-size: 26px; }
.lzcard p { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-muted); }

/* Static map */
.tstatic { position: absolute; inset: 0; z-index: 3; margin: 0; display: grid; grid-template-rows: 1fr auto; background: var(--cloud); padding: var(--space-4); padding-top: 0; gap: var(--space-2); }
.tstatic[hidden] { display: none; }
.map { position: relative; min-height: 0; }
.map__svg { width: 100%; height: 100%; display: block; border-radius: var(--radius-md); background: var(--surface-sunken); }
.map__label { font: 700 14px/1 var(--font-sans); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-linejoin: round; }
.map__mk:focus-visible { outline: 2px solid var(--focus-ring); }
.terrain.is-static { height: auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: var(--space-6); align-items: start; padding: var(--space-8) max(16px, env(safe-area-inset-right, 0px)) var(--space-12) max(16px, env(safe-area-inset-left, 0px)); }
.terrain.is-static .hero__copy { position: relative; top: 0; left: 0; }
.terrain.is-static .tstatic { position: relative; inset: auto; height: min(78vh, 760px); padding: 0; background: transparent; }
.terrain.is-static .tattr { display: none; }
@media (max-width: 760px) { .terrain.is-static { grid-template-columns: 1fr; padding: 0 0 var(--space-6); } .terrain.is-static .tstatic { height: 72svh; padding: 0 16px; } }
.terrain.is-static .tpanel, .terrain.is-static .tnav, .terrain.is-static .tlock, .terrain.is-static .terrain__canvas, .terrain.is-static .terrain__overlay, .terrain.is-static .tinfo { display: none; }

/* Mobile: headline above the model, compact controls, panel as a bottom sheet */
@media (max-width: 760px) {
  .terrain { height: auto; min-height: 0; display: grid; grid-template-rows: auto 72svh; overflow: visible; }
  .hero__copy { position: relative; top: 0; left: 0; max-width: none; border-radius: 0; box-shadow: none; padding: var(--space-6) 16px var(--space-4); backdrop-filter: none; background: var(--ground); }
  .terrain__canvas { top: auto; bottom: 0; height: 72svh; }
  .terrain__overlay { top: auto; height: 72svh; }
  .tpanel { top: auto; bottom: calc(72svh - 56px); width: auto; left: 16px; right: auto; }
  .tpanel:not([open]) { width: auto; }
  .tpanel[open] { width: calc(100% - 32px); max-height: calc(72svh - 24px); overflow: auto; }
  .tnav { bottom: 52px; }
  .tnav button { width: 40px; height: 36px; }
  .tinfo { top: auto; bottom: 0; right: 0; left: 0; width: 100%; max-height: 62svh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .tattr { right: 70px; font-size: 10px; line-height: 14px; }
  .tstatic { position: relative; inset: auto; height: 72svh; }
  .terrain__status { top: calc(100% - 36svh); }
}
@media (min-width: 761px) { .terrain:has(.tinfo:not([hidden])) .tnav { right: calc(min(380px, 100% - 32px) + 32px); } }

/* Tandem flights */
.tandem { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-6); padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.tandem__main { display: grid; gap: var(--space-3); align-content: start; }
.tandem h3 { margin: 0; font: 800 40px/1 var(--font-display); }
.tandem h4 { margin: var(--space-2) 0 0; font: 700 13px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.tandem p { margin: 0; }
.tandem__tag { color: var(--ink-muted); font-size: 17px; line-height: 26px; }
.tandem__price b { font: 700 22px/28px var(--font-sans); margin-right: var(--space-2); }
.tandem__steps { margin: 0; padding-left: 1.25em; display: grid; gap: var(--space-2); line-height: 24px; }
.tandem__book { display: grid; gap: var(--space-3); align-content: start; align-self: start; padding: var(--space-4); border-radius: var(--radius-md); background: var(--cloud); }
.tandem__book h4 { margin: 0; }
.tandem .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { .tandem .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tandem__book .m7-btn { justify-content: center; text-align: center; overflow-wrap: anywhere; }
.tandem__src { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: var(--space-3); }
@media (max-width: 860px) { .tandem { grid-template-columns: 1fr; padding: var(--space-4); } }

/* Launch panel on the model: two facts side by side, coordinates on their own row, no empty cell. */
.tinfo .ldetail .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tinfo .ldetail .facts .facts__wide { grid-column: 1 / -1; order: 3; }

/* Glass map controls */
.tnav__group, .tnav__reset, .compass { background: rgb(255 255 255 / .55) !important; -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  border: 1px solid rgb(255 255 255 / .6) !important; box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 4px 14px rgb(20 30 50 / .14); }
.tnav__group button { background: transparent; }
.tnav__group button + button { border-top-color: rgb(255 255 255 / .55); }
.tnav__group button:hover, .tnav__reset:hover { background: rgb(255 255 255 / .35) !important; }
.compass__ring { fill: rgb(255 255 255 / .35); }
:root[data-theme="dark"] .tnav__group, :root[data-theme="dark"] .tnav__reset, :root[data-theme="dark"] .compass { background: rgb(20 30 50 / .5) !important; border-color: rgb(255 255 255 / .18) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tnav__group, :root:not([data-theme="light"]) .tnav__reset, :root:not([data-theme="light"]) .compass { background: rgb(20 30 50 / .5) !important; border-color: rgb(255 255 255 / .18) !important; } }

/* Glass layers panel */
.tpanel { background: rgb(255 255 255 / .58) !important; -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgb(255 255 255 / .6); box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 4px 14px rgb(20 30 50 / .14) !important; }
.tpanel__row { border-top-color: rgb(255 255 255 / .55); }
:root[data-theme="dark"] .tpanel { background: rgb(20 30 50 / .55) !important; border-color: rgb(255 255 255 / .18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tpanel { background: rgb(20 30 50 / .55) !important; border-color: rgb(255 255 255 / .18); } }

/* Glass pins: same colours, translucent with blur and a white edge */
.pin__label { -webkit-backdrop-filter: blur(8px) saturate(160%); backdrop-filter: blur(8px) saturate(160%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 3px 10px rgb(20 30 50 / .18); }
.pin--launch .pin__label { background: linear-gradient(180deg, rgb(236 242 140 / .92), rgb(221 230 79 / .8)); border-color: rgb(255 255 255 / .6); }
.pin--lz .pin__label { background: linear-gradient(180deg, rgb(208 188 219 / .94), rgb(188 159 203 / .86)); border-color: #fff; }
.pin--historic .pin__label { background: rgb(255 255 255 / .6); border-color: var(--ink); }
.tandem__site { background: linear-gradient(180deg, rgb(196 222 244 / .92), rgb(158 201 232 / .82)); color: var(--on-lime); border: 1px solid rgb(255 255 255 / .7); box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 4px 14px rgb(20 30 50 / .12); -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%); }
.tandem__site:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 6px 18px rgb(20 30 50 / .18); }
.tandem__email { justify-self: center; text-align: center; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.tandem__book h4, .tandem__book > p { text-align: center; }
