:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-soft: #faf9f7;
  --ink: #17181c;
  --muted: #62656f;
  --faint: #8f929b;
  --line: rgba(23, 24, 28, 0.1);
  --line-strong: rgba(23, 24, 28, 0.16);
  --accent: #627eea;
  --accent-soft: rgba(98, 126, 234, 0.12);
  --shadow: 0 24px 60px -34px rgba(23, 24, 28, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -12%, rgba(98, 126, 234, 0.13), transparent 38%),
    linear-gradient(180deg, #fbfaf8 0%, var(--bg) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

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

img {
  display: block;
  max-width: 100%;
}

.topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px clamp(16px, 4vw, 40px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 1rem;
  font-weight: 750;
}

.brand img {
  flex: 0 0 auto;
  border-radius: 50%;
}

.brand span {
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 10px;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 550;
}

.nav a:hover {
  color: var(--ink);
}

.spacer {
  flex: 1;
}

.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.stage {
  min-width: 0;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 8px clamp(16px, 4vw, 40px) 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero {
  text-align: center;
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.62rem, 6.4vw, 4.3rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: 0;
}

.sub {
  max-width: 650px;
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.15rem);
}

.sub strong {
  color: var(--ink);
  font-weight: 800;
  background: linear-gradient(180deg, transparent 58%, var(--accent-soft) 58%);
}

.app-card {
  width: min(572px, 100%);
  margin-top: 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.leg {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: left;
}

.label {
  display: block;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-top: 10px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.chip img {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switch {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #ffffff;
  color: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 12px 26px -22px rgba(23, 24, 28, 0.55);
  transition: transform 160ms ease, background 160ms ease;
}

.switch:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 800;
  transition: transform 160ms ease, filter 160ms ease;
}

.primary:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.footer {
  padding: 16px 24px 22px;
  color: var(--faint);
  font-size: 0.85rem;
  font-weight: 650;
  text-align: center;
}

@media (max-width: 700px) {
  .nav {
    display: none;
  }
}

@media (max-width: 520px) {
  .topbar {
    gap: 10px;
    padding: 14px 14px 8px;
  }

  .brand {
    font-size: 0.94rem;
  }

  .ghost {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.86rem;
  }

  .stage {
    justify-content: start;
    padding: 22px 14px 8px;
  }

  h1 {
    font-size: clamp(2.42rem, 12vw, 3rem);
  }

  .sub {
    margin-top: 12px;
    font-size: 1rem;
  }

  .app-card {
    margin-top: 24px;
    padding: 14px;
  }

  .route {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .leg {
    padding: 13px 14px;
  }

  .switch {
    justify-self: center;
    width: 42px;
    height: 42px;
    transform: rotate(90deg);
  }

  .switch:hover {
    transform: rotate(90deg) translateX(1px);
  }

  .primary {
    min-height: 52px;
  }

  .footer {
    padding: 10px 20px 16px;
  }
}

@media (max-height: 700px) {
  .topbar {
    padding-top: 12px;
    padding-bottom: 8px;
  }

  .stage {
    padding-top: 6px;
    padding-bottom: 4px;
  }

  .app-card {
    margin-top: 20px;
  }

  .footer {
    padding-top: 8px;
    padding-bottom: 12px;
  }
}
