/* ================= ROOT ================= */

:root {
  --bg: #f5f2ed;
  --text-main: #2e2a26;
  --text-soft: #59534d;
  --line: #d8d1c8;
  --focus-ring: #8f765f;
  --home-copy-width: 360px;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/CormorantRegular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/CormorantSemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/CormorantMediumItalic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.page-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.home-page .page-root::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background:
    radial-gradient(1200px 640px at 14% 22%, rgba(176, 199, 225, 0.12), transparent 60%),
    radial-gradient(940px 580px at 86% 32%, rgba(231, 214, 194, 0.11), transparent 62%),
    radial-gradient(740px 420px at 50% 80%, rgba(205, 223, 216, 0.1), transparent 65%);
}

.home-page .page-root > * {
  position: relative;
  z-index: 1;
}

/* ================= HEADER ================= */

.header {
  text-align: center;
  padding: 24px 20px 12px;
}

.title {
  font-family: "Cormorant Garamond", "Cormorant", serif;
  font-size: clamp(2.4rem, 4vw, 3rem);
  letter-spacing: 0.18em;
  font-weight: 400;
  margin-bottom: 10px;
  color: #d8b46f;
}

.title-link {
  color: inherit;
  text-decoration: none;
}

.subtitle {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3d2f26;
  margin: 0 auto;
  line-height: 1.8;
}

/* ================= MAIN ================= */

.main-container {
  display: grid;
  align-items: flex-start;
  padding: 16px 8vw 10px;
  gap: 40px;
  flex: 1;
}

.home-grid {
  grid-template-columns: minmax(320px, 1fr) auto minmax(320px, 1fr);
  grid-template-areas: "solar center lunar";
}

.home-solar {
  grid-area: solar;
  justify-self: stretch;
  padding-left: 24px;
}

.home-center {
  grid-area: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  width: 320px;
  height: 320px;
  aspect-ratio: 1 / 1;
}

@supports (width: min(1px, 2px)) {
  .home-center {
    width: min(360px, 60vw);
    height: min(360px, 60vw);
  }
}

.home-lunar {
  grid-area: lunar;
  justify-self: stretch;
  padding-right: 24px;
}

.home-solar.is-empty,
.home-lunar.is-empty {
  align-self: center;
}

.home-solar.is-active,
.home-lunar.is-active {
  align-self: flex-start;
  padding-top: 20px;
}

.home-lunar .section-label,
.home-lunar .timestamp,
.home-lunar .daily-message,
.home-lunar .moon-block,
.home-lunar .moon-text {
  text-align: right;
  text-transform: none;
}

.home-lunar .home-copy {
  align-items: flex-end;
  text-align: right;
}

.home-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  width: min(var(--home-copy-width), 100%);
  max-width: var(--home-copy-width);
  margin: 0 auto;
}

.home-copy.is-empty {
  align-items: center;
  text-align: center;
  justify-content: center;
}

.home-copy.is-empty .section-label {
  text-align: center;
  margin-bottom: 0;
}

.home-copy.is-empty .home-divider,
.home-copy.is-empty .timestamp,
.home-copy.is-empty .daily-message,
.home-copy.is-empty .moon-block {
  display: none;
}

.home-copy.is-active {
  align-items: flex-start;
  text-align: left;
  justify-content: flex-start;
}

.section-label {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 10px;
  text-align: left;
  width: 100%;
  align-self: flex-start;
}

.timestamp {
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-bottom: 18px;
  letter-spacing: 0.05em;
}

.daily-message {
  font-family: "Lora", serif;
  font-size: 1.35rem;
  line-height: 1.9;
  font-style: italic;
  margin-bottom: 20px;
  text-align: left;
  text-wrap: normal;
  max-width: 100%;
  color: #5a524b;
}

.moon-block {
  margin-top: 6px;
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.moon-block.visible {
  opacity: 1;
  transform: translateY(0);
}

.moon-text {
  font-family: "Cormorant Garamond", "Cormorant", serif;
  font-size: 1.28rem;
  line-height: 1.9;
  font-style: italic;
  text-align: left;
  text-wrap: balance;
  color: #5a524b;
}

.moon-text .moon-phase,
.moon-text .moon-signo {
  font-family: "Cormorant Garamond", "Cormorant", serif;
  font-style: italic;
  font-size: 1.28rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  color: #7b624a;
}

.moon-text .moon-prep {
  font-family: "Cormorant Garamond", "Cormorant", serif;
  font-style: italic;
  font-size: 1.28rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  color: #7b624a;
  margin: 0 4px;
  display: inline;
  transform: none;
}


/* ================= RIGHT ================= */

.celestial-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-width: none;
  cursor: pointer;
  transition: transform 0.6s ease, opacity 0.6s ease, filter 0.6s ease;
}

#sunBtn {
  animation: sunPulse 6.5s ease-in-out infinite;
}

.celestial-btn:hover {
  transform: scale(1.05);
}

#moonBtn:hover {
  transform: scale(1.07);
  filter: drop-shadow(0 12px 22px rgba(160, 150, 140, 0.28));
}

#moonBtn.moon-hint {
  animation: moonPulse 7s ease-in-out infinite;
}

.home-lunar:hover #moonBtn {
  animation: moonPulse 5.5s ease-in-out infinite;
}

#sunBtn {
  animation: sunPulse 6s ease-in-out infinite;
}

.celestial-btn:focus-visible,
.personal-btn:focus-visible,
.input-text:focus-visible,
.textarea:focus-visible,
.tag:focus-visible,
.pay-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.hidden {
  display: none;
}

/* ================= CTA ================= */

.personal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0;
  padding: 6px 4px;
  font-family: "Cormorant", serif;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  text-transform: none;
  border: none;
  border-radius: 0;
  text-decoration: none;
  color: var(--text-main);
  opacity: 0.85;
  background: transparent;
  transition: color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  position: relative;
  isolation: isolate;
  line-height: 1.25;
}

.personal-btn::before {
  display: none;
}

.personal-btn:hover::before {
  opacity: 0.85;
}

.personal-btn::after {
  display: none;
}


.bottom-zone {
  padding: 0 8vw 40px;
}

.cta-transition {
  margin-top: 0;
  padding-top: 10px;
  border-top: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-page .personal-btn {
  letter-spacing: 0.02em;
  font-size: 1.2rem;
  min-width: 0;
  text-align: center;
}

.personal-btn.active {
  opacity: 1;
}

.personal-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  color: #26221d;
}


/* ================= PÁGINA 2 – LECTURA PERSONAL ================= */

.lp-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-rows: auto 1fr auto;
  gap: 0 60px;
  padding: 40px 8vw 20px;
  flex: 1;
}

@supports not (display: grid) {
  .home-grid,
  .lp-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: center;
  }

  .home-copy,
  .home-solar,
  .home-lunar,
  .lp-cell,
  .lp-form,
  .lp-tags,
  .lp-instructions,
  .lp-pay {
    width: 100%;
    max-width: 560px;
  }

  .home-copy {
    align-items: center;
    text-align: center;
  }

  .home-copy.is-active {
    align-items: center;
    text-align: center;
  }
}

/* Fila 1 — Labels */
.lp-label-left {
  padding-bottom: 14px;
  padding-left: 18px;
}

.lp-label-right {
  padding-bottom: 14px;
  padding-left: 18px;
}

/* Fila 2 — Contenido */
.lp-form {
  display: flex;
  flex-direction: column;
}

.lp-form .label {
  padding-left: 18px;
}

.lp-tags {
  display: flex;
  flex-direction: column;
}

/* Fila 3 — Instrucciones y botón */
.lp-instructions {
  padding-top: 20px;
  padding-left: 18px;
  font-family: "Lora", serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 2;
  text-align: left;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
}

.lp-pay {
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}

/* ---- CAMPOS ---- */

.label {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 14px;
  display: block;
}

.input-text,
.textarea {
  width: 100%;
  background: rgba(255, 252, 248, 0.84);
  border: 1px solid rgba(205, 195, 183, 0.9);
  padding: 16px 18px;
  font-family: "Lora", serif;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 36px;
  border-radius: 18px 24px 16px 22px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    0 6px 14px rgba(124, 104, 90, 0.05);
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.input-text:focus,
.textarea:focus {
  outline: none;
  border-color: #bfae9c;
  box-shadow: 0 0 0 2px rgba(191,174,156,0.15);
}

.textarea {
  min-height: 160px;
  resize: vertical;
  border-radius: 22px 18px 24px 16px;
}

/* ---- TAGS ---- */

.tags-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-content: flex-start;
}

.tag {
  padding: 10px 22px;
  border-radius: 28px;
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: 1px solid rgba(200, 170, 170, 0.35);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 215, 225, 0.5), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(255, 220, 170, 0.3), transparent 60%),
    linear-gradient(135deg, #f5f2ed, #eee6df);
  transition: box-shadow 0.3s ease, background 0.35s ease, border-color 0.3s ease, transform 0.2s ease;
}

.tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(190, 160, 160, 0.18);
}

.tag.selected {
  border: 1px solid rgba(200, 170, 120, 0.45);
  background:
    radial-gradient(circle at 60% 40%, rgba(255, 200, 140, 0.45), transparent 60%),
    radial-gradient(circle at 40% 60%, rgba(232, 239, 241, 0.679), transparent 40%),
    linear-gradient(135deg, #efe2d5, #e5d3c6);
  box-shadow: 0 7px 20px rgba(180, 140, 120, 0.2);
  transform: translateY(-1px);
}

/* ---- ERROR ---- */

.form-error {
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  color: #8a5a5a;
  margin-top: -20px;
  margin-bottom: 20px;
}

.pay-disabled-note {
  margin-top: 12px;
  margin-bottom: 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(190, 170, 150, 0.4);
  background: rgba(247, 239, 231, 0.85);
  color: #5c524a;
  text-align: center;
  line-height: 1.5;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.78rem;
}

/* ---- BOTÓN DE PAGO ---- */

.pay-btn {
  width: fit-content;
  max-width: 100%;
  padding: 14px 30px;
  border-radius: 60px;
  border: 1px solid rgba(200, 170, 170, 0.35);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 215, 225, 0.5), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(255, 220, 170, 0.3), transparent 60%),
    linear-gradient(135deg, #f5f2ed, #eee6df);
  color: #2e2a26;
  font-family: "Inter", sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.2s ease, border-color 0.25s ease;
}

  .pay-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(200, 170, 170, 0.5);
    box-shadow: none;
  }

  .pay-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }

/* ---- STRIPE COMPONENT ---- */

stripe-buy-button {
  --stripe-button-border-radius: 40px;
  --stripe-button-background-color: #2e2a26;
  --stripe-button-text-color: #ffffff;
  --stripe-button-hover-background-color: #1f1b17;
}

/* ================= FOOTER ================= */

.footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-soft);
  padding: 22px;
  border-top: 1px solid var(--line);
  position: relative;
}

.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-page .legal-container {
  flex: 1;
}

.footer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 0 8vw;
  margin: 0 auto;
  position: relative;
}

.footer-copy {
  margin: 0;
  text-align: right;
  justify-self: end;
}

@media (min-width: 1000px) {
  .footer-copy {
    white-space: nowrap;
  }
}

.footer-links {
  margin: 0;
  white-space: nowrap;
  text-align: left;
  justify-self: start;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.home-divider {
  height: 1px;
  width: 100%;
  max-width: 100%;
  background: #cfc6bb;
  margin: 2px 0 16px;
  display: none;
}

.home-solar.is-active .home-divider,
.home-lunar.is-active .home-divider {
  display: block;
  margin-left: 0;
}

.home-lunar .home-divider {
  margin-left: auto;
}

.cta-dot {
  font-size: 1.1rem;
  margin-right: 10px;
  opacity: 0.5;
}

.cta-text {
  display: inline-block;
  position: relative;
  padding: 6px 14px;
}

.cta-text::before {
  content: "";
  position: absolute;
  inset: -8px -18px;
  border-radius: 999px;
  background:
    radial-gradient(60% 120% at 18% 50%, rgba(216, 180, 111, 0.4), transparent 70%),
    radial-gradient(60% 120% at 36% 50%, rgba(243, 197, 210, 0.5), transparent 70%),
    radial-gradient(60% 120% at 58% 50%, rgba(247, 171, 144, 0.48), transparent 70%),
    radial-gradient(60% 120% at 78% 50%, rgba(246, 197, 154, 0.46), transparent 70%),
    radial-gradient(60% 120% at 94% 50%, rgba(205, 176, 220, 0.38), transparent 70%);
  opacity: 0.78;
  filter: blur(7px) saturate(1.02);
  z-index: -1;
  animation: aurora-haze 8s ease-in-out infinite;
}

.footer-dot {
  font-size: 1.1rem;
  color: var(--text-soft);
  opacity: 0.75;
  text-align: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.fade-in {
  animation: fadeIn 1.6s ease forwards;
}

.fade-out {
  animation: fadeOut 0.8s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

@keyframes sunPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@keyframes moonPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 10px 20px rgba(160, 150, 140, 0.22));
  }
  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 22px 36px rgba(160, 150, 140, 0.35));
  }
}

@keyframes aurora-haze {
  0%, 100% {
    filter: blur(6px);
    transform: scale(1);
  }
  50% {
    filter: blur(8px);
    transform: scale(1.015);
  }
}

.legal-container {
  width: min(760px, 92vw);
  margin: 0 auto 36px;
  font-family: "Lora", serif;
  color: var(--text-main);
  line-height: 1.75;
}

.legal-container h2 {
  font-family: "Cormorant", serif;
  font-size: 1.55rem;
  margin: 22px 0 8px;
  font-weight: 500;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {

  /* — Layout general — */
  .main-container {
    text-align: center;
    padding: 20px;
    overflow-x: hidden;
  }

  /* — Grid home — */
  .home-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "solar"
      "center"
      "lunar";
    gap: 16px;
    justify-items: center;
  }

  /* — Columnas solar y lunar — */
  .home-solar,
  .home-lunar {
    width: 100%;
    max-width: 420px;
    padding-left: 0;
    padding-right: 0;
  }

  .home-copy {
    align-items: center;
    text-align: center;
  }

  .home-lunar .section-label,
  .home-lunar .timestamp,
  .home-lunar .daily-message,
  .home-lunar .moon-block,
  .home-lunar .moon-text,
  .home-lunar .home-copy {
    text-align: center;
    align-items: center;
  }

  .daily-message,
  .moon-text,
  .moon-block {
    text-align: center;
  }

  /* El lunar empieza suave hasta que se activa */
  .home-lunar.is-empty {
    opacity: 0.45;
    transition: opacity 0.8s ease;
  }

  .home-lunar.is-active {
    opacity: 1;
  }

  /* — Círculo central — */
  .home-center {
    width: min(280px, 80vw);
    height: min(280px, 80vw);
    position: relative;
  }

  .celestial-btn {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* — CTA: halo intensificado, sin forma cerrada — */
  .bottom-zone {
    padding: 0 20px 26px;
  }

  .cta-transition {
    padding-top: 18px;
  }

  .cta-dot {
    display: none;
  }

  .home-page .personal-btn {
    font-size: 1.05rem;
    line-height: 1.4;
    width: 100%;
    max-width: 420px;
    padding: 8px 4px;
    min-height: 48px;
  }


  .cta-text {
    width: 100%;
    text-align: center;
    padding: 10px 20px;
  }

  /* Halo más presente en móvil */
  .cta-text::before {
    inset: -14px -20px;
    opacity: 0.95;
    filter: blur(11px) saturate(1.12);
    animation: aurora-haze 8s ease-in-out infinite;
  }

  /* — Footer — */
  .footer-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-copy {
    text-align: center;
  }

  .footer-dot {
    display: none;
  }

  /* — Página lectura personal — */
  .lp-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 22px;
    padding: 28px 20px 18px;
    display: flex;
    flex-direction: column;
  }

  .lp-label-left,
  .lp-label-right {
    padding-left: 0;
  }

  .lp-label-left { order: 1; }
  .lp-form { order: 2; }
  .lp-label-right { order: 3; }
  .lp-tags { order: 4; }
  .lp-instructions { order: 5; }
  .lp-pay { order: 6; }

  .lp-form .label {
    padding-left: 0;
  }

  .lp-instructions {
    padding-left: 0;
    text-align: center;
    align-items: center;
  }

  .lp-pay {
    justify-content: center;
  }

}


/* ================= PÁGINA 3 – AURORA (preparado) ================= */

.aurora-stage {
  position: relative;
  min-height: 60vh;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}


.aurora-message {
  font-family: "Lora", serif;
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-main);
  max-width: 600px;
}

.aurora-signature {
  margin-top: 20px;
  font-family: "Cormorant", serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.aurora-lights {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
