/* Lumiko website: shared styles.
   Night-sky theme with cream "paper" cards for long text.
   No external fonts, scripts, images or trackers: everything lives in this file. */

:root {
  color-scheme: dark;

  /* Night sky */
  --night-1: #1A1247;
  --night-2: #2A1F6B;
  --night-3: #3A2D8C;
  --on-night: #FFF8EC;
  --on-night-muted: #CFC7F2;
  --line-night: rgba(255, 248, 236, 0.16);

  /* Lumi's glow */
  --glow: #FFD166;
  --glow-strong: #F6C445;

  /* Paper (long text) */
  --paper: #FFF8EC;
  --paper-edge: #E8D9BC;
  --tint-glow: #FFEFC2;
  --tint-violet: #EEEAFB;
  --ink: #241A5E;
  --ink-muted: #4F4585;
  --ink-heading: #3B2491;
  --link: #4B2DB0;

  --shadow: 0 14px 40px rgba(8, 4, 30, 0.45);
  --radius: 22px;
  --font-display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html {
  background-color: var(--night-1);
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--on-night);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

/* The night sky: fixed layers of gradient and stars behind everything. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background-color: var(--night-1);
  background-image:
    radial-gradient(1.4px 1.4px at 22px 34px, rgba(255, 248, 236, 0.9) 50%, transparent 100%),
    radial-gradient(1px 1px at 140px 96px, rgba(255, 248, 236, 0.7) 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 260px 180px, rgba(255, 248, 236, 0.8) 50%, transparent 100%),
    radial-gradient(1px 1px at 84px 220px, rgba(207, 199, 242, 0.85) 50%, transparent 100%),
    radial-gradient(1.6px 1.6px at 310px 40px, rgba(255, 209, 102, 0.8) 50%, transparent 100%),
    radial-gradient(900px 520px at 88% -8%, rgba(255, 209, 102, 0.14), transparent 70%),
    radial-gradient(760px 620px at -12% 108%, rgba(108, 84, 214, 0.38), transparent 70%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 100%);
  background-size: 170px 170px, 230px 230px, 330px 330px, 290px 290px, 410px 410px,
    100% 100%, 100% 100%, 100% 100%;
  background-repeat: repeat, repeat, repeat, repeat, repeat, no-repeat, no-repeat, no-repeat;
}
body::after {
  background-image:
    radial-gradient(1.8px 1.8px at 60px 120px, rgba(255, 248, 236, 0.95) 50%, transparent 100%),
    radial-gradient(2px 2px at 200px 60px, rgba(255, 209, 102, 0.9) 50%, transparent 100%);
  background-size: 380px 380px, 520px 520px;
  opacity: 0.6;
}

/* Links and focus */
a {
  color: var(--glow);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--glow);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  top: -200px;
  left: 16px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--glow);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }
.skip:focus-visible { outline-color: var(--on-night); }

/* Cream paper surfaces (cards, panels, legal text) */
.paper {
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.paper a { color: var(--link); }
.paper a:hover { color: var(--ink); }
.paper :focus-visible { outline-color: var(--link); }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 860px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(26, 18, 71, 0.94);
  border-bottom: 1px solid var(--line-night);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(26, 18, 71, 0.76);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    backdrop-filter: saturate(140%) blur(12px);
  }
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-night);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 209, 102, 0.45));
}
.brand b {
  color: var(--glow);
  font-weight: 800;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.65);
}
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--on-night);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}
.nav a:hover { background: rgba(255, 248, 236, 0.1); }
.nav a[aria-current="page"] { background: var(--glow); color: var(--ink); }

/* Hero */
.hero { padding: 56px 0 24px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 32px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--glow);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal;
  color: var(--glow);
  text-shadow: 0 0 26px rgba(255, 209, 102, 0.5);
}
.lead { margin: 0 0 16px; color: var(--on-night-muted); font-size: 1.18rem; }
.hero .meta { margin: 0 0 24px; color: var(--on-night-muted); }
.hero .meta strong { color: var(--on-night); }

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}
.hero-art::before {
  content: "";
  position: absolute;
  width: min(340px, 90%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.32) 0%, rgba(255, 209, 102, 0.08) 45%, transparent 70%);
}
.hero-art img {
  position: relative;
  width: min(260px, 72%);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(255, 209, 102, 0.35));
}
.firefly {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 10px 4px rgba(255, 209, 102, 0.55);
}
.firefly.f1 { top: 12%; left: 14%; }
.firefly.f2 { top: 24%; right: 10%; width: 6px; height: 6px; }
.firefly.f3 { bottom: 14%; left: 26%; width: 5px; height: 5px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  border: 2px solid var(--glow);
  border-radius: 999px;
  background: var(--glow);
  color: var(--ink);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.btn:hover {
  border-color: var(--glow-strong);
  background: var(--glow-strong);
  color: var(--ink);
  box-shadow: 0 0 24px rgba(255, 209, 102, 0.45);
}
.btn.ghost {
  border-color: rgba(255, 248, 236, 0.45);
  background: transparent;
  color: var(--on-night);
}
.btn.ghost:hover {
  border-color: var(--glow);
  background: rgba(255, 248, 236, 0.08);
  color: var(--on-night);
}
.btn:focus-visible { outline-color: var(--on-night); }

/* Sections and cards */
section.block { padding: 28px 0; }
h2.title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.1rem);
  letter-spacing: -0.01em;
}
.section-lead { margin: 0 0 22px; max-width: 62ch; color: var(--on-night-muted); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { padding: 24px; border-radius: var(--radius); }
.card h3 {
  margin: 14px 0 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.card p { margin: 0; color: var(--ink-muted); }
.icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--night-2);
  color: var(--glow);
  box-shadow: 0 0 0 4px var(--tint-glow);
}
.icon svg { width: 28px; height: 28px; }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.pills li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--line-night);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.07);
  font-weight: 600;
}
.pills li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 8px rgba(255, 209, 102, 0.85);
}
.prose-night p { max-width: 68ch; color: var(--on-night-muted); }

.panel { padding: 32px; border-radius: 28px; }
.panel h2.title { color: var(--ink); }
.panel h3 {
  margin: 24px 0 8px;
  color: var(--ink-heading);
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.panel p { margin: 0 0 12px; }
.paper .lead { color: var(--ink-muted); }
.promise-list { margin: 0 0 16px; padding-left: 1.2em; }
.promise-list li { margin: 8px 0; }
.promise-list li::marker { color: var(--ink-heading); }

/* Legal pages */
.legal-hero { padding: 40px 0 8px; }
.legal-hero h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.6vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.legal-hero h1 span { color: var(--on-night-muted); }
.legal-hero p { margin: 0; color: var(--on-night-muted); }
.lang-switch {
  display: inline-flex;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border: 1px solid var(--line-night);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.07);
}
.lang-switch a {
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--on-night);
  font-weight: 700;
  text-decoration: none;
}
.lang-switch a:hover { background: var(--glow); color: var(--ink); }

article.legal { margin: 24px 0; padding: 36px; border-radius: 28px; }
article.legal > header {
  margin-bottom: 8px;
  padding-bottom: 14px;
  border-bottom: 2px dashed var(--paper-edge);
}
article.legal > header h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.8rem;
}
article.legal > header p { margin: 4px 0 0; color: var(--ink-muted); }
article.legal h3 {
  margin: 34px 0 8px;
  color: var(--ink-heading);
  font-family: var(--font-display);
  font-size: 1.28rem;
}
article.legal h4 { margin: 22px 0 6px; color: var(--ink); font-size: 1.06rem; }
article.legal ul,
article.legal ol { padding-left: 1.3em; }
article.legal li { margin: 5px 0; }
article.legal li::marker { color: var(--ink-heading); }

.summary {
  margin: 20px 0;
  padding: 18px 22px;
  border-left: 6px solid var(--glow-strong);
  border-radius: 18px;
  background: var(--tint-glow);
}
article.legal .summary h3 { margin-top: 0; color: var(--ink); }
.summary ul { margin: 0; }

.toc {
  margin: 20px 0;
  padding: 14px 22px;
  border-radius: 18px;
  background: var(--tint-violet);
}
.toc summary {
  padding: 4px 0;
  color: var(--ink-heading);
  font-weight: 700;
  cursor: pointer;
}
.toc ol { margin: 10px 0 4px; columns: 2; column-gap: 28px; }
article.legal .toc li { margin: 0 0 6px; break-inside: avoid; }

.table-wrap {
  margin: 14px 0;
  overflow-x: auto;
  border: 1px solid var(--paper-edge);
  border-radius: 14px;
}
table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 0.95rem; }
th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--paper-edge);
  text-align: left;
  vertical-align: top;
}
th { background: var(--tint-violet); color: var(--ink); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }

.to-top { display: inline-block; margin-top: 24px; font-weight: 600; }

/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line-night);
  color: var(--on-night-muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* Gentle motion, only for people who have not asked for less */
@media (prefers-reduced-motion: no-preference) {
  body::after { animation: twinkle 5s ease-in-out infinite alternate; }
  .hero-art img { animation: float 7s ease-in-out infinite; }
  .firefly { animation: drift 6s ease-in-out infinite alternate; }
  .firefly.f2 { animation-delay: -2s; }
  .firefly.f3 { animation-delay: -4s; }
}
@keyframes twinkle {
  from { opacity: 0.25; }
  to { opacity: 0.9; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes drift {
  0% { transform: translate(0, 0); opacity: 0.55; }
  50% { opacity: 1; }
  100% { transform: translate(10px, -14px); opacity: 0.7; }
}

/* Responsive */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  html { scroll-padding-top: 12px; }
  body { font-size: 16px; }
  .site-header { position: static; }
  .brand { font-size: 1.25rem; }
  .nav a { padding: 8px 11px; }
  .hero { padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero-art { order: -1; min-height: 0; }
  .hero-art img { width: 150px; }
  .btn { flex: 1 1 100%; }
  .panel { padding: 22px 18px; border-radius: 22px; }
  article.legal { padding: 22px 18px; border-radius: 22px; }
  .summary,
  .toc { padding: 14px 16px; }
  .summary { border-left-width: 4px; }
  .toc ol { columns: 1; }
}

/* Windows high contrast and other forced-colour modes */
@media (forced-colors: active) {
  .paper,
  .pills li,
  .lang-switch,
  .summary,
  .toc { border: 1px solid CanvasText; }
  .btn { border-color: ButtonText; }
}

@media print {
  body::before,
  body::after,
  .skip,
  .site-header,
  .hero-art,
  .actions,
  .lang-switch,
  .toc,
  .to-top,
  .site-footer nav { display: none !important; }
  html,
  body { background: #fff; }
  body,
  body * {
    color: #000 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  article.legal,
  .panel { padding: 0; }
}
