@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

@font-face {
  font-family: 'GaramondNo8';
  src: url('fonts/GaramondNo8-Reg.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GaramondNo8';
  src: url('fonts/GaramondNo8-Ita.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GaramondNo8';
  src: url('fonts/GaramondNo8-Med.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GaramondNo8';
  src: url('fonts/GaramondNo8-MedIta.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700&display=swap');

/* ── Tokens ── */
:root {
  --bg:         #fafafa; /* Co-Star off-white */
  --bg-card:    #ffffff;
  --bg-hover:   #f0f0f0;
  --text:       #111111; /* Co-Star soft black */
  --text-dim:   #333333;
  --text-muted: #666666;
  
  /* Setting gold to black so legacy HTML classes instantly adapt without rewriting HTML */
  --gold:       #111111; 
  --gold-dim:   rgba(17, 17, 17, 0.05);
  
  --border:     rgba(17, 17, 17, 0.15); /* Soft hairline border */
  --border-mid: rgba(17, 17, 17, 0.3);
  --radius:     0px;
  
  --ff-serif:   'GaramondNo8', 'Times New Roman', Times, serif;
  --ff-sans:    'Satoshi', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --ff-mono:    'Space Mono', monospace;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  padding: 20px 24px;

}

.container {
  width: min(1200px, 100%);
  margin-inline: auto;
}

/* ── Header ── */
.site-header {
  padding-bottom: 1.25rem;
}
.logo {
  font-family: var(--ff-mono);
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: bold;
  text-decoration: none;
  color: var(--text);
}

/* ── Typography Utilities ── */
.section-label, .calc-label {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 1rem;
}

h2 {
  font-family: var(--ff-sans);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 3rem;
  text-transform: uppercase;
}

/* ────────────────────────────────────────────
   APP GRID (form + wheel side by side)
──────────────────────────────────────────── */
.app-section {
  padding: 0.5rem 0 2rem 0;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2.5rem;
  align-items: start;
}

/* When wheel panel is hidden, left panel spans full width */
.app-grid:not(:has(#wheel-panel:not([hidden]))) .left-panel {
  grid-column: 1 / -1;
}

.left-panel {
  min-width: 0;
}

.right-panel {
  position: sticky;
  top: 1rem;
  min-width: 0;
}

@media (max-width: 820px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
  .right-panel {
    position: static;
  }
}

/* ── CALCULATOR FORM ── */
.calculator {
  padding: 2rem 0 4rem 0;
}

.birth-sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  font-size: 0.82rem;
  line-height: 2;
  color: var(--text-dim);
}

/* Flex line-break helpers — zero size by default */
.lb {
  flex-basis: 0;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* > 1405px: 2 lines — break only before email */
@media (min-width: 1405px) {
  .lb-email { flex-basis: 100%; }
}

/* 999px – 1405px: 3 lines — break after city + before email */
@media (min-width: 999px) and (max-width: 1404px) {
  .lb-date  { flex-basis: 100%; }
  .lb-email { flex-basis: 100%; }
}

/* < 999px: 4 lines — break after intro, after city, before email */
@media (max-width: 998px) {
  .lb-city  { flex-basis: 100%; }
  .lb-date  { flex-basis: 100%; }
  .lb-email { flex-basis: 100%; }
}

/* ── Native Inputs Reset ── */
input[type="text"],
input[type="date"],
input[type="time"],
input[type="email"] {
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--border-mid);
  border-radius: 0;
  color: var(--text);
  font-family: var(--ff-mono);
  font-size: 0.82rem;
  height: 21px;
  padding: 0;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  cursor: pointer;
  -webkit-appearance: none;
}

input:focus {
  border-bottom-color: var(--text);
  border-bottom-style: solid;
}
/* Triggers when JS detects a blurred, empty field */
input.invalid-input {
  border-bottom-color: #e07070 !important;
}

input#city-input.city-selected {
  border-bottom-style: solid;
  border-bottom-color: var(--text);
  text-align: left;
}

input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* Sizing */
/* ── Sizing (Updated for wider inputs) ── */
#city-input { width: 22ch; }
input[type="date"], #f-date { width: 150px; }
input[type="time"], #f-time { width: 110px; }
input[type="email"], #f-email { width: 26ch; }

/* Clean up WebKit native picker icons */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}
input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="time"]:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
}

/* ── City Autocomplete Dropdown ── */
.location-wrap {
  position: relative;
  display: inline-block;
}

#city-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg);
  border: 1px solid var(--text);
  list-style: none;
  width: 100%;
  min-width: 250px;
  z-index: 100;
  margin-top: 4px;
  max-height: 250px;
  overflow-y: auto;
}

#city-dropdown li {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--ff-sans);
  font-size: 0.75rem;
  color: var(--text);
  transition: background 0.1s;
  cursor: pointer;
}

#city-dropdown li:last-child { border-bottom: none; }

#city-dropdown li:hover {
  background: var(--text);
  color: var(--bg);
}

.sug-primary { display: block; font-weight: bold; }
.sug-secondary { display: block; font-family: var(--ff-sans); font-size: 0.65rem; opacity: 0.7; }

.location-status {
  font-family: var(--ff-sans);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ── Meta Data Under Form ── */
.meta-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  font-family: var(--ff-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.unknown-time-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.unknown-time-label input { accent-color: var(--text); }

.form-footer { margin-top: 1.5rem; }
#form-error { color: red; padding-left: 10px; font-family: var(--ff-sans); font-size: 0.72rem; margin-bottom: 0.75rem; min-height: 1rem; }

/* Submit Button */
.btn-calculate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--text);
  color: var(--text);
  font-family: var(--ff-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.6rem 1.75rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.btn-calculate:hover:not(:disabled) {
  background: var(--text);
  color: var(--bg);
}
.btn-calculate:disabled { opacity: 0.5; cursor: not-allowed; }

/* ────────────────────────────────────────────
   WHEEL + ANALYSIS
──────────────────────────────────────────── */
#zodiac-wheel {
  width: 100%;
  aspect-ratio: 1;
}

#zodiac-wheel svg {
  width: 100% !important;
  height: auto !important;
}

.analysis-col {
  width: 100%;
}

.placement-list {
  list-style: none;
  width: 100%;
  border-top: 1px solid var(--border);
}

.placement-item {
  display: grid;
  grid-template-columns: 110px 1fr 70px;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.pi-sign {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.pi-planet {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 400;
  text-align: center;
  color: var(--text-dim);
}

.pi-degree {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  text-align: right;
  color: var(--text-muted);
}

.result-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 1.5rem;
}

.btn-recalc {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  border: 1px solid var(--text);
  padding: 0.5rem 1.25rem;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-recalc:hover { 
  background: var(--text);
  color: var(--bg);
}


/* ── Elemental Colors ── */
.color-fire  { color: #e87474 !important; }
.color-earth { color: #74ba82 !important; }
.color-air   { color: #a084c7 !important; }
.color-water { color: #79a3db !important; }

/* ── Big Three Summary Sentence ── */
/* ── Big Three Summary Sentence ── */
.about-text {
  font: normal 15.5px/27px 'GaramondNo8', 'Times New Roman', Times, serif;
  letter-spacing: 0.5px;
  font-variant-ligatures: none;
  color: var(--text-dim);
  margin-top: 3rem;
  max-width: 400px;
  line-height: 1.1;
  font-style: italic;
}

.about-text p + p {
  text-indent: 65px;
}

.about-text a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-text a:hover {
  color: var(--text);
}

@media only screen and (max-width: 1024px) {
  .about-text {
    font-size: 16px;
    line-height: 21px;
  }
}

.birth-details {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}

.big-three-summary {
  font-family: var(--ff-sans);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.big-three-summary strong {
  font-family: var(--ff-sans);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 0.05em;
  color: var(--text);
}

/* New class for your custom Base64 SVGs */
img.custom-glyph {
  height: 1.1em; /* Scales perfectly with whatever font size the text is */
  width: auto;
  margin: 0 0.3rem;
  display: inline-block;
  vertical-align: middle;
  transform: translateY(-2px); /* Nudges the icon up slightly to sit on the baseline */
}

/* ────────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────────── */
@media (max-width: 820px) {
  .analysis-col {
    padding: 1rem 0;
  }
}
/* ── Wheel appear animation ── */
@keyframes wheelAppear {
  0%   { opacity: 0; transform: rotate(-8deg) scale(0.93); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: rotate(0deg) scale(1); }
}

.wheel-appear {
  animation: wheelAppear 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
