/* ============================================================
   Horoscopist — horoscopist.app template stylesheet
   Dark cosmic theme: starfield, indigo accents, glowing cards
   ============================================================ */

:root {
  --bg: #0a0a14;
  --bg-elevated: #11111f;
  --surface: #151527;
  --surface-2: #1b1b31;
  --border: #262641;
  --border-soft: #1f1f37;

  --text: #eef0ff;
  --text-muted: #9a9cb8;
  --text-faint: #6c6f8e;

  --accent: #8b8ef8;
  --accent-strong: #a5a7ff;
  --accent-soft: rgba(139, 142, 248, 0.14);
  --accent-glow: rgba(139, 142, 248, 0.45);
  --teal: #35d0c0;

  --radius: 14px;
  --radius-lg: 20px;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --shadow-card: 0 18px 50px -18px rgba(0, 0, 0, 0.7);
  --shadow-accent: 0 10px 40px -10px var(--accent-glow);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  /* Starfield: layered radial-gradient dots on a soft nebula haze */
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255,255,255,0.55) 45%, transparent 55%),
    radial-gradient(1px 1px at 78% 12%, rgba(255,255,255,0.35) 45%, transparent 55%),
    radial-gradient(1.4px 1.4px at 62% 42%, rgba(255,255,255,0.4) 45%, transparent 55%),
    radial-gradient(1px 1px at 32% 62%, rgba(255,255,255,0.3) 45%, transparent 55%),
    radial-gradient(1.2px 1.2px at 88% 68%, rgba(255,255,255,0.45) 45%, transparent 55%),
    radial-gradient(1px 1px at 8% 82%, rgba(255,255,255,0.35) 45%, transparent 55%),
    radial-gradient(1.2px 1.2px at 48% 88%, rgba(255,255,255,0.4) 45%, transparent 55%),
    radial-gradient(1px 1px at 92% 92%, rgba(255,255,255,0.3) 45%, transparent 55%),
    radial-gradient(1200px 700px at 70% -10%, rgba(90, 70, 180, 0.16), transparent 65%),
    radial-gradient(1000px 600px at 10% 10%, rgba(53, 208, 192, 0.05), transparent 60%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; }

.hero-title { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; }

.grad-text {
  background: linear-gradient(100deg, var(--accent-strong), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }

h3 { font-size: 1.1rem; margin-bottom: 8px; }

p { color: var(--text-muted); }

.eyebrow {
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 20, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #5a5fd8);
  color: #0a0a14;
  font-size: 1.2rem;
  box-shadow: var(--shadow-accent);
}

.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand-tag { font-size: 0.72rem; color: var(--text-faint); }

.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--text-muted); font-size: 0.92rem; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

.header-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(120deg, var(--accent), #6d72f0);
  color: #0b0b18;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { background: linear-gradient(120deg, var(--accent-strong), #7d82f5); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 15px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; text-align: center; }

.hero-inner { max-width: 780px; }

.hero-sub {
  margin: 20px auto 32px;
  max-width: 560px;
  font-size: 1.08rem;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }

.hero-card {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}

.hero-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.hero-card-head > div:not(.moon-dot) { min-width: 140px; flex: 1; }

.moon-dot {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.hero-card-label { color: var(--text-faint); font-size: 0.8rem; }
.hero-card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--text); }

.pill {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  background: rgba(53, 208, 192, 0.12);
  border: 1px solid rgba(53, 208, 192, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-card-body { font-size: 0.98rem; }

.hero-card-foot {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 0.82rem;
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt {
  background: rgba(17, 17, 31, 0.55);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-sub { margin-top: 10px; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 22px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: #34345c; }

.card-icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.grid-3 .card:nth-child(2) .card-icon { color: var(--teal); background: rgba(53, 208, 192, 0.12); }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}

.step-num {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #5a5fd8);
  color: #0a0a14;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 14px;
}

/* ---------- CTA ---------- */
.cta-section { text-align: center; }

.cta-inner {
  max-width: 640px;
  padding: 64px 40px;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(139, 142, 248, 0.14), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.cta-star { font-size: 2rem; color: var(--accent-strong); display: block; margin-bottom: 12px; }

.cta-inner .btn { margin-top: 26px; }

.cta-note { margin-top: 18px; font-size: 0.9rem; color: var(--text-faint); }

/* ---------- Page hero (legal / contact) ---------- */
.page-hero {
  padding: 72px 0 20px;
  text-align: center;
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page-meta { margin-top: 12px; color: var(--text-faint); font-size: 0.92rem; }

/* ---------- Legal pages ---------- */
.legal-body { padding-top: 32px; }
.legal-container {
  max-width: 760px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 52px);
  box-shadow: var(--shadow-card);
}

.lead { font-size: 1.02rem; color: var(--text); margin-bottom: 28px; }

.legal-container h2 {
  font-size: 1.25rem;
  margin: 34px 0 12px;
  padding-top: 26px;
  border-top: 1px solid var(--border-soft);
}
.legal-container h2:first-of-type { border-top: none; padding-top: 0; margin-top: 8px; }

.legal-container p { margin-bottom: 12px; }
.legal-container ul { margin: 0 0 12px 22px; }
.legal-container li { margin-bottom: 8px; color: var(--text-muted); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 26px;
  align-items: start;
}

.contact-aside { display: grid; gap: 22px; }

.contact-card h2, .contact-channels h2, .contact-faq h2 { font-size: 1.2rem; margin-bottom: 18px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }

.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; }

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }

.form-note { margin-top: 12px; font-size: 0.9rem; color: var(--teal); min-height: 1.2em; }
.form-note.error { color: #ff7d8a; }

.contact-channels .channel {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.contact-channels .channel:last-child { margin-bottom: 0; }

.card-icon-sm {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  flex-shrink: 0;
}

.contact-channels strong, .contact-faq strong { color: var(--text); }
.contact-faq p { margin-bottom: 14px; }
.contact-faq p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 48px 0 36px;
  background: rgba(8, 8, 16, 0.6);
}

.footer-inner { text-align: center; }

.footer-brand .brand-name { font-size: 1.05rem; }
.footer-tag { color: var(--text-faint); font-size: 0.85rem; margin-bottom: 18px; }

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.footer-nav a { color: var(--text-muted); font-size: 0.88rem; }
.footer-nav a:hover { color: var(--text); text-decoration: none; }

.footer-copy { color: var(--text-faint); font-size: 0.8rem; }

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .grid-3, .steps { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { padding: 60px 0 56px; }

  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 8px 0; font-size: 1rem; }
  .header-inner { position: relative; }
}
