@import url("../_shared/sections.css");

/* Plantilla "Noche estrellada": valores copiados de design/invitacion-movil.dc.html.
   --accent, --accent-hover y --link-hover llegan desde la paleta (invite/base.html). */

:root {
  --bg: #0D1230;
  --bg-alt: #131A3F;
  --bg-photo: #172047;
  --text: #F3EEE4;
  --text-2: #DCD8E8;
  --text-3: #B8B5CC;
  --text-soft: #D9D4E6;
  --muted: #8E8BA3;
  --accent: #C9A45C;
  --accent-hover: #E3C88E;
  --link-hover: #F3E2B8;
  --line-25: color-mix(in srgb, var(--accent) 25%, transparent);
  --line-40: color-mix(in srgb, var(--accent) 40%, transparent);
  --line-45: color-mix(in srgb, var(--accent) 45%, transparent);
  --line-50: color-mix(in srgb, var(--accent) 50%, transparent);
  --line-60: color-mix(in srgb, var(--accent) 60%, transparent);
  --line-soft: rgba(243, 238, 228, 0.25);
  --line-soft-2: rgba(243, 238, 228, 0.3);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Zen Kaku Gothic New", system-ui, sans-serif;
  --on-accent: var(--bg);
  --radius: 12px;
  --error: #F2B8AC; /* el mismo de .rsvp-error: se lee sobre el fondo oscuro */
}

body { margin: 0; background: var(--bg); }
a { color: var(--accent-hover); }
a:hover { color: var(--link-hover); }
button, input, textarea { font-family: inherit; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
[x-cloak] { display: none !important; }

.inv {
  min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text);
  font-family: var(--sans); overflow-x: hidden;
}
.inv-section { background: var(--bg); }
.inv-section--alt { background: var(--bg-alt); }
.inv-wrap {
  max-width: 460px; margin: 0 auto; padding: 56px 28px; box-sizing: border-box;
  display: flex; flex-direction: column;
}

/* --- Portada --- */
.cover {
  position: relative; padding: 28px 24px 56px; align-items: center;
  background-size: cover; background-position: center;
}
.cover--photo {
  background-image: linear-gradient(rgba(13, 18, 48, 0.55), rgba(13, 18, 48, 0.85)), var(--cover-photo);
}
.cover-sky { position: absolute; top: 0; left: 0; width: 100%; height: auto; pointer-events: none; }
.cover-sky .lines { stroke: var(--accent); stroke-opacity: 0.45; stroke-width: 0.8; fill: none; }
.cover-sky .bright { fill: var(--accent); }
.cover-sky .faint { fill: #F3EEE4; fill-opacity: 0.55; }
.cover-top { width: 100%; display: flex; justify-content: space-between; align-items: center; position: relative; }
.pill {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3);
  border: 1px solid var(--line-45); border-radius: 999px; padding: 6px 12px;
}
.kanji-top { font-size: 22px; color: var(--accent); }
.chapter {
  margin-top: 72px; font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--accent); position: relative; text-align: center;
}
.names {
  margin: 18px 0 0; font-family: var(--serif); font-weight: 500; font-size: min(64px, 16.45vw);
  line-height: 0.95; text-align: center; letter-spacing: 0.01em; position: relative;
  overflow-wrap: anywhere;
}
.names--spaced { margin-top: 72px; }
/* 64 y 40 px desde 390 de ancho (la referencia); más angosto se achican para que un nombre
   largo («Maximiliano») entre entero en su línea. */
.names .amp { font-style: italic; font-weight: 400; font-size: min(40px, 10.3vw); color: var(--accent); }
.subtitle {
  margin: 18px 0 0; font-family: var(--serif); font-style: italic; font-size: 22px;
  color: var(--text-soft); position: relative;
}
.photo-frame {
  margin-top: 36px; width: 100%; max-width: 280px; aspect-ratio: 280 / 360;
  border-radius: 140px 140px 14px 14px; border: 1px solid var(--line-60); padding: 8px;
  box-sizing: border-box; position: relative;
}
.photo-inner {
  width: 100%; height: 100%; border-radius: 132px 132px 8px 8px; background: var(--bg-photo);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-align: center; padding: 24px; box-sizing: border-box; overflow: hidden;
}
.photo-inner--image { padding: 0; }
.photo-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-hint { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.cover-date {
  margin-top: 32px; display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-size: 22px; letter-spacing: 0.06em;
}
.cover-date .sep { width: 1px; height: 22px; background: var(--line-60); }
.cover-date .day { font-size: 34px; font-weight: 600; color: var(--accent); }

/* --- Saludo --- */
.greeting-wrap { padding: 48px 28px; gap: 16px; }
.greeting { margin: 0; font-family: var(--serif); font-style: italic; font-size: 32px; line-height: 1.1; }
.lead { margin: 0; font-size: 16px; line-height: 1.7; color: var(--text-2); }
.personal-note {
  margin: 4px 0 0; font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px;
}
.personal-note svg { stroke: var(--accent); flex: none; }

/* --- Cuenta regresiva --- */
.countdown-wrap { align-items: center; gap: 20px; }
.caps { font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent); }
.count-row { width: 100%; display: flex; justify-content: center; gap: 16px; }
.count-box {
  flex: 1 1 0; max-width: 150px; padding: 22px 0; border: 1px solid var(--line-40); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.count-num { font-family: var(--serif); font-size: 56px; font-weight: 500; line-height: 1; }
.count-unit { font-size: 13px; color: var(--text-3); letter-spacing: 0.08em; }
.count-today { margin: 0; font-family: var(--serif); font-style: italic; font-size: 32px; }

/* --- Programa --- */
.program-wrap { gap: 28px; }
.program-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 40px; }
.program-date { font-size: 13px; color: var(--text-3); }
.timeline { display: flex; flex-direction: column; border-left: 1px solid var(--line-50); margin-left: 6px; }
.moment { position: relative; padding: 0 0 36px 26px; display: flex; flex-direction: column; gap: 8px; }
.moment:last-child { padding-bottom: 4px; }
.moment .dot {
  position: absolute; left: -6px; top: 10px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent);
}
.m-time { font-family: var(--serif); font-size: 34px; font-weight: 600; color: var(--accent); line-height: 1; }
.m-day { font-size: 13px; color: var(--text-3); }
.m-title { font-size: 18px; font-weight: 700; }
.m-place { font-size: 15px; line-height: 1.6; color: var(--text-2); overflow-wrap: anywhere; }
.m-note { font-size: 13px; color: var(--text-3); }
.btn-map {
  align-self: flex-start; margin-top: 6px; min-height: 44px; display: inline-flex; align-items: center;
  gap: 8px; padding: 0 18px; border: 1px solid var(--line-60); border-radius: 999px; font-size: 14px;
  text-decoration: none; box-sizing: border-box;
}
/* "Cómo llegar" y "Abrir en Waze", uno al lado del otro (bajan si no entran). */
.map-links { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.map-links .btn-map { margin-top: 0; }

/* --- Confirmación --- */
.rsvp-wrap { gap: 18px; }
.rsvp-form, .rsvp-done, .rsvp-person { display: flex; flex-direction: column; gap: 20px; }
.rsvp-person + .rsvp-person { padding-top: 28px; border-top: 1px solid var(--line-25); }
.h2-rsvp { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1.05; }
.person-name { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 28px; line-height: 1.1; }
.rsvp-lead { margin: 0; font-size: 15px; color: var(--text-2); line-height: 1.6; }
.choices { margin: 0; padding: 0; border: none; display: flex; flex-direction: column; gap: 12px; }
.choice {
  min-height: 52px; border-radius: 12px; border: 1px solid var(--line-soft-2); background: transparent;
  color: var(--text); font-size: 16px; font-weight: 500; cursor: pointer;
}
.choice--yes[aria-pressed="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.choice--no[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.inv-field { display: flex; flex-direction: column; gap: 8px; }
.inv-field label { font-size: 14px; color: var(--text-2); }
.inv-field .hint { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.inv-input, .inv-textarea {
  width: 100%; box-sizing: border-box; border-radius: 12px; border: 1px solid var(--line-soft);
  background: var(--bg-alt); color: var(--text); font-size: 16px;
}
.inv-input { min-height: 52px; padding: 0 14px; }
.inv-textarea { padding: 14px; resize: none; }
.send {
  min-height: 52px; border-radius: 999px; border: 1px solid var(--line-soft); background: transparent;
  color: var(--muted); font-size: 16px; font-weight: 700; cursor: pointer;
}
.send:not(:disabled) { background: var(--text); color: var(--bg); border-color: var(--text); }
.send:disabled { cursor: not-allowed; }
.send-hint { margin: -6px 0 0; font-size: 13px; color: var(--text-3); text-align: center; }
.rsvp-error { margin: 0; font-size: 14px; color: #F2B8AC; }
.rsvp-notice {
  margin: 0; padding: 14px 16px; border: 1px solid var(--line-45); border-radius: 12px;
  font-size: 14px; line-height: 1.6; color: var(--text-2);
}
.thanks-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  padding: 28px 20px; border: 1px solid var(--line-45); border-radius: 16px;
}
.thanks-card .kanji { font-size: 30px; color: var(--accent); }
.thanks-card h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 36px; line-height: 1.1; }
.thanks-card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-2); overflow-wrap: anywhere; }
.thanks-card strong { font-weight: 500; color: var(--text); }
.gifts-card {
  display: flex; flex-direction: column; gap: 14px; padding: 28px 22px; background: var(--bg-alt);
  border-radius: 16px;
}
.gifts-label {
  display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--accent);
}
.gifts-text { display: flex; flex-direction: column; gap: 10px; }
.gifts-text h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.1; }
.gifts-text p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text-2); }
.btn-gifts {
  margin-top: 4px; min-height: 52px; border-radius: 999px; border: none; background: var(--accent);
  color: var(--bg); font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
}
.btn-gifts:hover { color: var(--bg); background: var(--accent-hover); }
.gifts-methods { margin: 0; font-size: 13px; color: var(--text-3); text-align: center; }
.in-person {
  min-height: 44px; border: none; background: transparent; color: var(--accent); font-size: 14px;
  text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
.in-person-done { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); text-align: center; }
.change {
  align-self: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  display: inline-flex; align-items: center; box-sizing: border-box; text-decoration: none;
  border: 1px solid var(--line-soft-2); background: transparent; color: var(--text); font-size: 14px;
  cursor: pointer;
}

/* --- Pie --- */
.footer-wrap {
  padding: 64px 28px 72px; align-items: center; gap: 10px; text-align: center;
  border-top: 1px solid var(--line-25);
}
.footer-kanji { font-size: 56px; color: var(--accent); opacity: 0.85; }
.footer-names { font-family: var(--serif); font-size: 30px; font-weight: 500; }
.footer-date { font-size: 13px; letter-spacing: 0.24em; color: var(--text-3); }
.footer-closing { margin-top: 14px; font-size: 12px; color: var(--text-3); font-style: italic; }

/* --- Páginas sueltas (portada pública, neutra, regalos) --- */
.notice-wrap { padding: 48px 28px; gap: 18px; align-items: center; text-align: center; }
.notice-wrap .lead { max-width: 360px; }
.notice-wrap .btn-gifts { align-self: stretch; }
.notice-wrap .btn-map { align-self: center; }
.rsvp-block { display: flex; flex-direction: column; }
