/* MooJot landing page. Colours mirror the app's two themes (src/app.css):
   pink & white in light mode, black & orange in dark mode. */

@font-face { font-family: "Noto Sans Thai"; font-weight: 400; font-display: swap; src: url(/fonts/noto-sans-thai-thai-400-normal.woff2) format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Thai"; font-weight: 700; font-display: swap; src: url(/fonts/noto-sans-thai-thai-700-normal.woff2) format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Thai"; font-weight: 800; font-display: swap; src: url(/fonts/noto-sans-thai-thai-800-normal.woff2) format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Thai"; font-weight: 400; font-display: swap; src: url(/fonts/noto-sans-thai-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Thai"; font-weight: 700; font-display: swap; src: url(/fonts/noto-sans-thai-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Thai"; font-weight: 800; font-display: swap; src: url(/fonts/noto-sans-thai-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light dark;
  --canvas: #fff7fa;
  --card: #ffffff;
  --card-sub: #fff0f5;
  --elevated: #ffe6f0;
  --border: rgba(244, 63, 133, 0.16);
  --text: #18181b;
  --text-2: #52525b;
  --muted: #6b6b75;
  --brand: #ff4d94;
  --brand-text: #c81e6b;
  --brand-soft: rgba(255, 77, 148, 0.12);
  --hero-from: #e8207a;
  --hero-to: #b8145a;
  --hero-text: #ffffff;
  --hero-text-2: rgba(255, 255, 255, 0.9);
  --hero-wave: var(--canvas);
  --btn-bg: #ffffff;
  --btn-text: #c81e6b;
  --btn-shadow: rgba(120, 10, 60, 0.35);
  --primary-bg: #e11d74;
  --primary-text: #ffffff;
  --ok: #15803d;
  --now: #c2410c;
  --phone-bezel: #18181b;
  --shadow: 0 20px 50px -20px rgba(190, 24, 93, 0.35);
  --radius: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0a0a0c;
    --card: #141417;
    --card-sub: #1b1b20;
    --elevated: #1f1f24;
    --border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-2: #d4d4d8;
    --muted: #a1a1aa;
    --brand: #ff6b1a;
    --brand-text: #fb923c;
    --brand-soft: rgba(255, 107, 26, 0.14);
    --hero-from: #ff7a1a;
    --hero-to: #ea580c;
    --hero-text: #0a0a0c;
    --hero-text-2: rgba(10, 10, 12, 0.86);
    --btn-bg: #0a0a0c;
    --btn-text: #ffffff;
    --btn-shadow: rgba(60, 20, 0, 0.5);
    --primary-bg: #ff6b1a;
    --primary-text: #0a0a0c;
    --ok: #4ade80;
    --now: #fb923c;
    --phone-bezel: #2a2a30;
    --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  }
}

/* One language at a time. Without JS the page stays in Thai. */
html[data-lang="en"] body [lang="th"],
html:not([data-lang="en"]) body [lang="en"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-text); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
p { margin: 0; }
b, strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 12px; background: var(--card); color: var(--text); }
.skip:focus { top: 12px; }

/* Top bar ------------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(90deg, var(--hero-from), var(--hero-to));
  color: var(--hero-text);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.brand img { border-radius: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); }
@media (prefers-color-scheme: dark) { .lang-switch { background: rgba(0, 0, 0, 0.18); } }
.lang-switch button {
  font: inherit; font-size: 14px; font-weight: 700; line-height: 1;
  border: 0; border-radius: 999px; padding: 9px 13px; min-height: 36px;
  background: transparent; color: inherit; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-text); }
.icon-link { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: inherit; }
.icon-link .icon { width: 22px; height: 22px; }
.icon-link:hover { background: rgba(255, 255, 255, 0.16); }

/* In-app browser note ------------------------------------------------------ */
.inapp-note { display: none; background: #fef3c7; color: #422006; font-size: 15px; line-height: 1.55; }
html[data-inapp] .inapp-note { display: block; }
.inapp-note .wrap { padding-top: 12px; padding-bottom: 12px; }
.kbd { display: inline-block; min-width: 1.6em; padding: 0 6px; border-radius: 6px; background: rgba(66, 32, 6, 0.12); text-align: center; }

/* Hero --------------------------------------------------------------------- */
.hero {
  position: relative;
  background: linear-gradient(165deg, var(--hero-from) 0%, var(--hero-to) 100%);
  color: var(--hero-text);
  padding: 36px 0 0;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 40% at 85% 70%, rgba(255, 255, 255, 0.16), transparent 70%),
    radial-gradient(50% 35% at 10% 10%, rgba(255, 255, 255, 0.1), transparent 70%);
}
.hero-grid { position: relative; display: grid; gap: 28px; }
.chip {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.2); font-size: 14px; font-weight: 700;
}
@media (prefers-color-scheme: dark) { .chip { background: rgba(0, 0, 0, 0.14); } }
.hero h1 { margin-top: 16px; font-size: clamp(42px, 11vw, 72px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; }
.hero h1 [lang="th"] { line-height: 1.3; }
.lead { margin-top: 16px; max-width: 34em; font-size: 18px; color: var(--hero-text-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.meta { margin-top: 12px; font-size: 14px; color: var(--hero-text-2); }
.meta-stores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.store-pill { padding: 4px 12px; border-radius: 999px; border: 1px solid currentColor; font-size: 13px; font-weight: 700; opacity: 0.85; }
html[data-ios] .ios-pill { opacity: 1; background: rgba(255, 255, 255, 0.2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 26px; border-radius: 999px;
  font: inherit; font-size: 18px; font-weight: 800; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.hero .btn-primary, .final-cta .btn-primary { background: var(--btn-bg); color: var(--btn-text); box-shadow: 0 12px 28px -10px var(--btn-shadow); }
.btn-primary { background: var(--primary-bg); color: var(--primary-text); }
.btn-ghost { color: inherit; border: 2px solid currentColor; background: transparent; padding: 0 22px; }
.btn-small { min-height: 46px; padding: 0 20px; font-size: 16px; }
.btn:hover { transform: translateY(-1px); }

.when-soon { display: none; }
html[data-release="soon"] .when-ready { display: none; }
html[data-release="soon"] .when-soon { display: inline; }
html[data-release="soon"] .js-download { opacity: 0.92; }

.hero-art { position: relative; justify-self: center; width: min(72vw, 300px); padding-bottom: 30px; }
.phone {
  position: relative; border-radius: 38px; padding: 9px; background: var(--phone-bezel);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.5);
}
.phone img { width: 100%; height: auto; border-radius: 30px; aspect-ratio: 600 / 1298; }
.phone-hero { transform: rotate(3deg); margin-left: 34px; max-height: 470px; overflow: hidden; }
.phone-hero img { max-height: 452px; }
.phone-hero img { object-fit: cover; object-position: top; }
.moo-hero { position: absolute; left: -26px; bottom: 6px; width: 46%; height: auto; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.28)); }
.hero-wave { position: relative; display: block; width: 100%; height: 56px; margin-top: -40px; fill: var(--hero-wave); }

/* Coming-soon note: shown by #coming-soon (no JS) or when /api/release has nothing */
.soon-note { display: none; padding: 8px 0 0; }
.soon-note:target, html[data-release="soon"] .soon-note { display: block; }
.soon-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px; border-radius: var(--radius); background: var(--card); border: 2px dashed var(--brand);
}
.soon-card img { flex: none; width: 56px; height: 56px; }
@media (max-width: 559px) { .soon-card { flex-direction: column; gap: 8px; } }
.soon-card p { overflow-wrap: anywhere; }
.soon-card h2 { font-size: 21px; }
.soon-card p { margin: 6px 0 14px; color: var(--text-2); }
.soon-card .btn { background: var(--brand-soft); color: var(--brand-text); }

/* Sections ----------------------------------------------------------------- */
.section { padding: 64px 0; }
.section-tint { background: var(--card-sub); }
.eyebrow { font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-text); }
.section-title { margin-top: 6px; font-size: clamp(30px, 7vw, 44px); font-weight: 800; letter-spacing: -0.015em; }
.section-lead { margin-top: 12px; max-width: 40em; color: var(--text-2); font-size: 18px; }

.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; }
.step {
  position: relative; padding: 24px 22px 24px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.step-num {
  position: absolute; top: 18px; right: 20px;
  font-size: 54px; font-weight: 800; line-height: 1; color: var(--brand); opacity: 0.18;
}
.step-icon, .feature-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px;
  background: var(--brand-soft); color: var(--brand-text);
}
.step-icon .icon, .feature-icon .icon { width: 24px; height: 24px; }
.step h3 { margin-top: 14px; font-size: 21px; font-weight: 800; }
.step p { margin-top: 8px; color: var(--text-2); }
.step .btn { margin-top: 16px; }
.step-tip { font-size: 15px; padding: 10px 12px; border-radius: 12px; background: var(--card-sub); }
.install-extras { margin-top: 24px; display: grid; gap: 8px; color: var(--text-2); font-size: 15px; }

.shots {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 28px max(20px, calc((100vw - 1120px) / 2 + 20px)) 8px;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shot { flex: none; width: min(64vw, 250px); margin: 0; scroll-snap-align: center; }
.shot figcaption { margin-top: 12px; text-align: center; font-weight: 700; color: var(--text-2); }
.fineprint { font-size: 13px; color: var(--muted); }
.section .fineprint { margin-top: 12px; text-align: center; }

.features { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
.feature { padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.feature h3 { margin-top: 14px; font-size: 19px; font-weight: 800; }
.feature p { margin-top: 6px; color: var(--text-2); font-size: 16px; }

.privacy { background: var(--elevated); }
.privacy-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; }
.privacy-list li { display: flex; gap: 14px; align-items: flex-start; }
.privacy-list .icon { width: 28px; height: 28px; margin-top: 2px; color: var(--brand-text); }
.privacy-list h3 { font-size: 19px; font-weight: 800; }
.privacy-list p { color: var(--text-2); }
.privacy-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; font-weight: 700; }

.roadmap { display: grid; gap: 14px; margin-top: 30px; }
.lane { padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.lane h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; }
.lane-done h3 { color: var(--ok); }
.lane-now h3 { color: var(--now); }
.lane-later h3 { color: var(--muted); }
.lane ul { margin: 12px 0 0; padding-left: 20px; color: var(--text-2); display: grid; gap: 6px; }
.lane-now { border: 2px solid var(--brand); }
.roadmap-ask { margin-top: 20px; font-weight: 700; }
.roadmap-ask a { display: inline-flex; align-items: center; gap: 6px; }
.roadmap-ask .icon { width: 16px; height: 16px; }

.faq { margin-top: 24px; display: grid; gap: 10px; }
.faq details { border-radius: 18px; background: var(--card); border: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 48px 16px 20px; position: relative;
  font-weight: 700; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 24px; font-weight: 400; color: var(--brand-text);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 18px; color: var(--text-2); }

.final-cta {
  background: linear-gradient(165deg, var(--hero-from), var(--hero-to));
  color: var(--hero-text); padding: 56px 0 60px; text-align: center;
}
.final-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.final-moo { width: 140px; height: auto; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.25)); }
.final-cta h2 { font-size: clamp(28px, 7vw, 42px); font-weight: 800; }
.oss-link { display: inline-flex; align-items: center; gap: 8px; color: inherit; font-weight: 700; }

.footer { padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; gap: 12px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.footer-brand img { border-radius: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; }
.footer-links a { color: var(--text-2); }

/* Wider screens ------------------------------------------------------------ */
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .privacy-list { grid-template-columns: repeat(2, 1fr); gap: 24px 32px; }
  .roadmap { grid-template-columns: repeat(3, 1fr); }
  .install-extras { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
  .hero-art { width: 340px; }
  .phone-hero { max-height: 560px; }
  .phone-hero img { max-height: 542px; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .shots { justify-content: center; }
}
