/* LumiTales — minimal legal-page stylesheet */
:root {
  --bg: #fafaf7;
  --fg: #1f2024;
  --muted: #6b6f76;
  --rule: #e6e6e0;
  --accent: #6552a4;
  --accent-soft: #ede7f8;
  --maxwidth: 760px;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Helvetica, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--rule);
  background: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 14px;
  font-size: 0.9rem;
}
.lang-switch a.active {
  color: var(--accent);
  font-weight: 600;
}

main.legal-doc {
  max-width: var(--maxwidth);
  margin: 0 auto;
  padding: 32px 24px 64px;
}

main.legal-doc h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}
main.legal-doc h2 {
  font-size: 1.35rem;
  margin: 1.8em 0 0.6em;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.3em;
}
main.legal-doc h3 { font-size: 1.1rem; margin: 1.4em 0 0.4em; }
main.legal-doc h4 { font-size: 1rem; margin: 1.2em 0 0.3em; }

main.legal-doc p { margin: 0.8em 0; }

main.legal-doc a {
  color: var(--accent);
  word-break: break-word;
}

/* In-document section reference (§N.M). Subtle by default so the
   surrounding paragraph reads naturally, underlined on hover. */
main.legal-doc a.sec-ref {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  white-space: nowrap;
}
main.legal-doc a.sec-ref:hover,
main.legal-doc a.sec-ref:focus {
  color: var(--accent);
  border-bottom-style: solid;
  outline: none;
}

/* When a section-link target is jumped to, give the user a moment of
   visual feedback so they see where they landed. */
main.legal-doc :target {
  scroll-margin-top: 16px;
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 0 6px;
  margin-left: -6px;
  transition: background 0.6s ease;
}

main.legal-doc blockquote {
  margin: 1em 0;
  padding: 0.6em 1em;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--fg);
}

main.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.94rem;
}
main.legal-doc th,
main.legal-doc td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
}
main.legal-doc thead th {
  background: #fff;
  border-bottom: 2px solid var(--rule);
}

main.legal-doc ul,
main.legal-doc ol { padding-left: 1.3em; }
main.legal-doc li { margin: 0.3em 0; }

main.legal-doc code {
  background: #f1eef7;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.92em;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 24px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
.site-footer p { margin: 0.3em 0; }
.site-footer a {
  color: var(--accent);
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* ================================================================
   Landing page (web/public/index.html)
   ================================================================
   Uses body.landing as the scope so it doesn't collide with the
   legal-doc layout. Visually warmer than the doc pages: hero brand
   mark, large tagline, and a card grid pointing to each document. */

body.landing {
  background:
    radial-gradient(circle at 20% -10%, rgba(101, 82, 164, 0.18), transparent 60%),
    radial-gradient(circle at 95% 110%, rgba(255, 196, 122, 0.20), transparent 55%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
}

.landing-brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

.landing-lang-nav { display: flex; gap: 6px; }

.landing-lang-anchor {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--rule);
  transition: background 0.15s ease, transform 0.15s ease;
}
.landing-lang-anchor:hover,
.landing-lang-anchor:focus {
  background: var(--accent-soft);
  transform: translateY(-1px);
  outline: none;
}

.landing-main {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.landing-block { scroll-margin-top: 24px; }

.landing-tagline {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  color: var(--fg);
}

.landing-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 32px;
}

.landing-section-title {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 16px;
  border: 0;
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.landing-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.landing-card:hover,
.landing-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(101, 82, 164, 0.12);
  border-color: var(--accent);
  outline: none;
}

.landing-card-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
}

.landing-card-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

.landing-footer-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 640px;
}

.landing-foot {
  border-top: 1px solid var(--rule);
  padding: 22px 32px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.4);
}
.landing-foot p { margin: 0.25em 0; }
.landing-foot a {
  color: var(--accent);
  text-decoration: none;
}
.landing-foot a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .landing-header { padding: 16px 20px; }
  .landing-main { padding: 16px 20px 32px; gap: 40px; }
  .landing-brand-logo { height: 36px; }
}

/* ================================================================
   Dark mode overrides — applies to BOTH legal docs and landing.
   ================================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c;
    --fg: #e9eaed;
    --muted: #9da1a8;
    --rule: #2a2d33;
    --accent: #b9a8ee;
    --accent-soft: #2a2342;
  }
  .site-header { background: #1c1e22; }
  main.legal-doc thead th { background: #1c1e22; }
  main.legal-doc code { background: #2a2342; }

  body.landing {
    background:
      radial-gradient(circle at 20% -10%, rgba(185, 168, 238, 0.16), transparent 60%),
      radial-gradient(circle at 95% 110%, rgba(255, 196, 122, 0.10), transparent 55%),
      var(--bg);
  }
  .landing-lang-anchor { background: rgba(255, 255, 255, 0.04); }
  .landing-lang-anchor:hover,
  .landing-lang-anchor:focus { background: var(--accent-soft); }
  .landing-card { background: rgba(255, 255, 255, 0.04); }
  .landing-card:hover,
  .landing-card:focus { box-shadow: 0 6px 20px rgba(185, 168, 238, 0.18); }
  .landing-foot { background: rgba(255, 255, 255, 0.02); }
}
