/* ==========================================================================
   roamcheaper.in — foundations
   Crisp white, hard black type, one red. The page is calm so the phone can
   be loud. Everything that moves shares two easing curves and one switch.
   ========================================================================== */

:root {
  --bg:        #ffffff;
  --card:      #f6f6f4;
  --card-deep: #eeeeeb;
  --paper:     #ffffff;
  --paper-hi:  #ffffff;

  --ink:       #101116;
  --ink-2:     #1c1d24;
  --ink-soft:  #4b4d57;
  --ink-faint: #8b8c96;

  --red:       #e11d2e;
  --red-deep:  #a90f1f;
  --red-glow:  #ff3b4e;
  --blue:      #1440a0;
  --green:     #148449;
  --amber:     #b26e05;
  --brass:     #b08d3e;

  --board:     #101116;
  --board-hi:  #1e2028;
  --board-txt: #f5f5f2;

  --rule:      rgba(16, 17, 22, 0.14);
  --rule-soft: rgba(16, 17, 22, 0.07);

  --sans: 'Archivo', system-ui, -apple-system, sans-serif;
  --black: 'Archivo Black', 'Archivo', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --shadow:
    0 1px 2px rgba(16, 17, 22, .05),
    0 6px 16px rgba(16, 17, 22, .06);
  --shadow-lift:
    0 2px 4px rgba(16, 17, 22, .06),
    0 16px 32px rgba(16, 17, 22, .10),
    0 40px 80px rgba(16, 17, 22, .12);

  --ease-spring: cubic-bezier(.22, 1.4, .36, 1);
  --ease-out:    cubic-bezier(.16, 1, .3, 1);

  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --max: 78rem;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

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

h1, h2, h3 { line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-underline-offset: .16em; text-decoration-thickness: .07em; }
a:hover { color: var(--red); }

::selection { background: var(--red); color: #fff; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.1rem;
  font: 600 .85rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.skip-link:focus { left: .75rem; top: .75rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Scroll reveals. JS adds .in-view; --d staggers siblings.
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity .75s var(--ease-out),
    transform .75s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.in-view { opacity: 1; transform: none; }

html.no-motion .reveal { opacity: 1; transform: none; transition: none; }

/* --------------------------------------------------------------------------
   Fares ticker. Real prices, cheapest first, on a dark strip.
   -------------------------------------------------------------------------- */

.ticker {
  position: relative;
  z-index: 3;
  background: var(--board);
  color: var(--board-txt);
  font: 500 .68rem/1 var(--mono);
  letter-spacing: .12em;
  overflow: hidden;
  display: none;
}
.ticker.is-live { display: block; }

.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  padding: .6rem 0;
  animation: ticker-roll 52s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker-item { padding-inline: 1.6rem; }
.ticker-item b { color: var(--red-glow); font-weight: 700; }
.ticker-item .tk-sep { color: rgba(245, 245, 242, .3); margin-left: 3.2rem; }

@keyframes ticker-roll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

html.no-motion .ticker-track { animation: none; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.hero, main > section, .footer {
  position: relative;
  z-index: 2;
  padding-inline: var(--gut);
}

main > section {
  max-width: var(--max);
  margin-inline: auto;
  padding-block: clamp(4rem, 9vw, 7.5rem);
  border-top: 1px solid var(--rule-soft);
}

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  font: 700 .68rem/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}
.section-eyebrow::before {
  content: '';
  width: 2rem;
  height: 2px;
  background: var(--red);
}

.section-title {
  font-family: var(--black);
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.6rem);
  letter-spacing: -.03em;
  line-height: .98;
  margin-bottom: .8rem;
}

.section-lede {
  font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 40rem;
}

/* --------------------------------------------------------------------------
   Masthead + hero
   -------------------------------------------------------------------------- */

.hero {
  max-width: var(--max);
  margin-inline: auto;
  padding-block: clamp(1.25rem, 3vw, 2rem) clamp(3.5rem, 7vw, 6rem);
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.wordmark {
  font-family: var(--black);
  font-size: clamp(1.1rem, 1rem + .7vw, 1.5rem);
  letter-spacing: -.03em;
}
.wordmark-dot { color: var(--red); }

.masthead-meta {
  font: 500 .68rem/1 var(--mono);
  letter-spacing: .14em;
  color: var(--ink-faint);
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}
@media (min-width: 62rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

.hero-headline {
  font-family: var(--black);
  font-size: clamp(2.7rem, 1.1rem + 6.4vw, 5.9rem);
  letter-spacing: -.04em;
  line-height: .96;
  margin-bottom: 1.6rem;
}

/* line-by-line entrance: each line rises out of its own mask */
.hl {
  display: block;
  overflow: hidden;
  padding-bottom: .06em;
  margin-bottom: -.06em;
}
.hw {
  display: inline-block;
  transform: translateY(110%);
  animation: hl-rise .9s var(--ease-out) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes hl-rise { to { transform: translateY(0); } }

html.no-motion .hw { transform: none; animation: none; }

/* the destination word, synced to the phone by theatre.js */
.fillin {
  font-style: normal;
  color: var(--red);
  display: inline-block;
  transition: opacity .26s ease, transform .26s var(--ease-out);
}
.fillin.is-swapping { opacity: 0; transform: translateY(-.14em); }
html.no-motion .fillin { transition: none; }

.fillin-rule {
  display: block;
  width: 1.6em;
  height: .075em;
  background: var(--ink);
  margin-top: .12em;
  transform-origin: left;
  animation: rule-draw .8s var(--ease-out) .9s backwards;
}
@keyframes rule-draw { from { transform: scaleX(0); } }
html.no-motion .fillin-rule { animation: none; }

.hero-sub {
  font-size: clamp(1.05rem, 1rem + .45vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 1.9rem;
}

.hero-note {
  margin-top: 1.1rem;
  font: 400 .78rem/1.5 var(--mono);
  color: var(--ink-faint);
}

/* the copy column eases in after the headline */
.hero-sub, .hero .btn-primary, .hero-note {
  opacity: 0;
  animation: hero-fade .8s var(--ease-out) forwards;
}
.hero-sub { animation-delay: .55s; }
.hero .btn-primary { animation-delay: .7s; }
.hero-note { animation-delay: .85s; }
@keyframes hero-fade { to { opacity: 1; } }
html.no-motion .hero-sub,
html.no-motion .hero .btn-primary,
html.no-motion .hero-note { opacity: 1; animation: none; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font: 600 .95rem/1 var(--sans);
  padding: .95rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform .16s var(--ease-spring),
    box-shadow .16s var(--ease-spring),
    background-color .16s ease;
}

.btn-primary {
  background: linear-gradient(180deg, var(--red-glow), var(--red) 60%);
  border-color: var(--red-deep);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 4px 0 var(--red-deep),
    0 10px 22px rgba(225, 29, 46, .28);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 6px 0 var(--red-deep),
    0 16px 30px rgba(225, 29, 46, .32);
}
.btn-primary:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 1px 0 var(--red-deep),
    0 4px 10px rgba(225, 29, 46, .28);
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 0 var(--rule), 0 6px 14px rgba(16, 17, 22, .05);
}
.btn-ghost:hover {
  background: var(--card);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--rule), 0 10px 20px rgba(16, 17, 22, .08);
}
.btn-ghost:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--rule); }

.btn[disabled] { cursor: progress; opacity: .85; }

/* --------------------------------------------------------------------------
   Landscape
   -------------------------------------------------------------------------- */

.landscape-grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
@media (min-width: 46rem) { .landscape-grid { grid-template-columns: 1fr 1fr; } }

.lcard {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #fff;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s ease;
}
.lcard:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 17, 22, .3);
  box-shadow: var(--shadow-lift);
}

.lcard-title {
  font-family: var(--black);
  font-size: 1.1rem;
  letter-spacing: -.015em;
  margin-bottom: .5rem;
}

.lcard-body { color: var(--ink-soft); font-size: .95rem; }

.landscape-close {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
  font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem);
  max-width: 46rem;
}

/* --------------------------------------------------------------------------
   Hub links
   -------------------------------------------------------------------------- */

.hublinks {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.hublinks a {
  font: 600 .85rem/1 var(--sans);
  color: var(--ink);
  text-decoration: none;
  padding: .65rem .9rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  transition: border-color .15s ease, transform .15s var(--ease-spring), box-shadow .15s ease, background-color .15s ease;
}
.hublinks a:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(225, 29, 46, .15);
}

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

.footer {
  max-width: var(--max);
  margin-inline: auto;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
  border-top: 2px solid var(--ink);
}

.footer-grid { display: grid; gap: clamp(2rem, 4vw, 3rem); }
@media (min-width: 52rem) {
  .footer-grid { grid-template-columns: 1.15fr 1.15fr .8fr; }
}

.footer-title {
  font: 700 .72rem/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .9rem;
}

.footer-col p { font-size: .9rem; color: var(--ink-soft); margin-bottom: .85rem; }

.footer-warn { border-left: 3px solid var(--amber); padding-left: .9rem; }

.footer-links { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.footer-links li { margin-bottom: .7rem; color: var(--ink-soft); }
.footer-links a { font-weight: 600; }

.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  align-items: baseline;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-soft);
  font: 400 .75rem/1.5 var(--mono);
  color: var(--ink-faint);
}

.colophon-mark {
  font-family: var(--black);
  font-size: .85rem;
  letter-spacing: -.02em;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Reduced motion. JS also sets html.no-motion.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hw, .hero-sub, .hero .btn-primary, .hero-note { transform: none; opacity: 1; animation: none; }
}
