/* Ngựa Sắt landing site. Colours and type follow the app (mobile/src/theme/tokens.ts). */

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-400Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-600SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-700Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --asphalt: #0d1117;
  --surface: #161b22;
  --street: #1a222d;
  --line: #2a3442;
  --mint: #00ffcc;
  --mint-ink: #052a23;
  --amber: #ffaa00;
  --text: #e6edf3;
  --muted: #8f9cad;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.875rem;
  --step-4: clamp(2.25rem, 4.5vw, 3.25rem);
  --step-5: clamp(2.75rem, 7vw, 4.75rem);

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius: 16px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--asphalt);
  color: var(--text);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
}

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

a {
  color: var(--mint);
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--mint);
  color: var(--mint-ink);
  padding: 8px 14px;
  border-radius: 10px;
}

/* --- Header --- */

.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--step-1);
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--step--1);
  padding: 10px 12px;
  border-radius: 10px;
}
.site-nav a:hover {
  color: var(--text);
}
.site-nav a[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--mint);
  border-radius: 0;
}

/* --- Buttons --- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.button-primary {
  background: var(--mint);
  color: var(--mint-ink);
}
.button-primary:hover {
  background: #5cffdf;
}
.button-quiet {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}
.button-quiet:hover {
  border-color: var(--muted);
}

/* --- Hero: a route drawing itself across the street grid --- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 9vw, 112px) clamp(56px, 8vw, 96px);
}
.hero-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-map .street {
  stroke: var(--street);
  fill: none;
}
.hero-map .route {
  fill: none;
  stroke: var(--mint);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.6s cubic-bezier(0.6, 0, 0.25, 1) 0.3s forwards;
  filter: drop-shadow(0 0 10px rgba(0, 255, 204, 0.35));
}
.hero-map .stop {
  fill: var(--amber);
  opacity: 0;
  animation: appear 0.3s ease-out 1.5s forwards;
}
.hero-map .car {
  fill: var(--mint);
  opacity: 0;
  animation: appear 0.3s ease-out 2.8s forwards;
}
.hero-map .car-halo {
  fill: var(--mint);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.4s ease-out 3s infinite;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes appear {
  to {
    opacity: 1;
  }
}
@keyframes pulse {
  0% {
    opacity: 0.45;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(3.2);
  }
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}
.hero h1 {
  font-size: var(--step-5);
  font-weight: 700;
  max-width: 13ch;
}
.hero .lead {
  margin-top: 24px;
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.hero-note {
  margin-top: 16px;
  font-size: var(--step--1);
  color: var(--muted);
}

.phone {
  justify-self: center;
  width: min(300px, 100%);
  border-radius: 46px;
  padding: 10px;
  background: #05080c;
  box-shadow:
    0 0 0 1px var(--line),
    0 30px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 90px -30px rgba(0, 255, 204, 0.35);
}
.phone img {
  border-radius: 36px;
  width: 100%;
  height: auto;
  aspect-ratio: 780 / 1688;
}

/* --- "Một ngày của chiếc xe": the app's own timeline, one stop per feature --- */

.day {
  padding-block: clamp(56px, 9vw, 112px);
  border-top: 1px solid var(--line);
}
.section-title {
  font-size: var(--step-4);
  max-width: 18ch;
}
.section-lead {
  margin-top: 16px;
  color: var(--muted);
  font-size: var(--step-1);
  max-width: 52ch;
}

.timeline {
  list-style: none;
  margin: clamp(40px, 6vw, 72px) 0 0;
  padding: 0;
  position: relative;
}
/* The route line joining the stops. */
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(var(--mint), rgba(0, 255, 204, 0.25));
}
.stop-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
  gap: 24px clamp(32px, 6vw, 80px);
  align-items: center;
  padding-left: 48px;
}
.stop-item + .stop-item {
  margin-top: clamp(48px, 7vw, 88px);
}
/* Moving: a hollow mint ring; stopped: an amber square, as on the app's map.
   Drawn on the text block so it sits level with the time. */
.stop-text {
  position: relative;
}
.stop-text::before {
  content: "";
  position: absolute;
  left: -48px;
  top: 6px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 3px solid var(--mint);
  background: var(--asphalt);
}
.stop-item.is-stop .stop-text::before {
  border: 0;
  border-radius: 3px;
  background: var(--amber);
  left: -47px;
  width: 15px;
  height: 15px;
}
.stop-time {
  font-weight: 700;
  font-size: var(--step-1);
  font-variant-numeric: tabular-nums;
  color: var(--mint);
}
.stop-item.is-stop .stop-time {
  color: var(--amber);
}
.stop-item h3 {
  margin-top: 8px;
  font-size: var(--step-3);
}
.stop-item p {
  margin-top: 14px;
  color: var(--muted);
  max-width: 50ch;
}
.stop-item .shot {
  width: 100%;
  border-radius: 28px;
  border: 8px solid #05080c;
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  aspect-ratio: 780 / 1688;
  height: auto;
}

/* --- Also in the app --- */

.extras {
  padding-block: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
.extras-list {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px 40px;
}
.extras-list li {
  border-top: 2px solid var(--line);
  padding-top: 18px;
}
.extras-list strong {
  display: block;
  font-size: var(--step-1);
}
.extras-list span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--step--1);
}

.cta {
  padding-block: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
.cta .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta h2 {
  font-size: var(--step-3);
  max-width: 24ch;
}
.cta p {
  margin-top: 10px;
  color: var(--muted);
}

/* --- Inner pages --- */

.page-head {
  padding-block: clamp(40px, 7vw, 80px) clamp(24px, 4vw, 40px);
}
.page-head h1 {
  font-size: var(--step-4);
}
.page-head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: var(--step-1);
  max-width: 56ch;
}

.page-body {
  padding-bottom: clamp(56px, 9vw, 112px);
}

/* Support: questions grouped by topic */
.faq-group + .faq-group {
  margin-top: 48px;
}
.faq-group h2 {
  font-size: var(--step-2);
  margin-bottom: 12px;
}
.faq {
  max-width: 760px;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 40px 18px 0;
  font-weight: 600;
  font-size: var(--step-1);
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}
.faq .answer {
  padding: 0 0 22px;
  color: var(--muted);
  max-width: 64ch;
}
.faq .answer p + p,
.faq .answer p + ol,
.faq .answer ol + p {
  margin-top: 10px;
}
.faq .answer ol {
  margin: 0;
  padding-left: 1.3em;
}
.faq .answer strong {
  color: var(--text);
  font-weight: 600;
}

.help-box {
  margin-top: 56px;
  max-width: 760px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.help-box h2 {
  font-size: var(--step-2);
}
.help-box p {
  margin-top: 6px;
  color: var(--muted);
}

/* Privacy: long-form reading column with a contents list beside it */
.doc {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.doc-toc {
  position: sticky;
  top: 24px;
  font-size: var(--step--1);
}
.doc-toc p {
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.doc-toc ol {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
}
.doc-toc li + li {
  margin-top: 6px;
}
.doc-toc a {
  color: var(--muted);
  text-decoration: none;
}
.doc-toc a:hover {
  color: var(--text);
}
.prose {
  max-width: 68ch;
}
.prose h2 {
  font-size: var(--step-2);
  margin-top: 48px;
  scroll-margin-top: 24px;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  font-size: var(--step-1);
  margin-top: 28px;
}
.prose p,
.prose ul {
  margin-top: 14px;
  color: #c3ccd6;
}
.prose ul {
  padding-left: 1.25em;
}
.prose li + li {
  margin-top: 8px;
}
.prose strong {
  color: var(--text);
  font-weight: 600;
}
.updated {
  color: var(--muted);
  font-size: var(--step--1);
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.contact-email {
  display: inline-block;
  margin-top: 8px;
  font-size: var(--step-2);
  font-weight: 700;
  word-break: break-all;
}
.contact-aside p + p {
  margin-top: 16px;
}
.contact-aside .muted {
  color: var(--muted);
}
.form {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 4vw, 32px);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.field {
  display: grid;
  gap: 8px;
}
.field label {
  font-size: var(--step--1);
  font-weight: 600;
  color: #c3ccd6;
}
.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--text);
  background: var(--asphalt);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 50px;
  padding: 12px 14px;
}
.field textarea {
  min-height: 150px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--mint);
}
.field-error {
  color: #ff8a80;
  font-size: var(--step--1);
}
.field-error:empty {
  display: none;
}
.form-note {
  color: var(--muted);
  font-size: var(--step--1);
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 32px 40px;
  color: var(--muted);
  font-size: var(--step--1);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  padding-block: 8px;
}
.site-footer a:hover {
  color: var(--text);
}

/* --- Small screens --- */

@media (max-width: 860px) {
  .hero-inner,
  .contact,
  .doc {
    grid-template-columns: minmax(0, 1fr);
  }
  .phone {
    width: min(260px, 80%);
  }
  .stop-item {
    grid-template-columns: minmax(0, 1fr);
  }
  .stop-item .shot {
    width: min(240px, 80%);
  }
  .doc-toc {
    position: static;
  }
}

@media (max-width: 480px) {
  /* The logo already leads home; four links do not fit one row. */
  .nav-home {
    display: none;
  }
  .site-nav a {
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-map .route {
    animation: none;
    stroke-dashoffset: 0;
  }
  .hero-map .stop,
  .hero-map .car {
    animation: none;
    opacity: 1;
  }
  .hero-map .car-halo {
    animation: none;
  }
  .faq summary::after {
    transition: none;
  }
}
