:root {
  color-scheme: light;
  --bg: #f5f9ff;
  --surface: #ffffff;
  --surface-blue: #edf6ff;
  --ink: #071b33;
  --muted: #5d7189;
  --line: #d7e5f3;
  --blue: #0873d8;
  --blue-strong: #045cac;
  --sky: #63c7ff;
  --green: #2c9666;
  --amber: #e4a628;
  --shadow: 0 22px 60px rgba(7, 35, 72, 0.14);
  --radius: 8px;
  --font-sans: "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono: "Cascadia Mono", "Roboto Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(9, 40, 78, 0.12);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: max-content;
  text-decoration: none;
}

.logo-frame {
  display: grid;
  place-items: center;
  width: 128px;
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
}

.official-logo {
  display: block;
  width: 100%;
  height: auto;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(237, 246, 255, 0.82);
}

.site-nav a {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}

.site-nav a.active,
.site-nav a:hover {
  color: #ffffff;
  background: var(--blue);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  min-width: max-content;
}

.primary-action,
.secondary-action,
.ghost-action {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.primary-action {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 14px 34px rgba(8, 115, 216, 0.23);
}

.primary-action:hover {
  background: var(--blue-strong);
}

.secondary-action {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.ghost-action {
  color: var(--blue-strong);
  background: rgba(8, 115, 216, 0.1);
}

.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  overflow: hidden;
  background: #0c1a2c;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(0.9) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 18, 35, 0.88), rgba(6, 18, 35, 0.48) 52%, rgba(6, 18, 35, 0.18)),
    linear-gradient(0deg, rgba(6, 18, 35, 0.72), rgba(6, 18, 35, 0.06));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  width: min(760px, calc(100% - 38px));
  min-height: calc(100vh - 146px);
  padding: 76px 0 120px;
  margin-left: clamp(20px, 6vw, 78px);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--sky);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(48px, 7.5vw, 94px);
  line-height: 0.94;
}

.page-hero h1 {
  max-width: 1000px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.02;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.03;
}

h3 {
  margin-bottom: 0;
  font-size: 22px;
}

.hero-copy {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero .secondary-action {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.hero-stats {
  position: absolute;
  z-index: 3;
  right: clamp(20px, 6vw, 78px);
  bottom: 34px;
  left: clamp(20px, 6vw, 78px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(8, 22, 40, 0.82);
  backdrop-filter: blur(16px);
}

.hero-stats div {
  min-height: 88px;
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-stats div:last-child {
  border-right: 0;
}

.hero-stats span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.hero-stats strong {
  display: block;
  margin-top: 9px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 28px;
}

.page-shell {
  width: min(1180px, calc(100% - 38px));
  margin: 0 auto;
  padding: 70px 0;
}

.page-shell.tight {
  padding-top: 48px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.section-heading p,
.lead-copy {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.65;
}

.feature-grid,
.steps-grid,
.download-grid,
.values-grid,
.stats-grid {
  display: grid;
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.values-grid,
.download-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.stat-card,
.join-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(7, 35, 72, 0.06);
}

.card {
  min-height: 220px;
  padding: 24px;
}

.card p,
.download-card p,
.stat-card span,
.value-item p,
.step p,
.form-note,
.footer-copy {
  color: var(--muted);
  line-height: 1.6;
}

.icon-pill {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  border-radius: 8px;
  color: var(--blue-strong);
  background: var(--surface-blue);
}

.icon-pill svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.experience-band {
  background: #071b33;
  color: #ffffff;
}

.experience-band .page-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 42px;
  align-items: center;
}

.experience-band p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.product-shot {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: #0b1422;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.shot-topbar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shot-topbar span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #476179;
}

.shot-map {
  position: relative;
  min-height: 330px;
  background:
    linear-gradient(rgba(7, 20, 34, 0.85), rgba(7, 20, 34, 0.85)),
    repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(99, 199, 255, 0.06) 36px),
    repeating-linear-gradient(90deg, transparent, transparent 35px, rgba(99, 199, 255, 0.06) 36px);
}

.route-line {
  position: absolute;
  height: 2px;
  background: rgba(99, 199, 255, 0.62);
  transform-origin: left center;
}

.line-a {
  left: 13%;
  top: 67%;
  width: 330px;
  transform: rotate(-21deg);
}

.line-b {
  left: 24%;
  top: 32%;
  width: 390px;
  transform: rotate(15deg);
}

.line-c {
  left: 52%;
  top: 56%;
  width: 250px;
  transform: rotate(-33deg);
}

.map-label,
.map-plane {
  position: absolute;
  display: grid;
  place-items: center;
}

.map-label {
  min-width: 56px;
  min-height: 28px;
  border: 1px solid rgba(151, 201, 255, 0.28);
  border-radius: 8px;
  color: #ddecff;
  background: #071426;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.map-plane {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--sky);
  box-shadow: 0 0 0 7px rgba(99, 199, 255, 0.13);
}

.public-map-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: #071426;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.public-map-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.public-map-topbar .eyebrow {
  margin-bottom: 4px;
}

.public-map-topbar strong {
  color: #ffffff;
  font-size: 16px;
}

.map-status-pill {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  min-width: 110px;
  padding: 0 10px;
  border: 1px solid rgba(99, 199, 255, 0.32);
  border-radius: 999px;
  color: #ccecff;
  background: rgba(8, 115, 216, 0.16);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.public-live-map {
  position: relative;
  min-height: 420px;
  background:
    linear-gradient(rgba(7, 20, 34, 0.7), rgba(7, 20, 34, 0.7)),
    repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(99, 199, 255, 0.06) 36px),
    repeating-linear-gradient(90deg, transparent, transparent 35px, rgba(99, 199, 255, 0.06) 36px);
}

.public-live-map .leaflet-container,
.public-live-map.leaflet-container {
  font-family: var(--font-sans);
  background: #071426;
}

.public-live-map .leaflet-control-zoom a {
  color: #ddecff;
  background: rgba(7, 20, 34, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.public-live-map .leaflet-control-attribution {
  color: rgba(255, 255, 255, 0.56);
  background: rgba(7, 20, 34, 0.78);
}

.public-live-map .leaflet-control-attribution a {
  color: #ccecff;
}

.map-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #ddecff;
  font-weight: 900;
  text-align: center;
}

.public-map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.public-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.legend-dot.breeze {
  background: var(--sky);
}

.legend-dot.vatsim {
  background: #d6a22f;
}

.legend-dot.atc {
  background: #18b76f;
}

.legend-dot.weather {
  background: #77d9ff;
}

.public-map-layer-controls {
  position: absolute;
  right: 14px;
  bottom: 48px;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(520px, calc(100% - 28px));
  pointer-events: auto;
}

.map-layer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(157, 187, 220, 0.26);
  border-radius: 5px;
  color: rgba(230, 241, 255, 0.72);
  background: rgba(7, 20, 34, 0.84);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.map-layer-toggle.is-active {
  border-color: rgba(25, 127, 232, 0.72);
  color: #ffffff;
  background: rgba(8, 115, 216, 0.92);
}

.map-layer-toggle:focus-visible {
  outline: 3px solid rgba(99, 199, 255, 0.4);
  outline-offset: 2px;
}

.public-map-plane-icon,
.public-map-atc-icon {
  background: transparent;
  border: 0;
}

.public-aircraft-svg {
  width: 14px;
  height: 14px;
  transform: rotate(var(--heading));
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.46));
}

.public-aircraft-svg path {
  fill: var(--aircraft-color);
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 1.6;
}

.public-map-atc-icon span {
  display: inline-grid;
  place-items: center;
  pointer-events: none;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(120, 224, 172, 0.52);
  border-radius: 5px;
  color: #eafff4;
  background: rgba(5, 24, 18, 0.88);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.public-map-atc-icon.label-only span {
  border-color: rgba(99, 199, 255, 0.48);
  color: #ddecff;
  background: rgba(7, 20, 34, 0.9);
}

.public-map-popup {
  display: grid;
  gap: 5px;
  min-width: 170px;
  color: #ddecff;
}

.public-map-popup strong,
.public-map-popup span {
  display: block;
}

.public-map-popup strong {
  color: #ffffff;
}

.public-live-map .leaflet-popup-content-wrapper,
.public-live-map .leaflet-popup-tip {
  background: #071426;
  color: #ddecff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}

.join-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 1fr);
  gap: 22px;
  align-items: start;
}

.join-layout > aside .eyebrow {
  color: var(--blue-strong);
}

.join-panel {
  padding: 24px;
}

.join-form {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.join-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.join-form input,
.join-form select,
.join-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.join-form textarea {
  min-height: 112px;
  padding-top: 12px;
  resize: vertical;
}

.join-form input:focus,
.join-form select:focus,
.join-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 115, 216, 0.15);
}

.form-success {
  display: none;
  min-height: 46px;
  padding: 12px;
  border: 1px solid rgba(44, 150, 102, 0.28);
  border-radius: var(--radius);
  color: #146844;
  background: rgba(44, 150, 102, 0.1);
  font-weight: 850;
}

.form-success.visible {
  display: block;
}

.form-error {
  display: none;
  min-height: 46px;
  padding: 12px;
  border: 1px solid rgba(162, 71, 53, 0.28);
  border-radius: var(--radius);
  color: #8b2e22;
  background: rgba(162, 71, 53, 0.1);
  font-weight: 850;
}

.form-error.visible {
  display: block;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.58fr);
  gap: 34px;
  align-items: center;
  width: min(1180px, calc(100% - 38px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 70px 0;
}

.auth-copy h1 {
  max-width: 720px;
  color: var(--ink);
  font-size: clamp(44px, 6vw, 76px);
}

.auth-copy p {
  max-width: 660px;
  color: var(--muted);
  line-height: 1.65;
}

.auth-panel,
.account-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-panel {
  padding: 26px;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) repeat(2, minmax(280px, 0.85fr));
  gap: 18px;
  align-items: stretch;
}

.account-card {
  min-height: 280px;
  padding: 24px;
}

.account-card p {
  color: var(--muted);
  line-height: 1.6;
}

.account-details {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
}

.account-details div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.account-details dt {
  color: var(--muted);
  font-weight: 850;
}

.account-details dd {
  margin: 0;
  font-weight: 900;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-family: var(--font-mono);
  font-weight: 900;
}

.download-card {
  min-height: 265px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.download-card.locked {
  background: linear-gradient(180deg, #ffffff, #edf6ff);
}

.badge {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--blue-strong);
  background: rgba(8, 115, 216, 0.12);
  font-size: 12px;
  font-weight: 900;
}

.stat-card {
  min-height: 125px;
  padding: 18px;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 32px;
}

.page-hero {
  background: #071b33;
  color: #ffffff;
}

.page-hero .page-shell {
  padding: 82px 0 70px;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.65;
}

.value-item {
  padding: 24px;
  border-left: 4px solid var(--blue);
  background: var(--surface);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(180px, 0.4fr));
  gap: 28px;
  width: min(1180px, calc(100% - 38px));
  margin: 0 auto;
  padding: 42px 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.footer-links::-webkit-scrollbar {
  display: none;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.legal {
  width: min(1180px, calc(100% - 38px));
  margin: 0 auto;
  padding: 0 0 30px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav,
  .header-actions {
    width: 100%;
    overflow-x: auto;
  }

  .feature-grid,
  .values-grid,
  .download-grid,
  .stats-grid,
  .experience-band .page-shell,
  .join-layout,
  .auth-shell,
  .account-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-nav a {
    min-width: 0;
    padding: 0 8px;
    font-size: 12px;
  }

  .hero {
    min-height: 820px;
  }

  .hero-content {
    min-height: 580px;
    margin-left: 18px;
    padding-top: 62px;
  }

  .hero-stats,
  .form-row,
  .account-details div {
    grid-template-columns: 1fr;
  }

  .public-map-layer-controls {
    left: 12px;
    right: 12px;
    bottom: 58px;
    justify-content: flex-start;
  }

  .map-layer-toggle {
    font-size: 9px;
  }

  .hero-stats div {
    min-height: 74px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .hero-stats div:last-child {
    border-bottom: 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
