/* ---------------------------------------------------------------------------
   typesati landing page
   Palette comes from the app icon: near-black, indigo, a single white dot.
   Theming is driven by CSS custom properties; [data-theme="dark"] overrides them.
--------------------------------------------------------------------------- */

:root {
  /* Brand constant across both themes */
  --indigo: #4b43c4;
  --indigo-soft: #6f67e0;

  /* Light theme (default) */
  --bg: #f7f7f9;
  --bg-raised: #ffffff;
  --text: #16161d;
  --text-muted: #5c5c6b;
  --border: #e4e4ec;
  --accent: var(--indigo);
  --dot: var(--indigo);
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.06), 0 12px 32px rgba(20, 20, 30, 0.08);

  --max: 64rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 16px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0c0c10;
  --bg-raised: #16161d;
  --text: #f4f4f6;
  --text-muted: #a0a0b0;
  --border: #26262f;
  --accent: var(--indigo-soft);
  --dot: #f4f4f6;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* ----------------------------------------------------------------- base */

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.3s ease, color 0.3s ease;
}

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

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

.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 10;
  background: var(--bg-raised);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* ----------------------------------------------------------------- header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem var(--gutter);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 650;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.wordmark__dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--indigo) 18%, transparent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--accent); }

/* Sun in light, moon in dark — drawn with a single element. */
.theme-toggle__icon {
  position: relative;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: currentColor;
}
[data-theme="dark"] .theme-toggle__icon {
  background: transparent;
  box-shadow: inset -4px -4px 0 0 currentColor;
  transform: rotate(-30deg);
}

/* ----------------------------------------------------------------- layout */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6rem) var(--gutter);
  border-top: 1px solid var(--border);
}

.section__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.section__title {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section__body {
  margin: 0 0 1rem;
  max-width: 42rem;
  color: var(--text-muted);
  font-size: 1.075rem;
}
.section__body strong { color: var(--text); }

/* ----------------------------------------------------------------- hero */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 5rem) var(--gutter) clamp(3rem, 8vw, 5.5rem);
  text-align: center;
}

.hero__icon {
  width: clamp(84px, 16vw, 112px);
  height: auto;
  border-radius: 24px;
  filter: drop-shadow(0 18px 40px rgba(75, 67, 196, 0.28));
}

.hero__title {
  margin: 1.75rem auto 1.25rem;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero__sub {
  margin: 0 auto 2rem;
  max-width: 38rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--text-muted);
}

.hero__cta { display: grid; gap: 0.85rem; justify-items: center; }
.hero__note { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn--primary {
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 8px 24px rgba(75, 67, 196, 0.35);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(75, 67, 196, 0.45);
  background: var(--indigo-soft);
}

/* ----------------------------------------------------------------- idea */

.idea__grid {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0 2.25rem;
}
@media (min-width: 40rem) {
  .idea__grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

.idea__term {
  display: grid;
  gap: 0.4rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--accent);
}
.idea__word {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}
.idea__gloss { color: var(--text-muted); }
.idea__pali {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.idea__conclusion {
  margin: 0;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.idea__conclusion strong { color: var(--accent); }

/* ----------------------------------------------------------------- shows */

.shows {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 52rem) {
  .shows { grid-template-columns: 1fr 1fr; }
}

.menubar {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.menubar__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.menubar__dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #e5484d;
  box-shadow: 0 0 0 4px color-mix(in srgb, #e5484d 22%, transparent);
}

.menubar__stats { margin: 0; padding: 0.4rem 0; }
.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.15rem;
}
.stat dt { color: var(--text-muted); font-size: 0.95rem; }
.stat dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}
.stat__split { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; }
.stat--accent dd { color: var(--accent); font-size: 1.15rem; }

/* ----------------------------------------------------------------- privacy */

.classify {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.classify__chip {
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text);
}

.privacy__points {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
  max-width: 42rem;
}
.privacy__points li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text-muted);
}
.privacy__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

/* ----------------------------------------------------------------- permission */

.permission__title {
  margin: 0 0 1rem;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  letter-spacing: -0.02em;
}

/* ----------------------------------------------------------------- closing */

.closing {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 1.5rem;
}
.closing__dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--indigo) 16%, transparent);
}
.closing__title {
  margin: 0;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

/* ----------------------------------------------------------------- footer */

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 650;
}
.site-footer__links { display: flex; gap: 1.25rem; }
.site-footer__links a { color: var(--text-muted); text-decoration: none; }
.site-footer__links a:hover { color: var(--text); }
.site-footer__license {
  flex-basis: 100%;
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.site-footer__credit {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.site-footer__credit a {
  color: inherit;
  text-decoration-color: var(--accent);
}
.site-footer__credit a:hover { color: var(--text); }
