:root {
  --ink: #13212b;
  --muted: #53636d;
  --faint: #8a97a0;
  --paper: #f4f0e7;
  --surface: #fffdf8;
  --line: rgba(19, 33, 43, 0.16);
  --line-soft: rgba(19, 33, 43, 0.08);
  --rust: #c85032;
  --rust-soft: rgba(200, 80, 50, 0.12);
  --blue: #315f71;
  --grid: rgba(49, 95, 113, 0.16);
  --white: #fffdf8;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Roboto Mono", monospace;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--paper); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(244, 240, 231, 0.94), rgba(244, 240, 231, 0.98)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(19, 33, 43, 0.03) 80px),
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(19, 33, 43, 0.03) 80px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.sky {
  position: fixed;
  inset: 0 0 auto;
  height: 310px;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #b8d1d7 0%, #dce6e2 64%, rgba(244, 240, 231, 0) 100%);
}

.sun {
  position: absolute;
  right: 12%;
  top: 62px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(255, 239, 194, 0.7);
  box-shadow: 0 0 70px rgba(255, 225, 157, 0.75);
}

.cloud {
  position: absolute;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  filter: blur(1px);
}

.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.cloud::before { width: 54px; height: 54px; left: 32px; bottom: 0; }
.cloud::after { width: 74px; height: 74px; left: 67px; bottom: 0; }
.cloud-one { width: 180px; top: 104px; left: 9%; }
.cloud-two { width: 145px; top: 168px; right: 28%; transform: scale(.75); opacity: .7; }

.site-header, main, footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  border-bottom: 1px solid rgba(19, 33, 43, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: ui-sans-serif, sans-serif;
  font-size: .72rem;
  letter-spacing: .08em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rust);
  box-shadow: 0 0 0 5px rgba(200, 80, 50, 0.12);
}

.hero {
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  align-items: center;
  gap: clamp(42px, 7vw, 92px);
  padding: clamp(72px, 10vw, 130px) 0 80px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--rust);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

h1 {
  max-width: 620px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.5rem, 7vw, 6.65rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .91;
}

.lede {
  max-width: 550px;
  margin: 28px 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 3px;
  color: var(--white);
  background: var(--ink);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s ease;
}

a.primary-action:hover { background: var(--rust); }
a.primary-action:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

.secondary-note { color: var(--muted); font-size: .88rem; }

.route-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 253, 248, .8);
  box-shadow: 0 30px 80px rgba(19, 33, 43, 0.14);
  backdrop-filter: blur(12px);
  transform: rotate(1.2deg);
  overflow: hidden;
}

.route-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(19, 33, 43, .09);
  pointer-events: none;
}

.route-card-topline, .route-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 26px;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.route-card-topline { border-bottom: 1px solid var(--line); }
.route-card-footer { gap: 18px; border-top: 1px solid var(--line); }

.route-map { display: block; width: 100%; height: auto; }
.route-map .contour { fill: none; stroke: var(--blue); stroke-width: 1.2; opacity: .14; }
.route-map .flight-path { fill: none; stroke: url(#route); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 8 10; filter: url(#glow); }
.route-map .airport { fill: var(--rust); }
.route-map .airport-pulse { fill: rgba(200, 80, 50, .12); stroke: rgba(200, 80, 50, .35); }
.route-map .plane { fill: var(--ink); }
.route-map text { fill: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.route-map .route-code { fill: var(--muted); font-size: 10px; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.features article {
  padding: 35px 34px 40px;
  border-right: 1px solid var(--line);
}

.features article:first-child { padding-left: 0; }
.features article:last-child { padding-right: 0; border-right: 0; }
.feature-number { color: var(--rust); font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.features h2 { margin: 15px 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: 1.38rem; }
.features p { max-width: 280px; margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.6; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 45px;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .05em;
}

/* ---- Flightbook entry ---- */
.entry {
  padding: clamp(40px, 7vw, 78px) 0 clamp(30px, 5vw, 56px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.entry-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  margin: 0 0 20px;
  color: var(--rust);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.entry-eyebrow .dash { width: 24px; height: 1px; background: var(--rust); opacity: .5; }
.entry-eyebrow .dim { color: var(--faint); }

.entry-head h2 {
  max-width: 16ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: .98;
  text-wrap: balance;
}

.entry-dek {
  max-width: 60ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  line-height: 1.55;
}

.entry-chart {
  margin: clamp(30px, 5vw, 46px) 0 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 30px 70px -34px rgba(19, 33, 43, 0.3);
  overflow: hidden;
}

.entry-chart-head, .entry-chart-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
  padding: 15px 22px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.entry-chart-head { border-bottom: 1px solid var(--line); }
.entry-chart-foot { border-top: 1px solid var(--line); }
.entry-chart-foot b { color: var(--ink); font-weight: 700; }

#routemap {
  display: block;
  width: 100%;
  height: auto;
  background: radial-gradient(120% 140% at 78% 12%, #faf6ee, var(--surface));
}

.rm-grid { stroke: var(--grid); stroke-width: 1; opacity: .55; }
.rm-route { fill: none; stroke: var(--rust); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.rm-route-glow { fill: none; stroke: var(--rust); stroke-width: 9; opacity: .14; stroke-linecap: round; stroke-linejoin: round; }
.rm-apt { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.rm-apt-pulse { fill: var(--rust-soft); }
.rm-icao { fill: var(--ink); font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: .04em; }
.rm-city { fill: var(--muted); font-size: 11px; }
.rm-plane { fill: var(--rust); }
.rm-north { fill: var(--rust); }
.rm-compass circle { fill: none; stroke: var(--grid); stroke-width: 1; }
.rm-compass line { stroke: var(--muted); stroke-width: 1.2; }
.rm-compass text { fill: var(--muted); font-family: var(--mono); font-size: 10px; }

.entry-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: clamp(28px, 4vw, 42px);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.entry-stats .stat { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; background: var(--surface); }
.entry-stats .stat .k { color: var(--muted); font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; }
.entry-stats .stat .v { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 3.2vw, 2.5rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.entry-stats .stat .v small { font-size: .5em; color: var(--muted); font-family: var(--mono); }

.entry-legs { margin-top: clamp(36px, 5vw, 54px); }

.entry-legs-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.entry-legs-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.legs { border: 1px solid var(--line); border-radius: 5px; background: var(--surface); overflow: hidden; }

.leg {
  display: grid;
  align-items: center;
  gap: 8px 20px;
  grid-template-columns: 34px minmax(150px, 1.4fr) repeat(3, minmax(78px, 1fr));
  padding: 18px 22px;
  border-top: 1px solid var(--line-soft);
}

.leg:first-child { border-top: none; }
.leg .no { color: var(--rust); font-family: var(--mono); font-size: .8rem; font-weight: 600; }
.leg .route { display: flex; flex-direction: column; gap: 3px; }
.leg .route .pair { font-family: var(--mono); font-size: 1.02rem; font-weight: 600; letter-spacing: .02em; }
.leg .route .pair .arrow { color: var(--rust); margin: 0 6px; }
.leg .route .cities { color: var(--muted); font-size: .82rem; }
.leg .cell .lab { display: block; margin-bottom: 4px; color: var(--faint); font-family: var(--mono); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; }
.leg .cell .val { font-family: var(--mono); font-size: .94rem; font-variant-numeric: tabular-nums; }
.leg .cell .val .z { color: var(--muted); font-size: .8rem; }

.aircraft {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-top: 24px;
  padding: 18px 22px;
  border: 1px dashed var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .02em;
}

.aircraft b { color: var(--ink); font-weight: 600; }
.aircraft .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--rust); }

.entry-note {
  max-width: 74ch;
  margin: clamp(34px, 5vw, 50px) 0 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.62;
}

.entry-note .src {
  display: block;
  margin-bottom: 10px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

.unlock {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 240px);
  padding: clamp(48px, 9vw, 96px) 0;
}

.unlock-card {
  width: min(480px, 100%);
  padding: clamp(30px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 253, 248, .82);
  box-shadow: 0 30px 80px rgba(19, 33, 43, 0.14);
  backdrop-filter: blur(12px);
}

.unlock-card h1 {
  font-size: clamp(2.1rem, 5vw, 2.9rem);
  line-height: 1;
  margin-top: 14px;
}

.unlock-card .lede { margin-top: 18px; font-size: 1.02rem; }

.unlock-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.unlock-form input[type="password"] {
  flex: 1 1 200px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(19, 33, 43, 0.28);
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
}

.unlock-form input[type="password"]:focus {
  outline: 2px solid var(--rust);
  outline-offset: 1px;
  border-color: var(--rust);
}

.unlock-form .primary-action {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.unlock-error {
  margin: 16px 0 0;
  color: var(--rust);
  font-size: .9rem;
  font-weight: 600;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 72px; }
  .route-card { transform: none; }
  .features { grid-template-columns: 1fr; }
  .features article, .features article:first-child, .features article:last-child {
    padding: 28px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .features article:last-child { border-bottom: 0; }
  .entry-stats { grid-template-columns: repeat(2, 1fr); }
  .leg {
    grid-template-columns: 28px 1fr 1fr;
    row-gap: 14px;
  }
  .leg .route { grid-column: 2 / -1; }
}

@media (max-width: 580px) {
  .site-header, main, footer { width: min(100% - 28px, 1180px); }
  .site-header { min-height: 82px; }
  .status { display: none; }
  .hero { gap: 50px; padding: 58px 0 60px; }
  h1 { font-size: clamp(3.35rem, 16vw, 5.2rem); }
  .route-card-topline, .route-card-footer { padding: 17px 19px; }
  .route-card-footer { flex-wrap: wrap; justify-content: flex-start; }
  footer { flex-direction: column; }
  .entry-stats { grid-template-columns: 1fr 1fr; }
  .leg .cell.dist { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .plane { animation: drift 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes drift { 50% { translate: 4px -4px; } }
}
