/* Landing page (/) of the public site — also the store listings' developer website, which
   is where AdMob crawls /app-ads.txt. Static by design: the site's CSP (firebase.json,
   hosting target "legal") allows no script, no inline style and no external host, so
   everything here is self-hosted and every style lives in this file. The legal pages keep
   their own legal.css. Colours follow the app's tokens (packages/core tokens.dart); the
   phone screens are the app's own widget renders (app/tool/store_screens/raw/en). */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/PlusJakartaSans.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* Cut from the app's own Noto fonts to just the words this page uses ("ไทย", "မြန်မာ"),
   so a machine without a Thai/Burmese font never shows empty boxes. Re-cut them with
   fontTools if the page gains more Thai or Burmese text. */
@font-face {
  font-family: "Noto Sans Thai";
  src: url("/fonts/NotoSansThai-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0E00-0E7F;
}
@font-face {
  font-family: "Noto Sans Myanmar";
  src: url("/fonts/NotoSansMyanmar-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+1000-109F;
}

:root {
  --bg: #f6f4fb;
  --surf: #ffffff;
  --ink: #1c1633;
  --mut: #5b5470;
  --faint: #8a8399;
  --line: #e7e2f2;
  --accent: #6d4ae0;
  --accent-text: #5a3ec8;
  --accent-soft: #efeafc;
  --hero-a: #7a57e8;
  --hero-b: #4a2cae;
  --gold: #ffd37e;
  --warn-bg: #fcefd9;
  --warn-ink: #7a4f0f;
  --warn-mark: #c77a12;
  --shadow: 0 1px 2px rgba(28, 22, 51, .04), 0 10px 30px rgba(28, 22, 51, .07);
  --glow: rgba(109, 74, 224, .18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131314;
    --surf: #1f1f21;
    --ink: #ececf0;
    --mut: #b0b0b9;
    --faint: #85858e;
    --line: #34343a;
    --accent-text: #b7a4f5;
    --accent-soft: #29243a;
    --hero-a: #6447d6;
    --hero-b: #36218a;
    --warn-bg: #33281a;
    --warn-ink: #f0c98a;
    --warn-mark: #e8b45f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .3);
    --glow: rgba(140, 110, 245, .22);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans Thai", "Noto Sans Myanmar", "Noto Sans", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-text); }

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

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

h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }

.kicker {
  margin: 0 0 10px;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  margin: 12px;
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(60% 70% at 85% 10%, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(255, 211, 126, .16), rgba(255, 211, 126, 0) 70%),
    linear-gradient(150deg, var(--hero-a), var(--hero-b));
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand img { border-radius: 10px; flex: none; }

.toplinks { display: flex; gap: 6px; }
.toplinks a {
  color: rgba(255, 255, 255, .86);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  padding: 8px 12px;
  border-radius: 999px;
}
.toplinks a:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: 40px;
  padding-top: 32px;
  padding-bottom: 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: 14px;
  font-weight: 600;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.eyebrow .lang + .lang::before { content: "·"; margin: 0 8px 0 0; opacity: .6; }

.hero h1 {
  font-size: clamp(40px, 5.6vw, 66px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.025em;
  max-width: 13ch;
}

.lede {
  margin: 20px 0 0;
  max-width: 34em;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
  color: rgba(255, 255, 255, .86);
}

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 22px 8px 16px;
  border-radius: 14px;
  background: #0f0b1d;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 12px 28px -10px rgba(10, 4, 40, .6);
  transition: transform .15s ease, box-shadow .15s ease;
}
.store:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .24), 0 16px 32px -10px rgba(10, 4, 40, .7); }
.store svg { width: 26px; height: 26px; flex: none; fill: #fff; }
.store svg.line { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.store span { display: block; font-size: 19px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.store small { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; opacity: .78; margin-bottom: 2px; }

.trust { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.trust li { position: relative; padding-left: 26px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .9); }
.trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: rgba(255, 211, 126, .22);
}
.trust li::after {
  content: "";
  position: absolute;
  left: 6.5px;
  top: 50%;
  width: 5px;
  height: 9px;
  margin-top: -6px;
  border: solid var(--gold);
  border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg);
}

/* Phone frame around a raw app render (1179×2556). The island sits inside the render's
   own 59 pt top safe area, so it never covers app content. */
.phone {
  position: relative;
  width: 100%;
  max-width: 290px;
  aspect-ratio: 1179 / 2556;
  margin: 0 auto;
  padding: 9px;
  border-radius: 46px;
  background: #0d0b14;
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, .1),
    0 40px 70px -28px rgba(18, 8, 60, .55),
    0 18px 36px -18px rgba(0, 0, 0, .35);
}
.phone::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 3.1%;
  left: 50%;
  width: 31%;
  height: 3.3%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #0d0b14;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }

.hero-art { position: relative; }
.hero-art .phone { max-width: 300px; transform: rotate(3deg); }
.hero-art .ticket {
  position: absolute;
  z-index: 2;
  width: 52%;
  max-width: 240px;
  left: -2%;
  bottom: 6%;
  filter: drop-shadow(0 22px 30px rgba(18, 8, 60, .45));
}

/* ── Showcase rows ──────────────────────────────────────────────────── */

.showcase { padding-top: 96px; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 64px;
  margin-top: 64px;
}
.row.flip .row-copy { order: 2; }

.row-copy { max-width: 470px; }
.row.flip .row-copy { justify-self: end; }

.num {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
}

.row h3 { margin-top: 16px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.row p { margin: 14px 0 0; color: var(--mut); font-size: 17px; }

.ticks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; font-weight: 600; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.ticks li::after {
  content: "";
  position: absolute;
  left: 7.5px;
  top: calc(.2em + 4.5px);
  width: 5px;
  height: 9px;
  border: solid var(--accent-text);
  border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg);
}

.row-art {
  position: relative;
  padding: 36px 0;
  background: radial-gradient(closest-side, var(--glow), transparent);
}
.row-art .phone { max-width: 270px; }

/* ── Extras ─────────────────────────────────────────────────────────── */

.extras {
  margin-top: 96px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.extras article,
.plan {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
  margin-bottom: 16px;
}
.ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.extras h3 { font-size: 18px; font-weight: 800; }
.extras p { margin: 6px 0 0; color: var(--mut); font-size: 15px; }

/* ── Plans ──────────────────────────────────────────────────────────── */

.plans { padding-top: 96px; }

.plan-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.plan { padding: 30px; }
.plan h3 { font-size: 24px; font-weight: 800; }
.plan-sub { margin: 6px 0 0; color: var(--mut); }
.plan ul { list-style: none; margin: 22px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.plan li { position: relative; padding-left: 30px; font-weight: 600; }
.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.plan li::after {
  content: "";
  position: absolute;
  left: 7.5px;
  top: calc(.2em + 4.5px);
  width: 5px;
  height: 9px;
  border: solid var(--accent-text);
  border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg);
}

.plan.premium {
  color: #fff;
  border-color: transparent;
  background:
    radial-gradient(60% 60% at 100% 0%, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 70%),
    linear-gradient(150deg, var(--hero-a), var(--hero-b));
}
.plan.premium .plan-sub { color: rgba(255, 255, 255, .78); }
.plan.premium ul { border-top-color: rgba(255, 255, 255, .2); }
.plan.premium li::before { background: rgba(255, 211, 126, .22); }
.plan.premium li::after { border-color: var(--gold); }
.plan .fine { margin: 22px 0 0; font-size: 14px; color: rgba(255, 255, 255, .75); }

/* ── Closing call to action ─────────────────────────────────────────── */

.cta-band { padding-top: 96px; }

.cta-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding: 44px 48px;
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(50% 80% at 0% 50%, rgba(255, 211, 126, .18), rgba(255, 211, 126, 0) 70%),
    linear-gradient(150deg, var(--hero-a), var(--hero-b));
}
.cta-card img { filter: drop-shadow(0 18px 26px rgba(18, 8, 60, .45)); }
.cta-card p { margin: 10px 0 0; color: rgba(255, 255, 255, .84); font-size: 17px; }
.cta-card .stores { margin-top: 24px; }

/* ── Notice, legal, footer ──────────────────────────────────────────── */

.notice {
  margin-top: 56px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: 20px;
  padding: 20px 22px;
}
.notice svg { flex: none; width: 24px; height: 24px; margin-top: 1px; fill: none; stroke: var(--warn-mark); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notice p { margin: 0; font-size: 15px; }
.notice a { color: inherit; font-weight: 700; }

.legal { padding-top: 80px; }
.legal h2 { font-size: clamp(24px, 3vw, 30px); }

.hub {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.hub a {
  display: block;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease;
}
.hub a:hover { border-color: var(--accent); }
.hub strong { display: block; font-size: 16px; }
.hub span { display: block; color: var(--mut); font-size: 14px; margin-top: 2px; }

.support { margin: 20px 0 0; color: var(--mut); }

footer {
  margin-top: 64px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  color: var(--faint);
  font-size: 13px;
}

/* ── Tablet ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-bottom: 0; gap: 48px; }
  .hero-copy { text-align: center; }
  .hero h1 { margin: 0 auto; }
  .lede { margin-left: auto; margin-right: auto; }
  .stores, .trust { justify-content: center; }
  /* The phone bleeds off the bottom of the hero card instead of shrinking to a stamp. */
  .hero-art { height: 440px; overflow: hidden; }
  .hero-art .phone { max-width: 280px; transform: none; }
  .hero-art .ticket { width: 180px; left: calc(50% - 250px); bottom: auto; top: 150px; }
  .row { grid-template-columns: 1fr; gap: 8px; margin-top: 72px; }
  .row.flip .row-copy { order: 0; justify-self: start; }
  .row-copy { max-width: none; }
  .extras { grid-template-columns: 1fr; }
  .cta-card { grid-template-columns: 1fr; text-align: center; padding: 40px 28px; gap: 16px; }
  .cta-card img { width: 180px; margin: 0 auto; }
  .cta-card .stores { justify-content: center; }
}

/* ── Phone ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero { margin: 8px; border-radius: 26px; }
  .top { padding-top: 14px; padding-bottom: 14px; }
  .brand { font-size: 16px; }
  .toplinks { display: none; }
  .hero-grid { padding-top: 16px; gap: 36px; }
  .eyebrow { font-size: 13px; margin-bottom: 18px; }
  .hero h1 { font-size: clamp(34px, 10vw, 44px); }
  .lede { font-size: 16.5px; }
  .stores { flex-direction: column; align-items: stretch; }
  .store { justify-content: center; }
  .trust { gap: 8px 16px; }
  .trust li { font-size: 14px; }
  .hero-art { height: 360px; }
  .hero-art .phone { max-width: 250px; }
  .hero-art .ticket { width: 120px; left: calc(50% - 178px); top: 70px; }
  .showcase, .plans, .cta-band { padding-top: 72px; }
  .extras { margin-top: 72px; }
  .row { margin-top: 56px; }
  .row-art .phone { max-width: 240px; }
  .plan-grid, .hub { grid-template-columns: 1fr; }
  .plan { padding: 24px; }
  .cta-card { border-radius: 26px; padding: 32px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .store, .hub a { transition: none; }
}
