/* =============================================================
   LA ESTRELLA DULCES REGIONALES — Página de mantenimiento
   CSS modular con variables. Sin frameworks (sin Tailwind/Bootstrap).
   Pensado para poder reutilizarse tal cual dentro del sitio principal.
   ============================================================= */

/* -------------------------------------------------------------
   1. VARIABLES (design tokens)
   ------------------------------------------------------------- */
:root {
  /* Color */
  --color-cream: #fbf6ec;
  --color-cream-dark: #f2e9d8;
  --color-white: #ffffff;
  --color-ink: #241b15;
  --color-ink-soft: #4a3f35;
  --color-red: #c21e2c;
  --color-red-dark: #8f1620;
  --color-amber: #e8a33d;
  --color-pine: #2f4b3c;

  /* Tipografía */
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Poppins", system-ui, -apple-system, sans-serif;

  /* Espaciado (escala base 8px) */
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-5: 3rem;     /* 48px */
  --space-6: 4rem;     /* 64px */

  /* Radios y sombras */
  --radius-card: 28px;
  --radius-pill: 999px;
  --radius-sm: 12px;
  --shadow-card: 0 30px 80px -30px rgba(36, 27, 21, 0.25), 0 8px 24px -12px rgba(36, 27, 21, 0.12);
  --shadow-btn: 0 12px 28px -8px rgba(194, 30, 44, 0.45);
  --shadow-btn-hover: 0 18px 36px -8px rgba(194, 30, 44, 0.55);

  /* Transiciones */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-base: 0.3s;
}

/* -------------------------------------------------------------
   2. RESET / BASE
   ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background-color: var(--color-cream);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

address {
  font-style: normal;
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------------------------------------------------
   3. FONDO — marca de agua de la catedral (extremadamente tenue)
   ------------------------------------------------------------- */
.watermark-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.watermark-bg__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.5;
  /* "Respiro" extremadamente lento: zoom casi imperceptible en loop. */
  animation: watermark-breathe 60s var(--ease-out) infinite alternate;
  transform-origin: center;
}

@keyframes watermark-breathe {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.045);
  }
}

/* -------------------------------------------------------------
   4. LAYOUT PRINCIPAL
   ------------------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, var(--space-6)) clamp(1rem, 4vw, var(--space-4));
}

/* -------------------------------------------------------------
   5. TARJETA FLOTANTE (componente reutilizable: .floating-card)
   ------------------------------------------------------------- */
.floating-card {
  position: relative;
  width: 100%;
  max-width: 600px;
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(2rem, 6vw, var(--space-6)) clamp(1.5rem, 5vw, var(--space-5));
  text-align: center;
  animation: card-enter 0.9s var(--ease-out) both;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Cascada suave de los hijos directos de la tarjeta */
.floating-card > * {
  animation: child-enter 0.7s var(--ease-out) both;
}
.floating-card > *:nth-child(1) { animation-delay: 0.1s; }
.floating-card > *:nth-child(2) { animation-delay: 0.2s; }
.floating-card > *:nth-child(3) { animation-delay: 0.3s; }
.floating-card > *:nth-child(4) { animation-delay: 0.4s; }
.floating-card > *:nth-child(5) { animation-delay: 0.48s; }
.floating-card > *:nth-child(6) { animation-delay: 0.56s; }
.floating-card > *:nth-child(7) { animation-delay: 0.64s; }
.floating-card > *:nth-child(8) { animation-delay: 0.72s; }
.floating-card > *:nth-child(9) { animation-delay: 0.8s; }

@keyframes child-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------------------------------------------
   6. MARCA (componente: .brand-mark)
   ------------------------------------------------------------- */
.brand-mark {
  margin: 0 0 var(--space-3);
}

.brand-mark__logo {
  height: clamp(96px, 18vw, 132px);
  width: auto;
  margin: 0 auto;
}

/* -------------------------------------------------------------
   7. PÍLDORA DE ESTADO (componente: .status-pill)
   ------------------------------------------------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0 0 var(--space-4);
  padding: 0.5rem 1.1rem;
  border: 1px solid rgba(232, 163, 61, 0.5);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
}

.status-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-amber);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(232, 163, 61, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(232, 163, 61, 0);
  }
}

/* -------------------------------------------------------------
   8. TÍTULO Y TEXTO DE APOYO
   ------------------------------------------------------------- */
.headline {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  line-height: 1.15;
  color: var(--color-ink);
}

.support-text {
  margin: 0 0 var(--space-4);
  max-width: 440px;
  margin-inline: auto;
}

.support-text p {
  margin: 0 0 var(--space-2);
  font-size: clamp(0.9rem, 2vw, 1rem);
  line-height: 1.65;
  color: var(--color-ink-soft);
}

.support-text p:last-child {
  margin-bottom: 0;
}

.support-text--emphasis {
  font-weight: 600;
  color: var(--color-ink);
}

/* -------------------------------------------------------------
   9. DIVISOR (componente: .divider)
   ------------------------------------------------------------- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.divider__line {
  height: 1px;
  width: clamp(40px, 12vw, 72px);
  background: var(--color-cream-dark);
}

.divider__accent {
  font-size: 0.75rem;
  color: var(--color-amber);
}

.divider--footer {
  margin: var(--space-4) 0 var(--space-3);
}

.divider--footer .divider__line {
  width: 100%;
  max-width: 320px;
}

/* -------------------------------------------------------------
   10. CONTACTO (componente: .contact-item)
   ------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
}

.contact-item--full {
  grid-column: 1 / -1;
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-cream-dark);
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: transform var(--duration-base) var(--ease-out);
}

.contact-item:hover,
.contact-item:focus-visible {
  transform: translateY(-3px);
}

.contact-item__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-cream);
  color: var(--color-amber);
  transition: background-color var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out);
}

.contact-item:hover .contact-item__icon,
.contact-item:focus-visible .contact-item__icon {
  background: var(--color-amber);
  color: var(--color-white);
}

.contact-item__label {
  font-size: 0.78rem;
  color: var(--color-ink-soft);
}

.contact-item__value {
  font-size: clamp(0.82rem, 2vw, 0.95rem);
  font-weight: 600;
  color: var(--color-red);
}

.contact-item__value--email {
  word-break: break-word;
  font-size: clamp(0.85rem, 2.2vw, 0.95rem);
}

/* -------------------------------------------------------------
   11. CTA PRINCIPAL (componente: .btn-whatsapp)
   ------------------------------------------------------------- */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 420px;
  padding: 1.1rem 2rem;
  border-radius: var(--radius-pill);
  background: var(--color-red);
  color: var(--color-cream);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  box-shadow: var(--shadow-btn);
  transition: transform var(--duration-base) var(--ease-out),
    background-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.btn-whatsapp:hover,
.btn-whatsapp:focus-visible {
  background: var(--color-red-dark);
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-2px);
}

.btn-whatsapp:active {
  transform: translateY(0);
}

.trust-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: var(--space-2) 0 0;
  font-size: 0.8rem;
  color: var(--color-amber);
}

/* -------------------------------------------------------------
   12. FIRMA FINAL (componente: .signature)
   ------------------------------------------------------------- */
.signature {
  margin: 0;
}

.signature__script {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--color-amber);
}

.signature__tagline {
  margin: 0.15rem 0 var(--space-2);
  font-size: 0.85rem;
  color: var(--color-ink-soft);
}

.signature__copyright {
  margin: 0;
  font-size: 0.72rem;
  color: var(--color-ink-soft);
  opacity: 0.7;
}

/* -------------------------------------------------------------
   13. RESPONSIVE — móvil pequeño (320px+)
   ------------------------------------------------------------- */
@media (max-width: 420px) {
  .contact-grid {
    gap: var(--space-2);
  }

  .contact-item__icon {
    width: 42px;
    height: 42px;
  }
}

/* -------------------------------------------------------------
   14. PANTALLAS GRANDES / 4K
   ------------------------------------------------------------- */
@media (min-width: 2000px) {
  .floating-card {
    max-width: 720px;
  }
}

/* -------------------------------------------------------------
   15. ACCESIBILIDAD — reduced motion
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .watermark-bg__image,
  .floating-card,
  .floating-card > *,
  .status-pill__dot {
    animation: none !important;
  }

  .floating-card > * {
    opacity: 1;
    transform: none;
  }

  .btn-whatsapp,
  .contact-item {
    transition: none;
  }
}
