/* Astrology Studio — global design system
   Task 3.1 | Mobile-first | Lightweight custom CSS
*/
:root {
  --astro-bg: #fbf9f6;
  --astro-surface: #ffffff;
  --astro-surface-soft: #f5f0fb;
  --astro-primary: #7152a3;
  --astro-primary-dark: #563b83;
  --astro-primary-soft: #eee7f7;
  --astro-gold: #bd9850;
  --astro-gold-soft: #f7f0df;
  --astro-text: #292536;
  --astro-muted: #777181;
  --astro-border: #e9e4ed;
  --astro-success: #34765b;
  --astro-danger: #b94c56;
  --astro-radius-sm: 10px;
  --astro-radius: 16px;
  --astro-radius-lg: 22px;
  --astro-shadow: 0 8px 28px rgba(54, 39, 76, .07);
  --astro-shadow-soft: 0 3px 14px rgba(54, 39, 76, .05);
  --astro-container: 1160px;
  --astro-font: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--astro-bg);
  color: var(--astro-text);
  font-family: var(--astro-font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--astro-primary); text-decoration: none; }
a:hover { color: var(--astro-primary-dark); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.astro-container {
  width: min(100% - 32px, var(--astro-container));
  margin-inline: auto;
}
.astro-section { padding: 42px 0; }
.astro-section--compact { padding: 26px 0; }
.astro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--astro-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.astro-eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--astro-gold);
}
.astro-heading {
  margin: 8px 0 10px;
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1.18;
  letter-spacing: -.035em;
}
.astro-subheading {
  margin: 0;
  max-width: 660px;
  color: var(--astro-muted);
  font-size: 15px;
}
.astro-muted { color: var(--astro-muted); }
.astro-small { font-size: 12px; }
.astro-label {
  display: block;
  margin-bottom: 7px;
  color: #514b5b;
  font-size: 13px;
  font-weight: 650;
}

/* Header / navigation */
.astro-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--astro-border);
  backdrop-filter: blur(12px);
}
.astro-header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.astro-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--astro-text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.04em;
}
.astro-brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, #8b6aba, #60458e);
  box-shadow: 0 4px 12px rgba(113,82,163,.2);
}
.astro-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.astro-nav a {
  color: #5e5868;
  font-size: 13px;
  font-weight: 650;
}
.astro-nav a:hover, .astro-nav a.is-active { color: var(--astro-primary); }

/* Buttons */
.astro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.astro-btn:hover { transform: translateY(-1px); }
.astro-btn--primary {
  color: #fff;
  background: var(--astro-primary);
  box-shadow: 0 5px 14px rgba(113,82,163,.18);
}
.astro-btn--primary:hover { color: #fff; background: var(--astro-primary-dark); }
.astro-btn--outline {
  color: var(--astro-primary);
  background: #fff;
  border-color: #d8cde8;
}
.astro-btn--soft { color: var(--astro-primary-dark); background: var(--astro-primary-soft); }
.astro-btn--gold { color: #6b5220; background: var(--astro-gold-soft); }
.astro-btn--block { width: 100%; }

/* Cards and layout helpers */
.astro-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.astro-col-3 { grid-column: span 3; }
.astro-col-4 { grid-column: span 4; }
.astro-col-6 { grid-column: span 6; }
.astro-col-8 { grid-column: span 8; }
.astro-col-12 { grid-column: span 12; }
.astro-card {
  min-width: 0;
  padding: 22px;
  background: var(--astro-surface);
  border: 1px solid var(--astro-border);
  border-radius: var(--astro-radius);
  box-shadow: var(--astro-shadow-soft);
}
.astro-card--soft { background: var(--astro-surface-soft); border-color: #ece4f4; }
.astro-card--gold { background: #fffdf8; border-color: #eee2c7; }
.astro-card-title { margin: 0 0 7px; font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.astro-card-text { margin: 0; color: var(--astro-muted); font-size: 13px; }
.astro-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 14px;
  color: var(--astro-primary);
  background: var(--astro-primary-soft);
  font-size: 19px;
}
.astro-card-icon--gold { color: #8a6a2d; background: var(--astro-gold-soft); }
.astro-flex { display: flex; align-items: center; gap: 12px; }
.astro-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.astro-stack { display: flex; flex-direction: column; gap: 12px; }

/* Hero */
.astro-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid #e9e0f1;
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 10%, rgba(221,205,241,.7), transparent 32%),
    linear-gradient(125deg, #fff 0%, #f8f3fc 58%, #fbf6e9 100%);
}
.astro-hero-content { max-width: 650px; position: relative; z-index: 1; }
.astro-hero p { color: var(--astro-muted); max-width: 540px; }
.astro-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* Form controls */
.astro-field { margin-bottom: 16px; }
.astro-input, .astro-select, .astro-textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--astro-text);
  background: #fff;
  border: 1px solid #ded8e5;
  border-radius: 12px;
  outline: none;
}
.astro-textarea { min-height: 110px; resize: vertical; }
.astro-input:focus, .astro-select:focus, .astro-textarea:focus {
  border-color: #a88bc9;
  box-shadow: 0 0 0 3px rgba(113,82,163,.11);
}
.astro-help { display: block; margin-top: 6px; color: var(--astro-muted); font-size: 12px; }

/* Status / tags */
.astro-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--astro-primary-dark);
  background: var(--astro-primary-soft);
  font-size: 11px;
  font-weight: 750;
}
.astro-pill--gold { color: #765a23; background: var(--astro-gold-soft); }
.astro-pill--success { color: #286247; background: #e7f3ec; }

/* Footer */
.astro-footer {
  margin-top: 50px;
  padding: 28px 0;
  color: var(--astro-muted);
  background: #fff;
  border-top: 1px solid var(--astro-border);
  font-size: 12px;
}

/* Mobile bottom navigation — used in authenticated app pages */
.astro-bottom-nav {
  display: none;
  position: fixed;
  inset: auto 0 0;
  z-index: 60;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--astro-border);
  backdrop-filter: blur(12px);
}
.astro-bottom-nav-inner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.astro-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 2px;
  color: #817b89;
  font-size: 10px;
  font-weight: 650;
}
.astro-bottom-nav a span:first-child { font-size: 18px; line-height: 1.2; }
.astro-bottom-nav a.is-active { color: var(--astro-primary); }

/* Utility */
.astro-divider { height: 1px; background: var(--astro-border); margin: 18px 0; }
.astro-center { text-align: center; }
.astro-mt-1 { margin-top: 8px; }
.astro-mt-2 { margin-top: 16px; }
.astro-mt-3 { margin-top: 24px; }
.astro-mb-0 { margin-bottom: 0; }
.astro-w-100 { width: 100%; }

@media (max-width: 900px) {
  .astro-col-3, .astro-col-4 { grid-column: span 6; }
  .astro-nav { gap: 14px; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .astro-container { width: min(100% - 24px, var(--astro-container)); }
  .astro-section { padding: 28px 0; }
  .astro-header-inner { min-height: 60px; }
  .astro-nav { display: none; }
  .astro-col-3, .astro-col-4, .astro-col-6, .astro-col-8 { grid-column: span 12; }
  .astro-card { padding: 18px; border-radius: 15px; }
  .astro-bottom-nav { display: block; }
  .astro-page-with-bottom-nav { padding-bottom: 86px; }
  .astro-hero { border-radius: 20px; }
}
