/* Talktask marketing site — colors mirror lib/app/theme/app_colors.dart */
:root {
  --primary: #1565C0;
  --primary-light: #42A5F5;
  --primary-dark: #0D47A1;
  --accent: #E76F51;
  --accent-light: #F4A261;
  --bg-soft: #FDFCFA;
  --surface: #FFFFFF;
  --surface-container: #F5F4F2;
  --surface-container-high: #E0DFDD;
  --text-main: #1B263B;
  --text-muted: #6B7280;
  --text-on-primary: #FFFFFF;
  --border: #D1D5DB;
  --success: #2A9D8F;
  --warning: #E9C46A;
  --error: #E63946;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --max-width: 1080px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
    "Noto Sans Thai", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ─── Container ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Header / Nav ──────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 252, 250, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-main);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700;
}
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 15px; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  font-size: 13px;
}
.lang-toggle a {
  padding: 4px 10px;
  color: var(--text-muted);
  background: var(--surface);
}
.lang-toggle a.active {
  background: var(--primary);
  color: white;
}
.lang-toggle a:hover { text-decoration: none; }

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 64px;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(66, 165, 245, 0.08), transparent 60%),
    var(--bg-soft);
}
.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text-main);
}
.hero .lead {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.05s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-secondary {
  background: var(--surface);
  color: var(--text-main);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-container); }

/* ─── Sections ──────────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  margin-bottom: 16px;
}
.section .sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 17px;
}

/* ─── Features grid ─────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.feature .icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: rgba(21, 101, 192, 0.08);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.feature h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}
.feature p { color: var(--text-muted); font-size: 15px; }

/* ─── Steps ─────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: step;
}
.step {
  counter-increment: step;
  text-align: center;
  padding: 24px;
}
.step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  margin-bottom: 16px;
}
.step h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 15px; }

/* ─── Pricing ───────────────────────────────────────────────── */
.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
}
.plan.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.plan .badge {
  position: absolute;
  top: -10px; right: 24px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.plan h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.plan .price {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-main);
  margin: 12px 0 4px;
}
.plan .price small { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.plan ul { list-style: none; margin: 20px 0 24px; }
.plan li {
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 15px;
  position: relative;
  padding-left: 24px;
}
.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}
.footer-grid h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
}
.footer-grid ul { list-style: none; }
.footer-grid li { padding: 4px 0; }
.footer-grid a { color: var(--text-main); font-size: 14px; }
.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.parent-brand { color: var(--text-muted); }
.parent-brand strong { color: var(--text-main); }

/* ─── Legal pages ───────────────────────────────────────────── */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px;
}
.legal h1 {
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.legal .updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 40px;
}
.legal h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
}
.legal h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
}
.legal p, .legal li { color: var(--text-main); font-size: 15px; line-height: 1.7; }
.legal ul, .legal ol { margin: 12px 0 12px 24px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--primary); }
.legal hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}
.legal .toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.legal .toc h3 { margin-top: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.legal .toc ul { margin: 8px 0 0 0; list-style: none; }
.legal .toc li { margin-bottom: 4px; }

/* ─── Hero CTA micro-row ────────────────────────────────────── */
.app-store-row {
  display: flex; gap: 12px; justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.app-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--text-main);
  color: white;
  border-radius: var(--radius-md);
  font-size: 13px;
}
.app-badge:hover { background: #000; color: white; text-decoration: none; }
.app-badge .small { font-size: 11px; opacity: 0.8; display: block; }
.app-badge .big { font-size: 15px; font-weight: 600; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { gap: 12px; }
  .nav-links a:not(.lang-toggle *) { display: none; }
  .hero { padding: 56px 0 40px; }
  .section { padding: 48px 0; }
  .footer-grid { grid-template-columns: 1fr; }
}
