/* website/style.css — apprundub.com
 * Mirrors the in-app Rundub design language (lib/theme.ts):
 *   warm off-white bg, brick-red brand, MomoTrust Display (Latin) + Prompt (Thai),
 *   soft lifted cards. Latin display type uses MomoTrust; Thai falls back to Prompt
 *   automatically (MomoTrust is Latin-only) — same split the app makes at runtime.
 */

@font-face {
  font-family: 'MomoTrust Display';
  src: url('fonts/MomoTrustDisplay-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Backgrounds */
  --bg: #FFF5EF;          /* warm off-white — page bg */
  --surface: #FFFFFF;     /* pure white (sparingly) */
  --card: #FFFDFB;        /* warm white card — preferred */
  --card-alt: #FBEDE9;    /* faint red-tinted cell */
  --peach: #F6DAD3;       /* soft red tint */
  /* Brand */
  --primary: #B13123;     /* track red */
  --primary-pressed: #811A13;
  --accent: #D04834;      /* lit red */
  /* Text */
  --text: #1E1F23;
  --secondary: #B6B6C0;
  --muted: #9A9AA4;
  /* Lines */
  --border: #E6E7EB;
  --border-soft: #F0F0F3;
  /* Type */
  --display: 'MomoTrust Display', 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  --body: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Latin display face — wordmark + English headings (Thai stays Prompt) */
.brand,
.hero h1,
.doc h1 .only-en,
.doc h2 .only-en { font-family: var(--display); font-weight: 400; }

/* Nav */
.nav {
  max-width: 880px; margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-size: 24px; color: var(--primary); letter-spacing: -0.3px; }
.brand a { color: var(--primary); }
.nav-links a { color: var(--muted); font-size: 14px; margin-left: 18px; font-weight: 600; }
.nav-links a:hover { color: var(--primary); }

.wrap { max-width: 760px; margin: 0 auto; padding: 24px; }

/* Hero (landing) */
.hero { text-align: center; padding: 72px 24px 44px; }
.hero h1 { font-size: 46px; line-height: 1.08; margin: 0 0 14px; letter-spacing: -1px; }
.hero h1 .red { color: var(--primary); }
.hero p { font-size: 18px; color: var(--secondary); max-width: 540px; margin: 0 auto 28px; }
.badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.badge {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px 18px; font-size: 14px; color: var(--text); font-weight: 600;
  box-shadow: 0 2px 6px rgba(30, 31, 35, 0.06);
}

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 44px auto; max-width: 760px; padding: 0 24px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  padding: 24px; box-shadow: 0 6px 14px rgba(30, 31, 35, 0.06);
}
.card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.card p { margin: 0; color: var(--secondary); font-size: 14px; }

/* Language switch (legal docs) */
.lang-switch { display: inline-flex; gap: 8px; margin: 4px 0 18px; }
.lang-switch button {
  font-family: var(--body); cursor: pointer;
  padding: 7px 16px; border-radius: 9999px; border: 1px solid var(--border);
  background: var(--card); color: var(--muted); font-size: 13px; font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-switch button:hover { color: var(--primary); }
.lang-switch button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
body.lang-en .only-th { display: none; }
body.lang-th .only-en { display: none; }

/* Legal docs */
.doc h1 { font-size: 30px; margin: 8px 0 4px; letter-spacing: -0.5px; }
.doc .updated { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.doc .intro {
  color: var(--text); margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 16px 18px; box-shadow: 0 2px 6px rgba(30, 31, 35, 0.05);
}
.doc h2 { font-size: 18px; margin: 30px 0 6px; letter-spacing: -0.2px; }
.doc p { color: #4A4A52; white-space: pre-line; }

footer {
  border-top: 1px solid var(--border); margin-top: 56px;
  text-align: center; color: var(--muted); font-size: 13px; padding: 28px 24px 40px;
}
footer a { color: var(--muted); margin: 0 8px; }
footer a:hover { color: var(--primary); }
