/* === MoodShapes — shared site styles === */

:root {
  --lavender: #B7A3E0;
  --lavender-soft: #D9CCF0;
  --lavender-deep: #6B4FB3;
  --bg-0: #0E0A1F;
  --bg-1: #1A1338;
  --bg-2: #2A1F58;
  --bg-3: #3A2B72;
  --ink: #F5EFFF;
  --ink-dim: #B9AFD0;
  --ink-low: #7A6F95;
  --card: rgba(28, 20, 56, 0.55);
  --card-border: rgba(183, 163, 224, 0.18);

  --mood-awesome: #6FCB7A;
  --mood-good:    #5C84D6;
  --mood-normal:  #E9C44B;
  --mood-bad:     #E0823F;
  --mood-awful:   #C16A5E;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Background */
.bg {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(60vw 60vw at 18% 8%, rgba(140, 108, 196, 0.55), transparent 60%),
    radial-gradient(70vw 70vw at 92% 18%, rgba(91, 132, 214, 0.32), transparent 65%),
    radial-gradient(80vw 80vw at 50% 95%, rgba(184, 157, 222, 0.18), transparent 70%),
    linear-gradient(180deg, #15102e 0%, #0c0820 50%, #0a0719 100%);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Layout */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.container.narrow { max-width: 920px; }

/* Nav */
header.site-header { position: relative; z-index: 50; }
nav.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 0; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
.brand img {
  width: 40px; height: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(140, 108, 196, 0.5);
}
.brand-name {
  font-family: "Fraunces", serif;
  font-weight: 600; font-size: 22px; letter-spacing: -0.01em;
}
.nav-links {
  display: flex; gap: 28px;
  font-size: 14px; color: var(--ink-dim);
}
.nav-links a { color: inherit; text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-current { color: var(--ink); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--ink); color: var(--bg-0);
  font-weight: 700; font-size: 14px;
  border-radius: 999px; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(245, 239, 255, 0.2); }
.nav-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-dim); font-size: 14px; text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background .2s, color .2s;
}
.nav-back:hover { background: rgba(255,255,255,0.06); color: var(--ink); }
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* App Store badge */
.app-store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px 12px 18px;
  background: #000; color: #fff;
  border-radius: 14px; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.18);
  transition: transform .2s, box-shadow .2s;
}
.app-store-badge:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.5); }
.app-store-badge .apple { width: 30px; height: 30px; }
.app-store-badge .label small {
  display: block; font-size: 11px; opacity: 0.75; line-height: 1; letter-spacing: 0.02em;
}
.app-store-badge .label strong {
  display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px;
}

/* Type kickers + accents */
.kicker {
  font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--lavender); font-weight: 700;
  margin-bottom: 16px;
}
.gradient-em {
  font-style: italic;
  background: linear-gradient(120deg, #d9c5f5, #ffd0c2 50%, #b6e1bf);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  display: inline-block;
  padding: 0.12em 0.18em 0.22em 0.06em;
  margin-right: -0.12em;
  line-height: 1.1;
  overflow: visible;
}

/* Footer */
footer.site-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 32px 0 48px;
  color: var(--ink-low); font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
footer.site-footer a { color: var(--ink-dim); text-decoration: none; margin-left: 20px; }
footer.site-footer a:hover { color: var(--ink); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; }
}

/* === Legal page (privacy / EULA) === */
.legal-header {
  padding: 60px 0 40px;
  text-align: center; position: relative;
}
.header-shapes {
  display: flex; justify-content: center; align-items: center;
  gap: 12px; margin-bottom: 32px; height: 80px;
}
.header-shapes img {
  width: 64px; height: 64px; object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
  animation: bob 4s ease-in-out infinite;
}
.header-shapes img:nth-child(1) { animation-delay: 0s;  transform: rotate(-12deg); }
.header-shapes img:nth-child(2) { animation-delay: .2s; transform: rotate(-6deg); }
.header-shapes img:nth-child(3) { animation-delay: .4s; transform: rotate(0deg); }
.header-shapes img:nth-child(4) { animation-delay: .6s; transform: rotate(6deg); }
.header-shapes img:nth-child(5) { animation-delay: .8s; transform: rotate(12deg); }
@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.legal-header h1 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: clamp(48px, 7vw, 84px);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 18px;
  padding-bottom: 0.08em;
  text-wrap: balance;
}
.legal-header .lede {
  font-size: 19px; color: var(--ink-dim);
  max-width: 640px; margin: 0 auto 16px;
  text-wrap: pretty;
}
.legal-header .meta {
  font-size: 13px; color: var(--ink-low);
  letter-spacing: 0.04em;
}

/* TL;DR strip (3 highlight chips) */
.tldr {
  margin: 56px 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.tldr-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 28px 24px; text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.tldr-card .num {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 44px; line-height: 1; letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.tldr-card.green .num { color: var(--mood-awesome); }
.tldr-card.blue  .num { color: var(--mood-good); }
.tldr-card.lav   .num { color: var(--lavender-soft); }
.tldr-card .lab { color: var(--ink-dim); font-size: 14px; }
@media (max-width: 720px) {
  .tldr { grid-template-columns: 1fr; }
}

/* TOC */
.toc {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 24px 28px;
  margin-bottom: 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.toc-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--lavender); font-weight: 700; margin-bottom: 14px;
}
.toc ol {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 6px 28px;
  counter-reset: toc;
}
.toc li {
  counter-increment: toc;
  font-size: 14px;
}
.toc li::before {
  content: counter(toc) ". ";
  color: var(--ink-low);
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}
.toc a {
  color: var(--ink-dim); text-decoration: none;
  transition: color .15s;
}
.toc a:hover { color: var(--ink); }
@media (max-width: 720px) {
  .toc ol { grid-template-columns: 1fr; }
}

/* Policy / EULA article */
article.policy {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 56px clamp(28px, 5vw, 64px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 80px;
  line-height: 1.65;
}
article.policy h2 {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 26px; letter-spacing: -0.01em;
  line-height: 1.2; margin: 0 0 16px;
  text-wrap: balance;
  scroll-margin-top: 24px;
}
article.policy h3 {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 19px; letter-spacing: -0.005em;
  margin: 28px 0 10px;
  color: var(--ink);
}
article.policy section + section {
  margin-top: 36px; padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
article.policy p,
article.policy li {
  color: var(--ink-dim);
  font-size: 16px;
}
article.policy p { margin: 0 0 14px; }
article.policy ul,
article.policy ol {
  margin: 0 0 16px; padding-left: 22px;
}
article.policy li { margin-bottom: 8px; }
article.policy li::marker { color: var(--ink-low); }
article.policy strong { color: var(--ink); font-weight: 600; }
article.policy em { color: var(--lavender-soft); font-style: italic; }
article.policy a {
  color: var(--lavender-soft);
  text-decoration: underline;
  text-decoration-color: rgba(217, 204, 240, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
  word-break: break-word;
}
article.policy a:hover { text-decoration-color: var(--lavender-soft); }
article.policy code {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 1px 6px;
  background: rgba(183, 163, 224, 0.1);
  border: 1px solid rgba(183, 163, 224, 0.18);
  border-radius: 6px;
  color: var(--lavender-soft);
  word-break: break-word;
}
article.policy hr {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 36px 0;
}

/* Callout (replaces > blockquotes from MD) */
article.policy .callout {
  background: rgba(140, 108, 196, 0.08);
  border: 1px solid rgba(183, 163, 224, 0.22);
  border-left: 3px solid var(--lavender);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 0 0 20px;
  color: var(--ink);
}
article.policy .callout p { color: var(--ink); }
article.policy .callout p:last-child { margin-bottom: 0; }
article.policy .callout.warn {
  background: rgba(224, 130, 63, 0.08);
  border-color: rgba(224, 130, 63, 0.32);
  border-left-color: var(--mood-bad);
}
article.policy .callout.danger {
  background: rgba(193, 106, 94, 0.1);
  border-color: rgba(193, 106, 94, 0.32);
  border-left-color: var(--mood-awful);
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 18px; }
article.policy table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
}
article.policy th,
article.policy td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.04);
  color: var(--ink-dim);
}
article.policy th {
  background: rgba(183, 163, 224, 0.08);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.01em;
}
article.policy tr:last-child td { border-bottom: none; }
article.policy td:last-child,
article.policy th:last-child { border-right: none; }

/* Section tag (small uppercase label above each h2) */
.section-tag {
  display: inline-block;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--lavender);
  margin-bottom: 8px; font-weight: 700;
}

/* Contact card */
.contact-card {
  margin-top: 24px;
  padding: 22px 24px;
  background: rgba(140, 108, 196, 0.1);
  border: 1px solid rgba(183, 163, 224, 0.22);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.contact-card .label {
  font-size: 13px; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.contact-card .email {
  font-family: "Fraunces", serif;
  font-size: 22px; color: var(--ink);
  word-break: break-all;
}
.contact-card a.email-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--ink); color: var(--bg-0);
  border-radius: 999px; text-decoration: none;
  font-size: 14px; font-weight: 600;
  transition: transform .2s;
}
.contact-card a.email-cta:hover { transform: translateY(-1px); }

/* Cross-link card between privacy/EULA */
.legal-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 56px;
}
.legal-pair a {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .2s, border-color .2s, background .2s;
}
.legal-pair a:hover {
  transform: translateY(-2px);
  border-color: rgba(183, 163, 224, 0.4);
  background: rgba(40, 28, 78, 0.6);
}
.legal-pair .pair-tag {
  font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--lavender);
  font-weight: 700;
}
.legal-pair .pair-title {
  font-family: "Fraunces", serif;
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
}
.legal-pair .pair-desc {
  color: var(--ink-dim); font-size: 14px;
}
@media (max-width: 720px) {
  .legal-pair { grid-template-columns: 1fr; }
}
