  /*
 * Shared styles for all /landing/* pages.
 *
 * Theme-aware: respects `localStorage.theme` and the user's OS dark-mode
 * preference. Palette matches the main Word Holder app
 * (see tailwind.config.js for source tokens).
 *
 * Edit this file, not the 5 per-language index.html files.
 * After edits, all landing pages pick up the change on refresh.
 */

/* ────────────────────────────────────────────────────────────
 * Theme tokens
 * ──────────────────────────────────────────────────────────── */

:root {
  /* Light (default) — matches `bg-[#f5f5f0]` + primary teal in the app */
  --bg: #f5f5f0;
  --bg-gradient-start: #f9f7f4;
  --bg-gradient-end: #f1eeea;
  --card: #ffffff;
  --card-hover-shadow: rgba(13, 148, 136, 0.15);
  --text: #111110;            /* neutral-900 */
  --muted: #6b6762;           /* neutral-500 */
  --border: #e2dfdb;          /* neutral-200 */
  --accent: #0d9488;          /* primary-500 teal */
  --accent-2: #0f766e;        /* primary-600 */
  --accent-subtle: rgba(13, 148, 136, 0.08);
  --ok: #059669;              /* success-500 */

  /* Example card (the "See It In Action" preview) */
  --example-bg: #f9f7f4;
  --example-border: #e2dfdb;
  --example-inner-bg: rgba(13, 148, 136, 0.06);
  --example-headword: #0d9488;
  --example-definition: #111110;
  --example-translation: #92400e; /* text-translation, from tailwind config */
  --example-sentence: #4a4742;    /* neutral-600 */
  --example-gloss: #6b6762;       /* neutral-500 */
  --example-idioms-bg: rgba(0, 0, 0, 0.04);
}

html.dark {
  /* Dark — matches `dark:bg-neutral-900` + lighter teal for contrast */
  --bg: #111110;              /* neutral-900 */
  --bg-gradient-start: #1c1b19;
  --bg-gradient-end: #0a0a09;
  --card: #1c1b19;            /* neutral-800 */
  --card-hover-shadow: rgba(45, 212, 191, 0.2);
  --text: #f9f7f4;            /* neutral-50 */
  --muted: #94908b;           /* neutral-400 */
  --border: #2e2c29;          /* neutral-700 */
  --accent: #2dd4bf;          /* primary-400 — lighter for dark contrast */
  --accent-2: #5eead4;        /* primary-300 */
  --accent-subtle: rgba(45, 212, 191, 0.12);
  --ok: #34d399;              /* success-400 */

  --example-bg: #1c1b19;
  --example-border: #2e2c29;
  --example-inner-bg: rgba(45, 212, 191, 0.1);
  --example-headword: #2dd4bf;
  --example-definition: #e5e7eb;
  --example-translation: #fbbf24;
  --example-sentence: #d1d5db;
  --example-gloss: #94908b;
  --example-idioms-bg: rgba(0, 0, 0, 0.3);
}

html.green {
  /* Green — matches `sage-400` background */
  --bg: #8bb7b1;              /* sage-400 */
  --bg-gradient-start: #b0d2cc;
  --bg-gradient-end: #6a9d96;
  --card: #ffffff;
  --card-hover-shadow: rgba(13, 148, 136, 0.18);
  --text: #111110;
  --muted: #466960;           /* sage-700 */
  --border: #d1e5e1;          /* sage-200 */
  --accent: #0d9488;
  --accent-2: #0f766e;
  --accent-subtle: rgba(13, 148, 136, 0.1);
  --ok: #059669;

  --example-bg: #f6f9f8;      /* sage-50 */
  --example-border: #d1e5e1;
  --example-inner-bg: rgba(13, 148, 136, 0.08);
  --example-headword: #0d9488;
  --example-definition: #111110;
  --example-translation: #92400e;
  --example-sentence: #4a4742;
  --example-gloss: #6b6762;
  --example-idioms-bg: rgba(0, 0, 0, 0.05);
}

/* ────────────────────────────────────────────────────────────
 * Layout + typography
 * ──────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Ubuntu, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  background: var(--bg);
  background: radial-gradient(
    1200px 600px at 10% -10%,
    var(--bg-gradient-start) 0%,
    var(--bg) 40%,
    var(--bg-gradient-end) 100%
  );
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: var(--accent); }
a:hover { color: var(--accent-2); }

header {
  padding: 48px 20px 16px;
  text-align: center;
}

.logo {
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: 24px;
  color: var(--text);
}

.hero {
  padding: 8px 20px 40px;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.title {
  font-size: 38px;
  line-height: 1.15;
  margin: 8px 0 12px;
  font-family: 'Bricolage Grotesque', 'DM Sans', sans-serif;
  color: var(--text);
}

.subtitle {
  color: var(--muted);
  font-size: 18px;
  margin: 0 auto 24px;
  max-width: 760px;
}

.kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.cta {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 20px 0 8px;
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #ffffff;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--card-hover-shadow);
  color: #ffffff;
}

.btn.secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1000px;
  margin: 24px auto;
  padding: 0 20px;
}

@media (min-width: 880px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

html.dark .card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.card h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.muted { color: var(--muted); }

.check {
  color: var(--ok);
  font-weight: 700;
}

.list {
  margin: 0;
  padding-left: 18px;
}

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

/* ────────────────────────────────────────────────────────────
 * "See It In Action" preview card
 * ──────────────────────────────────────────────────────────── */

.example {
  background: var(--example-bg);
  border: 1px solid var(--example-border);
  border-radius: 12px;
  padding: 14px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  overflow: auto;
}

.example-inner {
  padding: 8px;
  background: var(--example-inner-bg);
  border-radius: 8px;
}

.example-header {
  margin-bottom: 12px;
}

.example-word {
  font-weight: 600;
  color: var(--example-headword);
}

.example-pos {
  opacity: 0.6;
  margin-left: 6px;
}

.example-ipa {
  opacity: 0.5;
  font-size: 12px;
  margin-left: 6px;
}

.example-sense {
  margin-bottom: 10px;
  padding-left: 12px;
}

.example-definition {
  color: var(--example-definition);
}

.example-translation {
  color: var(--example-translation);
  font-weight: 500;
}

.example-sentences {
  padding-left: 12px;
  opacity: 0.9;
  font-size: 12px;
  margin-top: 4px;
}

.example-sentence {
  color: var(--example-sentence);
}

.example-gloss {
  color: var(--example-gloss);
  margin-left: 8px;
}

.example-idioms {
  margin-top: 12px;
  padding: 8px;
  background: var(--example-idioms-bg);
  border-radius: 6px;
  font-size: 11px;
}

.example-idiom-label {
  color: var(--accent);
}

/* ────────────────────────────────────────────────────────────
 * Footer
 * ──────────────────────────────────────────────────────────── */

footer {
  max-width: 1000px;
  margin: 32px auto 60px;
  padding: 0 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
