:root {
  --bg: #090d10;
  --bg-elevated: #10161a;
  --surface: rgba(16, 22, 26, 0.84);
  --surface-strong: rgba(22, 29, 35, 0.94);
  --surface-soft: rgba(198, 171, 121, 0.05);
  --line: rgba(198, 171, 121, 0.34);
  --line-soft: rgba(198, 171, 121, 0.14);
  --text: #f1eee8;
  --muted: #a49d90;
  --muted-strong: #c9c1b4;
  --accent: #c6ab79;
  --accent-strong: #e0c48e;
  --accent-soft: rgba(198, 171, 121, 0.08);
  --success: #83d8ba;
  --danger: #ff8f80;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --max: 1240px;
  --content: 1080px;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(198, 171, 121, 0.08), transparent 28%),
    linear-gradient(180deg, #090d10 0%, #0c1115 46%, #090d10 100%);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}

body::selection {
  background: rgba(198, 171, 121, 0.22);
  color: #ffffff;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 60;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.02);
}

.page-progress__bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 18px rgba(198, 171, 121, 0.35);
}

.site-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.site-backdrop__orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.55;
}

.site-backdrop__orb--one {
  top: 96px;
  right: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(198, 171, 121, 0.18), transparent 68%);
}

.site-backdrop__orb--two {
  top: 420px;
  left: -120px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(70, 118, 153, 0.16), transparent 70%);
}

.site-backdrop__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(198, 171, 121, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(198, 171, 121, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 78%);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 20px 34px;
}

.site-header__inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 20px;
}

main {
  width: 100%;
  max-width: var(--content);
}

.site-header,
.site-footer,
.hero,
.workflow-strip,
.upload-stage,
.workspace,
.info-hero,
.info-section {
  border-top: 1px solid var(--line-soft);
}

.site-header,
.site-footer,
.section-head,
.route-card-header,
.footer-line,
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  width: 100%;
  margin-bottom: 20px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(9, 13, 16, 0.9);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  padding-top: 18px;
  padding-bottom: 16px;
}

.brand,
.site-nav a,
.section-label,
.route-card-label,
.primary-button,
.secondary-button,
.workflow-index {
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.12em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(198, 171, 121, 0.18);
  border-radius: 999px;
  background: rgba(198, 171, 121, 0.04);
  font-size: 0.78rem;
}

.brand-text {
  font-size: 0.94rem;
}

.brand-text span {
  color: var(--accent);
}

.brand-divider {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(198, 171, 121, 0.18);
  border-radius: 14px;
  background: rgba(9, 13, 16, 0.72);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.18s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.footer-line a:hover,
.footer-line a:focus-visible {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 30px;
  padding: 44px 0 42px;
}

.hero--home {
  align-items: end;
}

.hero-copy {
  position: relative;
  overflow: hidden;
  max-width: 760px;
  padding: clamp(1.5rem, 3vw, 2.8rem);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(24, 31, 36, 0.86), rgba(13, 18, 22, 0.96)),
    radial-gradient(circle at top left, rgba(198, 171, 121, 0.06), transparent 28%);
  box-shadow: var(--shadow);
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 160px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.hero-kicker,
.section-label,
.route-card-label,
.eyebrow,
.mini-label,
.proof-label,
.status-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  letter-spacing: -0.04em;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.96;
  font-weight: 780;
}

.hero-title {
  max-width: 11ch;
}

.info-title {
  max-width: 13ch;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  line-height: 0.98;
}

.section-title {
  margin-top: 10px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.02;
}

.controls-title {
  margin-top: 8px;
  font-size: 1.15rem;
  line-height: 1.1;
}

.hero-text,
.section-note,
.upload-meta,
.site-footer,
.copy-grid p,
.field small,
.workflow-step p,
.hero-points li,
.upload-panel-copy,
.status-copy,
.proof-value,
.proof-item {
  color: var(--muted-strong);
}

.hero-text {
  max-width: 43ch;
  margin: 18px 0 0;
  font-size: 1.04rem;
  line-height: 1.62;
}

.hero-text--wide,
.section-note--wide {
  max-width: 54ch;
}

.proof-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(198, 171, 121, 0.12);
}

.proof-item {
  padding-right: 0.5rem;
}

.proof-label {
  margin-bottom: 0.35rem;
  color: var(--muted);
}

.proof-value {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-card {
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(23, 29, 34, 0.95), rgba(13, 18, 22, 0.98));
  box-shadow: var(--shadow);
}

.hero-card--stacked {
  align-self: stretch;
}

.hero-panel-title {
  margin: 10px 0 0;
  max-width: 16ch;
  font-size: 1.4rem;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.hero-points {
  margin: 18px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 12px;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 22px 0 28px;
}

.workflow-step {
  padding: 18px 18px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(21, 28, 33, 0.88), rgba(13, 18, 22, 0.98));
  box-shadow: var(--shadow);
}

.workflow-index {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.workflow-step strong {
  display: block;
  font-size: 1rem;
}

.workflow-step p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.upload-stage {
  padding: 24px 0 34px;
}

.upload-panel-shell {
  margin-top: 22px;
  max-width: 620px;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.upload-panel-head {
  display: grid;
  gap: 6px;
}

.upload-panel-copy {
  margin: 0;
}

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

.upload-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid rgba(198, 171, 121, 0.2);
  border-radius: 999px;
  background: rgba(198, 171, 121, 0.06);
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.upload-control:hover,
.upload-control:focus-within {
  transform: translateY(-1px);
  border-color: rgba(198, 171, 121, 0.4);
  background: rgba(198, 171, 121, 0.12);
}

.upload-control--large {
  min-width: 220px;
}

.upload-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.upload-meta {
  margin: 0;
  font-size: 0.95rem;
}

.status-panel {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(9, 13, 16, 0.48);
  line-height: 1.6;
}

.status-panel[data-state="error"] .status-copy {
  color: var(--danger);
}

.status-panel[data-state="success"] .status-copy {
  color: var(--success);
}

.workspace {
  position: relative;
  padding: 26px 0 0;
}

.workspace.is-hidden,
.download-panel.is-hidden,
.workspace-overlay.is-hidden {
  display: none;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 24px;
  align-items: start;
  padding-top: 22px;
}

.preview-panel,
.controls-panel {
  min-width: 0;
}

.controls-panel--sticky {
  position: sticky;
  top: 20px;
}

.controls-card {
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.section-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.section-head--stacked {
  align-items: flex-start;
}

.section-head--compact {
  padding-bottom: 14px;
}

.section-note {
  max-width: 30ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: right;
}

.section-note--download {
  max-width: none;
  text-align: left;
}

.comparison-grid {
  display: grid;
  gap: 18px;
}

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

.route-card {
  background: linear-gradient(180deg, rgba(21, 28, 33, 0.92), rgba(13, 18, 22, 0.98));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.route-card--skeleton {
  background: linear-gradient(180deg, rgba(21, 28, 33, 0.88), rgba(13, 18, 22, 0.96));
}

.route-card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.route-card-title {
  margin-top: 5px;
  font-size: 1rem;
  font-weight: 700;
}

.route-card-body {
  padding: 0;
}

.route-map {
  position: relative;
  min-height: 560px;
  background: #10161a;
}

.route-map--skeleton {
  overflow: hidden;
}

.route-map .leaflet-container {
  width: 100%;
  height: 100%;
  min-height: 560px;
  background: #10161a;
  filter: saturate(0.8) contrast(0.94) brightness(0.88);
}

.route-map::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(9, 13, 16, 0.98));
  pointer-events: none;
  z-index: 400;
}

.map-stats,
.map-skeleton-stats {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 500;
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 10px;
  width: min(320px, calc(100% - 32px));
}

.route-map-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 300;
}

.metric-chip {
  padding: 12px 12px 10px;
  border: 1px solid var(--line-soft);
  background: rgba(10, 15, 18, 0.86);
  border-radius: 16px;
  backdrop-filter: blur(6px);
}

.metric-chip--skeleton {
  min-height: 64px;
  background: linear-gradient(90deg, rgba(23, 29, 34, 0.92), rgba(45, 54, 60, 0.95), rgba(23, 29, 34, 0.92));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.route-map--skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(23, 29, 34, 0.42), rgba(45, 54, 60, 0.88), rgba(23, 29, 34, 0.42));
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

.metric-chip span {
  display: block;
  color: var(--accent);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-chip strong {
  display: block;
  margin-top: 4px;
  font-size: 0.95rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

.adjust-form {
  display: grid;
  gap: 16px;
  padding-top: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field input {
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid rgba(198, 171, 121, 0.14);
  border-radius: 14px;
  background: rgba(9, 13, 16, 0.62);
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus {
  outline: none;
  border-color: rgba(198, 171, 121, 0.4);
  box-shadow: 0 0 0 3px rgba(198, 171, 121, 0.08);
}

.field.is-invalid input {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 143, 128, 0.12);
}

.field-error {
  min-height: 1.2em;
  color: var(--danger);
}

.field small {
  line-height: 1.5;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.primary-button {
  border: 1px solid rgba(198, 171, 121, 0.5);
  background: var(--accent);
  color: #111418;
}

.secondary-button {
  border: 1px solid rgba(198, 171, 121, 0.18);
  background: rgba(198, 171, 121, 0.04);
  color: var(--text);
}

.primary-button--link,
.secondary-button--link {
  min-width: 180px;
}

.primary-button:hover,
.secondary-button:hover,
.primary-button:focus-visible,
.secondary-button:focus-visible {
  transform: translateY(-1px);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--accent-strong);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: rgba(198, 171, 121, 0.34);
  background: rgba(198, 171, 121, 0.08);
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.download-panel {
  margin-top: 24px;
  padding: 20px 22px 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.workspace-overlay {
  position: absolute;
  inset: 22px 0 0;
  display: grid;
  place-items: center;
  background: rgba(9, 13, 16, 0.7);
  backdrop-filter: blur(5px);
  z-index: 900;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(198, 171, 121, 0.14);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.site-footer {
  margin-top: 34px;
  padding: 16px 0 0;
  color: var(--muted);
}

.footer-line {
  justify-content: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.footer-line a {
  text-decoration: none;
}

.info-page,
.legal-page {
  max-width: var(--content);
  padding: 24px 0 8px;
}

.info-hero {
  padding: 30px 0 36px;
}

.info-section {
  padding: 22px 0 26px;
}

.copy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-top: 18px;
  max-width: 920px;
}

.copy-grid p {
  margin: 0;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .hero,
  .workspace-grid,
  .comparison-grid--dual {
    grid-template-columns: 1fr;
  }

  .controls-panel--sticky {
    position: static;
  }

  .section-note {
    text-align: left;
  }
}

@media (max-width: 820px) {
  .workflow-strip,
  .copy-grid,
  .proof-rail {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 740px) {
  .page-shell {
    width: 100%;
    padding: 0 12px 28px;
  }

  .footer-line,
  .section-head {
    display: grid;
    gap: 12px;
  }

  .site-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    padding-top: 6px;
    border-top: 1px solid var(--line-soft);
    gap: 10px;
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    display: block;
    padding: 6px 0;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand-divider {
    display: none;
  }

  .brand-mark {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .brand-text {
    font-size: 0.86rem;
  }

  .hero {
    padding-top: 28px;
  }

  h1 {
    font-size: clamp(2.8rem, 12vw, 4.4rem);
  }

  .upload-actions {
    align-items: flex-start;
  }

  .route-map,
  .route-map .leaflet-container {
    min-height: 420px;
  }

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

  .upload-panel-shell,
  .controls-card,
  .hero-card {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .workflow-strip,
  .copy-grid {
    grid-template-columns: 1fr;
  }

  .route-map,
  .route-map .leaflet-container {
    min-height: 380px;
  }
}
