/* Mystic Luna — Web design system, ported from app DESIGN.md */
:root {
  --surface: #16130b;
  --surface-dim: #110e07;
  --surface-low: #1f1b13;
  --surface-container: #231f17;
  --surface-high: #2d2a21;
  --on-surface: #eae1d4;
  --on-surface-variant: #d0c5af;
  --outline: #99907c;
  --outline-variant: #4d4635;
  --primary: #f2ca50;
  --primary-dim: #e9c349;
  --primary-container: #d4af37;
  --on-primary: #3c2f00;
  --secondary: #d9b9ff;
  --secondary-container: #5c348d;
  --tertiary: #afd1ff;
  --error: #ffb4ab;
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --container-margin: 24px;
  --section-gap: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--surface);
  color: var(--on-surface);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Celestial background — radial nebulas behind glass */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(92, 52, 141, 0.35), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 30%, rgba(212, 175, 55, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 90%, rgba(120, 183, 255, 0.18), transparent 60%);
  filter: blur(40px);
}
body::after {
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(234, 225, 212, 0.7), transparent),
    radial-gradient(1px 1px at 33% 72%, rgba(234, 225, 212, 0.5), transparent),
    radial-gradient(1px 1px at 58% 24%, rgba(234, 225, 212, 0.7), transparent),
    radial-gradient(1px 1px at 78% 62%, rgba(234, 225, 212, 0.45), transparent),
    radial-gradient(1px 1px at 92% 12%, rgba(234, 225, 212, 0.6), transparent),
    radial-gradient(1px 1px at 7% 88%, rgba(234, 225, 212, 0.55), transparent),
    radial-gradient(1px 1px at 45% 95%, rgba(234, 225, 212, 0.5), transparent),
    radial-gradient(1px 1px at 67% 8%, rgba(234, 225, 212, 0.4), transparent);
  opacity: 0.9;
}

main, header, footer, section { position: relative; z-index: 1; }

/* Typography */
h1, h2, h3, h4, .serif {
  font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  color: var(--on-surface);
  font-weight: 500;
}
h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
h2 { font-size: clamp(28px, 4vw, 36px); line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 20px; line-height: 28px; font-weight: 600; }

p { color: var(--on-surface-variant); }
p + p { margin-top: 16px; }
a { color: var(--primary); text-decoration: none; transition: opacity .2s ease; }
a:hover { opacity: 0.78; }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--primary);
  display: inline-block; margin-bottom: 16px;
}

/* Layout */
.wrap {
  max-width: 1120px; margin: 0 auto;
  padding: 0 var(--container-margin);
}
section { padding: var(--section-gap) 0; }

/* Header / Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: rgba(22, 19, 11, 0.55);
  border-bottom: 1px solid rgba(234, 225, 212, 0.08);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 16px var(--container-margin);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Newsreader', serif; font-size: 20px; font-weight: 600;
  color: var(--on-surface); letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--on-surface-variant); font-size: 14px; font-weight: 500;
}
.nav-links a:hover { color: var(--on-surface); opacity: 1; }
@media (max-width: 720px) {
  .nav-links { gap: 16px; }
  .nav-links a:not(.btn) { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius);
  font-family: 'Manrope', sans-serif; font-weight: 600; font-size: 14px;
  letter-spacing: 0.04em; cursor: pointer; border: none;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
  color: var(--on-primary);
  box-shadow: 0 0 0 1px rgba(242, 202, 80, 0.4), 0 10px 30px -10px rgba(242, 202, 80, 0.45);
}
.btn-primary:hover { transform: translateY(-1px); opacity: 1; }
.btn-ghost {
  background: rgba(234, 225, 212, 0.04);
  color: var(--on-surface);
  border: 1px solid rgba(242, 202, 80, 0.4);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: rgba(242, 202, 80, 0.08); opacity: 1; }

/* Glass card */
.glass {
  position: relative;
  background: rgba(234, 225, 212, 0.045);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid rgba(234, 225, 212, 0.08);
  box-shadow:
    inset 1px 1px 0 rgba(242, 202, 80, 0.12),
    inset -1px -1px 0 rgba(0, 0, 0, 0.35);
}
.glass::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(242, 202, 80, 0.25), transparent 40%, transparent 60%, rgba(217, 185, 255, 0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

/* Hero */
.hero { padding-top: 96px; padding-bottom: 64px; text-align: center; }
.hero h1 { max-width: 18ch; margin: 0 auto 24px; }
.hero h1 em { font-style: italic; color: var(--primary); font-weight: 500; }
.hero .lede { font-size: 18px; line-height: 28px; max-width: 56ch; margin: 0 auto 36px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Feature grid */
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(242, 202, 80, 0.22), rgba(217, 185, 255, 0.14));
  border: 1px solid rgba(242, 202, 80, 0.3);
  display: grid; place-items: center; margin-bottom: 16px;
  font-size: 22px;
}
.feature h3 { margin-bottom: 8px; }

/* Sections in legal/support */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin: 40px 0 16px; }
.prose h3 { margin: 24px 0 12px; }
.prose p, .prose li { color: var(--on-surface-variant); font-size: 16px; line-height: 26px; }
.prose ul { margin: 12px 0 16px 24px; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--on-surface); font-weight: 600; }
.prose .meta {
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 8px;
}

/* FAQ */
details.faq {
  border-top: 1px solid rgba(234, 225, 212, 0.08);
  padding: 20px 4px;
}
details.faq[open] summary { color: var(--primary); }
details.faq summary {
  cursor: pointer; font-weight: 600; font-size: 16px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
  color: var(--on-surface);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+'; font-family: 'Newsreader', serif; font-size: 22px; line-height: 1;
  color: var(--primary); transition: transform .2s ease;
}
details.faq[open] summary::after { content: '–'; }
details.faq p { margin-top: 12px; font-size: 15px; line-height: 25px; }

/* Footer */
footer {
  margin-top: var(--section-gap);
  border-top: 1px solid rgba(234, 225, 212, 0.08);
  padding: 40px 0 56px;
}
.foot-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 0 var(--container-margin);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  font-size: 13px; color: var(--on-surface-variant);
}
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { color: var(--on-surface-variant); }
.foot-links a:hover { color: var(--primary); opacity: 1; }

/* Contact form */
.form { display: grid; gap: 16px; }
.form label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-surface-variant); }
.form input, .form textarea {
  width: 100%; padding: 14px 16px; border-radius: var(--radius);
  background: rgba(17, 14, 7, 0.6); color: var(--on-surface);
  border: 1px solid rgba(234, 225, 212, 0.1);
  font-family: 'Manrope', sans-serif; font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form input:focus, .form textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(242, 202, 80, 0.18);
}
.form textarea { min-height: 140px; resize: vertical; }

/* Small bits */
.divider { height: 1px; background: rgba(234, 225, 212, 0.08); margin: 32px 0; border: 0; }
.tag {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: rgba(217, 185, 255, 0.14); color: var(--secondary);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
}
.center { text-align: center; }
