/* Noto Sans Thai Looped (SIL Open Font License, see licenses/), a
   variable font served from this site: nothing loaded from elsewhere. */
@font-face {
  font-family: "Noto Sans Thai Looped";
  src: url("fonts/NotoSansThaiLooped.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #faf8f3;
  --surface: #ffffff;
  --ink: #1d1b16;
  --muted: #6b665c;
  --line: #e4dfd3;
  --accent: #f2b24c;
  --accent-ink: #7a4b00;
  --accent-soft: #fcefd8;
  --navy: #2b3170;
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140f;
    --surface: #211e17;
    --ink: #f3efe4;
    --muted: #a59f92;
    --line: #3a352a;
    --accent-ink: #f5c46d;
    --accent-soft: #3a2e17;
    --navy: #aeb4ff;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Jumps to a section stop below the sticky header, not under it. */
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 "Noto Sans Thai Looped", system-ui, -apple-system, "Segoe UI",
    "Noto Sans Thai", sans-serif;
}

a { color: var(--navy); }

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

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

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

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}

.brand img { width: 36px; height: 36px; border-radius: 9px; }

.site-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

.site-nav a:hover { color: var(--ink); }

.lang-switch {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 12px 5px 8px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.lang-switch svg {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  flex: none;
}

/* Hero */
.hero { padding: 72px 0 48px; }

.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.2;
  margin: 0 0 16px;
}

.hero .lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; }

.hero-art {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 70%);
  border-radius: 32px;
  padding: 24px;
}

.hero-art img { width: min(320px, 80%); }

.cta { display: flex; gap: 12px; flex-wrap: wrap; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #1d1b16;
}

.note { color: var(--muted); font-size: 14px; }

/* Sections */
section.block { padding: 56px 0; }

section.block h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  margin: 0 0 8px;
}

section.block .sub { color: var(--muted); margin: 0 0 28px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.card h3 { margin: 0 0 4px; font-size: 17px; }

.card p { margin: 0; color: var(--muted); font-size: 15px; }

.highlight .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  font-size: 22px;
  margin-bottom: 12px;
}

.group { margin-top: 24px; }

/* Tool categories as tabs: wrap on wide screens, scroll sideways on a
   phone. */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.tab .count {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 999px;
  padding: 0 7px;
}

.tab svg {
  width: 18px;
  height: 18px;
  fill: var(--tone-fg, currentColor);
}

/* The chosen category in its own colours, as on the app's Home. */
.tab[aria-selected="true"] {
  background: var(--tone-bg, var(--accent-soft));
  border-color: var(--tone-fg, var(--accent));
  color: var(--tone-fg, var(--accent-ink));
}

/* Only the chosen category shows once the script runs. */
html.js .group[data-hidden] { display: none; }

.group h3 { font-size: 20px; margin: 0 0 4px; }

.group .sub { margin-bottom: 14px; }

.tool h4 {
  margin: 0 0 4px;
  font-size: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

/* The tool's icon, the same one the app shows. */
.tool-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border-radius: 11px;
  background: var(--tone-bg, var(--accent-soft));
}

.tool-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--tone-fg, var(--accent-ink));
}

.pro-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: #1d1b16;
  border-radius: 6px;
  padding: 1px 6px;
}

/* Pro */
.pro-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.plan {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.plan.best { border-color: var(--accent); background: var(--accent-soft); }

.plan strong { display: block; font-size: 22px; }

.check-list { padding-left: 0; list-style: none; columns: 2 260px; }

.check-list li { margin: 6px 0; padding-left: 26px; position: relative; break-inside: avoid; }

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-ink);
  font-weight: 700;
}

/* FAQ */
details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

summary { cursor: pointer; font-weight: 600; }

details p { color: var(--muted); margin: 10px 0 0; }

/* Legal pages */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 20px 72px; }

.doc h1 { font-size: 32px; margin: 0 0 4px; line-height: 1.3; }

.doc h2 { font-size: 20px; margin: 32px 0 8px; }

.doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.doc .lead { font-size: 17px; }

.doc ul { padding-left: 22px; }

.doc li { margin: 4px 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}

.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }

.site-footer a { color: var(--muted); }

/* Why Soider: six cards in even rows on every screen, 3 + 3 on wide
   screens and two to a row below that. */
.highlights-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .highlights-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones: tools two to a row, a little more compact. */
@media (max-width: 560px) {
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .tools-grid .card { padding: 14px; }

  .tools-grid h4 { font-size: 15px; line-height: 1.35; }

  .tools-grid p { font-size: 13px; line-height: 1.5; }

  .tools-grid .tool-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .tools-grid .tool-icon svg { width: 20px; height: 20px; }

  .highlights-grid { gap: 10px; }

  .highlights-grid .card { padding: 14px; }

  .highlights-grid h3 { font-size: 15px; line-height: 1.35; }

  .highlights-grid p { font-size: 13px; line-height: 1.5; }

  .tabs { flex-wrap: nowrap; }
}

@media (max-width: 760px) {
  .hero { padding: 40px 0 24px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .site-nav { display: none; }
  .lang-switch { margin-left: auto; }
}
