/* ==========================================================================
   Bodisea — demo de invitación
   ========================================================================== */

body.is-demo,
body.is-invitation {
  --paper: var(--d-paper);
  --paper-2: var(--d-paper-2);
  --paper-3: var(--d-paper-3);
  --card: var(--d-card);
  --ink: var(--d-ink);
  --ink-2: var(--d-ink-2);
  --ink-soft: var(--d-ink-soft);
  --olive: var(--d-olive);
  --olive-deep: var(--d-olive-deep);
  --sage: var(--d-sage);
  --line: var(--d-line);
  --line-strong: var(--d-line-strong);
  --font-display: var(--d-font-display);
  --font-sans: var(--d-font-sans);
  --cover-bg: var(--d-cover-bg);
  --cover-text: var(--d-cover-text);
  --cover-muted: var(--d-cover-muted);
  --cover-accent: var(--d-cover-accent);
  --cover-line: var(--d-cover-line);
  background: var(--paper);
}

/* Barra de demo ---------------------------------------------------------- */

.demo-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem clamp(1rem, 3vw, 1.5rem);
  background: rgba(22, 24, 15, 0.94);
  backdrop-filter: blur(8px);
  color: var(--on-dark);
  font-size: 0.74rem;
  line-height: 1.4;
}

.demo-bar a {
  color: var(--on-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(239, 237, 228, 0.4);
  padding-bottom: 1px;
}

.demo-bar a:hover {
  border-color: var(--on-dark);
}

.demo-bar__label {
  color: var(--on-dark-soft);
}

/* Portada ---------------------------------------------------------------- */

.cover {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(5rem, 12vh, 9rem) 1.5rem clamp(4rem, 10vh, 6rem);
  background: var(--cover-bg);
  color: var(--cover-text);
  overflow: clip;
}

.cover::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid var(--cover-line);
  pointer-events: none;
  z-index: 2;
}

.cover__photo {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(0.78) contrast(0.94);
  opacity: 0.42;
}

.cover__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cover-bg) 42%, transparent), color-mix(in srgb, var(--cover-bg) 82%, transparent));
}

.cover__inner {
  max-width: 620px;
  text-align: center;
  position: relative;
  z-index: 3;
}

.cover__kicker {
  color: var(--cover-accent);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.cover__names {
  margin: 1.6rem 0 1.4rem;
  font-family: var(--font-display);
  font-size: clamp(3.1rem, 9vw, 5.8rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.92;
}

.cover__names em {
  display: block;
  margin: 0.22rem 0;
  color: var(--cover-accent);
  font-size: 0.4em;
  line-height: 1;
}

.cover__date {
  color: var(--cover-muted);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
}

.cover__place {
  margin-top: 0.35rem;
  color: var(--cover-muted);
  font-size: 0.82rem;
}

.cover__scroll {
  position: absolute;
  inset: auto 0 1.6rem;
  color: var(--cover-muted);
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
  z-index: 3;
}

/* Variaciones de portada por diseño -------------------------------------- */

body.design-sal .cover__inner {
  max-width: 680px;
  text-align: right;
}

body.design-sal .cover__names {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.02;
  text-transform: uppercase;
}

body.design-sal .cover__names em {
  display: inline;
  font-size: 0.8em;
  font-style: normal;
}

body.design-sal .cover__kicker {
  letter-spacing: 0.32em;
}

body.design-tinta .cover__inner {
  max-width: 760px;
  text-align: left;
}

body.design-tinta .cover__names {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.96;
  text-transform: uppercase;
}

body.design-tinta .cover__names em {
  display: inline;
  font-size: 0.7em;
  font-style: normal;
}

body.design-tinta .cover::before {
  inset: 22px;
  border: 0;
  border-left: 1px solid var(--cover-line);
}

body.design-terracota .cover::before {
  inset: 24px 24px 0;
  border: 1px solid var(--cover-line);
  border-radius: 999px 999px 0 0;
}

body.design-terracota .cover__names em {
  font-style: normal;
}

body.design-lavanda .cover__names {
  font-style: italic;
}

body.design-lavanda .cover__names em {
  font-style: normal;
}

body.design-lavanda .place,
body.design-lavanda .rsvp {
  border-radius: 12px;
}

body.design-bosque .cover::before {
  inset: 26px;
}

body.design-bosque .cover::after {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px solid var(--cover-line);
  pointer-events: none;
}

body.design-bosque .cover__kicker {
  letter-spacing: 0.34em;
}

body.design-noche {
  color-scheme: dark;
}

body.design-noche .cover {
  background: radial-gradient(circle at 50% 30%, #1a2030 0%, var(--cover-bg) 70%);
}

body.design-noche .cover__photo {
  filter: saturate(0.7) contrast(1.05) brightness(0.62);
  opacity: 0.7;
}

body.design-sal .cover__photo,
body.design-lavanda .cover__photo {
  opacity: 0.34;
}

body.design-tinta .cover__photo {
  filter: grayscale(0.65) contrast(1.12);
  opacity: 0.3;
}

body.design-noche .cover::before {
  inset: 14px;
}

body.design-noche .cover__names {
  letter-spacing: -0.045em;
}

body.design-papel .cover::before {
  inset: 24px;
  border: 3px double var(--cover-line);
}

body.design-papel .cover__kicker {
  letter-spacing: 0.36em;
}

body.design-papel .cover__names {
  letter-spacing: -0.015em;
}

@media (max-width: 560px) {
  body.design-sal .cover__inner {
    text-align: left;
  }
}

/* Contenido -------------------------------------------------------------- */

.inv-wrap {
  width: min(100% - 2.5rem, 720px);
  margin-inline: auto;
}

.inv-section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  border-bottom: 1px solid var(--line);
}

.inv-section:last-of-type {
  border-bottom: 0;
}

.inv-title {
  margin-bottom: 2rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-align: center;
}

.inv-text {
  max-width: 46ch;
  margin-inline: auto;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.7;
  text-align: center;
}

/* Cuenta atrás ----------------------------------------------------------- */

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  border-block: 1px solid var(--line);
}

.countdown > div {
  padding: 1.5rem 0.5rem;
  border-right: 1px solid var(--line);
  text-align: center;
}

.countdown > div:last-child {
  border-right: 0;
}

.countdown dt {
  color: var(--ink-soft);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.countdown dd {
  margin: 0.5rem 0 0;
  font-family: var(--font-sans);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* El día ---------------------------------------------------------------- */

.schedule {
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.schedule li:last-child {
  border-bottom: 0;
}

.schedule time {
  color: var(--olive-deep);
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.schedule strong {
  display: block;
  font-weight: 600;
  line-height: 1.4;
}

.schedule span {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Lugar ----------------------------------------------------------------- */

.place {
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--line-strong);
  background: var(--card);
  text-align: center;
}

.place__icon {
  width: 26px;
  margin: 0 auto 1rem;
  color: var(--olive);
}

.place__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.place__address {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.place .btn {
  margin-top: 1.4rem;
}

/* Detalles -------------------------------------------------------------- */

.details {
  display: grid;
  gap: 2rem;
}

.details > div {
  text-align: center;
}

.details h3 {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.details p {
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.6;
  max-width: 40ch;
  margin-inline: auto;
}

@media (min-width: 720px) {
  .details {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

/* RSVP ------------------------------------------------------------------ */

.rsvp {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line-strong);
  background: var(--card);
}

.rsvp__head {
  margin-bottom: 2rem;
  text-align: center;
}

.rsvp__head p {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.field > label,
.field legend {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field input[type="text"],
.field input[type="email"],
.field textarea,
.field select {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--paper);
  font-size: 0.95rem;
  line-height: 1.4;
}

.field textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 1px;
  border-color: var(--olive);
}

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

fieldset.field {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}

.choices {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

@media (min-width: 520px) {
  .choices--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--paper);
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.choice:hover {
  border-color: var(--olive);
}

.choice:has(input:checked) {
  border-color: var(--olive-deep);
  background: var(--paper-2);
}

.choice input {
  accent-color: var(--olive-deep);
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.rsvp .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.rsvp__legal {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: center;
}

.rsvp__ok {
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--olive);
  background: var(--paper-2);
  text-align: center;
}

.rsvp__ok h3 {
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.rsvp__ok p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Pie de la invitación --------------------------------------------------- */

.inv-footer {
  padding-block: 3rem 4rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.inv-footer__names {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.inv-footer p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.inv-footer__credit {
  margin-top: 2.5rem;
  font-size: 0.74rem;
  color: var(--ink-soft);
}

.inv-footer__credit a {
  color: var(--olive-deep);
}

/* ==========================================================================
   Adaptación WordPress
   ========================================================================== */

body.is-demo,
body.is-invitation {
  background: var(--paper);
}

/* Barra de demo bajo la barra de administración */
.admin-bar .demo-bar {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .demo-bar {
    top: 46px;
  }
}

.field input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--paper);
  font-size: 0.95rem;
  line-height: 1.4;
}

.field--check {
  display: block;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.5;
  cursor: pointer;
}

.check input {
  width: 1rem;
  height: 1rem;
  margin: 0.18rem 0 0;
  accent-color: var(--olive-deep);
}

.check a {
  color: var(--olive-deep);
}

.rsvp__errors {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid #8a3b2e;
  background: #f6e9e3;
  color: #4a241c;
  font-size: 0.9rem;
}

.rsvp__errors p {
  margin-bottom: 0.35rem;
}

.rsvp__errors ul {
  margin: 0;
  padding-left: 1.1rem;
}

.rsvp__errors li + li {
  margin-top: 0.2rem;
}

.rsvp__closed {
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  text-align: center;
}

.rsvp__closed h3 {
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.rsvp__closed p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.rsvp__closed a {
  color: var(--olive-deep);
}

.rsvp__demo-note {
  max-width: 52ch;
  margin: 0 auto 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--line-strong);
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: center;
}

.rsvp__ok-note {
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.companion-fields {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.1rem 0.1rem;
  border: 1px solid var(--line);
  background: var(--paper);
}

.companion-fields > legend {
  padding: 0 0.35rem;
  color: var(--olive-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.companion-fields .field:last-child {
  margin-bottom: 1rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rsvp__legal a {
  color: var(--olive-deep);
}
