/* Ask the Stars — celestial dark navy & gold, mobile-first */

:root {
  --navy-950: #060a18;
  --navy-900: #0a1128;
  --navy-800: #101a3a;
  --navy-700: #1a2547;
  --navy-600: #26355f;
  --gold-400: #e8c766;
  --gold-500: #d4af37;
  --gold-600: #b8962a;
  --cream: #f6f1e5;
  --muted: #b9c0d4;
  --muted-dark: #8d94ab;
  --card: #111a38;
  --card-border: #26355f;
  --radius: 14px;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--navy-900);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h2 {
  font-size: 1.9rem;
  color: var(--gold-400);
}

a {
  color: var(--gold-400);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.container.narrow {
  max-width: 760px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold-500);
  color: var(--navy-950);
  padding: 8px 14px;
  z-index: 100;
  font-weight: 600;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 10, 24, 0.92);
  border-bottom: 1px solid var(--navy-600);
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

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

.brand-mark {
  color: var(--gold-500);
  font-size: 1.5rem;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
}

.site-nav a:hover {
  color: var(--cream);
  background: var(--navy-700);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 72px 0 64px;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(212, 175, 55, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 45% at 85% 20%, rgba(90, 110, 200, 0.25), transparent 60%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900));
}

.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 28%, #fff, transparent),
    radial-gradient(1px 1px at 28% 12%, #ffe9a8, transparent),
    radial-gradient(2px 2px at 44% 34%, #fff, transparent),
    radial-gradient(1px 1px at 61% 18%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 76% 30%, #ffe9a8, transparent),
    radial-gradient(1px 1px at 88% 14%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 20% 62%, #fff, transparent),
    radial-gradient(1px 1px at 38% 72%, #ffe9a8, transparent),
    radial-gradient(2px 2px at 55% 58%, #fff, transparent),
    radial-gradient(1px 1px at 70% 68%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 90% 60%, #ffe9a8, transparent),
    radial-gradient(1px 1px at 6% 48%, #fff, transparent);
  opacity: 0.8;
}

.hero-inner {
  position: relative;
}

.hero-eyebrow {
  margin: 0 0 12px;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  margin-bottom: 16px;
}

.hero-lede {
  max-width: 620px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

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

.hero-note {
  margin: 0;
  color: var(--muted-dark);
  font-size: 0.88rem;
}

/* Buttons */
.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-gold {
  background: var(--gold-500);
  color: var(--navy-950);
  border-color: var(--gold-500);
}

.button-gold:hover {
  background: var(--gold-400);
  border-color: var(--gold-400);
}

.button-outline {
  background: transparent;
  color: var(--cream);
  border-color: var(--navy-600);
}

.button-outline:hover {
  border-color: var(--gold-500);
  color: var(--gold-400);
}

.button-text {
  background: none;
  border: none;
  color: var(--muted);
  padding: 6px 0;
  text-decoration: underline;
  font-size: 0.88rem;
}

.button-text:hover {
  color: var(--cream);
  transform: none;
}

/* Sections */
.section {
  padding: 56px 0;
}

.section-alt {
  background: var(--navy-950);
  border-top: 1px solid var(--navy-800);
  border-bottom: 1px solid var(--navy-800);
}

.section-intro {
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 640px;
}

/* Horoscope cards */
.horoscope-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.horoscope-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px;
}

.horoscope-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.horoscope-card h3 {
  font-size: 1.15rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.horoscope-card .glyph {
  color: var(--gold-500);
  font-size: 1.3rem;
}

.horoscope-card .dates {
  color: var(--muted-dark);
  font-size: 0.8rem;
  white-space: nowrap;
}

.horoscope-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.horoscope-card .lucky {
  color: var(--gold-400);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Zodiac grid */
.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.zodiac-card {
  font: inherit;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--cream);
  padding: 18px 16px;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.zodiac-card:hover {
  border-color: var(--gold-500);
  transform: translateY(-2px);
}

.zodiac-card .glyph {
  display: block;
  font-size: 1.9rem;
  color: var(--gold-500);
  line-height: 1;
  margin-bottom: 10px;
}

.zodiac-card .sign-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.zodiac-card .sign-dates {
  display: block;
  color: var(--muted-dark);
  font-size: 0.82rem;
}

/* Form */
#question-form {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.field {
  margin-bottom: 14px;
}

.form-row .field {
  margin-bottom: 0;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.optional {
  font-weight: 400;
  color: var(--muted-dark);
  font-size: 0.82rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--cream);
  background: var(--navy-800);
  border: 1px solid var(--navy-600);
  border-radius: 10px;
  padding: 10px 12px;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-dark);
}

.field-error {
  color: #f0a8a8;
  font-size: 0.88rem;
  margin: 6px 0 0;
}

.form-note {
  color: var(--muted-dark);
  font-size: 0.85rem;
  margin: 14px 0 0;
}

.confirmation {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-600);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.confirmation p {
  margin: 0 0 6px;
}

.confirmation p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.my-questions h3 {
  font-size: 1.2rem;
  color: var(--gold-400);
}

.my-questions ul {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.my-questions li {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.92rem;
}

.my-questions .q-meta {
  color: var(--muted-dark);
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.my-questions .q-text {
  margin: 0;
  color: var(--cream);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--gold-500);
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}

.faq-item[open ] summary::after {
  content: "–";
}

.faq-item p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* Dialog */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 5, 12, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.dialog-backdrop[hidden] {
  display: none;
}

.dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--navy-800);
  border: 1px solid var(--gold-600);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  text-align: center;
}

.dialog-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.dialog-close:hover {
  color: var(--cream);
}

.dialog-glyph {
  font-size: 3rem;
  line-height: 1;
  color: var(--gold-500);
  margin: 0 0 8px;
}

.dialog h3 {
  font-size: 1.6rem;
  margin-bottom: 2px;
}

.dialog-dates {
  color: var(--muted-dark);
  margin: 0 0 18px;
  font-size: 0.9rem;
}

.dialog-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 18px;
  text-align: left;
}

.dialog-facts div {
  background: var(--navy-900);
  border: 1px solid var(--navy-600);
  border-radius: 10px;
  padding: 10px 12px;
}

.dialog-facts dt {
  color: var(--muted-dark);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.dialog-facts dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.dialog-reading {
  text-align: left;
  color: var(--muted);
  margin: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--navy-800);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0 0 8px;
}

.footer-small {
  color: var(--muted-dark);
  font-size: 0.85rem;
}

/* Wider screens */
@media (min-width: 640px) {
  .horoscope-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .zodiac-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .form-row:has(> :nth-child(3)) {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .horoscope-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .zodiac-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .section {
    padding: 72px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .zodiac-card {
    transition: none;
  }
}
