:root {
  color-scheme: light;
  --ink: #111318;
  --muted: #5d6674;
  --line: #dce2e8;
  --paper: #f6f8fa;
  --white: #ffffff;
  --night: #05070a;
  --carbon: #151a20;
  --signal: #00a9a5;
  --signal-dark: #047470;
  --green: #7fb043;
  --amber: #ffb44c;
  --blue: #3878d8;
  --radius: 8px;
  font-family: Inter, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #071014;
  color: var(--white);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 620px) minmax(280px, 1fr);
  gap: 34px;
  min-height: 820px;
  padding: 170px 5vw 80px;
  background: #071014;
  color: var(--white);
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--signal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 20px;
  font-size: 88px;
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 580px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.9;
}

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

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 900;
}

.button.primary {
  background: var(--signal);
  color: var(--night);
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: var(--white);
}

.hero-stats {
  position: relative;
  z-index: 2;
  grid-column: 2;
  align-self: center;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(14px);
}

.hero-stats div {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

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

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hero-stats dt {
  color: rgba(255, 255, 255, 0.55);
}

dd {
  margin: 7px 0 0;
  font-size: 32px;
  font-weight: 900;
}

section:not(.hero) {
  padding: 86px 5vw;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

h2 {
  margin-bottom: 0;
  font-size: 72px;
  line-height: 1.12;
}

.simulator-section {
  background: #071014;
  color: var(--white);
}

.simulator-section .section-heading h2 {
  color: var(--white);
}

/* ── Simulator shell ── */
.sim-shell {
  display: grid;
  grid-template-columns: 1fr 290px;
  background: #0b1820;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.sim-left {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sim-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
}

.sim-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(0, 169, 165, 0.15);
  color: var(--signal);
  letter-spacing: 0.02em;
  transition: color 0.3s;
}

#routeCanvas {
  display: block;
  width: 100%;
  height: auto;
}

#elevCanvas {
  display: block;
  width: 100%;
  height: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sim-right {
  display: flex;
  flex-direction: column;
}

.sim-controls {
  flex: 1;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: none;
  padding: 0;
  margin: 0;
}

.ctrl-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.ctrl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ctrl-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--signal);
}

.sim-controls select {
  width: 100%;
  height: 40px;
  background: #0f1e26;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
}

.sim-controls input[type="range"] {
  width: 100%;
  accent-color: var(--signal);
  cursor: pointer;
}

.sim-controls .check-row {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
  gap: 10px;
}

.sim-controls .check-row input[type="checkbox"] {
  accent-color: var(--signal);
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.sim-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.sim-metrics > div {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: #0b1820;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sim-metrics > div:nth-child(even) {
  border-right: 0;
}

.sim-metrics dt {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
}

.sim-metrics dd {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
    padding-top: 72px;
  }

  .hero-copy {
    width: min(100%, 560px);
  }

  .hero-stats {
    grid-column: 1;
  }

  .sim-shell,
  .sim-metrics {
    grid-template-columns: 1fr;
  }

  .sim-left {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  h1 {
    font-size: 58px;
  }

  h2 {
    font-size: 38px;
  }
}

@media (max-width: 620px) {
  .hero {
    padding: 58px 20px 28px;
  }

  .lead {
    font-size: 15px;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 30px;
  }

  .hero-stats,
  .metric-grid {
    grid-template-columns: 1fr;
  }

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

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

  section:not(.hero) {
    padding: 58px 20px;
  }
}
