/* ── Astralis · style.css ─────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --deep:    #0d0b1e;
  --navy:    #181630;
  --purple:  #302b63;
  --violet:  #4a3f8f;
  --gold:    #d4af37;
  --gold-lt: #f0d875;
  --cream:   #f5f0e8;
  --white:   #ffffff;
  --text:    #1a1830;
  --muted:   #6b6880;
  --border:  rgba(212,175,55,0.2);

  --fuego:   #e24b4a;
  --tierra:  #639922;
  --aire:    #378add;
  --agua:    #7f77dd;

  --radius:  12px;
  --radius-lg: 20px;
  --shadow:  0 4px 24px rgba(13,11,30,0.12);
  --shadow-lg: 0 8px 48px rgba(13,11,30,0.18);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Tipografía ── */
h1, h2, h3 { font-family: 'Playfair Display', serif; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }

/* ── Header ── */
.site-header {
  background: var(--deep);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.logo-star { font-size: 1.1rem; }

.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold); }

/* ── Hero ── */
.hero {
  background: linear-gradient(160deg, var(--deep) 0%, var(--navy) 50%, var(--purple) 100%);
  color: white;
  text-align: center;
  padding: 80px 24px 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 20px rgba(212,175,55,0.3));
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 500;
}

.hero h1 {
  color: white;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  max-width: 520px;
  margin: 0 auto 40px;
}

/* ── Formulario ── */
.form-section {
  max-width: 680px;
  margin: -48px auto 0;
  padding: 0 24px 80px;
  position: relative;
  z-index: 10;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-lg);
}

.form-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--purple);
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }

label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"] {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: #fafaf8;
  border: 1.5px solid #e5e2d8;
  border-radius: 8px;
  padding: 10px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(74,63,143,0.1);
  background: white;
}

/* ── Buscador de lugar ── */
.place-wrapper { position: relative; }

.place-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1.5px solid #e5e2d8;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.place-results.visible { display: block; }

.place-option {
  padding: 10px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 0.5px solid #f0ede5;
  transition: background 0.15s;
}
.place-option:hover { background: #f8f6f0; }
.place-option .place-name { font-weight: 500; color: var(--text); }
.place-option .place-sub { font-size: 0.75rem; color: var(--muted); }
.place-option:last-child { border-bottom: none; }

/* ── Coords ── */
.coords-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.coords-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ── Botón principal ── */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--purple), var(--violet));
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 8px;
  letter-spacing: 0.3px;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.55; cursor: default; }

/* ── Loading ── */
.loading-overlay {
  display: none;
  text-align: center;
  padding: 48px 0;
}
.loading-overlay.visible { display: block; }
.spinner {
  width: 48px; height: 48px;
  border: 3px solid #e5e2d8;
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--muted); font-size: 0.95rem; }

/* ── Resultado ── */
#resultado { display: none; padding: 0 24px 80px; max-width: 860px; margin: 0 auto; }
#resultado.visible { display: block; }

/* ── Triada card ── */
.triada-card {
  background: linear-gradient(135deg, var(--deep), var(--navy));
  border-radius: var(--radius-lg);
  padding: 40px;
  color: white;
  text-align: center;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
}

.triada-nombre {
  font-size: 0.75rem;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.triada-titulo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin-bottom: 32px;
}

.triada-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.triada-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
}

.triada-item .t-label {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.triada-item .t-val {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
}

.triada-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.badge {
  background: rgba(212,175,55,0.15);
  border: 1px solid var(--border);
  color: var(--gold-lt);
  font-size: 0.8rem;
  padding: 4px 14px;
  border-radius: 20px;
}

/* ── Grid de planetas ── */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--purple);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--gold);
}

.planetas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.planeta-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--border);
  transition: transform 0.15s;
}
.planeta-card:hover { transform: translateY(-2px); }
.planeta-card.fuego  { border-left-color: var(--fuego);  }
.planeta-card.tierra { border-left-color: var(--tierra); }
.planeta-card.aire   { border-left-color: var(--aire);   }
.planeta-card.agua   { border-left-color: var(--agua);   }

.p-icono { font-size: 1.4rem; margin-bottom: 6px; }
.p-nombre { font-size: 0.75rem; font-weight: 600; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; }
.p-signo  { font-size: 1rem; font-weight: 600; color: var(--text); margin: 2px 0; }
.p-detalle { font-size: 0.78rem; color: var(--muted); }

/* ── Aspectos ── */
.aspectos-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 40px;
}

.aspecto-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: 8px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}

.asp-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.asp-armonioso { background: var(--tierra); }
.asp-tenso     { background: var(--fuego);  }
.asp-neutral   { background: var(--agua);   }

.asp-nombre { font-weight: 600; color: var(--purple); min-width: 100px; }
.asp-planetas { color: var(--text); flex: 1; }
.asp-orbe { font-size: 0.8rem; color: var(--muted); }

/* ── Interpretación ── */
.interpretacion-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
}

.interp-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--purple);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}
.interp-content h3:first-child { margin-top: 0; }

.interp-content p {
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 12px;
  font-size: 0.97rem;
}

.interp-content strong { color: var(--purple); }

/* ── CTA PDF ── */
.pdf-cta {
  background: linear-gradient(135deg, #f8f6f0, var(--cream));
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  text-align: center;
  margin-bottom: 40px;
}

.pdf-cta h3 {
  font-family: 'Playfair Display', serif;
  color: var(--purple);
  margin-bottom: 8px;
}

.pdf-cta p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--deep);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: 'Inter', sans-serif;
}
.btn-pdf:hover { background: var(--gold-lt); }
.btn-pdf:active { transform: scale(0.98); }
.btn-pdf:disabled { opacity: 0.5; cursor: default; }

/* ── Footer ── */
.site-footer {
  background: var(--deep);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 32px 24px;
  font-size: 0.85rem;
}
.site-footer a { color: var(--gold); text-decoration: none; }

/* ── Error ── */
.error-msg {
  background: #fff0f0;
  border: 1px solid #fcc;
  color: #c00;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-top: 12px;
  display: none;
}
.error-msg.visible { display: block; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .form-card { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .triada-items { grid-template-columns: 1fr 1fr; }
  .site-header { padding: 14px 20px; }
  .nav-links { display: none; }
  .interpretacion-card { padding: 24px 20px; }
  .pdf-cta { padding: 24px 20px; }
}
