/* =========================================================================
   Daily Horoscope — style.css
   Global design system used on every page.

   Contents
   1.  Design tokens (light + dark theme)
   2.  Reset & base elements
   3.  Typography & utilities
   4.  Layout (container, sections, grids)
   5.  Components: icons, buttons, badges, cards, forms, accordion,
       tabs, modal, toast, callouts
   6.  Header, mega menu & mobile off-canvas navigation
   7.  Hero (homepage)
   8.  Homepage sections
   9.  Footer & back-to-top
   10. Animations, reveal-on-scroll, reduced motion, print

   Mobile-first. Breakpoints: 576px, 768px, 992px, 1200px.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Typography */
  --font-display: "Cinzel", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-h1: clamp(2.1rem, 1.35rem + 3.6vw, 4rem);
  --fs-h2: clamp(1.6rem, 1.2rem + 1.8vw, 2.5rem);
  --fs-h3: clamp(1.12rem, 1.04rem + .4vw, 1.35rem);
  --lh-tight: 1.15;
  --lh-body: 1.7;

  /* Spacing scale */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --space-9: 4rem;
  --space-10: 6rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --t-fast: .18s;
  --t-base: .3s;
  --t-slow: .6s;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 72px;
  --header-h-scrolled: 60px;

  /* Colors — light theme */
  --c-bg: #f8f5ff;
  --c-bg-alt: #f0eafd;
  --c-surface: #ffffff;
  --c-surface-2: #f3eeff;
  --c-input-bg: #ffffff;
  --c-glass: rgba(250, 247, 255, .8);
  --c-glass-strong: rgba(255, 255, 255, .96);
  --c-border: rgba(76, 29, 149, .12);
  --c-border-strong: rgba(76, 29, 149, .28);
  --c-text: #231a47;
  --c-text-muted: #564c78;
  --c-heading: #1a1140;
  --c-primary: #6d28d9;
  --c-primary-hover: #5b21b6;
  --c-primary-soft: rgba(109, 40, 217, .09);
  --c-accent: #a21caf;
  --c-gold: #855600;
  --c-gold-bright: #c9952f;
  --c-gold-soft: rgba(201, 149, 47, .16);
  --c-success: #047857;
  --c-error: #b42318;
  --c-warning: #8a4b00;
  --c-on-primary: #ffffff;
  --c-focus: #6d28d9;
  --c-overlay: rgba(20, 12, 50, .45);

  /* Category accents */
  --c-cat-zodiac: #a16207;
  --c-cat-love: #be185d;
  --c-cat-numerology: #0f766e;
  --c-cat-vedic: #c2410c;
  --c-cat-tarot: #6d28d9;
  --c-cat-cosmic: #1d4ed8;

  /* Element accents */
  --c-fire: #c2410c;
  --c-earth: #15803d;
  --c-air: #0369a1;
  --c-water: #1d4ed8;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #6d28d9 0%, #a21caf 100%);
  --grad-gold: linear-gradient(135deg, #f8dc9b 0%, #d9a744 50%, #b9832b 100%);
  --grad-text: linear-gradient(100deg, #4c1d95 0%, #9d174d 28%, #855600 50%, #9d174d 72%, #4c1d95 100%);
  --hero-bg:
    radial-gradient(120% 80% at 12% 0%, rgba(167, 139, 250, .38) 0%, transparent 55%),
    radial-gradient(90% 70% at 92% 18%, rgba(244, 114, 182, .2) 0%, transparent 60%),
    linear-gradient(180deg, #ebe2ff 0%, #f5f0ff 62%, var(--c-bg) 100%);

  /* Hero canvas / wheel colors (read by hero.js) */
  --star-rgb: 109, 40, 217;
  --shooting-rgb: 185, 131, 43;
  --wheel-stroke: rgba(109, 40, 217, .26);
  --wheel-glyph: #9a6a12;

  /* Shadows & glows */
  --shadow-sm: 0 1px 2px rgba(35, 26, 71, .05), 0 3px 10px rgba(35, 26, 71, .05);
  --shadow-md: 0 10px 30px rgba(35, 26, 71, .08);
  --shadow-lg: 0 24px 60px rgba(35, 26, 71, .16);
  --glow-primary: 0 0 0 1px rgba(109, 40, 217, .18), 0 14px 34px rgba(109, 40, 217, .16);
  --glow-gold: 0 0 0 1px rgba(201, 149, 47, .35), 0 14px 34px rgba(201, 149, 47, .18);
}

[data-theme="dark"] {
  color-scheme: dark;

  --c-bg: #0b0a1f;
  --c-bg-alt: #100d2a;
  --c-surface: #161236;
  --c-surface-2: #1e1947;
  --c-input-bg: rgba(255, 255, 255, .04);
  --c-glass: rgba(13, 11, 36, .74);
  --c-glass-strong: rgba(17, 14, 44, .96);
  --c-border: rgba(180, 160, 255, .14);
  --c-border-strong: rgba(180, 160, 255, .3);
  --c-text: #ebe7ff;
  --c-text-muted: #b3acd6;
  --c-heading: #ffffff;
  --c-primary: #b9a2ff;
  --c-primary-hover: #d2c4ff;
  --c-primary-soft: rgba(167, 139, 250, .14);
  --c-accent: #f0abfc;
  --c-gold: #f2c86b;
  --c-gold-bright: #f2c86b;
  --c-gold-soft: rgba(242, 200, 107, .13);
  --c-success: #6ee7b7;
  --c-error: #fda4a4;
  --c-warning: #fcd34d;
  --c-focus: #f2c86b;
  --c-overlay: rgba(3, 2, 12, .66);

  --c-cat-zodiac: #f2c86b;
  --c-cat-love: #f9a8d4;
  --c-cat-numerology: #5eead4;
  --c-cat-vedic: #fdba74;
  --c-cat-tarot: #c4b5fd;
  --c-cat-cosmic: #93c5fd;

  --c-fire: #fdba74;
  --c-earth: #86efac;
  --c-air: #7dd3fc;
  --c-water: #a5b4fc;

  --grad-text: linear-gradient(100deg, #f8dc9b 0%, #f5d0fe 28%, #c4b5fd 50%, #f5d0fe 72%, #f8dc9b 100%);
  --hero-bg:
    radial-gradient(120% 80% at 12% 0%, rgba(124, 58, 237, .38) 0%, transparent 55%),
    radial-gradient(90% 70% at 92% 25%, rgba(192, 38, 211, .22) 0%, transparent 60%),
    linear-gradient(180deg, #06051a 0%, #0d0a2b 62%, var(--c-bg) 100%);

  --star-rgb: 255, 249, 235;
  --shooting-rgb: 242, 200, 107;
  --wheel-stroke: rgba(242, 200, 107, .26);
  --wheel-glyph: #f2c86b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .22);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .5);
  --glow-primary: 0 0 0 1px rgba(185, 162, 255, .3), 0 14px 40px rgba(124, 58, 237, .32);
  --glow-gold: 0 0 0 1px rgba(242, 200, 107, .35), 0 14px 40px rgba(242, 200, 107, .16);
}

/* -------------------------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  min-height: 100vh;
  padding-top: var(--header-h);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--c-text);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Smooth colour transition only while the theme is being switched */
.theme-anim,
.theme-anim *,
.theme-anim *::before,
.theme-anim *::after {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease, fill .45s ease, stroke .45s ease, box-shadow .45s ease !important;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

a {
  color: var(--c-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  transition: color var(--t-fast);
}
a:hover { color: var(--c-primary-hover); }

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 6px;
}
main:focus { outline: none; }

::selection { background: rgba(167, 139, 250, .35); color: inherit; }

/* Inline SVG sprite holder: kept in the DOM (not display:none) so gradients work */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* -------------------------------------------------------------------------
   3. TYPOGRAPHY & UTILITIES
   ------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--c-heading);
  line-height: var(--lh-tight);
  font-weight: 700;
}
h1, h2 { font-family: var(--font-display); letter-spacing: .01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 650; }
h4 { font-size: 1.05rem; font-weight: 600; }

.lead { font-size: var(--fs-md); color: var(--c-text-muted); }
.text-muted { color: var(--c-text-muted); }
.text-gold { color: var(--c-gold); }
.text-center { text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: var(--space-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.gradient-text,
.shimmer-text {
  background: var(--grad-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.shimmer-text { animation: shimmer 9s linear infinite; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: .75rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--c-primary);
  color: var(--c-on-primary);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--t-base) var(--ease-out);
}
[data-theme="dark"] .skip-link { color: #160d33; }
.skip-link:focus { transform: none; color: var(--c-on-primary); }
[data-theme="dark"] .skip-link:focus { color: #160d33; }

/* Stretched link: makes a whole card clickable while keeping one link */
.stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

/* Prose (long-form educational content) */
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2.75rem; }
.prose h3 { margin-top: 2rem; }
.prose h2 + *, .prose h3 + * { margin-top: .75rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .4rem; }
.prose li::marker { color: var(--c-gold-bright); }
.prose strong { color: var(--c-heading); font-weight: 600; }
.prose a { font-weight: 500; text-decoration: underline; text-decoration-color: rgba(167, 139, 250, .5); }
.prose a:hover { text-decoration-color: currentColor; }

/* -------------------------------------------------------------------------
   4. LAYOUT
   ------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: 860px; }

.section { position: relative; padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-alt { background: var(--c-bg-alt); }
.section-head {
  max-width: 720px;
  margin: 0 auto var(--space-7);
  text-align: center;
}
.section-head h2 + .lead { margin-top: var(--space-3); }

.grid { display: grid; gap: var(--space-5); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

@media (min-width: 576px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* -------------------------------------------------------------------------
   5. COMPONENTS
   ------------------------------------------------------------------------- */

/* ---- Icons (stroke icons from the inline sprite) ---- */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 1em; height: 1em; }
.icon-lg { width: 1.75rem; height: 1.75rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  color: var(--c-text);
  transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.icon-btn:hover { background: var(--c-primary-soft); color: var(--c-primary); }

/* ---- Buttons ---- */
.btn {
  --spinner-c: #fff;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 46px;
  padding: .75rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .01em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-base), background-color var(--t-base), color var(--t-base), border-color var(--t-base);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }

.btn-primary {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 8px 22px rgba(109, 40, 217, .32);
}
.btn-primary:hover { color: #fff; box-shadow: 0 12px 30px rgba(162, 28, 175, .38); }

.btn-gold {
  --spinner-c: #2a1a00;
  color: #2a1a00;
  background: var(--grad-gold);
  box-shadow: 0 8px 22px rgba(201, 149, 47, .28);
}
.btn-gold:hover { color: #2a1a00; box-shadow: 0 12px 30px rgba(201, 149, 47, .38); }

.btn-secondary {
  --spinner-c: var(--c-primary);
  color: var(--c-primary);
  border-color: currentColor;
  background: transparent;
}
.btn-secondary:hover { color: var(--c-primary); background: var(--c-primary-soft); }

.btn-ghost {
  --spinner-c: var(--c-text);
  color: var(--c-text);
  background: transparent;
}
.btn-ghost:hover { color: var(--c-primary); background: var(--c-primary-soft); }

.btn-sm { min-height: 44px; padding: .5rem 1rem; font-size: var(--fs-xs); }
.btn-lg { min-height: 54px; padding: .9rem 1.9rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn[disabled],
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Loading state: keeps width, hides label, shows spinner */
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--spinner-c);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* Ripple (added by main.js) */
.ripple {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: currentColor;
  opacity: .22;
  transform: scale(0);
  pointer-events: none;
  animation: ripple .65s var(--ease-out) forwards;
}

/* ---- Badges ---- */
.badge {
  --badge-c: var(--c-primary);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .65rem;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.5;
  color: var(--badge-c);
  background: color-mix(in srgb, var(--badge-c) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--badge-c) 25%, transparent);
}
.badge-gold { --badge-c: var(--c-gold); }
.badge-fire, [data-element="fire"] .badge { --badge-c: var(--c-fire); }
.badge-earth, [data-element="earth"] .badge { --badge-c: var(--c-earth); }
.badge-air, [data-element="air"] .badge { --badge-c: var(--c-air); }
.badge-water, [data-element="water"] .badge { --badge-c: var(--c-water); }

/* ---- Cards ---- */
.card {
  position: relative;
  padding: var(--space-5);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base), border-color var(--t-base);
}
.card-glow:hover { transform: translateY(-4px); border-color: var(--c-border-strong); box-shadow: var(--glow-primary); }

.glass {
  background: var(--c-glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--c-border);
}

/* ---- Forms (shared by homepage, contact and tool pages) ---- */
.form-group { display: grid; gap: .45rem; }
.label { font-size: var(--fs-sm); font-weight: 600; color: var(--c-heading); }
.label .optional { font-weight: 400; color: var(--c-text-muted); }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: .7rem 1rem;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--radius-md);
  background-color: var(--c-input-bg);
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color var(--t-fast), box-shadow var(--t-base), background-color var(--t-fast);
}
.input::placeholder,
.textarea::placeholder { color: var(--c-text-muted); opacity: .8; }
.input:hover,
.select:hover,
.textarea:hover { border-color: var(--c-primary); }
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px var(--c-primary-soft), 0 0 22px rgba(167, 139, 250, .25);
}
.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] { border-color: var(--c-error); }
.input[aria-invalid="true"]:focus,
.select[aria-invalid="true"]:focus,
.textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-error) 18%, transparent); }

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

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b7fc7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 18px;
}
.select option { color: #231a47; background: #fff; }

input[type="date"].input,
input[type="time"].input { min-width: 0; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .75; }

.field-hint { font-size: var(--fs-xs); color: var(--c-text-muted); }
.field-error {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-error);
  animation: shake .35s var(--ease-out);
}
.field-error::before { content: "⚠"; font-size: .9em; }

/* ---- Accordion ---- */
.accordion { display: grid; gap: .75rem; }
.accordion-item {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.accordion-item.is-open { border-color: var(--c-border-strong); box-shadow: var(--shadow-sm); }
.accordion-item h3,
.accordion-item h4 { margin: 0; font-size: 1rem; }
.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 56px;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--c-heading);
  border-radius: inherit;
}
.accordion-trigger:hover { color: var(--c-primary); }
.accordion-trigger .icon {
  color: var(--c-gold-bright);
  transition: transform var(--t-base) var(--ease-out);
}
.accordion-item.is-open .accordion-trigger .icon { transform: rotate(180deg); }
.accordion-content { padding: 0 1.25rem 1.25rem; color: var(--c-text-muted); }
.accordion-content > * + * { margin-top: .75rem; }

/* Collapsing only applies when JS is running (content stays readable without JS) */
.js .accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows var(--t-base) var(--ease-out), visibility var(--t-base);
}
.js .accordion-panel > .accordion-content { overflow: hidden; min-height: 0; }
.js .accordion-item.is-open .accordion-panel { grid-template-rows: 1fr; visibility: visible; }

/* ---- Tabs ---- */
.tab-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .35rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  background: var(--c-surface-2);
}
.tab {
  min-height: 44px;
  padding: .55rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text-muted);
  transition: background-color var(--t-base), color var(--t-base), box-shadow var(--t-base);
}
.tab:hover { color: var(--c-primary); }
.tab[aria-selected="true"] {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 6px 16px rgba(109, 40, 217, .3);
}
.tab-panel { animation: fadeUp .45s var(--ease-out); }

/* ---- Modal (native <dialog>) ---- */
.modal {
  width: min(92vw, 560px);
  max-height: 88vh;
  padding: 0;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-xl);
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--shadow-lg);
}
.modal[open] { animation: popIn .35s var(--ease-out); }
.modal::backdrop {
  background: var(--c-overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0 1.5rem;
}
.modal-header h2 { font-size: 1.35rem; }
.modal-body { padding: 1rem 1.5rem 1.5rem; }

/* ---- Toast ---- */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 900;
  display: grid;
  gap: .5rem;
  width: min(92vw, 420px);
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.1rem;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-md);
  background: var(--c-glass-strong);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text);
  opacity: 0;
  transform: translateY(14px) scale(.98);
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.toast::before {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--c-primary);
}
.toast-success::before { background: var(--c-success); }
.toast-error::before { background: var(--c-error); }
.toast.is-shown { opacity: 1; transform: none; }

/* ---- Callouts ---- */
.callout {
  display: flex;
  gap: .85rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-primary);
  border-radius: var(--radius-md);
  background: var(--c-primary-soft);
  font-size: var(--fs-sm);
}
.callout .icon { margin-top: .15rem; color: var(--c-primary); }
.callout-gold { border-left-color: var(--c-gold-bright); background: var(--c-gold-soft); }
.callout-gold .icon { color: var(--c-gold); }

/* -------------------------------------------------------------------------
   6. HEADER & NAVIGATION
   ------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}
/* Glass background lives on a pseudo-element so the header itself never
   becomes a containing block for the fixed mobile menu */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-bottom: 1px solid transparent;
  transition: background-color var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.site-header.is-scrolled::before,
.site-header.mega-open::before {
  background: var(--c-glass);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: var(--c-border);
  box-shadow: 0 6px 24px rgba(10, 6, 30, .08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
  transition: height var(--t-base) var(--ease-out);
}
.site-header.is-scrolled .header-inner { height: var(--header-h-scrolled); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 44px;
  color: var(--c-heading);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { color: var(--c-heading); }
.brand-mark {
  width: 36px;
  height: 36px;
  transition: transform var(--t-slow) var(--ease-out);
}
.brand:hover .brand-mark { transform: rotate(-18deg) scale(1.06); }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.nav-list { list-style: none; padding: 0; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 44px;
  padding: .55rem 1rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.nav-link:hover,
.nav-link.is-active,
.nav-link[aria-current="page"] { color: var(--c-primary); background: var(--c-primary-soft); }
.mega-toggle .chev { transition: transform var(--t-base) var(--ease-out); }
.has-mega.is-open .mega-toggle .chev { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }

/* Theme toggle (icon button) */
.theme-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  color: var(--c-gold);
  background: var(--c-surface);
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-base), background-color var(--t-fast);
}
.theme-toggle:hover { border-color: var(--c-border-strong); box-shadow: var(--glow-gold); }
.theme-toggle .icon {
  position: absolute;
  inset: 0;
  margin: auto;
  transition: transform .55s var(--ease-out), opacity .35s ease;
}
.theme-toggle .icon-sun { opacity: 0; transform: rotate(-120deg) scale(.4); }
.theme-toggle .icon-moon { opacity: 1; transform: none; }
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: none; }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(120deg) scale(.4); }

/* Theme switch (inside mobile menu) */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-height: 44px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text);
}
.theme-switch-track {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border-strong);
  transition: background-color var(--t-base);
}
.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grad-gold);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease-out);
}
.theme-switch[aria-pressed="true"] .theme-switch-track { background: var(--c-primary-soft); }
.theme-switch[aria-pressed="true"] .theme-switch-thumb { transform: translateX(22px); }

/* Mega menu – shared */
.mega-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.mega-title {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.mega-all {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 44px;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
}
.mega-grid { display: grid; }
.mega-cat {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  font-size: var(--fs-sm);
  font-weight: 700;
  text-align: left;
  color: var(--c-heading);
}
.mega-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  color: var(--cat-c);
  background: color-mix(in srgb, var(--cat-c) 14%, transparent);
}
.mega-cat .chev { margin-left: auto; color: var(--c-text-muted); transition: transform var(--t-base) var(--ease-out); }
.mega-links { list-style: none; padding: 0; }
.mega-links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: .35rem .6rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color var(--t-fast), background-color var(--t-fast), transform var(--t-fast);
}
.mega-links a:hover,
.mega-links a[aria-current="page"] { color: var(--c-primary); background: var(--c-primary-soft); }
.mega-links a[aria-current="page"] { font-weight: 600; }

[data-cat="zodiac"] { --cat-c: var(--c-cat-zodiac); }
[data-cat="love"] { --cat-c: var(--c-cat-love); }
[data-cat="numerology"] { --cat-c: var(--c-cat-numerology); }
[data-cat="vedic"] { --cat-c: var(--c-cat-vedic); }
[data-cat="tarot"] { --cat-c: var(--c-cat-tarot); }
[data-cat="cosmic"] { --cat-c: var(--c-cat-cosmic); }

/* ---- Desktop navigation (992px and up) ---- */
@media (min-width: 992px) {
  .site-nav { margin-left: auto; }
  .nav-list { display: flex; align-items: center; gap: .2rem; }
  .nav-toggle,
  .nav-panel-head,
  .nav-panel-foot,
  .nav-overlay { display: none; }
  .header-actions { margin-left: .5rem; }

  .mega {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1.5rem 0 1.75rem;
    background: var(--c-glass-strong);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out), visibility 0s linear var(--t-base);
  }
  .has-mega.is-open .mega {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out), visibility 0s;
  }
  .mega-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem 1.5rem; }
  .mega-cat { pointer-events: none; cursor: default; margin-bottom: .5rem; }
  .mega-cat .chev { display: none; }
  .mega-links a:hover { transform: translateX(3px); }
}
@media (min-width: 1200px) {
  .mega-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.25rem; }
}

/* ---- Mobile off-canvas navigation (below 992px) ---- */
@media (max-width: 991.98px) {
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    display: flex;
    flex-direction: column;
    width: min(88vw, 380px);
    height: 100vh;
    height: 100dvh;
    background: var(--c-surface);
    border-left: 1px solid var(--c-border);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .4s var(--ease-out), visibility 0s linear .4s;
  }
  .nav-open .site-nav {
    transform: none;
    visibility: visible;
    transition: transform .4s var(--ease-out), visibility 0s;
  }
  .nav-open,
  .nav-open body { overflow: hidden; }

  .nav-panel-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem .75rem .75rem 1.25rem;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
  }
  .nav-panel-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--c-heading);
  }

  .nav-list { display: flex; flex-direction: column; gap: .15rem; padding: .75rem; }
  .nav-link { width: 100%; padding: .75rem 1rem; border-radius: var(--radius-md); font-size: 1rem; }
  .mega-toggle { display: none; }

  .mega { padding: .25rem 0; }
  .mega > .container { padding: 0; }
  .mega-head { margin: .5rem 0 .25rem; padding: 0 1rem; }
  .mega-title { letter-spacing: .08em; white-space: nowrap; }
  .mega-all { white-space: nowrap; }
  .mega-grid { grid-template-columns: 1fr; gap: .1rem; }
  .mega-cat {
    min-height: 52px;
    padding: .5rem .75rem;
    border-radius: var(--radius-md);
  }
  .mega-cat:hover { background: var(--c-primary-soft); }
  .mega-links { display: none; padding: 0 0 .5rem 3.4rem; }
  .mega-col.is-open .mega-links { display: block; animation: fadeUp .3s var(--ease-out); }
  .mega-col.is-open .mega-cat .chev { transform: rotate(180deg); }
  .mega-links a { min-height: 44px; }

  .nav-panel-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--c-border);
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
  }

  .nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: var(--c-overlay);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility 0s linear .35s;
  }
  .nav-open .nav-overlay { opacity: 1; visibility: visible; transition: opacity .35s ease, visibility 0s; }
}

@media (max-width: 380px) {
  .brand-name { font-size: 1rem; }
  .brand-mark { width: 32px; height: 32px; }
}

/* -------------------------------------------------------------------------
   7. HERO (homepage)
   ------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + 2.5rem) 0 4rem;
  overflow: hidden;
  background: var(--hero-bg);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.hero-content { position: relative; max-width: 640px; }
.hero-title { margin-bottom: 1.1rem; }
.hero-sub {
  max-width: 56ch;
  font-size: clamp(1rem, .95rem + .35vw, 1.2rem);
  color: var(--c-text-muted);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.75rem; }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}
.hero-trust li { display: inline-flex; align-items: center; gap: .4rem; }
.hero-trust .icon { color: var(--c-gold-bright); }

/* Quick sign finder */
.quick-finder {
  margin-top: 2rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.quick-finder-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
  font-weight: 600;
  color: var(--c-heading);
}
.quick-finder-title .icon { color: var(--c-gold-bright); }
.quick-row { display: grid; gap: .65rem; }
@media (min-width: 576px) {
  .quick-row { grid-template-columns: 1fr auto; }
}
.quick-result:empty { display: none; }
.quick-result { margin-top: 1rem; }
.quick-result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--c-gold-bright) 40%, transparent);
  border-radius: var(--radius-md);
  background: var(--c-gold-soft);
  animation: popIn .5s var(--ease-out);
}
.quick-glyph {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  padding: 12px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #f8dc9b;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  box-shadow: 0 0 0 4px var(--c-gold-soft), 0 0 24px rgba(201, 149, 47, .35);
}
.quick-kicker { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--c-gold); font-weight: 600; }
.quick-sign { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--c-heading); line-height: 1.2; }
.quick-meta { font-size: var(--fs-sm); color: var(--c-text-muted); }
.quick-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .25rem;
  min-height: 32px;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
}

/* Rotating zodiac wheel */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1;
  justify-self: center;
  pointer-events: none;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 149, 47, .32) 0%, rgba(124, 58, 237, .18) 45%, transparent 70%);
  filter: blur(30px);
}
.zodiac-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  animation: spin 160s linear infinite;
}
.wheel-lines { fill: none; stroke: var(--wheel-stroke); }
.wheel-glyphs {
  fill: none;
  stroke: var(--wheel-glyph);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wheel-core { fill: var(--c-gold-soft); stroke: var(--wheel-glyph); stroke-width: 1.2; }
.wheel-star { fill: none; stroke: var(--wheel-glyph); stroke-width: 1; opacity: .7; }
.wheel-planet { fill: var(--wheel-glyph); }

@media (max-width: 991.98px) {
  .hero-content { margin-inline: auto; text-align: center; }
  .hero-ctas, .hero-trust { justify-content: center; }
  .quick-finder { text-align: left; }
  .hero-visual {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    width: min(150vw, 760px);
    max-width: none;
    opacity: .2;
    transform: translate(-50%, -50%);
  }
}
@media (min-width: 992px) {
  .hero-inner { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
}

/* -------------------------------------------------------------------------
   8. HOMEPAGE SECTIONS
   ------------------------------------------------------------------------- */

/* Tool cards */
.tool-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.4rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base), border-color var(--t-base);
}
.tool-card:hover,
.tool-card:focus-within {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--cat-c, var(--c-primary)) 45%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cat-c, var(--c-primary)) 20%, transparent), 0 16px 36px color-mix(in srgb, var(--cat-c, var(--c-primary)) 18%, transparent);
}
.tool-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.tool-card-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--cat-c, var(--c-primary));
  background: color-mix(in srgb, var(--cat-c, var(--c-primary)) 14%, transparent);
  transition: transform var(--t-base) var(--ease-out);
}
.tool-card-icon .icon { width: 24px; height: 24px; }
.tool-card:hover .tool-card-icon { transform: rotate(-8deg) scale(1.06); }
.tool-card-title {
  font-family: var(--font-body);
  font-size: 1.06rem;
  font-weight: 650;
  line-height: 1.35;
}
.tool-card-title a { color: var(--c-heading); text-decoration: none; }
.tool-card-title a:focus-visible { outline: none; }
.tool-card-title a:focus-visible::after { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.tool-card p { font-size: var(--fs-sm); color: var(--c-text-muted); line-height: 1.6; }
.tool-card-cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: auto;
  padding-top: .35rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-primary);
}
.tool-card-cta .icon { transition: transform var(--t-base) var(--ease-out); }
.tool-card:hover .tool-card-cta .icon { transform: translateX(4px); }

/* Tool categories */
.tool-category + .tool-category { margin-top: 3.25rem; }
.tool-category-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--c-border);
}
.tool-category-head .tool-card-icon { width: 52px; height: 52px; flex-shrink: 0; }
.tool-category-head h3 { font-family: var(--font-display); font-size: clamp(1.2rem, 1.1rem + .5vw, 1.5rem); }
.tool-category-head p { font-size: var(--fs-sm); color: var(--c-text-muted); }

/* Zodiac sign grid */
.sign-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  padding: 0;
  list-style: none;
}
@media (min-width: 576px) { .sign-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .sign-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .sign-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.sign-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  height: 100%;
  padding: 1.35rem .75rem 1.15rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  text-align: center;
  text-decoration: none;
  color: var(--c-text);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base), border-color var(--t-base);
}
.sign-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--c-gold-bright) 55%, transparent); box-shadow: var(--glow-gold); color: var(--c-text); }
.sign-glyph {
  width: 52px;
  height: 52px;
  margin-bottom: .35rem;
  padding: 10px;
  border-radius: 50%;
  background: var(--c-gold-soft);
  color: var(--c-gold-bright);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--t-slow) var(--ease-out), background-color var(--t-base);
}
.sign-card:hover .sign-glyph { transform: rotate(360deg); }
.sign-name { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; color: var(--c-heading); }
.sign-dates { font-size: var(--fs-xs); color: var(--c-text-muted); }
.sign-card .badge { margin-top: .35rem; }

/* Features */
.feature-grid { display: grid; gap: 1.15rem; }
@media (min-width: 576px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.feature {
  padding: 1.6rem 1.4rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--glow-primary); }
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: var(--grad-primary);
  color: #f8dc9b;
  box-shadow: 0 10px 24px rgba(109, 40, 217, .28);
}
.feature-icon .icon { width: 26px; height: 26px; }
.feature h3 { margin-bottom: .45rem; }
.feature p { font-size: var(--fs-sm); color: var(--c-text-muted); }

/* How it works */
.steps {
  position: relative;
  display: grid;
  gap: 1.25rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
  .steps::before {
    content: "";
    position: absolute;
    top: 34px;
    left: 16%;
    right: 16%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--c-gold-bright), transparent);
    opacity: .5;
  }
}
.step { position: relative; text-align: center; padding: 0 .5rem; counter-increment: step; }
.step-num {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 1rem;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--c-gold-bright) 50%, transparent);
  background: var(--c-surface);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--c-gold);
  box-shadow: var(--glow-gold);
}
.step-num::before { content: counter(step); }
.step h3 { margin-bottom: .4rem; }
.step p { font-size: var(--fs-sm); color: var(--c-text-muted); max-width: 34ch; margin-inline: auto; }

/* Guide (about astrology) */
.guide-layout { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 992px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 3.5rem; }
  .guide-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.facts-card {
  padding: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--c-gold-bright) 35%, transparent);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 80% at 100% 0%, var(--c-gold-soft), transparent 60%),
    var(--c-surface);
  box-shadow: var(--shadow-md);
}
.facts-card h3 { font-family: var(--font-display); margin-bottom: 1rem; }
.facts-list { display: grid; gap: .85rem; padding: 0; list-style: none; }
.facts-list li { display: flex; align-items: baseline; gap: .85rem; font-size: var(--fs-sm); color: var(--c-text-muted); }
.facts-list strong {
  min-width: 2.6ch;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--c-gold);
  line-height: 1;
}
.facts-card .btn { margin-top: 1.35rem; }

/* FAQ wrapper */
.faq-wrap { max-width: 840px; margin-inline: auto; }

/* CTA banner */
.cta-banner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(2.25rem, 6vw, 4rem) clamp(1.25rem, 5vw, 4rem);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #2e1065 0%, #581c87 50%, #86198f 100%);
  color: #f3eeff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 255, 255, .9), transparent),
    radial-gradient(1px 1px at 28% 72%, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1.5px 1.5px at 46% 18%, rgba(248, 220, 155, .9), transparent),
    radial-gradient(1px 1px at 62% 82%, rgba(255, 255, 255, .7), transparent),
    radial-gradient(2px 2px at 78% 30%, rgba(255, 255, 255, .9), transparent),
    radial-gradient(1px 1px at 90% 66%, rgba(248, 220, 155, .8), transparent),
    radial-gradient(60% 90% at 100% 0%, rgba(248, 220, 155, .22), transparent 70%);
}
.cta-banner h2 { color: #fff; }
.cta-banner p { max-width: 54ch; margin: .85rem auto 0; color: #ddd6fe; font-size: var(--fs-md); }
.cta-banner .hero-ctas { justify-content: center; }
.cta-banner .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, .6); }
.cta-banner .btn-secondary:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* -------------------------------------------------------------------------
   9. FOOTER & BACK-TO-TOP
   ------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: var(--space-9);
  padding-top: clamp(3rem, 7vw, 4.5rem);
  border-top: 1px solid var(--c-border);
  background:
    radial-gradient(70% 60% at 0% 0%, var(--c-primary-soft), transparent 70%),
    var(--c-bg-alt);
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem 1.5rem;
}
.footer-brand { grid-column: 1 / -1; max-width: 420px; }
.footer-brand p { margin-top: .85rem; color: var(--c-text-muted); }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .footer-grid { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 2.5rem; }
  .footer-brand { grid-column: auto; }
}
.footer-title {
  margin-bottom: .9rem;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.footer-links { display: grid; gap: .1rem; padding: 0; list-style: none; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color var(--t-fast), transform var(--t-fast);
}
.footer-links a:hover,
.footer-links a[aria-current="page"] { color: var(--c-primary); }
@media (max-width: 767.98px) {
  .footer-links a { min-height: 44px; }
}

.social-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; padding: 0; list-style: none; }
.social-list a {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-border);
  border-radius: 50%;
  color: var(--c-text-muted);
  background: var(--c-surface);
  transition: color var(--t-fast), border-color var(--t-fast), transform var(--t-base) var(--ease-out), box-shadow var(--t-base);
}
.social-list a:hover { color: var(--c-primary); border-color: var(--c-border-strong); transform: translateY(-3px); box-shadow: var(--glow-primary); }

.footer-bottom {
  display: grid;
  gap: .35rem;
  margin-top: 3rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: var(--fs-xs);
  text-align: center;
}
.footer-disclaimer { max-width: 80ch; margin-inline: auto; opacity: .9; }

.back-to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 90;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 10px 26px rgba(109, 40, 217, .38);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(.9);
  transition: opacity var(--t-base), transform var(--t-base) var(--ease-out), visibility 0s linear var(--t-base);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--t-base), transform var(--t-base) var(--ease-out), visibility 0s;
}
.back-to-top:hover { transform: translateY(-3px); }

/* -------------------------------------------------------------------------
   10. ANIMATIONS
   ------------------------------------------------------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes popIn {
  0% { opacity: 0; transform: translateY(10px) scale(.96); }
  100% { opacity: 1; transform: none; }
}
@keyframes shake {
  0%, 100% { transform: none; }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 149, 47, .35); }
  50% { box-shadow: 0 0 0 12px rgba(201, 149, 47, 0); }
}

/* Reveal on scroll (classes toggled by main.js) */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* -------------------------------------------------------------------------
   11. REDUCED MOTION & PRINT
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .zodiac-wheel,
  .shimmer-text { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .back-to-top, .hero-canvas, .hero-visual, .skip-link, .toast-region { display: none !important; }
  body { padding-top: 0; background: #fff; color: #000; }
  .js .reveal { opacity: 1; transform: none; }
  a { color: #000; }
}
