/* ---------------------------------------------------------------------
   Design tokens
   Public pages: deep indigo night sky, warm gold accent, restrained.
   Admin pages: calm off-white workspace, same accent for continuity.
--------------------------------------------------------------------- */
:root {
  --ink-900: #171a2e;      /* deep indigo background */
  --ink-800: #21254a;      /* card / raised surface on dark */
  --ink-700: #383c66;      /* borders on dark */
  --gold: #c9a24b;         /* signature accent */
  --gold-soft: #e4cb8a;
  --cream: #f3efe4;        /* text on dark */
  --lavender: #a6a9c4;     /* secondary text on dark */

  --paper: #faf8f3;        /* admin background */
  --paper-raised: #ffffff;
  --charcoal: #262633;
  --slate: #6b6b7c;
  --line: #e4e0d4;

  --good: #5c8a5a;
  --good-bg: #e4f0e2;
  --avoid: #b1544c;
  --avoid-bg: #f6e2df;

  --display-font: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--charcoal);
  background: var(--paper);
}

a { color: inherit; }

/* ---------------- Public pages (night-sky theme) ---------------- */

.public-page {
  min-height: 100vh;
  background:
    radial-gradient(1px 1px at 10% 20%, var(--gold-soft) 0, transparent 60%),
    radial-gradient(1px 1px at 80% 15%, var(--cream) 0, transparent 60%),
    radial-gradient(1.5px 1.5px at 60% 40%, var(--gold-soft) 0, transparent 60%),
    radial-gradient(1px 1px at 30% 70%, var(--cream) 0, transparent 60%),
    radial-gradient(1px 1px at 90% 80%, var(--gold-soft) 0, transparent 60%),
    radial-gradient(1.5px 1.5px at 45% 85%, var(--cream) 0, transparent 60%),
    #1a1e2b;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 20px;
}

.public-card {
  width: 100%;
  max-width: 640px;
}

.hero-banner {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 520px;
  overflow: hidden;
  margin-bottom: 0;
}
.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.hero-banner-text {
  position: absolute;
  top: 22%;
  left: 20%;
  max-width: 640px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.hero-banner-text .site-name {
  font-size: 34px;
  letter-spacing: 0.08em;
  margin: 0 0 6px 0;
}
.hero-banner-text h1 {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.25;
  margin: 4px 0 10px 0;
}
.hero-scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #f3efe4;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.hero-scroll-cue span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}
.hero-scroll-arrow {
  font-size: 22px;
  margin-top: 4px;
}
.divider-strip {
  width: 100%;
  height: 130px;
  overflow: hidden;
  margin-bottom: 20px;
}
.divider-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------------- Light theme override, scoped to homepage body content only ---------------- */
.light-theme {
  background: var(--paper) !important;
  color: var(--charcoal) !important;
}
.light-theme .panel {
  background: var(--paper-raised);
  border: 1px solid var(--line);
}
.light-theme .panel h2 {
  color: #78612d;
}
.light-theme .disclaimer-list,
.light-theme .panel p {
  color: var(--charcoal);
}
.light-theme .small-note {
  color: var(--slate);
}
.light-theme .testimonial-card {
  background: var(--paper);
  border-left: 3px solid var(--gold);
}
.light-theme .testimonial-text {
  color: var(--charcoal);
}
.light-theme .testimonial-name {
  color: #78612d;
}

.hero-photo-placeholder {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 2px dashed var(--ink-700);
  background: var(--ink-800);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--lavender);
  font-size: 15px;
}
.hero-photo-placeholder .hero-photo-note {
  font-size: 12px;
  color: var(--ink-700);
}
.hero-photo-placeholder-full {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border: 2px dashed var(--ink-700);
  background: var(--ink-800);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--lavender);
  font-size: 15px;
}
.hero-photo-placeholder-full .hero-photo-note {
  font-size: 12px;
  color: var(--ink-700);
}

.testimonial-card {
  background: var(--ink-900);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.testimonial-text {
  font-family: var(--display-font);
  font-size: 15px;
  color: var(--cream);
  font-style: italic;
  margin: 0 0 8px 0;
  line-height: 1.5;
}
.testimonial-name {
  font-size: 12.5px;
  color: var(--gold);
  margin: 0;
}

.sample-report-frame {
  background: var(--paper);
  border-radius: 10px;
  padding: 16px;
  margin-top: 14px;
  overflow-x: auto;
}

.crescent-logo {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  display: block;
}

.site-name {
  font-family: var(--display-font);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 10px 0;
}

.public-card h1 {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.25;
  margin: 0 0 8px 0;
  color: var(--cream);
}

.public-card .subtitle {
  color: var(--lavender);
  font-size: 15px;
  margin: 0 0 32px 0;
}

.panel {
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: 10px;
  padding: 28px 30px;
  margin-bottom: 20px;
}

.panel h2 {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: 20px;
  margin: 0 0 16px 0;
  color: var(--gold-soft);
}

.disclaimer-list {
  margin: 0;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--cream);
}
.disclaimer-list li { margin-bottom: 14px; }
.disclaimer-list li:last-child { margin-bottom: 0; }

.disclaimer-footer {
  font-size: 13.5px;
  color: var(--lavender);
  margin-top: 18px;
  line-height: 1.5;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--lavender);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--ink-700);
  background: var(--ink-900);
  color: var(--cream);
  font-size: 14.5px;
  font-family: var(--body-font);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0;
  padding: 14px 16px;
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: 8px;
}
.consent-row input[type="checkbox"] {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--gold);
  flex-shrink: 0;
}
.consent-row label { font-size: 14px; color: var(--cream); line-height: 1.5; }

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--ink-900);
  border: none;
  padding: 13px 26px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--body-font);
}
.btn:hover { background: var(--gold-soft); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; text-align: center; }

.error-msg {
  background: var(--avoid-bg);
  color: var(--avoid);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

.small-note { font-size: 13px; color: var(--lavender); margin-top: 14px; }

/* ---------------- Admin pages (paper theme) ---------------- */

.admin-shell { min-height: 100vh; }

.admin-nav {
  background: var(--ink-900);
  color: var(--cream);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-nav .brand {
  font-family: var(--display-font);
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-nav .brand-sub {
  font-family: var(--body-font);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lavender);
  border: 1px solid var(--ink-700);
  border-radius: 4px;
  padding: 2px 6px;
}
.admin-nav a { color: var(--lavender); text-decoration: none; font-size: 14px; margin-left: 18px; }
.admin-nav a:hover { color: var(--cream); }

.admin-main { max-width: 1000px; margin: 0 auto; padding: 32px 24px 64px; }

.admin-main h1 {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 4px 0;
}
.page-subtitle { color: var(--slate); font-size: 14px; margin: 0 0 28px 0; }

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 24px;
}

table.client-table { width: 100%; border-collapse: collapse; }
table.client-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
table.client-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  vertical-align: middle;
}
table.client-table tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.badge-paid { background: var(--good-bg); color: var(--good); }
.badge-pending { background: #f4ecd8; color: #9a7a2b; }

.link-btn {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  font-size: 13.5px;
}
.link-btn:hover { text-decoration: underline; }

.admin-btn {
  display: inline-block;
  background: var(--ink-900);
  color: var(--cream);
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--body-font);
}
.admin-btn:hover { background: var(--ink-800); }
.admin-btn.secondary { background: transparent; color: var(--charcoal); border: 1px solid var(--line); }

.flash {
  background: var(--good-bg);
  color: var(--good);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  margin-bottom: 20px;
}

.report-section { margin-top: 26px; }
.report-section h3 {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: 18px;
  margin: 0 0 12px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.report-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.report-row:last-child { border-bottom: none; }
.tag-top { color: #9a7a2b; font-weight: 600; }
.tag-peak { color: #0f766e; font-weight: 700; }
.tag-good { color: var(--good); font-weight: 600; }
.tag-avoid { color: var(--avoid); font-weight: 600; }

/* calendar embedded table (matches astro_engine render, admin-page variant) */
.calendar-wrap table { border-collapse: collapse; width: 100%; table-layout: fixed; margin-top: 8px; }
.calendar-wrap th { padding: 6px; font-size: 11px; color: var(--slate); text-transform: uppercase; }
.calendar-wrap td { border: 1px solid var(--line); height: 78px; vertical-align: top; padding: 5px; font-size: 11px; }
.calendar-wrap .daynum { font-weight: 600; font-size: 12px; margin-bottom: 3px; }
.calendar-wrap .note { font-size: 9.5px; line-height: 1.2; color: var(--charcoal); }
.calendar-wrap .other-month { background: #fafafa; color: #ccc; }
.calendar-wrap .neutral { background: #ffffff; }
.calendar-wrap .top { background: #ffd54a; }
.calendar-wrap .good { background: #c7f0c2; }
.calendar-wrap .jonas-only { background: #bfe0ff; }
.calendar-wrap .avoid { background: #f8d3ce; }
.calendar-wrap .peak { background: #0f766e; color: #fff; }
.calendar-wrap .peak .note { color: #fff; }
.calendar-wrap .ovulation-marker { box-shadow: inset 0 0 0 3px #6b46c1; }
.calendar-wrap .jupiter-peak-marker { box-shadow: inset 0 0 0 3px #ea580c; }
.calendar-wrap .ovulation-marker.jupiter-peak-marker { box-shadow: inset 0 0 0 3px #6b46c1, inset 0 0 0 6px #ea580c; }
.calendar-wrap .legend { margin-top: 10px; font-size: 12px; }
.calendar-wrap .legend .swatch {
  display: inline-block; width: 12px; height: 12px; margin-right: 6px;
  vertical-align: middle; border: 1px solid #999;
}
.calendar-wrap .legend-item { margin-right: 18px; white-space: nowrap; display: inline-flex; align-items: center; }

@media (max-width: 640px) {
  .field-row { flex-direction: column; gap: 0; }
  .admin-main { padding: 24px 16px 48px; }
  .public-page { padding: 32px 16px; }
  .public-card h1 { font-size: 26px; }
  .panel { padding: 22px 18px; }
  .admin-nav { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .admin-nav a { margin-left: 0; margin-right: 14px; }
  table.client-table { font-size: 13px; }
  table.client-table td, table.client-table th { padding: 8px 6px; }
  .hero-photo-placeholder { height: 140px; margin-bottom: 18px; }
}

/* Birth-place autocomplete dropdown (LocationIQ-backed) */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.autocomplete-suggestion {
  padding: 10px 14px;
  cursor: pointer;
  color: var(--cream);
  font-size: 14px;
  border-bottom: 1px solid var(--ink-700);
}
.autocomplete-suggestion:last-child { border-bottom: none; }
.autocomplete-suggestion:hover,
.autocomplete-suggestion.active {
  background: var(--ink-700);
}
.autocomplete-hint {
  padding: 8px 14px;
  color: var(--lavender);
  font-size: 12.5px;
  font-style: italic;
}

