/* ============================================================
   GREAT ASTROLOGY — Design System
   Premium SaaS aesthetic: deep navy ground, warm gold accents,
   large type, rounded cards, soft shadows. Mobile-first.
   ============================================================ */

:root {
  --navy-900: #070B1F;
  --navy-800: #0A102C;
  --navy-700: #101736;
  --navy-600: #182043;
  --navy-500: #232C55;
  --ink: #EDEFF7;
  --ink-dim: #A9B0CC;
  --ink-faint: #6E769A;
  --gold: #D9B45B;
  --gold-bright: #EDD08A;
  --gold-deep: #A8873B;
  --saffron: #E8975A;
  --purple: #8B7BB5;
  --teal: #5BAF9E;
  --rose: #C97B8E;
  --danger: #D9736B;
  --line: rgba(217, 180, 91, 0.14);
  --line-soft: rgba(169, 176, 204, 0.12);
  --card: linear-gradient(180deg, rgba(24, 32, 67, 0.75), rgba(16, 23, 54, 0.9));
  --shadow: 0 10px 40px rgba(3, 5, 16, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(139, 123, 181, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(217, 180, 91, 0.07), transparent 55%),
    var(--navy-900);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
}
img, svg { max-width: 100%; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, .brand-name { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.25; }
h3 { font-size: 1.18rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(7, 11, 31, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--gold); font-size: 1.2rem; }
.brand-name { color: var(--ink); letter-spacing: 0.06em; }
.brand-name em { font-style: normal; color: var(--gold); }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink-dim); padding: 7px 12px; border-radius: 999px;
  font-size: 0.92rem; font-weight: 500; transition: color .15s, background .15s;
}
.main-nav a:hover { color: var(--ink); text-decoration: none; background: rgba(217, 180, 91, 0.08); }
.main-nav a.active { color: var(--navy-900); background: var(--gold); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); font-size: 1.2rem; border-radius: 10px; padding: 4px 12px; cursor: pointer; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero .eyebrow {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero p.lead { color: var(--ink-dim); font-size: 1.12rem; max-width: 34em; margin: 18px 0 30px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
  font-family: var(--font-body);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #241A05; box-shadow: 0 6px 24px rgba(217, 180, 91, 0.35); }
.btn-gold:hover { box-shadow: 0 10px 30px rgba(217, 180, 91, 0.45); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(217, 180, 91, 0.08); }
.btn-sm { padding: 8px 18px; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 10px; }
.card .muted { color: var(--ink-dim); font-size: 0.95rem; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.section { padding: 56px 0; }
.section-head { margin-bottom: 30px; max-width: 46em; }
.section-head p { color: var(--ink-dim); margin-top: 10px; }
.kicker { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* quick action tiles */
.tile {
  display: flex; flex-direction: column; gap: 8px; padding: 22px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  color: var(--ink); transition: transform .18s, border-color .18s;
}
.tile:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--line); }
.tile .t-ic { font-size: 1.6rem; }
.tile .t-name { font-weight: 600; }
.tile .t-desc { color: var(--ink-dim); font-size: 0.86rem; line-height: 1.45; }

/* ---------- Forms ---------- */
.bf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.bf-field { display: flex; flex-direction: column; gap: 7px; font-size: 0.9rem; color: var(--ink-dim); }
.bf-field small { color: var(--ink-faint); }
.bf-wide { grid-column: 1 / -1; }
.bf-field input, .bf-field select, textarea.ga-input, input.ga-input {
  background: var(--navy-800); color: var(--ink); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 1rem; font-family: var(--font-body);
  width: 100%;
}
.bf-field input:focus, .bf-field select:focus { border-color: var(--gold); outline: none; }
.bf-city { position: relative; }
.bf-city-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  background: var(--navy-700); border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; box-shadow: var(--shadow);
}
.bf-city-list button {
  display: block; width: 100%; text-align: left; padding: 11px 14px; background: none;
  border: none; color: var(--ink); cursor: pointer; font-size: 0.95rem; font-family: var(--font-body);
}
.bf-city-list button:hover { background: rgba(217, 180, 91, 0.12); }
.bf-city-none { padding: 11px 14px; color: var(--ink-dim); font-size: 0.88rem; }
.bf-adv summary { cursor: pointer; color: var(--gold); font-size: 0.9rem; margin: 4px 0 12px; }
.form-error { color: var(--danger); font-size: 0.92rem; margin-top: 10px; min-height: 1.4em; }

/* ---------- Chart SVG ---------- */
.ga-chart { width: 100%; height: auto; display: block; }
.gc-frame { fill: rgba(10, 16, 44, 0.6); stroke: var(--gold-deep); stroke-width: 2; }
.gc-house { fill: transparent; stroke: rgba(217, 180, 91, 0.4); stroke-width: 1.2; }
.gc-lagna { fill: rgba(217, 180, 91, 0.07); }
.gc-lagna-mark { stroke: var(--gold); stroke-width: 1.6; }
.gc-signnum { fill: var(--ink-faint); font-size: 12px; font-family: var(--font-body); }
.gc-planet { fill: var(--gold-bright); font-size: 13.5px; font-weight: 600; font-family: var(--font-body); }
.gc-center { fill: var(--ink); font-size: 15px; font-family: var(--font-display); }
.gc-center-sub { fill: var(--ink-dim); font-size: 11.5px; font-family: var(--font-body); }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line-soft); }
table.ga-tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 560px; }
.ga-tbl th, .ga-tbl td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.ga-tbl th { background: var(--navy-700); color: var(--gold); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.ga-tbl tr:last-child td { border-bottom: none; }
.ga-tbl td { color: var(--ink-dim); }
.ga-tbl td:first-child { color: var(--ink); font-weight: 500; }

/* ---------- Badges & meters ---------- */
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.03em; }
.badge-gold { background: rgba(217, 180, 91, 0.16); color: var(--gold-bright); }
.badge-teal { background: rgba(91, 175, 158, 0.16); color: #8FD4C6; }
.badge-rose { background: rgba(201, 123, 142, 0.18); color: #E3A8B8; }
.badge-purple { background: rgba(139, 123, 181, 0.2); color: #B7A9DE; }
.badge-dim { background: rgba(169, 176, 204, 0.12); color: var(--ink-dim); }

.meter { height: 7px; background: var(--navy-600); border-radius: 99px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.tabs button {
  background: transparent; border: 1px solid var(--line-soft); color: var(--ink-dim);
  padding: 9px 18px; border-radius: 999px; cursor: pointer; font-size: 0.9rem; font-weight: 500; font-family: var(--font-body);
}
.tabs button.active { background: var(--gold); color: var(--navy-900); border-color: var(--gold); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Dasha timeline ---------- */
.dasha-bar { display: flex; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line-soft); min-height: 54px; }
.dasha-seg { position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; cursor: pointer; padding: 8px 2px; font-size: 0.78rem; color: var(--ink-dim); border-right: 1px solid rgba(7, 11, 31, 0.5); background: var(--navy-700); transition: background .15s; }
.dasha-seg:hover { background: var(--navy-600); }
.dasha-seg.current { background: rgba(217, 180, 91, 0.2); color: var(--gold-bright); }
.dasha-seg.past { opacity: 0.55; }
.dasha-seg b { font-size: 0.86rem; color: inherit; }
.dasha-detail { margin-top: 18px; }

/* accordion rows */
.acc { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.acc summary { cursor: pointer; padding: 14px 18px; background: var(--navy-700); font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 10px; list-style: none; }
.acc summary::-webkit-details-marker { display: none; }
.acc[open] summary { border-bottom: 1px solid var(--line-soft); }
.acc .acc-body { padding: 16px 18px; color: var(--ink-dim); font-size: 0.95rem; }

/* ---------- Panchang ---------- */
.pan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.pan-cell { background: var(--navy-700); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 14px 16px; }
.pan-cell .p-k { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.pan-cell .p-v { font-weight: 600; font-size: 1.02rem; margin-top: 3px; }
.pan-cell.warn .p-v { color: var(--saffron); }
.pan-cell.good .p-v { color: #8FD4C6; }

.cho-row { display: flex; gap: 6px; flex-wrap: wrap; }
.cho { flex: 1 1 100px; text-align: center; padding: 10px 6px; border-radius: var(--radius-sm); font-size: 0.82rem; border: 1px solid var(--line-soft); }
.cho.good { background: rgba(91, 175, 158, 0.12); }
.cho.bad { background: rgba(217, 115, 107, 0.1); opacity: 0.85; }
.cho b { display: block; font-size: 0.9rem; }
.cho span { color: var(--ink-faint); font-size: 0.76rem; }

/* ---------- Chat (AI page) ---------- */
.chat-box { display: flex; flex-direction: column; gap: 14px; min-height: 300px; max-height: 55vh; overflow-y: auto; padding: 4px; }
.msg { max-width: 85%; padding: 13px 18px; border-radius: 16px; font-size: 0.96rem; line-height: 1.6; }
.msg-user { align-self: flex-end; background: rgba(217, 180, 91, 0.16); border: 1px solid var(--line); border-bottom-right-radius: 4px; }
.msg-ai { align-self: flex-start; background: var(--navy-700); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; color: var(--ink-dim); }
.chat-input-row { display: flex; gap: 10px; margin-top: 16px; }
.chat-input-row input { flex: 1; }

/* ---------- Notices ---------- */
.notice { border-left: 3px solid var(--gold); background: rgba(217, 180, 91, 0.07); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-dim); font-size: 0.93rem; }
.notice b { color: var(--ink); }
.notice.soft { border-color: var(--purple); background: rgba(139, 123, 181, 0.08); }

/* ---------- Score dial (matching) ---------- */
.score-dial { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.score-dial .sd-num { font-family: var(--font-display); font-size: 3rem; color: var(--gold-bright); line-height: 1; }
.score-dial .sd-max { color: var(--ink-faint); font-size: 0.9rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 70px; padding: 44px 0 0; background: rgba(7, 11, 31, 0.6); }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; padding-bottom: 30px; }
.f-brand { font-size: 1.15rem; letter-spacing: 0.06em; }
.f-tag { color: var(--gold); font-size: 0.9rem; margin-top: 6px; }
.f-note { color: var(--ink-faint); font-size: 0.82rem; margin-top: 14px; max-width: 40em; }
.f-cols { display: flex; gap: 60px; }
.f-cols h4 { color: var(--ink); font-size: 0.86rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
.f-cols a { display: block; color: var(--ink-dim); font-size: 0.92rem; padding: 4px 0; }
.f-bottom { border-top: 1px solid var(--line-soft); padding: 16px 20px; color: var(--ink-faint); font-size: 0.8rem; text-align: center; }

/* ---------- Page hero (inner pages) ---------- */
.page-head { padding: 48px 0 8px; }
.page-head p { color: var(--ink-dim); margin-top: 10px; max-width: 44em; }

/* ---------- Hero visual ---------- */
.zodiac-visual { position: relative; }
.zodiac-visual svg { filter: drop-shadow(0 0 40px rgba(217, 180, 91, 0.15)); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 720px) {
  body { padding-bottom: 68px; } /* room for bottom nav */
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--navy-800); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; }
  .site-header.nav-open .main-nav { display: flex; }
  .nav-toggle { display: block; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
    background: rgba(10, 16, 44, 0.96); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line-soft); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-faint); font-size: 0.68rem; padding: 4px 0; }
  .bottom-nav a.active { color: var(--gold-bright); }
  .bottom-nav .bn-ic { font-size: 1.15rem; }
  .bottom-nav a:hover { text-decoration: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .bf-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .hero { padding: 44px 0 36px; }
  .card { padding: 20px; }
  .f-cols { gap: 32px; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .tile { padding: 16px; }
}

/* ---------- Print (PDF report) ---------- */
@media print {
  body { background: #fff; color: #1a1a2e; padding-bottom: 0; }
  .site-header, .bottom-nav, .site-footer, .nav-toggle, .btn, .tabs, .chat-input-row,
  #form-card, .cta-row, #suggestions { display: none !important; }
  .card { background: #fff; border: 1px solid #ddd; box-shadow: none; color: #1a1a2e; }
  .card .muted, .muted, .acc .acc-body, .ga-tbl td { color: #444; }
  .pan-cell { background: #f7f6f2; border-color: #ddd; }
  .pan-cell .p-k { color: #8a7b4f; }
  h1, h2, h3 { color: #1a1a2e; }
  .kicker { color: #8a6d1f; }
  .tab-panel { display: block !important; page-break-inside: avoid; margin-top: 18px; }
  .ga-tbl th { background: #f0ead8; color: #5c4a13; }
  .acc summary { background: #f7f6f2; color: #1a1a2e; }
  .notice { background: #faf6ea; color: #444; }
  .gc-frame { fill: #fff; stroke: #8a6d1f; }
  .gc-house { stroke: #c9b26a; }
  .gc-signnum { fill: #999; }
  .gc-planet { fill: #7a5c10; }
  .dasha-seg { background: #f0ead8; color: #444; }
  .dasha-seg.current { background: #e2d3a1; color: #5c4a13; }
  a { color: #1a1a2e; text-decoration: none; }
}

/* utility */
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.center { text-align: center; }
.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
