/* =========================================================
   DEŚA — Interactive art map of India
   ========================================================= */
:root {
  --accent: #e9bb5c; --accent-2: #ffd98e;
  --deep: #060a14; --deep-2: #0a1122; --deep-3: #101a33;
  --glass: rgba(9, 14, 28, 0.74);
}
body { background: var(--deep); }
.nav { --nav-bg: rgba(6, 10, 20, 0.8); }

/* ---------- Hero ---------- */
.d-hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 4vw; padding: calc(var(--nav-h) + 20px) var(--gutter) 60px; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse 60% 70% at 72% 50%, rgba(40, 70, 140, 0.28), transparent 70%), radial-gradient(ellipse 50% 50% at 10% 90%, rgba(233, 187, 92, 0.08), transparent 70%), var(--deep); }
.d-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.35; background-image: linear-gradient(rgba(233,187,92,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(233,187,92,.06) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse at 60% 50%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 60% 50%, #000 20%, transparent 75%); }
.d-hero__ghost { position: absolute; left: -2vw; bottom: -6vw; font-family: var(--indic); font-size: clamp(180px, 30vw, 460px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(233, 187, 92, 0.12); z-index: -1; pointer-events: none; }
.d-hero h1 { font-size: clamp(100px, 16vw, 260px); margin: 18px 0 14px; }
.d-hero h1 .char { display: inline-block; }
.d-hero__sub { font-family: var(--serif); font-size: clamp(22px, 2.3vw, 34px); line-height: 1.3; color: var(--paper-2); font-weight: 300; max-width: 26ch; font-style: italic; }
.d-hero__stats { display: flex; gap: clamp(20px, 4vw, 60px); margin: 40px 0 44px; flex-wrap: wrap; }
.d-hero__stats div { font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--paper-3); font-weight: 600; }
.d-hero__stats b { display: block; font-family: var(--serif); font-weight: 300; font-size: 44px; letter-spacing: 0; color: var(--paper); margin-bottom: 4px; text-transform: none; }
.d-hero__map { position: relative; width: 100%; max-width: 640px; justify-self: center; }
.d-hero__map svg { width: 100%; height: auto; overflow: visible; }
.d-hero__map .outline { fill: rgba(30, 50, 100, 0.18); stroke: var(--accent); stroke-width: 1.4; filter: drop-shadow(0 0 12px rgba(233, 187, 92, 0.35)); }
.d-hero__map .inner { fill: none; stroke: rgba(233, 187, 92, 0.2); stroke-width: 0.6; }
.d-hero__map .hp { transform-box: fill-box; transform-origin: center; }
@media (max-width: 900px) { .d-hero { grid-template-columns: 1fr; } .d-hero__map { max-width: 420px; order: -1; margin-top: 10px; } }

/* ---------- Atlas app ---------- */
.atlas { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: radial-gradient(ellipse 70% 80% at 60% 50%, #0d1830 0%, var(--deep) 75%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.atlas__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.atlas__svg:active { cursor: grabbing; }
.atlas .grat { fill: none; stroke: rgba(150, 180, 255, 0.07); stroke-width: 0.6; vector-effect: non-scaling-stroke; }
.atlas .state { fill: #111d38; stroke: rgba(233, 187, 92, 0.2); stroke-width: 0.7; vector-effect: non-scaling-stroke; transition: fill 0.35s; }
.atlas .state:hover { fill: #1a2a50; }
.atlas .state.is-lit { fill: #1d2f5a; }
.atlas .outline { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.atlas .outline-glow { fill: none; stroke: var(--accent); stroke-width: 5; opacity: 0.16; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.atlas .outline-glow--wide { stroke-width: 11; opacity: 0.06; }
.atlas__overlay { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; will-change: transform; overflow: visible; }
.atlas__overlay .pin { pointer-events: all; }
.atlas .sea { font-family: var(--serif); font-style: italic; fill: rgba(170, 195, 255, 0.28); font-size: 22px; letter-spacing: 0.3em; pointer-events: none; }
/* trails: widths are divided by the zoom level (--k) so lines keep a constant on-screen weight */
.atlas .hop path { fill: none; stroke: var(--c); stroke-linecap: round; }
.atlas .hop__ahead { stroke-width: calc(2px / var(--k, 1)); stroke-dasharray: 0 calc(9px / var(--k, 1)); opacity: 0.85; transition: opacity 0.4s; }
.atlas .hop__glow { stroke-width: calc(9px / var(--k, 1)); opacity: 0.18; }
.atlas .hop__done { stroke-width: calc(2.6px / var(--k, 1)); }
.nav-marker { color: var(--c); }
.nav-marker__pulse { fill: var(--c); opacity: 0.25; transform-box: fill-box; transform-origin: center; animation: navPulse 1.6s ease-out infinite; }
.nav-marker__disc { fill: #fff; stroke: var(--c); stroke-width: 2.5; filter: drop-shadow(0 2px 5px rgba(0,0,0,.55)); }
.nav-marker__arrow { fill: var(--c); stroke: #060a14; stroke-width: 0.8; stroke-linejoin: round; }
@keyframes navPulse { 0% { transform: scale(0.7); opacity: 0.45; } 100% { transform: scale(2.1); opacity: 0; } }
.pin.is-visited .core { fill: var(--paper); }
.caption__ctrl button[disabled] { opacity: 0.35; pointer-events: none; }

.pin { cursor: pointer; outline: none; }
.pin .halo { fill: var(--c); opacity: 0.16; transform-box: fill-box; transform-origin: center; animation: halo 2.8s ease-out infinite; }
.pin .ring { fill: none; stroke: var(--c); stroke-width: 1.2; opacity: 0.8; }
.pin .core { fill: var(--c); stroke: #060a14; stroke-width: 1.5; }
.pin .lbl { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; fill: var(--paper); paint-order: stroke; stroke: rgba(6, 10, 20, 0.9); stroke-width: 3.5px; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.atlas.show-labels .pin .lbl, .pin:hover .lbl, .pin.is-active .lbl, .pin:focus-visible .lbl { opacity: 1; }
.pin:hover .core, .pin:focus-visible .core { stroke: var(--paper); }
.pin.is-active .ring { stroke-width: 2; opacity: 1; }
.pin.is-active .core { stroke: var(--paper); stroke-width: 2; }
.pin.is-dim { opacity: 0.12; pointer-events: none; }
.pin.is-trail .halo { opacity: 0.35; }
@keyframes halo { 0% { transform: scale(0.6); opacity: 0.35; } 100% { transform: scale(2.4); opacity: 0; } }

/* panel */
.atlas__panel { position: absolute; top: calc(var(--nav-h) + 8px); left: var(--gutter); bottom: 24px; width: 340px; z-index: 5; display: flex; flex-direction: column; background: var(--glass); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); border: 1px solid rgba(233, 187, 92, 0.16); border-radius: 14px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(233, 187, 92, 0.28) transparent; }
.atlas__head { position: sticky; top: 0; z-index: 2; padding: 20px 20px 18px; border-bottom: 1px solid var(--line); background: #0a1020; box-shadow: 0 10px 18px -14px rgba(0, 0, 0, 0.8); }
.atlas__title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.atlas__title h2 { font-family: var(--serif); font-size: 34px; font-weight: 400; line-height: 1; }
.atlas__title span { font-family: var(--indic); color: var(--accent); font-size: 18px; }
.atlas__count { float: right; letter-spacing: 0.1em; color: var(--paper-2); font-variant-numeric: tabular-nums; }
.search { position: relative; display: block; margin-top: 16px; }
.search input { width: 100%; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); border-radius: 999px; padding: 11px 16px 11px 38px; color: var(--paper); font: inherit; font-size: 14px; outline: none; transition: border-color 0.3s; }
.search input:focus { border-color: var(--accent); }
.search svg { position: absolute; left: 14px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); stroke: var(--paper-3); fill: none; }
.atlas__section { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.atlas__label { font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--paper-3); font-weight: 700; margin-bottom: 12px; display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip { padding: 7px 10px; font-size: 10px; letter-spacing: 0.08em; flex: 1 1 auto; justify-content: center; white-space: nowrap; }
.chip .dot { background: var(--c, currentColor); }
.chip.is-off { opacity: 0.38; }
.trails { display: grid; gap: 8px; }
.cat-chips .chip:first-child { flex-basis: 100%; }
.trail-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); transition: border-color 0.3s, background 0.3s; }
.trail-btn:hover, .trail-btn.is-on { border-color: var(--c); background: rgba(255, 255, 255, 0.03); }
.trail-btn i { width: 18px; height: 2px; background: var(--c); border-radius: 2px; box-shadow: 0 0 8px var(--c); flex: none; }
.trail-btn span { flex: 1; font-family: var(--serif); font-size: 18px; line-height: 1.15; }
.trail-btn small { color: var(--paper-3); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.atlas__section--list { border-bottom: 0; padding-bottom: 10px; }
.list { margin: 0 -10px; }
.atlas__panel::-webkit-scrollbar { width: 6px; } .atlas__panel::-webkit-scrollbar-thumb { background: rgba(233, 187, 92, 0.28); border-radius: 6px; } .atlas__panel::-webkit-scrollbar-track { background: transparent; margin: 14px 0; }
.list button { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px; border-radius: 8px; transition: background 0.25s; }
.list button:hover, .list button.is-active { background: rgba(233, 187, 92, 0.08); }
.list .d { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.list .n { font-family: var(--serif); font-size: 18px; line-height: 1.1; }
.list .s { font-size: 11px; color: var(--paper-3); display: block; font-family: var(--sans); margin-top: 2px; }
.list .y { font-size: 10px; color: var(--paper-3); letter-spacing: 0.08em; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* drawer */
.atlas__drawer { position: absolute; top: calc(var(--nav-h) + 8px); right: var(--gutter); bottom: 24px; width: min(460px, 38vw); z-index: 6; background: rgba(8, 12, 24, 0.9); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border: 1px solid rgba(233, 187, 92, 0.2); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transform: translateX(calc(100% + 40px)); transition: transform 0.9s var(--ease-out); }
.atlas__drawer.is-open { transform: none; }
.drawer__img { position: relative; height: 42%; min-height: 220px; overflow: hidden; background: #0c1428; flex: none; cursor: zoom-in; }
.drawer__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform 1.6s var(--ease-out), opacity 0.6s; }
.drawer__img:hover img { transform: scale(1.1); }
.drawer__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(8, 12, 24, 0.95)); pointer-events: none; }
.drawer__zoom { position: absolute; right: 14px; top: 14px; z-index: 2; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; padding: 7px 11px; border-radius: 999px; background: rgba(6, 10, 20, 0.7); border: 1px solid var(--line-2); }
.drawer__close { position: absolute; left: 14px; top: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(6, 10, 20, 0.7); border: 1px solid var(--line-2); }
.drawer__close svg { width: 12px; height: 12px; }
.drawer__body { padding: 0 26px 26px; margin-top: -54px; position: relative; z-index: 2; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.drawer__cat { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 700; color: var(--c); }
.drawer__cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.drawer__name { font-family: var(--serif); font-size: clamp(30px, 2.6vw, 42px); line-height: 1.02; margin: 10px 0 6px; font-weight: 400; }
.drawer__native { font-family: var(--indic); color: var(--accent-2); font-size: 20px; }
.drawer__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 18px; font-size: 12px; color: var(--paper-2); }
.drawer__meta b { color: var(--paper-3); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; font-size: 10px; margin-right: 6px; }
.drawer__desc { font-family: var(--serif); font-size: 20px; line-height: 1.45; color: var(--paper); font-weight: 300; }
.drawer__hl { list-style: none; padding: 0; margin: 20px 0; border-top: 1px solid var(--line); }
.drawer__hl li { padding: 11px 0 11px 26px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--paper-2); position: relative; }
.drawer__hl .star { position: absolute; left: 0; top: 11px; color: var(--c); font-size: 11px; display: inline-block; }
.drawer__unesco { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--accent); border: 1px solid rgba(233, 187, 92, 0.4); padding: 7px 12px; border-radius: 999px; margin-bottom: 16px; }
.drawer__links { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 18px; }
.drawer__links .btn { padding: 12px 18px; font-size: 10px; }
.drawer__credit { font-size: 11px; color: var(--paper-3); line-height: 1.6; }
.drawer__credit a { border-bottom: 1px solid var(--line-2); }
.drawer__nav { display: flex; gap: 8px; margin-top: 18px; }
.drawer__nav button { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--paper-2); transition: border-color .3s; }
.drawer__nav button:hover { border-color: var(--accent); }

/* controls */
.atlas__zoom { position: absolute; right: var(--gutter); bottom: 24px; z-index: 4; display: flex; flex-direction: column; gap: 6px; transition: right 0.9s var(--ease-out); }
.atlas.drawer-open .atlas__zoom { right: calc(var(--gutter) + min(460px, 38vw) + 14px); }
.atlas__zoom button { width: 42px; height: 42px; border-radius: 50%; background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(10px); display: grid; place-items: center; font-size: 18px; }
.atlas__zoom button:hover { border-color: var(--accent); }
.atlas__legend { position: absolute; left: calc(var(--gutter) + 360px); bottom: 24px; z-index: 4; display: flex; gap: 14px; flex-wrap: wrap; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-3); font-weight: 600; max-width: 520px; }
.atlas__legend span { display: inline-flex; align-items: center; gap: 7px; }
.atlas__legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.atlas__note { position: absolute; right: calc(var(--gutter) + 58px); bottom: 30px; z-index: 3; font-size: 10px; color: var(--paper-4); letter-spacing: 0.06em; text-align: right; max-width: 280px; line-height: 1.5; }
.atlas.drawer-open .atlas__note { opacity: 0; }
.atlas__hint { position: absolute; left: 50%; top: calc(var(--nav-h) + 16px); transform: translateX(-50%); z-index: 4; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 700; color: var(--paper-2); background: var(--glass); border: 1px solid var(--line-2); padding: 9px 16px; border-radius: 999px; pointer-events: none; transition: opacity 0.5s; white-space: nowrap; }
.atlas__state { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--paper-3); pointer-events: none; transition: opacity 0.3s; }
.tip { position: absolute; z-index: 7; pointer-events: none; padding: 10px 14px; border-radius: 10px; background: rgba(6, 10, 20, 0.92); border: 1px solid var(--line-2); transform: translate(-50%, calc(-100% - 16px)); opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.tip.is-on { opacity: 1; }
.tip b { display: block; font-family: var(--serif); font-size: 19px; font-weight: 400; }
.tip span { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--c); font-weight: 700; }

/* trail caption */
.caption { position: absolute; left: 50%; bottom: 76px; z-index: 6; transform: translate(-50%, 30px); width: min(560px, 90vw); padding: 18px 22px; border-radius: 14px; background: rgba(8, 12, 24, 0.9); border: 1px solid var(--c, var(--accent)); backdrop-filter: blur(16px); opacity: 0; pointer-events: none; transition: opacity 0.5s, transform 0.6s var(--ease-out); }
.caption.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.caption__top { display: flex; justify-content: space-between; align-items: center; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 700; color: var(--c, var(--accent)); }
.caption__name { font-family: var(--serif); font-size: 28px; margin: 6px 0 4px; }
.caption__note { color: var(--paper-2); font-size: 14px; }
.caption__bar { height: 2px; background: var(--line); margin-top: 14px; border-radius: 2px; overflow: hidden; }
.caption__bar i { display: block; height: 100%; width: 0; background: var(--c, var(--accent)); }
.caption__ctrl { display: flex; gap: 8px; margin-top: 12px; }
.caption__ctrl button { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); }
.caption__ctrl button:hover { border-color: var(--c, var(--accent)); }

/* lightbox (full image) */
.lightbox { position: fixed; inset: 0; z-index: 9200; background: rgba(4, 6, 12, 0.96); visibility: hidden; opacity: 0; transition: opacity 0.5s, visibility 0.5s; }
.lightbox.is-open { visibility: visible; opacity: 1; }
.lightbox .detail__viewer { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.lightbox .detail__imgwrap { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.lightbox .detail__imgwrap img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.lightbox .detail__imgwrap img.full { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s; }
.lightbox .detail__imgwrap img.full.is-loaded { opacity: 1; }
.lightbox__close { position: absolute; top: 20px; right: 20px; z-index: 3; width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; background: rgba(6,10,20,.7); }
.lightbox__close svg { width: 14px; height: 14px; }
.lightbox__cap { position: absolute; left: 24px; bottom: 22px; z-index: 3; font-size: 12px; color: var(--paper-2); background: rgba(6,10,20,.7); padding: 8px 14px; border-radius: 999px; }

/* ---------- Trails section ---------- */
.trails-sec { padding: clamp(90px, 12vw, 160px) var(--gutter); max-width: 1400px; margin: 0 auto; }
.trails-sec h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(44px, 6vw, 90px); line-height: 0.95; max-width: 14ch; }
.trails-sec h2 em { color: var(--accent); }
.trails-sec > p { max-width: 60ch; margin: 24px 0 50px; }
.trail-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trail-card { position: relative; padding: 28px 24px 26px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(255,255,255,0.03), transparent); text-align: left; transition: border-color 0.4s, transform 0.6s var(--ease-out); overflow: hidden; }
.trail-card:hover { border-color: var(--c); transform: translateY(-6px); }
.trail-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--c); box-shadow: 0 0 18px var(--c); }
.trail-card .n { font-family: var(--serif); font-style: italic; color: var(--c); font-size: 20px; }
.trail-card h3 { font-family: var(--serif); font-size: 30px; line-height: 1.02; margin: 18px 0 10px; font-weight: 400; }
.trail-card p { font-size: 14px; color: var(--paper-3); }
.trail-card .stops { margin-top: 16px; font-size: 11px; letter-spacing: 0.08em; color: var(--paper-2); line-height: 1.8; }
.trail-card .go { margin-top: 20px; display: inline-flex; gap: 10px; align-items: center; font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 700; color: var(--c); }
@media (max-width: 1100px) { .trail-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .trail-cards { grid-template-columns: 1fr; } }

/* ---------- Mobile atlas ---------- */
@media (max-width: 900px) {
  .atlas { height: 100svh; }
  .atlas__panel { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 46%; border-radius: 16px; }
  .atlas__panel.is-collapsed { max-height: 118px; }
  .atlas__head { padding: 14px 16px 10px; }
  .atlas__section { padding: 10px 16px; }
  .atlas__legend, .atlas__note, .atlas__state { display: none; }
  .atlas__zoom { top: calc(var(--nav-h) + 10px); bottom: auto; right: 12px; }
  .atlas.drawer-open .atlas__zoom { right: 12px; }
  .atlas__drawer { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 78%; border-radius: 18px 18px 0 0; transform: translateY(105%); }
  .atlas__drawer.is-open { transform: none; }
  .caption { bottom: 50%; }
  .atlas__hint { top: auto; bottom: 50%; }
}
.panel-toggle { display: none; }
@media (hover: none), (pointer: coarse) { .atlas__hint { display: none; } }
@media (max-width: 900px) { .panel-toggle { display: inline-flex; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 999px; } }

/* ---------- Immersive trail view ---------- */
.atlas__panel, .atlas__legend, .atlas__note, .atlas__hint, .atlas__state { transition: transform 0.8s var(--ease-out), opacity 0.5s; }
.atlas--trail .atlas__panel { transform: translate3d(calc(-100% - 60px), 0, 0); opacity: 0; pointer-events: none; }
.atlas--trail .atlas__legend, .atlas--trail .atlas__note, .atlas--trail .atlas__hint, .atlas--trail .atlas__state { opacity: 0 !important; pointer-events: none; }
.trail-mode .nav, .trail-mode .nav.is-solid { transform: translate3d(0, -101%, 0) !important; }
.atlas--trail .atlas__drawer { top: 24px; background: #080c18; -webkit-backdrop-filter: none; backdrop-filter: none; }
.atlas--trail .drawer__transit { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(6, 10, 20, 0.92); }
.atlas--trail .drawer__nav { display: none; }
/* the player sits centred under the free map area, left of the details card */
.atlas--trail .caption { left: calc((100% - min(460px, 38vw) - var(--gutter) - 16px) / 2); bottom: 28px; }
.atlas--trail .atlas__zoom { bottom: 28px; }
@media (max-width: 900px) {
  .atlas--trail .atlas__panel { transform: translate3d(0, calc(100% + 40px), 0); }
  .atlas--trail .caption { left: 50%; bottom: 14px; }
  .atlas--trail .atlas__zoom { top: 16px; bottom: auto; }
}

/* ---------- Details card: sweep transition + en-route strip ---------- */
.drawer__content { position: absolute; inset: 0; display: flex; flex-direction: column; }
.drawer__name { perspective: 600px; }
.drawer__name .ch { display: inline-block; transform-origin: 50% 100%; }
.drawer__desc .line-mask { padding-bottom: 0.04em; }
.drawer__sweep { position: absolute; inset: 0; z-index: 8; pointer-events: none; overflow: hidden; border-radius: inherit; }
.drawer__sweep i { position: absolute; top: -12%; bottom: -12%; left: -22%; width: 144%; display: none; will-change: transform; }
.sweep__a { background: var(--c); box-shadow: 0 0 60px rgba(0, 0, 0, 0.45); }
.sweep__b { background: linear-gradient(115deg, #7a5b1c 0%, #c9a24a 22%, #f3dc95 42%, #fff4cf 50%, #d8b35c 62%, #8b6b25 100%); display: none; place-items: center; box-shadow: 0 0 80px rgba(0, 0, 0, 0.5); }
.sweep__b::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 9px); mix-blend-mode: overlay; }
.sweep__word { position: absolute; left: 0; right: 0; top: 38%; text-align: center; line-height: 1.1; font-family: var(--indic); font-size: clamp(48px, 5vw, 76px); font-weight: 600; color: rgba(40, 26, 6, 0.82); white-space: nowrap; text-shadow: 0 1px 0 rgba(255, 244, 207, 0.6); }
.sweep__sub { position: absolute; left: 0; right: 0; top: calc(38% + 96px); text-align: center; font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; font-weight: 800; color: rgba(40, 26, 6, 0.65); white-space: nowrap; }

.drawer__transit { position: absolute; left: 14px; right: 14px; bottom: 66px; z-index: 3; padding: 14px 16px 14px; border-radius: 12px; background: rgba(6, 10, 20, 0.78); border: 1px solid color-mix(in srgb, var(--tc, var(--accent)) 55%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transform: translate3d(0, 18px, 0) scale(0.98); transition: opacity 0.5s, transform 0.7s var(--ease-out); pointer-events: none; }
.atlas__drawer.is-transit .drawer__transit { opacity: 1; transform: none; }
.transit__top { display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 800; color: var(--tc, var(--accent)); }
.transit__label { flex: 1; }
.transit__km { font-family: var(--serif); font-size: 22px; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--paper); font-variant-numeric: tabular-nums; }
.transit__pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--tc, var(--accent)); }
.transit__pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--tc, var(--accent)); animation: transitPulse 1.2s ease-out infinite; will-change: transform, opacity; }
@keyframes transitPulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(3.2); opacity: 0; } }
.transit__km { min-width: 5.5ch; text-align: right; }
.transit__name { font-family: var(--serif); font-size: 26px; line-height: 1.1; margin: 4px 0 12px; color: var(--paper); }
.transit__bar { height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.transit__bar i { display: block; height: 100%; background: var(--tc, var(--accent)); box-shadow: 0 0 10px var(--tc, var(--accent)); transform-origin: left; transform: scaleX(0); }
/* the card dims while the marker is on the road */
.drawer__img img, .drawer__body { transition: opacity 0.6s, filter 0.6s; }
.atlas__drawer.is-transit .drawer__body { opacity: 0.32; }
.atlas__drawer.is-transit .drawer__img::after { background: linear-gradient(180deg, rgba(8, 12, 24, 0.35) 0%, rgba(8, 12, 24, 0.95) 100%); }
