/* =========================================================
   Invitación · Cumpleaños número 70
   Cartel impreso: papel crema, azul marino y naranja quemado.
   Pensado primero para celular.
   ========================================================= */

:root {
  --paper: #f3e9d8;
  --paper-2: #eee2cc;
  --paper-deep: #e6d6ba;

  --navy: #1b2d4f;
  --navy-deep: #111f3a;
  --navy-soft: #4d5f80;

  --orange: #c4592a;
  --orange-deep: #a8461d;

  --rule: #cdbb9c;

  --font-title: 'Archivo Black', Impact, sans-serif;
  --font-caps: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --font-brush: 'Yellowtail', 'Brush Script MT', cursive;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  color-scheme: light;
}

* { box-sizing: border-box; }

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

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--paper-deep);
  color: var(--navy);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

p { margin: 0; }

.page,
.poster {
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E"),
    radial-gradient(130% 90% at 50% 20%, #f7efe1 0%, var(--paper) 55%, var(--paper-2) 100%);
}

.page {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  overflow: hidden;
}

/* =========================================================
   Cartel
   ========================================================= */

.poster {
  position: relative;
  overflow: hidden;
  padding: max(54px, calc(env(safe-area-inset-top) + 16px)) 18px 26px;
  text-align: center;
  isolation: isolate;
}

.poster > *:not(.brush) { position: relative; z-index: 1; }

/* ---------- Brochazos de las esquinas ---------- */

.brush {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  height: auto;
}
.brush-top {
  top: -6px;
  left: -8px;
  width: 50%;
}
.brush-top-right {
  top: -54px;
  right: -30px;
  width: 26%;
  transform: scaleX(-1);
  opacity: 0.85;
}
.brush-bottom {
  right: -14px;
  bottom: -10px;
  width: 48%;
}
.brush-bottom-left {
  left: -16px;
  bottom: -12px;
  width: 26%;
  transform: scaleX(-1);
  opacity: 0.9;
}

/* ---------- Trazo naranja ---------- */

.stroke {
  display: block;
  width: 58%;
  max-width: 240px;
  height: 5px;
  margin: 8px auto 0;
  border-radius: 50% / 100%;
  background: linear-gradient(90deg, transparent 0%, var(--orange) 14%, var(--orange) 72%, transparent 100%);
  transform: rotate(-1.5deg);
}
.stroke-sm { width: 120px; height: 4px; }

/* ---------- Lista de la esquina ---------- */

.corner-list {
  margin-left: auto;
  width: max-content;
  text-align: left;
  font-family: var(--font-caps);
  font-weight: 600;
  font-size: clamp(11px, 3.2vw, 13px);
  line-height: 1.55;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
}
.corner-list .stroke { margin: 6px 0 0 auto; }

/* ---------- Título en arco ---------- */

.title {
  margin: 10px 0 0;
  font-weight: normal;
}
.arc {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.arc text {
  font-family: var(--font-title);
  font-size: 76px;
  fill: var(--navy);
  /* contorno color papel para separar el título de los brochazos */
  stroke: var(--paper);
  stroke-width: 8px;
  stroke-linejoin: round;
  paint-order: stroke;
}

/* ---------- Ratón bajo el arco, entre dos reglas ---------- */

.mascot-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: -6%;
}
.mascot-row .rule {
  display: block;
  height: 2px;
  background: var(--orange);
  opacity: 0.85;
}
.mascot {
  display: block;
  width: 17vw;
  max-width: 96px;
  min-width: 62px;
}
.mascot img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 12px rgba(17, 31, 58, 0.3));
}

/* ---------- ¡Vamos a celebrarlo! ---------- */

.celebrate {
  margin-top: 10px;
  font-family: var(--font-brush);
  font-size: clamp(40px, 12vw, 58px);
  line-height: 1.1;
  color: var(--orange);
  transform: rotate(-3deg);
}

.invite {
  margin-top: 22px;
  font-family: var(--font-caps);
  font-weight: 600;
  font-size: clamp(19px, 5.6vw, 25px);
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
}

/* ---------- Fecha / hora / lugar ---------- */

.info {
  display: grid;
  /* la columna del lugar necesita mas ancho que la de la hora */
  grid-template-columns: 1.05fr 0.8fr 1.15fr;
  margin: 20px auto 0;
  max-width: 440px;
}
.info-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding: 2px 4px;
  font-family: var(--font-caps);
  text-transform: uppercase;
}
.info-col + .info-col { border-left: 1.5px solid var(--orange); }

.info-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  color: var(--navy);
}
.info-top {
  font-weight: 600;
  font-size: clamp(13px, 3.9vw, 16px);
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: var(--navy);
}
.info-top-strong { font-weight: 700; letter-spacing: 0.04em; }
.info-main {
  font-weight: 700;
  font-size: clamp(13px, 3.9vw, 18px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--orange);
}
.info-main-lg { font-size: clamp(19px, 5.6vw, 24px); }
.info-sub {
  font-weight: 600;
  font-size: clamp(11px, 3.4vw, 14px);
  letter-spacing: 0.08em;
  color: var(--navy);
}

/* Las columnas de fecha y lugar son links (calendario y mapa),
   pero se ven igual que la de la hora. */
.info-link {
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
  -webkit-tap-highlight-color: rgba(196, 89, 42, 0.18);
}
.info-link:active { background: rgba(196, 89, 42, 0.08); }
.info-link:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ---------- Botón CONFIRMA ---------- */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px auto 0;
  padding: 13px 26px;
  min-height: 52px;
  background: var(--orange);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-caps);
  font-size: clamp(19px, 5.6vw, 24px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: 0 8px 18px -8px rgba(168, 70, 29, 0.8);
  animation: cta-pulse 1.9s ease-in-out infinite;
}
.cta svg { width: 26px; height: 26px; flex: none; }
.cta:active { transform: scale(0.97); animation: none; }
.cta:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

@keyframes cta-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 18px -8px rgba(168, 70, 29, 0.8), 0 0 0 0 rgba(196, 89, 42, 0.5); }
  50% { transform: scale(1.05); box-shadow: 0 8px 18px -8px rgba(168, 70, 29, 0.8), 0 0 0 16px rgba(196, 89, 42, 0); }
}

/* Aviso que parpadea una vez cuando bajas a confirmar */
@keyframes rsvp-flash {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(196, 89, 42, 0); }
  35% { box-shadow: inset 0 0 0 5px var(--orange); }
}
.rsvp.flash { animation: rsvp-flash 1.1s ease-out 1; }

/* ---------- Donativo ---------- */

.gift {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 24px auto 0;
  max-width: 420px;
  text-align: left;
}
.gift-icon {
  flex: none;
  width: clamp(38px, 11vw, 46px);
  height: auto;
  color: var(--navy);
}
.gift p {
  padding-left: 14px;
  border-left: 1.5px solid var(--orange);
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: clamp(14px, 4.2vw, 17px);
  line-height: 1.35;
  color: var(--navy);
}

/* ---------- Logo del Club ---------- */

.club { margin-top: 20px; }
/* Logo del Club: cada pocos segundos "saluda" (se ladea), le pasa un
   destello y suelta un halo azul, para invitar a tocarlo. Entre saludos
   se queda quieto, así no compite con el latido del botón CONFIRMA. */
.club-link {
  position: relative;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  transform-origin: 50% 100%;
  -webkit-tap-highlight-color: rgba(0, 160, 227, 0.2);
  animation: club-nudge 4.5s ease-in-out 1.2s infinite;
}
.club-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.7) 48%, transparent 66%);
  transform: translateX(-130%);
  animation: club-shine 4.5s ease-in-out 1.2s infinite;
  pointer-events: none;
}
.club-link:active {
  animation: none;
  transform: scale(0.95);
}

@keyframes club-nudge {
  0%, 58%, 100% {
    transform: rotate(0deg) scale(1);
    box-shadow: 0 6px 14px -8px rgba(17, 31, 58, 0.45), 0 0 0 0 rgba(0, 160, 227, 0);
  }
  63% {
    transform: rotate(-5deg) scale(1.08);
    box-shadow: 0 12px 22px -8px rgba(17, 31, 58, 0.5), 0 0 0 5px rgba(0, 160, 227, 0.35);
  }
  69% { transform: rotate(4deg) scale(1.08); }
  75% { transform: rotate(-2.5deg) scale(1.05); }
  82% {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 8px 16px -8px rgba(17, 31, 58, 0.45), 0 0 0 14px rgba(0, 160, 227, 0);
  }
}

@keyframes club-shine {
  0%, 60% { transform: translateX(-130%); }
  80%, 100% { transform: translateX(130%); }
}
.club-link:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.club img {
  display: inline-block;
  width: clamp(120px, 34vw, 160px);
  height: auto;
  border-radius: 12px;
}

/* =========================================================
   Confirmación
   ========================================================= */

.rsvp {
  position: relative;
  padding: 34px 20px calc(30px + env(safe-area-inset-bottom));
  text-align: center;
  background: var(--navy);
  color: var(--paper);
  scroll-margin-top: 0;
}
.rsvp::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 6px;
  background: var(--orange);
}

.rsvp-kicker {
  font-family: var(--font-brush);
  font-size: 30px;
  line-height: 1;
  color: #e8925f;
}
.rsvp h2 {
  margin: 4px 0 8px;
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: clamp(24px, 7vw, 30px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
}
.rsvp-sub {
  margin: 0 auto 22px;
  max-width: 340px;
  font-size: 15px;
  line-height: 1.55;
  color: #c9cfdb;
}

.field {
  display: block;
  text-align: left;
  margin-bottom: 14px;
}
.field span {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-caps);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e8925f;
}
.field input {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  background: var(--paper);
  border: 2px solid var(--paper);
  border-radius: 6px;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 17px; /* >= 16px evita el zoom automático en iPhone */
  transition: border-color 0.15s ease;
}
.field input::placeholder { color: #a39679; }
.field input:focus {
  outline: none;
  border-color: var(--orange);
}

.field-note {
  margin: -4px 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: #ffb08a;
  text-align: left;
}

.rsvp-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  font-family: var(--font-caps);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:disabled { opacity: 0.6; cursor: default; }

.btn-confirm {
  background: var(--orange);
  border: 2px solid var(--orange);
  color: #fff;
}
.btn-confirm:hover { background: var(--orange-deep); border-color: var(--orange-deep); }

.btn-decline {
  background: transparent;
  border: 2px solid rgba(243, 233, 216, 0.55);
  color: var(--paper);
}
.btn-decline:hover { background: rgba(243, 233, 216, 0.08); }

/* ---------- Gracias ---------- */

.thanks { padding: 6px 4px 2px; }
.thanks-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
}
.thanks-icon.ok { background: var(--orange); color: #fff; }
.thanks-icon.no { border: 2px solid rgba(243, 233, 216, 0.6); color: var(--paper); }
.thanks p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--paper);
}
.thanks-calendar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 18px;
  padding: 12px 22px;
  border: 2px solid rgba(243, 233, 216, 0.55);
  border-radius: 999px;
  color: var(--paper);
  font-family: var(--font-caps);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.thanks-calendar:active { background: rgba(243, 233, 216, 0.1); }
.thanks-calendar[hidden] { display: none; }

.link-btn {
  display: block;
  margin: 14px auto 0;
  padding: 10px;
  background: none;
  border: none;
  color: #e8925f;
  font-family: var(--font-caps);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* ---------- Pantallas grandes: el cartel como tarjeta ---------- */

@media (min-width: 600px) {
  body { padding: 32px 16px; }
  .page {
    border-radius: 4px;
    box-shadow: 0 30px 60px -30px rgba(17, 31, 58, 0.45);
  }
  .poster { padding: 30px 30px 30px; }
  .rsvp { padding: 40px 48px 36px; }
  .rsvp-actions { flex-direction: row; }
  .mascot { width: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  .cta { animation: none; }
  .club-link,
  .club-link::after { animation: none; }
  .rsvp.flash { animation: none; }
  .btn { transition: none; }
}
