:root {
  --bg: #F7F5FF;
  --surface: #FFFFFF;
  --surface-2: #F1EDFF;
  --border: #DCD6F2;
  --text: #2E2650;
  --text-secondary: #6A5F99;
  --text-muted: #9C93C4;
  --accent: #6D4FD6;
  --accent-strong: #4A3699;
  --on-accent: #F1EDFF;
  --badge-bg: #E5DEFB;
  --badge-text: #4A3699;
  --shadow: 0 20px 50px -25px rgba(74, 54, 153, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #141021;
  --surface: #1C1730;
  --surface-2: #241D3A;
  --border: #342A57;
  --text: #DBD3F2;
  --text-secondary: #A99CD1;
  --text-muted: #6E6396;
  --accent: #9D7BFF;
  --accent-strong: #C3ACFF;
  --on-accent: #1B1233;
  --badge-bg: #2C2152;
  --badge-text: #C3ACFF;
  --shadow: 0 20px 50px -25px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141021;
    --surface: #1C1730;
    --surface-2: #241D3A;
    --border: #342A57;
    --text: #DBD3F2;
    --text-secondary: #A99CD1;
    --text-muted: #6E6396;
    --accent: #9D7BFF;
    --accent-strong: #C3ACFF;
    --on-accent: #1B1233;
    --badge-bg: #2C2152;
    --badge-text: #C3ACFF;
    --shadow: 0 20px 50px -25px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Prompt", "Noto Sans Thai", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.25s ease, color 0.25s ease;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { margin: 0 0 0.6em; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 1em; color: var(--text-secondary); }
a { color: inherit; text-decoration: none; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.logo-dot { color: var(--accent); }

.nav {
  display: flex;
  gap: 28px;
  font-size: 15px;
  color: var(--text-secondary);
}
.nav a:hover { color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-toggle span { width: 16px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow);
}
.btn-primary:hover { opacity: 0.92; }
.btn-light {
  background: #ffffff;
  color: var(--accent-strong);
}
.btn-sm { padding: 10px 20px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.eyebrow-light { background: rgba(255,255,255,0.16); color: #fff; }

.hero-copy h1 {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 17px;
  max-width: 46ch;
}

.waitlist-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 24px 0 12px;
}
.waitlist-form input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0 20px;
  font-size: 15px;
  font-family: inherit;
}
.waitlist-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.waitlist-form .btn { height: 52px; }

.form-note {
  font-size: 14px;
  color: var(--text-muted);
}
.form-note-light {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}
.seats-badge {
  display: block;
  color: var(--accent-strong);
  font-weight: 600;
  margin-bottom: 4px;
}
.seats-badge strong { font-variant-numeric: tabular-nums; }

/* ---------- Hero visual (phone mock) ---------- */
.hero-visual { position: relative; display: flex; justify-content: center; }
.phone-mock {
  position: relative;
  z-index: 2;
  width: min(320px, 90%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px 18px 22px;
  box-shadow: var(--shadow);
}
.phone-notch {
  width: 60px;
  height: 6px;
  border-radius: 99px;
  background: var(--border);
  margin: 0 auto 20px;
}
.chat-row { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 16px; }
.chat-row.me { justify-content: flex-end; }
.avatar-blur {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--badge-bg));
  filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.avatar-blur.small { width: 32px; height: 32px; }
.avatar-blur .lock {
  filter: none;
  font-size: 12px;
}
.chat-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.chat-bubble {
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 14px 14px 14px 4px;
  max-width: 200px;
}
.chat-bubble.in { background: var(--surface-2); color: var(--text); }
.chat-bubble.in.dim { color: var(--text-muted); }
.chat-bubble.out {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 14px 14px 4px 14px;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  z-index: 1;
}
.glow-1 { width: 260px; height: 260px; background: var(--accent); top: -40px; right: 20px; }
.glow-2 { width: 200px; height: 200px; background: var(--badge-bg); bottom: -30px; left: 10px; }

/* ---------- Section shared ---------- */
section { padding: 84px 0; }
.section-title { font-size: clamp(24px, 3.4vw, 32px); text-align: center; }
.section-sub { text-align: center; max-width: 46ch; margin: 0 auto 48px; }

/* ---------- How it works ---------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.how-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.how-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--badge-bg);
  color: var(--badge-text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  margin-bottom: 16px;
}
.how-card h3 { font-size: 17px; }
.how-card p { font-size: 14.5px; margin: 0; }

/* ---------- Features ---------- */
.features { background: var(--surface-2); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--badge-bg);
  color: var(--accent-strong);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 16px; }
.feature-card p { font-size: 14px; margin: 0; }
.feature-card em { color: var(--accent-strong); font-style: normal; }

/* ---------- Founder ---------- */
.founder {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #fff;
}
[data-theme="dark"] .founder { background: linear-gradient(135deg, #2C2152, #4A3699); }
.founder-inner { display: flex; justify-content: center; }
.founder-copy { max-width: 560px; text-align: center; }
.founder-copy h2 { font-size: clamp(26px, 3.6vw, 36px); }
.founder-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.founder-list li {
  font-size: 15px;
  padding-left: 26px;
  position: relative;
  color: rgba(255,255,255,0.9);
}
.founder-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #fff;
  font-weight: 700;
}
.founder .waitlist-form { margin-left: auto; margin-right: auto; }
.founder .waitlist-form input { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); color: #fff; }
.founder .waitlist-form input::placeholder { color: rgba(255,255,255,0.6); }

/* ---------- Safety ---------- */
.safety-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.safety-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.safety-card h3 { font-size: 15px; }
.safety-card p { font-size: 13.5px; margin: 0; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  background: var(--surface);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--accent);
  margin-left: 12px;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 12px 0 0; font-size: 14.5px; }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; }
.final-cta h2 { font-size: clamp(26px, 3.6vw, 34px); }
.final-cta-inner .waitlist-form { margin: 24px auto 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; }
.footer-tagline { font-size: 14px; margin: 8px 0 0; }
.footer-copy { font-size: 13px; color: var(--text-muted); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 12px; }
  .how-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .safety-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .safety-grid { grid-template-columns: 1fr; }
  .waitlist-form { flex-direction: column; }
  .waitlist-form .btn { width: 100%; }
  section { padding: 56px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* Mobile nav dropdown */
body.nav-open .nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  gap: 16px;
}
