/* Rallumi landing. Brand tokens mirror packages/contracts/design-tokens.json.
   Shape rule: buttons and chips are pills (999px), surfaces are 24 to 32px, phones follow the device (40px).
   One accent (lime) on deep green ink. Light and dark follow the system; no section inverts the theme
   (the dark ticket cards are the brand's ticket component, not a theme switch). */
@font-face {
  font-family: "Quicksand";
  src: url("/assets/Quicksand-VN.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #F4F7EE; --surface: #FDFEFA; --alt: #ECF1E2; --line: #DDE5D0;
  --ink: #1D2A20; --soft: #3D5236; --muted: #56694F;
  --lime: #C8F53A; --lime-ink: #1D2A20; --lime-soft: #E8FB9E; --accent-text: #466215;
  --ticket: #1D2A20; --ticket-deep: #141F17; --ticket-ink: #F2F7E6; --ticket-muted: #AEBDA3;
  --bezel: #1D2A20;
  --panel: #E8FB9E; --panel-edge: transparent;
  --shadow: rgba(29, 42, 32, 0.38);
  --r-card: 28px; --r-pill: 999px;
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1200px;
  --nav-h: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1712; --surface: #16211A; --alt: #1E2C23; --line: #2B3B31;
    --ink: #EDF2E3; --soft: #C5D0B8; --muted: #98A78E;
    --lime: #C8F53A; --lime-ink: #111B15; --lime-soft: #2C3D1F; --accent-text: #C8F53A;
    --ticket: #223428; --ticket-deep: #17251C; --ticket-ink: #F2F7E6; --ticket-muted: #AEBDA3;
    --bezel: #2B3B31;
    --panel: #18271D; --panel-edge: rgba(200, 245, 58, 0.14);
    --shadow: rgba(0, 0, 0, 0.55);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 1.0625rem/1.65 "Quicksand", "Nunito", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; }
p { text-wrap: pretty; }
.ic { width: 1.25em; height: 1.25em; flex: none; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  padding: 10px 18px; border-radius: var(--r-pill);
  background: var(--lime); color: var(--lime-ink); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  height: 56px; padding: 0 1.8rem;
  border-radius: var(--r-pill);
  font: 700 1.05rem/1 "Quicksand", sans-serif; text-decoration: none; white-space: nowrap;
  border: 2px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, color 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-sm { height: 42px; padding: 0 1.2rem; font-size: 0.95rem; }
.btn-primary { background: var(--lime); color: var(--lime-ink); box-shadow: 0 14px 28px -16px var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -14px var(--shadow); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-ticket-ghost { border-color: var(--ticket-muted); color: var(--ticket-ink); background: transparent; }
.btn-ticket-ghost:hover { background: var(--ticket-ink); color: var(--ticket); }
.text-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 700; color: var(--accent-text); text-decoration: underline; text-underline-offset: 5px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { height: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; margin-right: auto; }
.brand img { height: 34px; width: auto; }
.nav-links { display: flex; gap: 1.75rem; font-weight: 600; }
.nav-links a { text-decoration: none; color: var(--soft); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--lime); transform: scaleX(0); transform-origin: left; }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------- phones (real app screenshots) ---------- */
.phone {
  position: relative;
  width: var(--pw, 280px);
  aspect-ratio: 390 / 844;
  padding: 9px;
  border-radius: 40px;
  background: var(--bezel);
  box-shadow: 0 50px 60px -34px var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.phone picture, .phone img { width: 100%; height: 100%; }
.phone img { border-radius: 32px; object-fit: cover; }
.phone-crop { aspect-ratio: 390 / 600; }
.phone-crop img { object-position: center top; }

/* ---------- hero ---------- */
.hero { min-height: calc(100dvh - var(--nav-h)); display: flex; align-items: center; padding-block: clamp(24px, 4vh, 56px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-title { font-size: clamp(2.2rem, 4.1vw, 3.9rem); }
@media (min-width: 900px) { .hero-title .line { white-space: nowrap; } }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.hero-title .line-in { display: inline-block; }
.mark {
  background: linear-gradient(transparent 60%, var(--lime) 60% 90%, transparent 90%) no-repeat left / var(--mark, 100%) 100%;
  padding-inline: 0.08em; margin-inline: -0.08em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero-sub { margin-top: 1.5rem; max-width: 34ch; font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--soft); }
.hero-cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-visual { position: relative; height: min(680px, 76vh); min-height: 480px; }
.hero-panel {
  position: absolute; inset: 3% 0 2% 10%;
  border-radius: 44px;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--panel-edge);
  overflow: hidden;
}
.hero-visual .phone { --pw: min(270px, 21vw); position: absolute; }
.phone-front { right: 6%; top: 0; z-index: 2; }
.phone-back { right: calc(6% + min(185px, 14.5vw)); top: 12%; transform: rotate(-6deg); }
.float-ticket {
  position: absolute; left: 2%; bottom: 6%; z-index: 3;
  width: min(250px, 19vw);
  border-radius: 22px; overflow: hidden;
  border: 6px solid var(--bezel);
  background: var(--bezel);
  box-shadow: 0 34px 44px -26px var(--shadow);
  transform: rotate(-4deg);
}
.crop-ticket { position: relative; aspect-ratio: 350 / 190; overflow: hidden; border-radius: 16px; }
.crop-ticket picture { position: absolute; left: -5.7%; top: -263%; width: 111.4%; }
.crop-ticket img { width: 100%; height: auto; }
@media (max-width: 899px) {
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { height: calc(min(210px, 46vw) * 2.164 + 56px); min-height: 0; }
  .hero-visual .phone { --pw: min(210px, 46vw); }
  .phone-front { right: 10%; }
  .phone-back { right: calc(10% + min(170px, 38vw)); }
  .float-ticket { display: none; }
  .hero-panel { inset: 4% 0 0 6%; border-radius: 32px; }
}

/* Light text on the lime band would not be readable in dark mode: use lime text instead. */
@media (prefers-color-scheme: dark) { .mark { background: none; color: var(--lime); } }

/* ---------- marquee (the only one on the page) ---------- */
.marquee { border-block: 1px solid var(--line); padding-block: 22px; overflow: hidden; background: var(--bg); }
.marquee-track { display: flex; width: max-content; }
.marquee-list { display: flex; flex: none; gap: 14px; padding-right: 14px; }
.marquee-list li {
  padding: 12px 28px; border-radius: var(--r-pill);
  font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 700; letter-spacing: -0.01em; white-space: nowrap;
  border: 2px solid var(--ink);
}
.marquee-list li:nth-child(odd) { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
/* Without script the single list simply wraps and stays centered. */
html:not(.js) .marquee-track, .marquee-static .marquee-track { width: auto; justify-content: center; }
html:not(.js) .marquee-list, .marquee-static .marquee-list { flex-wrap: wrap; justify-content: center; padding-inline: var(--gutter); }

/* ---------- sections ---------- */
.section-title { font-size: clamp(2rem, 4.2vw, 3.25rem); }
.lead { margin-top: 1.25rem; max-width: 62ch; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--soft); }
.eyebrow { margin-bottom: 0.9rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }
section { padding-block: clamp(56px, 7vw, 96px); }

/* ---------- how it works ---------- */
.how { padding-block: clamp(64px, 9vw, 112px) 0; }
.how-grid { margin-top: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: 1fr; gap: 0; }
.steps { display: grid; gap: clamp(40px, 8vw, 64px); padding-bottom: clamp(56px, 9vw, 96px); }
.step-ic {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1rem;
  border-radius: 50%; background: var(--lime); color: var(--lime-ink);
}
.step-ic .ic { width: 26px; height: 26px; }
.step h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.step p { margin-top: 0.7rem; max-width: 46ch; color: var(--soft); }
.step-shot { margin-top: 1.5rem; }
.step-shot .phone { --pw: min(240px, 62vw); }
.stage { display: none; }
/* Pinned storytelling: only when scripting is on, the screen is wide and motion is allowed. */
.anim .how-pin { min-height: 100dvh; display: flex; align-items: center; padding-block: calc(var(--nav-h) + 16px) 24px; }
.anim .how-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(32px, 6vw, 96px); align-items: center; margin-top: clamp(12px, 3vh, 36px); }
.anim .steps { gap: 1.1rem; padding-bottom: 0; }
.anim .step { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 1.1rem; align-items: start; }
.anim .step-ic { grid-row: span 2; margin: 0; }
.anim .step h3 { align-self: center; }
.anim .step p { grid-column: 2; margin-top: 0.3rem; }
.anim .step-shot { display: none; }
.anim .stage { display: grid; place-items: center; position: relative; }
.stage-panel { position: absolute; inset: -4% 6% -4% 6%; border-radius: 44px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--panel-edge); }
.phone-stage { --pw: min(340px, 29vw, 68dvh * 0.462); z-index: 1; }
.anim .how { padding-block: 0; }
.shot { position: absolute; inset: 9px; border-radius: 32px; overflow: hidden; }
.shot picture, .shot img { width: 100%; height: 100%; }
.shot + .shot { visibility: hidden; }

/* ---------- meeting point scene ---------- */
.meet-stage {
  margin-top: clamp(28px, 5vw, 56px);
  border-radius: 36px; background: var(--ticket); padding: clamp(10px, 2.4vw, 28px);
  box-shadow: 0 40px 60px -40px var(--shadow);
}
.meet-stage svg { width: 100%; height: auto; overflow: visible; }
.rings circle { stroke: var(--ticket-muted); stroke-opacity: 0.2; stroke-width: 1.5; stroke-dasharray: 3 9; }
.route-case { stroke: var(--ticket-deep); stroke-width: 17; }
.route { stroke: var(--lime); stroke-width: 9; }
.pin-ring { fill: none; stroke: var(--lime); stroke-width: 4; opacity: 0; transform-box: fill-box; transform-origin: center; }
.pin-dot { fill: var(--lime); stroke: var(--ticket-ink); stroke-width: 4; }
.pin-label { fill: var(--ticket-ink); font: 700 22px "Quicksand", sans-serif; }
.av circle { fill: var(--ticket-ink); stroke: var(--lime); stroke-width: 4; }
.av text { fill: var(--ticket); font: 700 19px "Quicksand", sans-serif; }

/* ---------- bento ---------- */
.features .section-title { margin-bottom: clamp(28px, 5vw, 48px); }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.cell { position: relative; overflow: hidden; border-radius: var(--r-card); padding: clamp(24px, 3vw, 38px); display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.cell h3 { font-size: clamp(1.3rem, 2.1vw, 1.75rem); }
.cell p { color: inherit; opacity: 0.86; max-width: 44ch; }
.cell .ic { width: 34px; height: 34px; margin-bottom: 0.5rem; }
.c-chat { grid-column: span 7; background: var(--lime-soft); }
.c-pay { grid-column: span 5; background: var(--ticket); color: var(--ticket-ink); }
.c-live { grid-column: span 5; background: var(--alt); }
.c-lang { grid-column: span 7; background: var(--surface); border: 1px solid var(--line); }
.c-invite { grid-column: 1 / -1; background: var(--lime); color: var(--lime-ink); display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; column-gap: clamp(16px, 3vw, 40px); }
.c-invite .ic { margin: 0; width: 44px; height: 44px; }
.c-invite p { max-width: 56ch; }
.cell-shot { margin: auto auto 0; width: min(100%, 330px); }
.cell-shot picture, .cell-shot img { width: 100%; height: 100%; }
/* Real screenshots cropped to the part that tells the story, in a rounded panel. */
.crop-bottom, .crop-top { height: clamp(280px, 30vw, 360px); border-radius: 22px; overflow: hidden; border: 1px solid color-mix(in srgb, currentColor 14%, transparent); box-shadow: 0 24px 40px -28px var(--shadow); }
.crop-bottom img, .crop-top img { object-fit: cover; }
.crop-bottom img { object-position: center bottom; }
.crop-top img { object-position: center top; }
.langs { margin-top: 0.8rem; display: flex; flex-wrap: wrap; gap: 8px; }
.langs li { padding: 7px 16px; border-radius: var(--r-pill); background: var(--alt); font-weight: 600; font-size: 0.95rem; }
@media (max-width: 899px) {
  .cell { grid-column: 1 / -1 !important; }
  .c-invite { display: flex; flex-wrap: wrap; }
}

/* ---------- discover ---------- */
.disc-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.disc-visual { position: relative; height: clamp(420px, 46vw, 540px); }
.disc-panel { position: absolute; inset: 4% 2% 2% 6%; border-radius: 44px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--panel-edge); }
.disc-visual .phone { --pw: min(250px, 38vw); position: absolute; }
.phone-disc-back { left: 10%; top: 4%; transform: rotate(-5deg); }
.phone-disc-front { left: calc(10% + min(215px, 32vw)); top: 12%; transform: rotate(3deg); }
@media (max-width: 899px) { .disc-grid { grid-template-columns: 1fr; } .disc-visual { height: 440px; } }

/* ---------- privacy ---------- */
.privacy { background: var(--alt); }
.priv-head { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); }
.priv-ic { display: grid; place-items: center; flex: none; width: clamp(56px, 8vw, 84px); aspect-ratio: 1; border-radius: 50%; background: var(--lime); color: var(--lime-ink); }
.priv-ic .ic { width: 50%; height: 50%; }
.priv-head .eyebrow { margin-bottom: 0.4rem; }
.facts { margin-top: clamp(28px, 5vw, 48px); max-width: 920px; }
.facts li { display: grid; grid-template-columns: minmax(230px, 0.42fr) 1fr; gap: 1.5rem; align-items: baseline; padding-block: clamp(20px, 3vw, 30px); }
.facts li + li { border-top: 1px solid var(--line); }
.fact-n { white-space: nowrap; font-size: clamp(2.4rem, 5.2vw, 4.4rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.facts p { max-width: 52ch; color: var(--soft); font-size: clamp(1.02rem, 1.4vw, 1.15rem); }
.privacy .text-link { margin-top: 1.5rem; }
@media (max-width: 640px) { .facts li { grid-template-columns: 1fr; gap: 0.4rem; } }

/* ---------- download ticket ---------- */
.ticket {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr); align-items: center;
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(32px, 5vw, 72px);
  border-radius: 32px;
  background: var(--ticket); color: var(--ticket-ink);
  -webkit-mask: radial-gradient(circle 18px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 18px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 18px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 18px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}
.ticket h2 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); }
.ticket p { margin-top: 1rem; max-width: 40ch; color: var(--ticket-muted); font-size: 1.1rem; }
.ticket-main { position: relative; }
.ticket-tear { align-self: stretch; width: 0; border-left: 2px dashed color-mix(in srgb, var(--ticket-muted) 55%, transparent); }
.ticket-actions { display: grid; gap: 0.8rem; }
.ticket-actions .btn { width: 100%; }
/* The same stamp the app puts on a locked-in plan. */
.stamp {
  position: absolute; right: 0; top: -6%;
  display: grid; place-items: center; width: clamp(84px, 10vw, 120px); aspect-ratio: 1;
  border-radius: 50%; border: 3px solid var(--lime); color: var(--lime);
  font-weight: 700; font-size: clamp(0.8rem, 1.2vw, 1rem); transform: rotate(-14deg);
  pointer-events: none;
}
.stamp::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0.6; }
@media (max-width: 899px) {
  .ticket { grid-template-columns: 1fr; padding-top: clamp(72px, 18vw, 96px); }
  .ticket-tear { width: auto; height: 0; border-left: 0; border-top: 2px dashed color-mix(in srgb, var(--ticket-muted) 55%, transparent); }
}

/* ---------- footer ---------- */
.footer { padding-block: 48px 64px; border-top: 1px solid var(--line); }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand img { height: 32px; width: auto; }
.footer-brand p { margin-top: 0.8rem; max-width: 36ch; color: var(--muted); font-size: 0.95rem; }
.footer-links { display: grid; gap: 0.5rem; font-weight: 600; }
.footer-links a { text-decoration: none; color: var(--soft); }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.mini-avatars { margin-top: auto; padding-top: 1.2rem; display: flex; }
.mini-avatars span {
  display: grid; place-items: center; width: 48px; height: 48px; margin-right: -6px;
  border-radius: 50%; background: var(--ticket); color: var(--ticket-ink);
  border: 3px solid var(--lime); font-size: 0.9rem; font-weight: 700;
}

/* ---------- opening curtain (once per visit, only while the gate class is set) ---------- */
.curtain { display: none; }
.curtain-on .curtain { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--lime); }
.curtain-mark img { width: 84px; height: 84px; }

/* ---------- pointer effects: spotlight on cells ---------- */
.cell { --mx: 50%; --my: 50%; }
.cell::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--lime) 32%, transparent), transparent 60%);
}
.c-pay::after { background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--lime) 22%, transparent), transparent 60%); }
@media (hover: hover) { .cell:hover::after { opacity: 1; } .c-invite::after { display: none; } }

/* ---------- words that light up as you read ---------- */
.lead .w { display: inline-block; white-space: pre; }

/* ---------- giant wordmark ---------- */
.footer { overflow: hidden; }
.giant { margin-top: clamp(40px, 6vw, 72px); padding-inline: var(--gutter); max-width: var(--max); margin-inline: auto; opacity: 0.09; }
.giant img { width: 100%; height: auto; }
@media (prefers-color-scheme: dark) { .giant { opacity: 0.14; } }

/* Elements that move continuously get their own layer. */
.phone-front, .phone-back, .float-ticket, .marquee-track { will-change: transform; }
