/* Lexilog.io public site: shared foundation.
 *
 * Canonical brand tokens, reset, page container, brand lockup, header, buttons and footer.
 * Extracted verbatim from index.html/app.html, which carried byte-identical copies of all of
 * this, and now also serves the legal/support pages so the whole site reads as one product.
 *
 * Page-specific rules stay in each page's own <style> block, which is linked AFTER this
 * file and therefore still wins on equal specificity.
 */

:root {
  --page: #fcfaf6;
  --page-warm: #f8f3ec;
  --surface: #ffffff;
  --surface-soft: #fdfbf8;
  --elevated: #f3efe8;
  --elevated-2: #ebe7df;
  --inset: #f1ede6;
  --text: #2c2a26;
  --text-2: #6b6860;
  --text-muted: #736f68;
  --text-faint: #c4c0b8;
  --line: #e7ded2;
  --line-2: #ded8cc;
  --accent: #f0561d;
  --accent-deep: #d1440f;
  --accent-soft: #fff3ec;
  --accent-tint: #fff6f1;
  --peach: #ffeee4;
  --peach-2: #fff7f1;
  --success: #4b8f62;
  --success-soft: #e6f0e9;
  --present: #c79a3a;
  --present-soft: #f6ecd4;
  --absent: #ddd9ce;
  --error: #c0553f;
  --error-soft: #fdece9;
  --cream-mark: #f4efe6;
  --sh-1: 0 1px 2px rgba(45,43,37,.04), 0 8px 20px rgba(45,43,37,.05);
  --sh-2: 0 2px 4px rgba(45,43,37,.05), 0 18px 40px rgba(45,43,37,.08);
  --sh-3: 0 30px 70px rgba(30,22,14,.14);
  --max: 1200px;
  --ease: cubic-bezier(.16,1,.3,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
  /* One explicit stack for every public surface, matching src/index.css --font-app.
     Poppins carries the Latin wordmark; it ships no Greek glyphs, so Greek resolves to the
     system UI face. Naming that chain explicitly (rather than leaving it to a bare
     `sans-serif`) is what keeps Greek identical across site, app and games funnel. */
  --font-sans: Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--page); }
body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-sans);
  background: var(--page);
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background: rgba(247,244,238,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .26s ease, backdrop-filter .26s ease;
  z-index: 200;
}
body.is-entering-beta::after { opacity: 1; backdrop-filter: blur(5px); }
body.is-entering-beta main, body.is-entering-beta .site-header { opacity: .9; transition: opacity .26s ease; }

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; }

.wrap { width: min(calc(100% - 44px), var(--max)); margin: 0 auto; }

/* ── Brand lockup (real Λ mark + Lexilog.io) ─────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: .42em; text-decoration: none; }
.logo-mark { display: block; width: 1.16em; height: 1.16em; flex: 0 0 auto; border-radius: 26%; overflow: hidden; }
.logo-mark svg { display: block; width: 100%; height: 100%; }
.logo-word {
  font-weight: 900; font-size: 1.5rem; letter-spacing: -0.04em; line-height: 1;
  color: var(--text); white-space: nowrap;
}
.logo-word .tld { color: var(--accent); }

/* ── Header (minimal, no pill) ───────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; }
.header-nav { display: inline-flex; align-items: center; gap: 14px; }
.hchip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
  transition: background .16s ease, transform .14s ease, box-shadow .2s ease;
}
.hchip:hover { background: #fbddcc; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(240,86,29,.16); }
.hchip-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.hchip-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: hpulse 2s ease-out infinite; }
@keyframes hpulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(2.7); opacity: 0; } }
.header-app { display: inline-flex; align-items: center; height: 40px; padding: 0 17px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 700; color: var(--text); transition: border-color .15s ease, color .15s ease, transform .14s ease, box-shadow .2s ease; }
.header-app:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(240,86,29,.12); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 14px; border: 1.5px solid transparent;
  font-size: 15.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: transform .14s ease, background .16s ease, border-color .15s ease, box-shadow .2s ease, color .15s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(240,86,29,.24); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: 0 12px 26px rgba(240,86,29,.3); }
.btn.is-pressed { transform: translateY(1px) scale(.985); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 16.5px; }


/* ── Footer brand panel ──────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-soft); }
.footer-brand { position: relative; padding: 48px 0 20px; overflow: hidden; --gx: -300px; --gy: -80px; }
.footer-brand::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(340px circle at var(--gx) var(--gy), rgba(240,86,29,.06), transparent 70%); }
.footer-brand-inner { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-wordmark { display: inline-flex; align-items: center; gap: .38em; font-weight: 700; font-size: clamp(1.75rem, 4.4vw, 2.5rem); letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.footer-wordmark .fw-mark { width: .92em; height: .92em; border-radius: 26%; overflow: hidden; }
.footer-wordmark .fw-mark svg { display: block; width: 100%; height: 100%; }
.footer-wordmark .tld { color: var(--accent); }
.footer-tag { margin: 14px 0 0; color: var(--text-2); font-size: 15px; max-width: 24rem; }
.footer-play { display: inline-flex; }
.footer-links-wrap { padding: 26px 0 26px; border-top: 1px solid var(--line); }
.footer-cols { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--text-2); }
.footer-links a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 10px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); transition: color .15s ease, border-color .15s ease; }
.footer-social a:hover { color: var(--accent); border-color: var(--accent); }
.footer-social svg { width: 19px; height: 19px; }
.footer-legal { padding: 0 0 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-muted); font-size: 12.5px; }

/* ── Floating play FAB ───────────────────────────────────────────────── */

/* ── Shared responsive foundation ─────────────────────────────────────── */
/* Container gutter and header density at small widths. Both marketing pages
   carried an identical copy of these three rules; they live here so the
   legal/support pages get the same container behaviour. */
@media (max-width: 600px) {
  .wrap { width: min(calc(100% - 34px), var(--max)); }
  .header-app { display: none; }
  .hchip { padding: 8px 14px; font-size: 13px; }
}

/* ── Reduced motion ───────────────────────────────────────────────────────
   index.html and app.html each carry their own reduce block for their page animations.
   The shared chrome needs one too, otherwise the four legal/support pages, which have no
   block of their own, keep an infinitely pulsing header dot and smooth scrolling. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hchip-dot::after { animation: none; }
  .btn,
  .btn:hover,
  .hchip:hover,
  .header-app:hover,
  .footer-social a { transition: none; transform: none; }
}

/* ── Focus ────────────────────────────────────────────────────────────────
   The public site had no focus indicator on its shared chrome at all. */
.logo:focus-visible,
.hchip:focus-visible,
.header-app:focus-visible,
.btn:focus-visible,
.footer-links a:focus-visible,
.footer-social a:focus-visible,
.footer-play:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
}
