/* TaluVox website. System fonts only (the app's stacks from src/index.css and
   config/tailwind.config.js); no external resources. Colors are tokens with a
   dark variant chosen by prefers-color-scheme. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    "PingFang SC", "Hiragino Sans", "Microsoft YaHei UI", "Microsoft YaHei",
    "Noto Sans CJK SC", "Yu Gothic UI", "Meiryo", "Malgun Gothic", system-ui, sans-serif;
  --page: #f7f6fa;
  --surface: #ffffff;
  --surface-muted: #f1eff6;
  --text: #1d1a24;
  --text-muted: #5b5666;
  --border: #e3e0ea;
  --accent: #6b3fd4;
  --accent-text: #ffffff;
  --accent-soft: #efe9fc;
  --pending-border: #d9a514;
  --pending-surface: #fff8e1;
  --pending-text: #5c4300;
  --focus: #6b3fd4;
  --radius: 12px;
  color-scheme: light dark;
}

:root:lang(ja) {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans CJK JP", "PingFang SC",
    "Microsoft YaHei UI", "Malgun Gothic", system-ui, sans-serif;
}

:root:lang(zh-TW) {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    "PingFang TC", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans CJK TC",
    "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Malgun Gothic", system-ui, sans-serif;
}

:root:lang(ko) {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "PingFang SC",
    "Microsoft YaHei UI", "Hiragino Sans", system-ui, sans-serif;
}

:root:lang(th) {
  --font: -apple-system, BlinkMacSystemFont, "Thonburi", "Leelawadee UI", "Tahoma",
    "Noto Sans Thai", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #131118;
    --surface: #1c1923;
    --surface-muted: #24202d;
    --text: #f2f0f6;
    --text-muted: #aaa4b6;
    --border: #322d3d;
    --accent: #c3b1fa;
    --accent-text: #1a1325;
    --accent-soft: #2b2340;
    --pending-border: #b98a10;
    --pending-surface: #2a2210;
    --pending-text: #f3dc9a;
    --focus: #c3b1fa;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

:lang(th) body,
body:lang(th) {
  line-height: 1.75;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2 {
  line-height: 1.25;
  overflow-wrap: anywhere;
  hyphens: auto;
}

h1 {
  font-size: 2rem;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
  margin: 40px 0 12px;
}

p {
  margin: 0 0 12px;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 1;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}

/* The lockup SVG keeps 45 of its 785 units empty on the left (10px at 184px),
   far more than its clear space of one wave stroke (3px). Pulling it into the
   empty page gutter aligns the drawn wave with the content edge. */
.brand {
  display: inline-flex;
  margin-left: -10px;
}

.brand img {
  display: block;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.primary-nav a,
.legal-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.primary-nav a:hover,
.legal-nav a:hover,
.primary-nav a[aria-current="page"],
.legal-nav a[aria-current="page"] {
  color: var(--text);
}

.primary-nav a[aria-current="page"] {
  font-weight: 600;
}

/* Main */

/* main also has .wrap, whose shorthand padding would otherwise reset these. */
main.wrap {
  flex: 1;
  padding-top: 40px;
  padding-bottom: 56px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  border-color: var(--accent);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.button.primary:hover {
  filter: brightness(1.08);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Home */

.hero {
  text-align: center;
  padding: 32px 0 16px;
}

.hero-icon {
  display: block;
  margin: 0 auto 20px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 34em;
  margin: 0 auto;
}

.hero .actions {
  justify-content: center;
}

/* Pricing */

.tier-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tier-card p {
  margin: 0;
}

.tier-card.most-popular {
  border: 2px solid var(--accent);
  /* Keeps the content on the same lines as the cards with a 1px border. */
  padding: 23px;
}

.tier-card .tier-name {
  font-size: 1.25rem;
  margin: 0;
}

/* Top right, level with the tier name, so every card's lines stay aligned with
   its neighbours whether or not it carries the badge. */
.badge {
  position: absolute;
  top: 23px;
  right: 23px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
}

.tier-price {
  color: var(--text-muted);
}

.tier-price .price {
  color: var(--text);
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-right: 4px;
}

.tier-credits {
  font-weight: 600;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.tax-note {
  margin: 16px 0 0;
  color: var(--text-muted);
}

.facts {
  margin: 0;
  padding-left: 1.25em;
}

.facts li + li {
  margin-top: 8px;
}

/* Download (pages/download.mjs) */

.download-version {
  color: var(--text-muted);
  margin: -12px 0 24px;
}

.download-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.download-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.download-item h2 {
  margin: 0;
}

.download-item p {
  margin: 0;
}

.download-file,
.download-note {
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* The button sits at the bottom, level across the cards of a row. */
.download-item p:last-child {
  margin-top: auto;
  padding-top: 8px;
}

.download-checksums {
  margin: 24px 0 0;
}

/* Placeholders */

.pending-notice {
  border: 2px dashed var(--pending-border);
  background: var(--pending-surface);
  color: var(--pending-text);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.pending-notice p {
  margin: 0;
}

.pending-notice .pending-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.outline {
  margin: 32px 0 0;
  padding-left: 1.5em;
}

.outline li::marker {
  color: var(--text-muted);
  font-weight: 600;
}

.outline h2 {
  font-size: 1.125rem;
  margin: 24px 0 4px;
}

.outline .pending {
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* Legal texts (pages/legal.mjs, rendered from src/legal/) */

.pending-notice + .legal-notes,
.pending-notice + .legal-text {
  margin-top: 24px;
}

.legal-notes {
  max-width: 70ch;
  margin: 0 0 28px;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--border);
  color: var(--text-muted);
}

.legal-notes p {
  margin: 0;
}

.legal-notes p + p {
  margin-top: 4px;
}

.legal-text {
  max-width: 70ch;
}

.legal-text h2 {
  margin: 36px 0 10px;
}

.legal-text h3 {
  font-size: 1.0625rem;
  line-height: 1.3;
  margin: 24px 0 8px;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.legal-text h1 + h2 {
  margin-top: 0;
}

.legal-text p,
.legal-text ul,
.legal-text blockquote {
  margin: 0 0 14px;
}

.legal-text ul {
  padding-left: 1.25em;
}

.legal-text li + li {
  margin-top: 6px;
}

.legal-text blockquote {
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--accent-soft);
  color: var(--text-muted);
}

.legal-text blockquote p:last-child {
  margin-bottom: 0;
}

.legal-text hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.legal-text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.875em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-muted);
  overflow-wrap: anywhere;
}

/* A wide table scrolls inside its own box; the page never scrolls sideways. */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
}

.table-scroll th,
.table-scroll td {
  min-width: 8rem;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.table-scroll th {
  background: var(--surface-muted);
  font-weight: 600;
}

.table-scroll tbody tr:last-child td {
  border-bottom: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.875rem;
}

.footer-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 24px;
}

.legal-nav,
.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.languages a {
  color: var(--text-muted);
  text-decoration: none;
}

.languages a:hover {
  color: var(--text);
}

.languages a[aria-current="true"] {
  color: var(--text);
  font-weight: 600;
}

/* Checkout and not-found pages */

.result {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.result h1 {
  font-size: 1.625rem;
  margin-bottom: 12px;
}

.result .lead {
  font-size: 1.125rem;
  font-weight: 600;
}

.pay p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.625rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .card,
  .result {
    padding: 20px;
  }

  .tier-card.most-popular {
    padding: 19px;
  }

  .badge {
    top: 19px;
    right: 19px;
  }
}
