/*
  Marketing pages (landing, /deals, /disclosure, /get). The legal pages keep
  using style.css. Colors come from lib/app/theme/colors.dart: teal routes,
  navy labels and chrome. --green is the darker link color style.css already
  uses — the app teal is too light for text on a light background.
*/

@font-face {
  font-family: "Overpass";
  src: url("/fonts/overpass-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Overpass Mono";
  src: url("/fonts/overpass-mono-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --teal: #4caf8a;
  --navy: #122d4c;
  --navy-dark: #0c2038;
  --green: #1e7a4c;
  --mist: #f5f8f6;
  --ink: #1a2233;

  --bg: var(--mist);
  --fg: var(--ink);
  --muted: #5a6472;
  --link: var(--green);
  --card: #ffffff;
  --rule: rgba(18, 45, 76, 0.14);

  --sans: "Overpass", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Overpass Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--navy-dark);
    --fg: #e8ede9;
    --muted: #a3adb5;
    --link: #6fd39a;
    --card: var(--navy);
    --rule: rgba(232, 237, 233, 0.14);
  }
}

:root[data-theme="dark"] {
  --bg: var(--navy-dark);
  --fg: #e8ede9;
  --muted: #a3adb5;
  --link: #6fd39a;
  --card: var(--navy);
  --rule: rgba(232, 237, 233, 0.14);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--mist);
  text-decoration: none;
}

.wordmark span {
  color: var(--teal);
}

.header-link {
  color: var(--mist);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 8px 14px;
  border: 1.5px solid rgba(232, 237, 233, 0.35);
  border-radius: 999px;
}

.header-link:hover {
  border-color: var(--teal);
}

/* Sub-pages get a solid header on the page background. */
.site-header.solid {
  position: static;
  background: var(--navy);
}

/* ---------- Hero: the boarding pass ---------- */

.hero {
  background: var(--navy);
  color: var(--mist);
  padding: 112px 0 72px;
}

.hero .wrap {
  max-width: 920px;
}

.ticket {
  --pad: 40px;
  position: relative;
  background: linear-gradient(180deg, #1a3d63, #142f50);
  border: 1px solid rgba(232, 237, 233, 0.14);
  border-radius: 18px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  padding: 52px var(--pad) 0;
  overflow: hidden;
}

.route-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.route-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
}

.hero h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.28em;
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.01em;
}

/* The changing word, set like a split-flap departures board. */
.flap {
  display: inline-block;
  color: var(--teal);
  perspective: 600px;
}

.flap-face {
  position: relative;
  display: inline-block;
  min-width: 1ch;
}

/* The seam across the middle of the flap. */
.flap-face::after {
  content: "";
  position: absolute;
  left: -0.06em;
  right: -0.06em;
  top: 50%;
  height: 1px;
  background: rgba(12, 32, 56, 0.55);
}

.flap-face.flipping {
  animation: flap 0.46s cubic-bezier(0.5, 0, 0.2, 1);
}

@keyframes flap {
  0% { transform: rotateX(0deg); }
  48% { transform: rotateX(-90deg); }
  52% { transform: rotateX(90deg); }
  100% { transform: rotateX(0deg); }
}

.sub {
  max-width: 46ch;
  margin: 26px 0 40px;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--mist);
  opacity: 0.86;
}

.sub strong {
  font-weight: 700;
}

/* Route strip: one code per leg of the trip. */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 6px calc(var(--pad) * -1) 0;
  border-top: 1px solid rgba(232, 237, 233, 0.14);
}

.leg {
  padding: 20px 14px 22px;
  border-right: 1px dashed rgba(232, 237, 233, 0.2);
}

.leg:first-child {
  padding-left: var(--pad);
}

.leg:last-child {
  border-right: none;
}

.leg .code {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--teal);
}

.leg .label {
  margin-top: 4px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a3adb5;
}

/* Perforation: dashed tear line with a notch cut out of each side. */
.perf {
  position: relative;
  height: 0;
  margin: 0 calc(var(--pad) * -1);
  border-top: 2px dashed rgba(232, 237, 233, 0.2);
}

.perf::before,
.perf::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
}

.perf::before {
  left: -11px;
}

.perf::after {
  right: -11px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 calc(var(--pad) * -1);
  padding: 22px var(--pad) 30px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a3adb5;
}

.footer-row .tag {
  color: var(--teal);
  text-decoration: none;
}

.footer-row .tag:hover {
  text-decoration: underline;
}

.below {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 18px 4px 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a3adb5;
}

.below a {
  color: var(--mist);
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 176px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--mist);
  color: var(--navy);
  text-decoration: none;
  line-height: 1.2;
}

.store small {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

.store strong {
  font-size: 1.0625rem;
  font-weight: 700;
}

/* Until the store listings exist the buttons are labels, not links. */
.store[aria-disabled="true"] {
  background: transparent;
  color: var(--mist);
  border: 1.5px dashed rgba(232, 237, 233, 0.4);
  cursor: default;
}

/* Phone frame around screenshots in the route section. */

.phone {
  border-radius: 40px;
  padding: 10px;
  background: var(--navy-dark);
  box-shadow:
    0 0 0 1.5px rgba(232, 237, 233, 0.12),
    0 30px 60px rgba(0, 0, 0, 0.35);
}

.phone img {
  border-radius: 31px;
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
}

/* ---------- The route: features as stops on a trip ---------- */

.route {
  padding: 112px 0 64px;
}

.route-intro {
  max-width: 40ch;
  margin-bottom: 72px;
}

.route-intro .eyebrow {
  color: var(--link);
}

.route-intro h2,
.pricing h2,
.download h2,
.page h1 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
}

.stops {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* The line that runs the length of the trip. */
.stops::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 120px;
  border-left: 3px dashed var(--teal);
  opacity: 0.55;
}

.stop {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  align-items: start;
  padding: 0 0 96px 64px;
}

.stop-dot {
  position: absolute;
  left: 0;
  top: 2px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--teal);
  transition: background-color 0.4s ease, transform 0.4s ease;
}

.stop.reached .stop-dot {
  background: var(--teal);
  transform: scale(1.12);
}

.stop .eyebrow {
  color: var(--link);
  padding-top: 4px;
}
.stop h3 {
  font-size: clamp(1.5rem, 2.8vw, 2.125rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.stop p {
  color: var(--muted);
  max-width: 46ch;
  margin: 0;
}

.stop .note {
  font-size: 0.875rem;
  margin-top: 14px;
}

.stop .phone {
  width: 100%;
  max-width: 260px;
  justify-self: center;
}

/* ---------- Pricing ---------- */

.pricing {
  padding: 32px 0 112px;
}

.pricing-head {
  margin-bottom: 40px;
}

.pricing-head .eyebrow {
  color: var(--link);
}

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 820px;
}

.plan {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 28px;
}

.plan h3 {
  font-size: 1.375rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.plan .plan-sub {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 0.9375rem;
}

.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan li {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}

.plan.premium {
  border: 2px solid var(--teal);
}

/* ---------- Download ---------- */

.download {
  background: var(--navy);
  color: var(--mist);
  padding: 96px 0;
}

.download .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: end;
}

.download .eyebrow {
  color: var(--teal);
}

.download p {
  color: #c9d3d9;
  max-width: 46ch;
  margin: 20px 0 32px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0 56px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer a {
  color: var(--fg);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ---------- Sub-pages (/deals, /disclosure) ---------- */

.page {
  padding: 64px 0 96px;
}

.page .wrap {
  max-width: 760px;
}

.page .lede {
  font-size: 1.1875rem;
  color: var(--muted);
  margin: 20px 0 40px;
}

.page h2 {
  font-size: 1.375rem;
  font-weight: 800;
  margin: 40px 0 8px;
}

.disclosure-box {
  border-left: 4px solid var(--teal);
  background: var(--card);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  font-size: 0.9375rem;
}

.deal-groups {
  list-style: none;
  padding: 0;
  margin: 0;
}

.deal-groups li {
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}

.deal-groups strong {
  display: block;
  font-size: 1.125rem;
}

.deal-groups span {
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero {
    padding: 96px 0 56px;
  }

  .stop {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-left: 52px;
    padding-bottom: 80px;
  }

  .stop .phone {
    max-width: 220px;
    justify-self: start;
  }

  .stops::before {
    bottom: 80px;
  }

  .plans,
  .download .wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .ticket {
    --pad: 22px;
    padding-top: 40px;
  }

  /* Strip becomes a 2x2 grid. */
  .strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .leg:nth-child(2) {
    border-right: none;
  }

  .leg:nth-child(-n + 2) {
    border-bottom: 1px dashed rgba(232, 237, 233, 0.2);
  }

  .leg:nth-child(3) {
    padding-left: var(--pad);
  }
}

@media (max-width: 420px) {
  .store {
    min-width: 0;
    flex: 1 1 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .stop-dot {
    transition: none;
  }

  .flap-face.flipping {
    animation: none;
  }
}
