/* AeroSky Partners — Ownership lifecycle as a flight route on an aeronautical chart */
html[data-mode="day"]  { --chart-line: rgba(2, 37, 64, .07); --chart-contour: rgba(2, 37, 64, .06); --card-bg: #ffffff; --card-line: rgba(2, 37, 64, .1); }
html[data-mode="dusk"] { --chart-line: rgba(255, 255, 255, .06); --chart-contour: rgba(255, 255, 255, .05); --card-bg: #15171b; --card-line: rgba(255, 255, 255, .1); }

.route {
  position: relative;
  padding: clamp(110px, 16vh, 180px) var(--gutter) clamp(110px, 16vh, 180px);
  overflow: hidden;
  background-image:                       /* chart graticule */
    linear-gradient(var(--chart-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--chart-line) 1px, transparent 1px);
  background-size: 120px 120px;
  background-position: center top;
}
.route__chart { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.route__chart .contour { stroke: var(--chart-contour); }
.route__compass { position: absolute; top: clamp(110px, 16vh, 180px); right: var(--gutter); width: 92px; height: 92px; color: var(--fg); opacity: .35; }

.route__head { position: relative; display: grid; justify-items: center; gap: 18px; max-width: 900px; margin: 0 auto clamp(64px, 10vh, 110px); text-align: center; }
.route__head h2 { margin: 0; font-family: var(--serif); font-size: clamp(46px, 5.2vw, 96px); font-weight: 400; line-height: 1; letter-spacing: -.02em; }
.route__head h2 em { font-style: italic; }
.route__head p { margin: 0; max-width: 52ch; font-size: 18px; line-height: 1.6; color: var(--fg-soft); }

/* the route: cards alternate either side of a central flight path */
.route__map { position: relative; max-width: 1240px; margin: 0 auto; }
.route__path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.route__path .track { fill: none; stroke: var(--fg); stroke-opacity: .14; stroke-width: 1.5; stroke-dasharray: 2 8; stroke-linecap: round; }
.route__path .flown { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; }
.route__plane { position: absolute; z-index: 3; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; color: var(--gold); pointer-events: none; will-change: transform; }
.route__plane svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(1, 15, 28, .25)); }

.leg { position: relative; display: grid; grid-template-columns: 1fr 120px 1fr; align-items: center; min-height: 340px; }
.leg + .leg { margin-top: clamp(40px, 7vh, 80px); }
.leg__dot { grid-column: 2; justify-self: center; position: relative; z-index: 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sheet); border: 1.5px solid var(--card-line); font-size: 13px; font-weight: 600; letter-spacing: .04em; transition: background-color .5s, border-color .5s, color .5s, transform .5s var(--ease); }
.leg.is-reached .leg__dot { background: var(--gold); border-color: var(--gold); color: var(--ink); transform: scale(1.08); }
.leg--right .step { grid-column: 3; grid-row: 1; }
.leg--left .step { grid-column: 1; grid-row: 1; }
.leg--right .leg__dot, .leg--left .leg__dot { grid-row: 1; }

/* start / end waypoints */
.leg--node { min-height: 0; }
.node { grid-column: 1 / -1; justify-self: center; position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 10px; border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg); font-size: 14px; font-weight: 500; }
.node__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--ink); }
.node__icon svg { width: 16px; height: 16px; }
.node small { opacity: .65; font-size: 12px; font-weight: 400; margin-left: 4px; }

/* step card */
.step {
  display: grid;
  overflow: hidden;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  box-shadow: 0 30px 60px -30px rgba(1, 15, 28, .25);
  text-align: left;
  cursor: pointer;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease), background-color .8s;
}
.step:hover { transform: translateY(-6px); box-shadow: 0 40px 70px -30px rgba(1, 15, 28, .35); }
.step:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.step__img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.step__img img { width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform 1.2s var(--ease); }
.step:hover .step__img img { transform: scale(1.05); }
.step__phase { position: absolute; left: 16px; top: 16px; padding: 6px 12px; border-radius: 999px; background: rgba(1, 15, 28, .6); color: var(--white); backdrop-filter: blur(6px); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.step__body { display: grid; gap: 12px; padding: 26px 28px 28px; }
.step__body .mono { color: var(--gold); }
.step__body h3 { margin: 0; font-family: var(--serif); font-size: clamp(30px, 2.6vw, 44px); font-weight: 400; line-height: 1; }
.step__body p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--fg-soft); }
.step__more { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 14px; font-weight: 600; }
.step__more i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-fg); font-style: normal; transition: transform .5s var(--ease); }
.step:hover .step__more i { transform: translateX(4px); }

.route__loop { position: relative; margin: clamp(30px, 5vh, 50px) auto 0; text-align: center; color: var(--fg-soft); font-size: 14px; }

/* ---------- detail drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 80; display: grid; justify-items: end; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(1, 15, 28, .45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .5s; }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer__panel {
  position: relative;
  width: min(620px, 100vw);
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--sheet);
  color: var(--fg);
  transform: translateX(100%);
  transition: transform .7s var(--ease);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__close { position: absolute; z-index: 2; top: 18px; right: 18px; width: 48px; height: 48px; border-radius: 50%; background: rgba(1, 15, 28, .55); color: var(--white); font-size: 20px; backdrop-filter: blur(6px); }
.drawer__img { aspect-ratio: 16 / 10; overflow: hidden; }
.drawer__img img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.drawer__body { display: grid; gap: 28px; padding: 36px clamp(24px, 4vw, 48px) 48px; }
.drawer__body .mono { color: var(--gold); }
.drawer__body h3 { margin: 6px 0 0; font-family: var(--serif); font-size: clamp(40px, 4vw, 62px); font-weight: 400; line-height: 1; }
.drawer__lede { margin: 0; font-size: 19px; line-height: 1.55; }
.drawer__block h4 { margin: 0 0 12px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.drawer__block p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--fg-soft); }
.drawer__block ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.drawer__block li { position: relative; padding-left: 28px; font-size: 16px; line-height: 1.5; color: var(--fg-soft); }
.drawer__block li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 1.5px; background: var(--gold); }
.drawer__ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.drawer__nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 22px; border-top: 1px solid var(--card-line); }
.drawer__nav button { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; opacity: .8; }
.drawer__nav button:hover { opacity: 1; }
.drawer__nav button[disabled] { visibility: hidden; }

@media (max-width: 900px) {
  .route__compass { display: none; }
  .leg { grid-template-columns: 56px 1fr; column-gap: 18px; min-height: 0; }
  .leg__dot { grid-column: 1; width: 44px; height: 44px; font-size: 12px; }
  .leg--right .step, .leg--left .step { grid-column: 2; }
  .node { grid-column: 1 / -1; justify-self: start; }
}
