/* terus.my — light, in BM. The page is the straight road: one amber route line runs from the
   hero's chevron down past every feature, and the TERUS chevron rides it (position: sticky, like
   the in-app puck that stays put while the map moves under it). Colours are the app's day tokens
   (android ui/malam/Tokens.kt DayColors) and the type is the app's Saira. */

:root {
  --page: #eef1f4;
  --band: #dde2e6;
  --surface: #ffffff;
  --ink: #0e141b;
  --muted: #5a6470;
  --faint: #a3abb4; /* decoration only: too light for text */
  --edge: rgba(10, 20, 30, 0.12);
  --route: #e07a00; /* the route line and the chevrons */
  --amber: #ff9f1c; /* the primary button, with ink text (9:1) */
  --amber-hover: #ffb547;
  --amber-big: #bd6500; /* large numerals: 3.7:1 on the page */
  --amber-text: #a85600; /* links and small amber text: 4.6:1 */
  --green: #1fa95b;
  --red: #d42f32;
  --sans: "Saira", system-ui, -apple-system, sans-serif;
  --gauge: "Saira Semi Condensed", "Saira", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 5vw, 72px);
  /* The headline's "TERUS" size; the road's rail is sized from it so the line starts right under
     the chevron hanging left of the word. */
  --terus: clamp(4.2rem, 14vw, 11.5rem);
  --rail: calc(var(--terus) * 0.86);
  --line: 8px;
  /* Names the document pages' inline styles use (privasi, syarat, akaun/padam, s). */
  --ink-2: var(--surface);
  --ink-3: var(--edge);
  --yellow: var(--amber-text);
  --text: var(--ink);
  --dim: var(--muted);
  --mono: var(--gauge);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 18px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* The TERUS chevron (launcher icon shape). */
.chev { display: block; fill: var(--route); }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  transition: background 0.3s, box-shadow 0.3s;
}
.topbar.is-scrolled {
  background: rgba(238, 241, 244, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--edge);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 19px/1 var(--sans);
  letter-spacing: 0.2em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark .chev { width: 20px; height: 20px; }
.topbar-cta {
  font: 600 15px/1 var(--sans);
  color: var(--ink);
  background: var(--amber);
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
}
.topbar-cta:hover { background: var(--amber-hover); }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 18px/1 var(--sans);
  color: var(--ink);
  background: var(--amber);
  border: 0;
  border-radius: 999px;
  padding: 19px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.btn-primary:hover { background: var(--amber-hover); transform: translateY(-2px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary svg { width: 20px; height: 20px; fill: currentColor; }
.btn-soon { font: 500 16px/1 var(--sans); color: var(--muted); padding: 19px 4px; }
.btn-ghost {
  font: 600 16px/1 var(--sans);
  color: var(--ink);
  background: none;
  border: 0;
  padding: 18px 12px;
  cursor: pointer;
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px var(--gutter) 96px;
  overflow: hidden;
  isolation: isolate;
}
.hero-map {
  position: absolute;
  inset: 0 0 0 30%;
  z-index: -1;
  background: url("/assets/hero-map-day.jpg") 40% 55% / cover no-repeat;
}
.hero-map::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--page) 0%, rgba(238, 241, 244, 0.7) 22%, rgba(238, 241, 244, 0) 55%),
    linear-gradient(to top, var(--page) 0%, rgba(238, 241, 244, 0) 32%),
    linear-gradient(to bottom, var(--page) 0%, rgba(238, 241, 244, 0) 20%);
}
.hero-inner { position: relative; padding-left: var(--rail); max-width: 1100px; }
.hero-title { font-weight: 700; }
.hero-title .t1 { display: block; font: 600 clamp(1.7rem, 3.9vw, 3.4rem)/1.1 var(--sans); letter-spacing: -0.01em; }
/* "Jalan / TERUS, / sekejap lagi sampai": the closing line sits tight under the wordmark. */
.hero-title .t2:has(+ .t3) { margin-bottom: 0.06em; }
.hero-title .t3 { margin-bottom: 0.55em; }
.hero-title .t2 {
  position: relative;
  display: block;
  font: 800 var(--terus)/0.92 var(--sans);
  letter-spacing: 0.04em;
  margin: 0.04em 0 0.22em;
}
/* The chevron hangs in the rail, left of "TERUS"; the route line starts under it. */
.hero-title .mark {
  position: absolute;
  left: calc(-1 * var(--rail));
  top: 0.06em;
  width: var(--rail);
  height: 0.74em;
  display: flex;
  justify-content: center;
}
.hero-title .mark .chev { width: 0.66em; height: 0.66em; }
.hero-title .mark::after {
  content: "";
  position: absolute;
  top: calc(100% + 0.08em);
  left: calc(50% - var(--line) / 2);
  width: var(--line);
  height: 200vh;
  border-radius: var(--line) var(--line) 0 0;
  background: var(--route);
  box-shadow: -3px 0 0 var(--surface), 3px 0 0 var(--surface);
}
.hero-sub { font-size: clamp(18px, 1.6vw, 22px); color: var(--muted); max-width: 30em; margin-bottom: 34px; }
.hero-meta { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* Load: the line rises, the chevron arrives from below, "TERUS" settles. Once. */
.rise { opacity: 0; transform: translateY(26px); animation: rise 0.9s var(--ease) forwards; animation-delay: calc(0.15s + var(--d, 0) * 110ms); }
.hero-title .mark .chev { animation: arrive 1.1s var(--ease) 0.35s both; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes arrive { from { opacity: 0; transform: translateY(0.9em); } to { opacity: 1; transform: none; } }

/* ---------- The road ---------- */
.road {
  position: relative;
  padding: 40px var(--gutter) 0 calc(var(--gutter) + var(--rail));
}
.road::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 36px; /* ends in the destination pin */
  left: calc(var(--gutter) + var(--rail) / 2 - var(--line) / 2);
  width: var(--line);
  background: var(--route);
  /* White casing on the sides only, so it joins the hero's line without a seam. */
  box-shadow: -3px 0 0 var(--surface), 3px 0 0 var(--surface);
}
/* The rider: sticky in a track as tall as the road, so it holds the middle of the screen while
   the stops scroll past, and stops at the destination pin. */
.rider-track {
  position: absolute;
  top: 0;
  bottom: 64px; /* the rider stops just short of the pin */
  left: var(--gutter);
  width: var(--rail);
  pointer-events: none;
  z-index: 2;
}
.rider {
  position: sticky;
  top: calc(50vh - 26px);
  width: 52px;
  height: 52px;
  margin: 0 auto;
  filter: drop-shadow(0 4px 8px rgba(14, 20, 27, 0.28));
}
.rider .chev { width: 100%; height: 100%; transform: rotate(180deg); stroke: var(--surface); stroke-width: 3.5; stroke-linejoin: round; paint-order: stroke; }

.stop {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding: clamp(56px, 9vh, 110px) 0;
}
.stop-copy { max-width: 31em; }
.stop.flip .stop-copy { order: 2; }
/* Waypoint on the line, level with the middle of the stop: hollow ahead, filled once passed. */
.stop > .dot {
  position: absolute;
  top: calc(50% - 13px);
  left: calc(-1 * var(--rail) / 2 - 13px);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  border: 6px solid var(--route);
  z-index: 1;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.stop.is-passed > .dot { background: var(--route); border-color: var(--surface); box-shadow: 0 0 0 3px var(--route); }
.stop h2 { font: 700 clamp(2rem, 3.5vw, 3.2rem)/1.06 var(--sans); letter-spacing: -0.015em; margin-bottom: 20px; text-wrap: balance; }
.stop-copy > p { color: var(--muted); font-size: clamp(17px, 1.3vw, 19px); }
.stop-copy > p + p { margin-top: 14px; }
.gauge { margin-top: 30px; }
.gauge b { display: block; font: 800 clamp(3.4rem, 6.5vw, 5.6rem)/0.95 var(--gauge); letter-spacing: -0.01em; color: var(--amber-big); }
.gauge b small { font-size: 0.45em; font-weight: 700; margin-right: 0.12em; vertical-align: 0.85em; }
.gauge span { display: block; margin-top: 8px; font-size: 15px; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-weight: 600; font-size: 16px; color: var(--ink); }
.live::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(31, 169, 91, 0.18); }

/* Phones: a dark bezel around the real screenshots. */
.phones { position: relative; isolation: isolate; display: flex; justify-content: center; align-items: center; }
.phone {
  flex: none;
  width: min(300px, 100%);
  aspect-ratio: 9 / 20;
  border-radius: 42px;
  background: var(--ink);
  padding: 9px;
  box-shadow: 0 34px 70px -28px rgba(14, 20, 27, 0.45), 0 10px 24px -12px rgba(14, 20, 27, 0.25);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 34px; }
/* Two screens of one flow: the second sits behind and lower. */
.phones.pair .phone { width: min(270px, 52%); }
.phones.pair .phone + .phone { margin-left: -9%; transform: translateY(12%); position: relative; z-index: -1; }
.stop.flip .phones.pair { flex-direction: row-reverse; }
.stop.flip .phones.pair .phone + .phone { margin-left: 0; margin-right: -9%; }
/* Day and night: side by side, same size. */
.phones.twin { gap: clamp(14px, 2vw, 28px); }
.phones.twin .phone { width: min(260px, 47%); }
.caption { margin-top: 18px; text-align: center; font-size: 14px; color: var(--muted); }

/* Destination: the end of the line. */
.stop.arrive { grid-template-columns: minmax(0, 1fr); padding-bottom: clamp(90px, 14vh, 160px); }
.road .pin {
  position: absolute;
  bottom: 0;
  left: calc(var(--gutter) + var(--rail) / 2 - 22px);
  width: 44px;
  height: 56px;
  z-index: 3;
}
.steps { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 34px; max-width: 40em; }
.steps li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); align-items: baseline; }
.steps .no { font: 800 2.2rem/1 var(--gauge); color: var(--amber-big); }
.steps h3 { font-size: 1.35rem; line-height: 1.25; margin-bottom: 6px; }
.steps p { color: var(--muted); }

/* ---------- Closing ---------- */
.closing { padding: clamp(100px, 16vh, 170px) var(--gutter); text-align: center; background: var(--band); }
.closing h2 { font: 800 clamp(2.6rem, 6.5vw, 5.4rem)/1 var(--sans); letter-spacing: -0.015em; margin-bottom: 40px; }
.closing .actions { justify-content: center; }
.closing-note { margin-top: 24px; color: var(--muted); font-size: 15px; }

/* ---------- Footer ---------- */
.footer { padding: 64px var(--gutter) 40px; background: var(--ink); color: #c9d0d7; font-size: 15px; }
.footer a { color: #fff; }
.footer .wordmark { color: #fff; margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.3fr 1.6fr; gap: 40px; margin-bottom: 40px; }
.footer-h { font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer .muted { color: #a9b2bc; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-bottom: 24px; }
.footer-legal { font-size: 13px; color: #a9b2bc; max-width: 70em; }
.footer-legal + .footer-legal { margin-top: 8px; }
.footer-company { color: #c9d0d7; }
.footer-company strong { color: #fff; font-weight: 700; letter-spacing: 0.02em; }

/* ---------- Modal ---------- */
.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 120px rgba(14, 20, 27, 0.35);
}
.modal::backdrop { background: rgba(14, 20, 27, 0.45); backdrop-filter: blur(4px); }
.modal[open] { animation: modal-in 0.4s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.modal-inner { padding: clamp(28px, 5vw, 44px); }
.modal-kicker { font-weight: 600; color: var(--amber-text); margin-bottom: 10px; }
.modal h2 { font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.1; margin-bottom: 22px; }
.modal-list { margin: 0 0 26px; padding-left: 20px; color: var(--muted); }
.modal-list li { margin-bottom: 10px; }
.modal-check { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; cursor: pointer; margin-bottom: 26px; }
.modal-check input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--route); flex: none; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.modal-meta { margin-top: 18px; font: 400 12px/1.5 var(--gauge); color: var(--muted); word-break: break-all; }

/* ---------- Document pages (privasi, syarat, akaun/padam, s) ---------- */
.eyebrow { font-weight: 600; color: var(--amber-text); margin-bottom: 10px; }
.doc { max-width: 760px; margin: 0 auto; padding: 130px var(--gutter) 96px; }
.doc h1 { font-size: clamp(40px, 7vw, 62px); line-height: 1.05; margin-bottom: 16px; }
.doc h2 { font-size: 24px; line-height: 1.25; margin: 56px 0 16px; }
.doc p + p { margin-top: 16px; }
.doc a:not(.btn-primary) { color: var(--amber-text); }
.doc code { font: 500 0.92em var(--gauge); }
.doc-meta { font-size: 15px; margin-bottom: 40px; }
.doc-lead { font-size: 20px; line-height: 1.55; margin-bottom: 16px; }
.doc-list { margin: 0; }
.doc-list dt { font-weight: 700; margin-top: 24px; }
.doc-list dd { margin: 6px 0 0; color: var(--muted); }
.doc-rule { border: 0; height: 1px; background: var(--edge); margin: 96px 0 72px; }
.doc ~ .footer, .footer.slim { padding-top: 40px; }

/* ---------- Phone width ---------- */
@media (max-width: 820px) {
  :root { --terus: clamp(3.6rem, 17vw, 5.4rem); --line: 6px; }
  body { font-size: 17px; }
  .hero { align-items: flex-end; padding: 96px var(--gutter) 64px; }
  .hero-map { inset: 0 0 42% 0; background-position: 46% 40%; }
  .hero-map::after {
    background:
      linear-gradient(to top, var(--page) 0%, rgba(238, 241, 244, 0.6) 30%, rgba(238, 241, 244, 0) 70%),
      linear-gradient(to bottom, var(--page) 0%, rgba(238, 241, 244, 0) 22%);
  }
  .hero-sub { margin-bottom: 28px; }
  .stop { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 64px 0; }
  .stop.flip .stop-copy { order: 0; }
  .stop > .dot { top: 70px; width: 22px; height: 22px; left: calc(-1 * var(--rail) / 2 - 11px); border-width: 5px; }
  .rider { width: 38px; height: 38px; top: calc(50vh - 19px); }
  .phone { width: min(250px, 78%); border-radius: 34px; padding: 7px; }
  .phone img { border-radius: 28px; }
  .phones.pair .phone { width: min(200px, 54%); }
  .phones.twin .phone { width: min(170px, 48%); }
  .road .pin { width: 34px; height: 44px; left: calc(var(--gutter) + var(--rail) / 2 - 17px); }
  .road::before { bottom: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .btn-primary { padding: 17px 22px; font-size: 17px; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}
