@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Megrim&display=swap");

/* Terms and conditions: Traviux glass over the blue/cyan gradients. */
:root {
  color-scheme: dark;
  --bg: #061317;
  --ink: #e8f4f5;
  --muted: rgba(231, 244, 245, 0.7);
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.06);
  --cyan: #18d9da;
  --cyan-bright: #58f0ed;
  --blue: #1d6fe0;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eaf4f6;
  --ink: #0b2027;
  --muted: #47616a;
  --line: rgba(11, 32, 39, 0.12);
  --glass: rgba(255, 255, 255, 0.72);
  --cyan-bright: #0a8f96;
}

* { box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 90px; }

body.legal-page {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

.legal-glow {
  position: fixed;
  inset: -20vh -10vw auto;
  height: 70vh;
  background:
    radial-gradient(40% 60% at 20% 30%, rgba(29, 111, 224, 0.35), transparent 70%),
    radial-gradient(35% 50% at 80% 20%, rgba(24, 217, 218, 0.28), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}

.legal-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(16px, calc((100vw - 980px) / 2));
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.megrim { font-family: Megrim, cursive; font-size: 1.6rem; font-weight: 700; letter-spacing: 0.02em; }
.megrim .accent { color: var(--cyan-bright); text-shadow: 0 0 18px rgba(66, 238, 238, 0.6); }

.legal-back,
.legal-cta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 30px -12px rgba(24, 217, 218, 0.7);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.legal-back:hover,
.legal-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(24, 217, 218, 0.85); }

.legal-shell {
  position: relative;
  z-index: 1;
  width: min(980px, 100% - 32px);
  margin: 0 auto;
  padding: 48px 0 64px;
}

.legal-hero { animation: legalIn 520ms cubic-bezier(.2, .8, .2, 1) both; }

.legal-eyebrow {
  margin: 0 0 8px;
  color: var(--cyan-bright);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.1;
  background: linear-gradient(120deg, var(--ink) 30%, var(--cyan-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.legal-meta { margin: 12px 0 0; color: var(--muted); font-size: 0.9rem; }
.legal-lead { max-width: 760px; margin: 18px 0 0; font-size: 1.08rem; color: var(--muted); }

.legal-index,
.legal-section {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--glass);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 24px 60px -36px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.legal-index { margin: 32px 0 24px; padding: 20px 24px; animation: legalIn 520ms 80ms cubic-bezier(.2, .8, .2, 1) both; }
.legal-index p { margin: 0 0 8px; font-weight: 800; }
.legal-index ol { margin: 0; padding-left: 22px; columns: 2 260px; column-gap: 32px; }
.legal-index li { break-inside: avoid; }
.legal-index a { color: var(--muted); text-decoration: none; transition: color 160ms ease; }
.legal-index a:hover { color: var(--cyan-bright); }

.legal-body { display: grid; gap: 16px; }

.legal-section { padding: 24px 28px; animation: legalIn 520ms 140ms cubic-bezier(.2, .8, .2, 1) both; }
.legal-section:target { border-color: rgba(88, 240, 237, 0.6); box-shadow: 0 0 0 4px rgba(24, 217, 218, 0.12); }
.legal-section h2 { margin: 0 0 10px; font-size: 1.2rem; line-height: 1.35; }
.legal-section p,
.legal-section li { color: var(--muted); }
.legal-section p { margin: 0 0 12px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.legal-section strong { color: var(--ink); }
.legal-section a { color: var(--cyan-bright); font-weight: 700; overflow-wrap: anywhere; }

.legal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.88rem;
}

@keyframes legalIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .legal-section { padding: 20px 18px; }
  .legal-index { padding: 18px; }
  .legal-back { padding: 0 14px; font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .legal-hero, .legal-index, .legal-section { animation: none; }
  .legal-back, .legal-cta { transition: none; }
}
