/* ==========================================================================
   Disney Skyliner guide. Built on the site's Twilight Magic tokens (--paper
   indigo night, --ink candlelight cream, --gold wonder). A WebGL route map you
   can tap, gondolas that glide between sections, and a full server-rendered SVG
   map underneath so the page works with no script. Namespaced sky- so it never
   collides with the arcade (rd-) or the rope-drop hub (rdp-).
   ========================================================================== */

.sky {
  /* a cooler, sky-traveling tint of the night for cables and panels */
  --sky-night:  oklch(28% 0.055 258);
  --sky-night2: oklch(33% 0.060 256);
  --sky-cable:  oklch(70% 0.045 250 / 0.5);
  /* one radius scale: content cards share a radius, larger surfaces step up once */
  --sky-r-card: 16px;
  --sky-r-surface: 18px;
  color: var(--ink);
  display: block;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.sky a { text-decoration: none; }

.sky-section { max-width: 1080px; margin: 0 auto; padding: clamp(2.4rem, 5.5vw, 4.4rem) var(--space-md); }
.sky-head { max-width: 56ch; margin: 0 0 var(--space-xl); }
.sky-h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.55rem, 3.4vw, 2.3rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 var(--space-sm); color: var(--ink); text-wrap: balance; }
.sky-h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 2.4vw, 1.5rem); letter-spacing: -0.015em; margin: 0 0 var(--space-md); color: var(--ink); text-wrap: balance; }
.sky-sub { font-size: 1.05rem; line-height: 1.55; color: var(--ink-soft); margin: 0; max-width: 64ch; text-wrap: pretty; }

/* ---------- HERO ---------------------------------------------------------- */
.sky-hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(440px, 64vh, 640px);
  display: flex; align-items: center;
}
.sky-hero-sky {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(130% 110% at 22% -10%, oklch(58% 0.13 250 / 0.55) 0%, transparent 46%),
    radial-gradient(120% 120% at 92% 8%, oklch(72% 0.13 86 / 0.30) 0%, transparent 40%),
    linear-gradient(178deg, oklch(40% 0.085 255) 0%, var(--paper-2) 46%, var(--paper) 100%);
}
.sky-hero-glow {
  position: absolute; right: -8%; top: -14%; z-index: -2;
  width: min(48vw, 440px); aspect-ratio: 1;
  background: radial-gradient(circle, oklch(94% 0.05 90 / 0.85) 0%, oklch(84% 0.13 84 / 0.4) 28%, transparent 66%);
  filter: blur(3px);
}
/* a faint cable strung across the upper right with two cabins hanging from it,
   gently swaying, so the open side of the hero carries the Skyliner motif */
.sky-hero-cable { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sky-hero-cable::before {
  content: ""; position: absolute; left: 32%; right: -6%; top: 27%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--sky-cable) 20%, var(--sky-cable) 92%, transparent);
}
.sky-hero-cabin {
  position: absolute; top: calc(27% + 52px);
  width: clamp(44px, 5vw, 62px); aspect-ratio: 0.84;
  border-radius: 12px 12px 15px 15px;
  background: linear-gradient(180deg, var(--c) 0 27%, oklch(28% 0.05 250) 27% 60%, var(--c) 60% 100%);
  box-shadow: 0 18px 36px oklch(10% 0.04 260 / 0.5), inset 0 1px 0 oklch(100% 0 0 / 0.18);
  transform-origin: 50% -52px;
}
.sky-hero-cabin::before { content: ""; position: absolute; left: 50%; top: -52px; width: 3px; height: 52px; transform: translateX(-50%); background: var(--sky-cable); }
.sky-hero-cabin--a { right: 12%; }
.sky-hero-cabin--b { right: 27%; top: calc(27% + 40px); width: clamp(34px, 3.8vw, 46px); transform-origin: 50% -40px; opacity: 0.82; }
.sky-hero-cabin--b::before { top: -40px; height: 40px; }
@media (max-width: 760px) { .sky-hero-cabin { display: none; } }

.sky-hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: 1080px;
  margin: 0 auto; padding: clamp(2.6rem, 6vw, 4rem) var(--space-md);
}
.sky-kicker { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.14em; font-size: .78rem; font-weight: 700; color: var(--gold); margin: 0 0 var(--space-sm); }
.sky-title { font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 5.2vw, 3.9rem); line-height: 1.0; letter-spacing: -0.025em; margin: 0 0 var(--space-md); max-width: 19ch; text-wrap: balance; text-shadow: 0 2px 26px oklch(18% 0.05 260 / 0.45); }
.sky-lede { max-width: 58ch; font-size: clamp(1.04rem, 2.1vw, 1.25rem); line-height: 1.5; margin: 0 0 var(--space-lg); color: var(--ink); text-wrap: pretty; text-shadow: 0 1px 12px oklch(18% 0.05 260 / 0.4); }

/* live status pill */
.sky-status {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  background: oklch(28% 0.05 260 / 0.6); border: 1px solid var(--rule);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 999px; padding: .6rem 1.1rem .6rem .9rem; margin: 0 0 var(--space-lg);
}
.sky-status-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--gold); box-shadow: 0 0 10px oklch(84% 0.13 86 / 0.5); }
.sky-status-text { display: flex; flex-direction: column; line-height: 1.2; }
.sky-status-text b { font-family: var(--label); font-weight: 700; font-size: .98rem; color: var(--ink); }
.sky-status-text span { font-size: .8rem; color: var(--muted); }

.sky-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
.sky-btn {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; text-decoration: none;
  font-family: var(--label); font-weight: 700; font-size: 1rem; line-height: 1;
  padding: .82rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.sky-btn:active { transform: translateY(1px) scale(0.96); }
.sky-btn-primary { background: linear-gradient(180deg, oklch(90% 0.10 90), var(--gold)); color: var(--paper); box-shadow: 0 8px 22px oklch(84% 0.13 86 / 0.26); }
.sky-btn-primary:hover { box-shadow: 0 10px 28px oklch(84% 0.13 86 / 0.4); }
.sky-btn-ghost { background: oklch(28% 0.05 260 / 0.4); color: var(--ink); border-color: var(--rule); }
.sky-btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* clear keyboard focus on every interactive control */
.sky-btn:focus-visible, .sky-chip:focus-visible, .sky-related a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- DIVIDER (gondolas crossing) ---------------------------------- */
.sky-divider {
  position: relative; height: 104px; margin: 0; overflow: hidden;
  max-width: 1280px; margin-inline: auto;
}
/* the slack cable line the cabins hang from */
.sky-divider::before {
  content: ""; position: absolute; left: 0; right: 0; top: 30px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--sky-cable) 12%, var(--sky-cable) 88%, transparent);
  border-radius: 2px;
}
.sky-divider-canvas { position: absolute; inset: 0; }
/* once WebGL upgrades a divider it draws its own cable + cabin; hide the static ones */
.sky-divider.is-gl::before { opacity: 0; }
.sky-divider.is-gl .sky-divider-fallback { display: none; }
/* no-script / reduced-motion fallback: a small static gondola on the cable */
.sky-divider-fallback {
  position: absolute; top: 18px; width: 26px; height: 30px; border-radius: 7px 7px 9px 9px;
  background: linear-gradient(180deg, oklch(72% 0.045 250) 38%, var(--c, var(--gold)) 38%);
  box-shadow: 0 6px 14px oklch(15% 0.05 260 / 0.4);
}
.sky-divider-fallback::before { content: ""; position: absolute; left: 50%; top: -12px; width: 14px; height: 14px; transform: translateX(-50%); border-left: 2px solid var(--sky-cable); border-top: 2px solid var(--sky-cable); border-radius: 8px 0 0 0; }
.sky-divider[data-dir="ltr"] .sky-divider-fallback { left: 12%; }
.sky-divider[data-dir="rtl"] .sky-divider-fallback { right: 12%; }

/* ---------- MAP ----------------------------------------------------------- */
.sky-map-section { max-width: 1180px; }
.sky-map { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.sky-legend { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.sky-chip {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; min-height: 40px;
  font-family: var(--label); font-weight: 650; font-size: .92rem; color: var(--ink-soft);
  background: transparent; border: 1.5px solid var(--hair); border-radius: 999px; padding: .5rem .95rem;
  transition: border-color .16s ease, color .16s ease, background .16s ease, transform .12s ease;
}
.sky-chip:hover { border-color: var(--rule); color: var(--ink); }
.sky-chip:active { transform: scale(0.96); }
.sky-chip.is-active { color: var(--ink); border-color: color-mix(in oklab, var(--c, var(--gold)) 70%, var(--rule)); background: oklch(30% 0.05 260 / 0.5); }
.sky-chip-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c, var(--ink-soft)); flex: none; box-shadow: 0 0 8px var(--c, transparent); }

.sky-map-grid { display: grid; gap: var(--space-md); }
.sky-map-stage {
  position: relative; border-radius: var(--sky-r-surface); overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, oklch(46% 0.085 250 / 0.6), transparent 60%),
    linear-gradient(180deg, var(--sky-night), var(--paper));
  border: 1px solid var(--hair);
  aspect-ratio: 16 / 11;
  max-height: 70vh;
}
@media (min-width: 880px) {
  .sky-map { grid-template-columns: 1.55fr 1fr; grid-template-areas: "legend legend" "stage info"; align-items: stretch; }
  .sky-legend { grid-area: legend; }
  .sky-map-stage { grid-area: stage; aspect-ratio: auto; min-height: 460px; }
  .sky-info { grid-area: info; }
}
.sky-map-gl { position: absolute; inset: 0; z-index: 2; opacity: 0; transition: opacity .9s ease; }
.sky-map-gl.is-ready { opacity: 1; }

/* SVG schematic (baseline + fallback) */
.sky-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; transition: opacity .6s ease; }
.sky-map.is-gl .sky-map-svg { opacity: 0; pointer-events: none; }
.sky-svg-line { fill: none; stroke: var(--c); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; opacity: .92; filter: drop-shadow(0 0 6px color-mix(in oklab, var(--c) 60%, transparent)); transition: opacity .2s ease, stroke-width .2s ease; }
.sky-map[data-focus]:not([data-focus="all"]) .sky-svg-line { opacity: .14; }
.sky-map[data-focus] .sky-svg-line.is-focus { opacity: 1; stroke-width: 8; }
.sky-svg-hit { fill: transparent; cursor: pointer; }
.sky-svg-node { fill: var(--paper); stroke: var(--ink); stroke-width: 4; transition: fill .18s ease, stroke .18s ease, r .18s ease; pointer-events: none; }
.sky-svg-station.is-hub .sky-svg-node { fill: var(--gold); stroke: var(--gold); }
.sky-svg-station:hover .sky-svg-node, .sky-svg-station.is-active .sky-svg-node { fill: var(--gold); stroke: var(--gold); }
.sky-svg-station:focus-visible { outline: none; }
/* a cream ring, independent of fill, so a focused hub (already gold) still reads as focused */
.sky-svg-station:focus-visible .sky-svg-node { fill: var(--gold); stroke: var(--ink); stroke-width: 6; }
.sky-svg-label { font-family: var(--label); font-weight: 700; font-size: 30px; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 6px; stroke-linejoin: round; }
.sky-svg-station.is-hub .sky-svg-label { fill: var(--gold); }

/* info panel */
.sky-info {
  background: linear-gradient(180deg, var(--sky-night2), var(--paper-2));
  border: 1px solid var(--hair); border-radius: var(--sky-r-surface); padding: var(--space-lg);
  display: flex; flex-direction: column; justify-content: flex-start; min-height: 200px;
}
.sky-info-eyebrow { font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 700; color: var(--gold); margin: 0 0 var(--space-2xs); }
.sky-info-name { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 1.7rem); letter-spacing: -.015em; margin: 0 0 var(--space-sm); color: var(--ink); line-height: 1.1; text-wrap: balance; }
.sky-info-body { margin: 0; color: var(--ink-soft); line-height: 1.55; text-wrap: pretty; }
.sky-info-reach { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--hair); }
.sky-info-reach-label { font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 700; color: var(--muted); }
.sky-info-reach p { margin: var(--space-2xs) 0 0; color: var(--ink); line-height: 1.5; }

.sky-map-note { max-width: 1180px; margin: var(--space-md) auto 0; font-size: .82rem; color: var(--muted); }

/* ---------- THE THREE LINES ---------------------------------------------- */
.sky-lines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--space-md); margin: 0 0 var(--space-2xl); }
.sky-line-card { background: linear-gradient(180deg, var(--sky-night2), var(--paper-2)); border: 1px solid color-mix(in oklab, var(--c) 38%, var(--hair)); border-radius: var(--sky-r-card); padding: var(--space-lg); position: relative; overflow: hidden; }
/* a soft corner wash in the line's own color ties the card to its line, no side stripe */
.sky-line-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(120% 78% at 0% 0%, color-mix(in oklab, var(--c) 16%, transparent), transparent 58%); }
.sky-line-card-head { display: flex; align-items: center; gap: var(--space-sm); margin: 0 0 var(--space-md); }
.sky-line-card-rail { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); flex: none; }
.sky-line-card-title { font-family: var(--display); font-weight: 700; font-size: 1.22rem; letter-spacing: -.01em; margin: 0; color: var(--ink); text-wrap: balance; }
.sky-line-stops { list-style: none; margin: 0 0 var(--space-md); padding: 0; position: relative; }
.sky-line-stops::before { content: ""; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; background: color-mix(in oklab, var(--c) 55%, transparent); }
.sky-line-stop { position: relative; display: flex; align-items: center; gap: var(--space-sm); padding: .42rem 0; }
.sky-line-stop-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 3px solid var(--c); flex: none; position: relative; z-index: 1; }
.sky-line-stop.is-park .sky-line-stop-dot { background: var(--c); width: 16px; height: 16px; box-shadow: 0 0 10px var(--c); }
.sky-line-stop.is-hub .sky-line-stop-dot { background: var(--gold); border-color: var(--gold); }
.sky-line-stop-name { font-weight: 600; color: var(--ink); }
.sky-line-stop.is-park .sky-line-stop-name { font-family: var(--display); font-weight: 700; }
.sky-line-card-note { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.45; text-wrap: pretty; }

/* transfer matrix */
.sky-matrix-wrap { max-width: 720px; }
.sky-matrix { width: 100%; border-collapse: collapse; font-size: .98rem; }
.sky-matrix th, .sky-matrix td { padding: .7rem .8rem; text-align: left; border-bottom: 1px solid var(--hair); }
.sky-matrix thead th { font-family: var(--label); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.sky-matrix tbody th { font-weight: 600; color: var(--ink); }
.sky-matrix td { color: var(--ink-soft); font-weight: 600; }
.sky-matrix td.is-direct { color: oklch(82% 0.15 150); }
.sky-matrix td.is-change { color: var(--ink-soft); }
.sky-matrix-note { margin: var(--space-sm) 0 0; font-size: .85rem; color: var(--muted); }

/* ---------- STATIONS ------------------------------------------------------ */
.sky-stations { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--space-md); }
.sky-station-card { background: var(--paper-2); border: 1px solid var(--hair); border-radius: var(--sky-r-card); padding: var(--space-lg); scroll-margin-top: 90px; transition: border-color .18s ease, transform .18s ease; }
.sky-station-card:hover { border-color: var(--rule); }
.sky-station-card.is-hub { border-color: color-mix(in oklab, var(--gold) 45%, var(--hair)); background: linear-gradient(180deg, oklch(31% 0.06 90 / 0.28), var(--paper-2)); }
.sky-station-kind { font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 700; color: var(--gold); }
.sky-station-card:not(.is-hub) .sky-station-kind { color: var(--muted); }
.sky-station-name { font-family: var(--display); font-weight: 700; font-size: 1.16rem; letter-spacing: -.01em; margin: var(--space-2xs) 0 var(--space-sm); color: var(--ink); line-height: 1.12; text-wrap: balance; }
.sky-station-reach { margin: 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.5; text-wrap: pretty; }

/* ---------- GOOD TO KNOW -------------------------------------------------- */
.sky-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--space-md); }
.sky-fact { background: var(--paper-2); border: 1px solid var(--hair); border-radius: var(--sky-r-card); padding: var(--space-lg); }
.sky-fact-k { display: block; font-family: var(--display); font-weight: 700; font-size: 1.06rem; color: var(--gold); margin: 0 0 var(--space-2xs); }
.sky-fact p { margin: 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.52; text-wrap: pretty; }

/* ---------- FAQ ----------------------------------------------------------- */
.sky-faq dl { margin: 0; max-width: 68ch; }
.sky-faq dt { font-family: var(--display); font-weight: 700; font-size: 1.12rem; margin: var(--space-lg) 0 var(--space-2xs); color: var(--ink); text-wrap: balance; }
.sky-faq dd { margin: 0; color: var(--ink-soft); line-height: 1.6; text-wrap: pretty; }

/* ---------- RELATED + FOOT ------------------------------------------------ */
.sky-related { max-width: 1080px; margin: 0 auto; padding: var(--space-md) var(--space-md) 0; display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.sky-related a { display: inline-flex; align-items: center; min-height: 40px; font-family: var(--label); font-weight: 600; font-size: .94rem; color: var(--ink); padding: .5rem 1rem; border: 1px solid var(--hair); border-radius: 999px; transition: border-color .16s ease, color .16s ease, transform .12s ease; }
.sky-related a:hover { border-color: var(--gold); color: var(--gold); }
.sky-related a:active { transform: scale(0.96); }
.sky-foot { max-width: 1080px; margin: 0 auto; padding: var(--space-lg) var(--space-md) var(--space-3xl); font-size: .82rem; color: var(--muted); }

/* ---------- MOTION -------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .sky-hero-inner > * { animation: sky-rise .7s cubic-bezier(.16,1,.3,1) backwards; }
  .sky-hero-inner > *:nth-child(2) { animation-delay: .05s; }
  .sky-hero-inner > *:nth-child(3) { animation-delay: .1s; }
  .sky-hero-inner > *:nth-child(4) { animation-delay: .15s; }
  .sky-hero-inner > *:nth-child(5) { animation-delay: .2s; }
  @keyframes sky-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  /* the hero cabins sway gently from their cable, like a real gondola in a breeze */
  .sky-hero-cabin--a { animation: sky-hero-sway 6.5s ease-in-out infinite; }
  .sky-hero-cabin--b { animation: sky-hero-sway 5.4s ease-in-out infinite reverse; }
  @keyframes sky-hero-sway { 0%, 100% { transform: rotate(-3.2deg); } 50% { transform: rotate(3.2deg); } }
  /* CSS fallback gondolas drift only if JS never upgrades the divider */
  .sky-divider:not(.is-gl) .sky-divider-fallback { animation: sky-glide-ltr 14s linear infinite; }
  .sky-divider[data-dir="rtl"]:not(.is-gl) .sky-divider-fallback { animation: sky-glide-rtl 14s linear infinite; }
  @keyframes sky-glide-ltr { from { transform: translateX(-40px); } to { transform: translateX(calc(100vw)); } }
  @keyframes sky-glide-rtl { from { transform: translateX(40px); } to { transform: translateX(calc(-100vw)); } }
}
@media (prefers-reduced-motion: reduce) {
  .sky-map-gl { display: none; } /* hold on the static SVG map */
}

/* ---------- RESPONSIVE ---------------------------------------------------- */
@media (max-width: 560px) {
  .sky-map-stage { aspect-ratio: 4 / 5; }
  .sky-svg-label { font-size: 34px; }
  .sky-divider { height: 84px; }
}
