/* Zodica website — cosmic dark theme.
   Palette, gradients and type mirror the Flutter app
   (lib/core/theme/). Headings: Cormorant Garamond (serif),
   body: Urbanist (sans). */

:root {
  /* Surfaces */
  --bg: #0b0b1a;
  --bg-alt: #12122a;
  --surface: #181833;
  --surface-high: #20203f;
  --card-border: rgba(255, 255, 255, 0.10);

  /* Brand accents */
  --primary: #8b7cff;
  --primary-dark: #5b4dd1;
  --secondary: #4fc3f7;
  --gold: #e9c46a;
  --cosmic: #b388ff;
  --relationship: #ff8fb1;
  --action: #7be0c0;

  /* Text */
  --text-primary: #f5f4ff;
  --text-secondary: #b9b7d4;
  --text-muted: #74738f;

  --maxw: 1100px;
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Urbanist', system-ui, -apple-system, sans-serif;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: var(--bg);
  /* Deep-space vertical gradient — mirrors AppGradients.background. */
  background-image: linear-gradient(
    to bottom,
    #14122e 0%,
    #0b0b1a 55%,
    #080812 100%
  );
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Aurora glow behind the hero — mirrors AppGradients.aurora. */
body::before {
  content: '';
  position: fixed;
  top: -20vh;
  left: 50%;
  transform: translateX(-50%);
  width: 120vw;
  height: 90vh;
  background: radial-gradient(
    ellipse at top,
    rgba(179, 136, 255, 0.33) 0%,
    rgba(179, 136, 255, 0) 60%
  );
  pointer-events: none;
  z-index: 0;
}

/* Starfield canvas layer (populated by js/stars.js). */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------- Typography ---------- */
h1, h2, h3, .wordmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.2px;
}

h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1rem; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--cosmic); }

.overline {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.muted { color: var(--text-muted); }
.lead {
  font-size: 1.18rem;
  color: var(--text-secondary);
  max-width: 56ch;
}

/* ---------- Brand lockup ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* The glowing cosmic orb (ZodicaAvatar in the app). */
.orb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: radial-gradient(
    circle at 35% 30%,
    var(--primary),
    var(--primary-dark)
  );
  box-shadow: 0 0 18px -2px rgba(139, 124, 255, 0.6);
  flex: none;
}
.orb::after {
  content: '\2726'; /* ✦ */
  font-size: 0.95rem;
  line-height: 1;
}
.orb.lg { width: 96px; height: 96px; box-shadow: 0 0 48px -4px rgba(139, 124, 255, 0.7); }
.orb.lg::after { font-size: 2.4rem; }

/* The app's splash icon used as the brand mark in the header/footer lockup.
   Hard-constrained and clipped so the artwork can't overflow its box. */
.brand-mark {
  width: 38px;
  height: 38px;
  max-width: 38px;
  max-height: 38px;
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
  flex: none;
  display: block;
  box-shadow: 0 0 18px -2px rgba(139, 124, 255, 0.6);
}

/* Header brand mark: a clean, capped 50×50 logo. */
.site-header .brand-mark {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
}

.wordmark {
  font-size: 1.7rem;
  letter-spacing: 1.5px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 11, 26, 0.55);
  border-bottom: 1px solid var(--card-border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--text-primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Urbanist', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 8px 28px -8px rgba(139, 124, 255, 0.65);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 34px -8px rgba(139, 124, 255, 0.8);
}
.btn-ghost {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--card-border);
}
.btn-ghost:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.09); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(60px, 12vh, 130px) 0 80px;
  text-align: center;
}
.hero .orb { margin: 0 auto 28px; }
.hero h1 { margin-bottom: 22px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--cosmic), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead { margin: 0 auto 36px; }
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Glass cards / sections ---------- */
section { padding: 70px 0; position: relative; z-index: 1; }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 50px; }
.section-head p { color: var(--text-secondary); }

.card {
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 124, 255, 0.4);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  background: rgba(139, 124, 255, 0.14);
  border: 1px solid rgba(139, 124, 255, 0.3);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-secondary); margin-bottom: 0; font-size: 0.96rem; }

/* ---------- CTA band ---------- */
.cta {
  text-align: center;
}
.cta-inner {
  background-image:
    radial-gradient(ellipse at top, rgba(179,136,255,0.18), rgba(179,136,255,0) 70%),
    linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 64px 28px;
}
.cta h2 { margin-bottom: 14px; }
.cta p { margin: 0 auto 28px; max-width: 48ch; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 44px 0;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); font-size: 0.92rem; font-weight: 600; }
.footer-links a:hover { color: var(--text-primary); }
.footer-copy { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- Legal / content pages ---------- */
.legal {
  padding-top: 60px;
  max-width: 800px;
}
.legal .overline { text-align: left; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 8px; }
.legal .updated { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 36px; }
.legal h2 {
  font-size: 1.6rem;
  margin: 38px 0 12px;
  color: var(--text-primary);
}
.legal h3 { font-size: 1.15rem; margin: 24px 0 8px; font-family: 'Urbanist', sans-serif; font-weight: 700; }
.legal p, .legal li { color: var(--text-secondary); }
.legal ul, .legal ol { margin: 0 0 1rem 1.3rem; }
.legal li { margin-bottom: 0.5rem; }
.legal a { text-decoration: underline; }
.legal .toc {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 36px;
}
.legal .toc ul { list-style: none; margin: 0; columns: 2; }
.legal .toc li { margin-bottom: 6px; }
.notice {
  background: rgba(233, 196, 106, 0.08);
  border: 1px solid rgba(233, 196, 106, 0.3);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav-links { gap: 16px; }
  .nav-links .nav-hide { display: none; }
  .legal .toc ul { columns: 1; }
  section { padding: 50px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
