/*
Theme Name: Wedding Invitation
Theme URI: https://example.com/
Author: Dario Torres
Author URI: https://example.com/
Description: Invitacion de boda mobile-only para Fran y Monica.
Version: 1.0.0
Text Domain: wedding-invitation
*/

:root {
  --terracota: #b8755a;
  --title-brown: #391d11;
  --tierra: #e8d5c4;
  --terra-strong: #a55d40;
  --sand: #f5e7d8;
  --bg-sand: #fbf7f1;
  --ink: #3c4743;
  --line: #d8bea7;
  --muted: #766963;
  --paper: var(--bg-sand);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Cormorant Garamond", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
}

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

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

/* ============================
   SHELL
   ============================ */

.site-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 18px 70px rgba(57, 29, 17, 0.12);
}

/* ============================
   HERO
   ============================ */

.hero,
.hero__image {
  display: block;
}

.hero {
  margin: 0;
}

.hero__image {
  width: 100%;
  height: auto;
}

/* FOUC prevention: hide hero SVG animated elements before first paint.
   GSAP uses fromTo() with explicit autoAlpha:1 to override these.
   Reduced-motion users are excluded so they always see the hero. */
@media (prefers-reduced-motion: no-preference) {
  .hero__image #Vector,
  .hero__image #Vector_2,
  .hero__image #Planta-1,
  .hero__image #Planta-1_2,
  .hero__image #Frame,
  .hero__image #Fran,
  .hero__image [id="Mónica"],
  .hero__image [id="&"],
  .hero__image [id="10 | oct | 26"] {
    opacity: 0;
    visibility: hidden;
  }
}

/* ============================
   SHARED SECTION
   ============================ */

.section {
  position: relative;
  padding: 5rem 2rem;
}

/* ============================
   SEPARADOR
   ============================ */

.separator {
  display: block;
  width: 11.5rem;
  height: auto;
  margin: 0 auto 2.5rem;
}

.separator--bottom {
  margin-top: 2.5rem;
  margin-bottom: 0;
}

.separator--small {
  width: 8.4rem;
  margin: 0 auto 2rem;
}

/* ============================
   INTRO / QUERIDO
   ============================ */

.section--intro {
  padding-top: 2rem;
  text-align: center;
  isolation: isolate;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.guest-name {
  margin: 0 0 1.5rem;
  color: var(--terracota);
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 500;
  line-height: 1;
}

.intro-copy {
  max-width: 18rem;
  margin: 0 auto 1.95rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.95;
  letter-spacing: 0.04em;
}

.intro-title {
  margin: 0 0 1.6rem;
  color: var(--terracota);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1;
}

.signature {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ============================
   SECTION KICKER & HEADINGS
   ============================ */

.section-kicker {
  margin: 0 0 0.65rem;
  color: var(--terracota);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-heading {
  margin: 0 0 1.25rem;
  color: var(--title-brown);
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1;
}

.section-copy {
  max-width: 18rem;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.02em;
}

/* ============================
   EVENT SECTION
   ============================ */

.event-section {
  padding: 4rem 2rem 5rem;
  isolation: isolate;
  text-align: center;
}

.event-heading {
  margin: 0 0 1.5rem;
  color: var(--title-brown);
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1;
}

.event-details-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 auto 2rem;
  padding: 0;
}

.event-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 0;
}

.event-detail dt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.event-detail dd {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
}

.event-detail--date dd {
  color: var(--title-brown);
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1;
}

/* ============================
   COUNTDOWN
   ============================ */

.event-countdown {
  margin: 2.5rem 0 0;
  padding: 2.5rem 0 0;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(4.5rem, 1fr));
  gap: 0;
}

.countdown-item {
  min-width: 0;
  padding: 0.75rem 0;
  text-align: center;
}

.countdown-item:not(:last-child) {
  border-right: 1px solid rgba(165, 93, 64, 0.25);
}

.countdown-value {
  display: block;
  color: var(--title-brown);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1;
}

.countdown-label {
  display: block;
  margin-top: 0.75rem;
  color: var(--title-brown);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0.6;
}

/* ============================
   EVENT LOCATION
   ============================ */

.event-location {
  padding-top: 2rem;
  text-align: center;
}

.event-location__label {
  margin: 0 0 0.55rem;
  color: var(--terracota);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.event-location h3 {
  margin: 0 0 0.3rem;
  color: var(--title-brown);
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.05;
}

.event-location p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1rem;
}

.event-location a {
  display: inline-block;
  color: var(--terra-strong);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15rem;
  transition: border-color 0.2s;
}

.event-location a:hover {
  border-color: var(--terracota);
}

/* ============================
   FORM SECTIONS (SHARED)
   ============================ */

.form-section {
  padding: 4rem 2rem 5rem;
  text-align: center;
}

/* ============================
   SONG SECTION
   ============================ */

.form-section--song {
  margin: 0 1.25rem;
  padding-top: 6rem;
  padding-bottom: 3rem;
  background: var(--terracota);
  border-radius: 190px 190px 0 0;
  isolation: isolate;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.song-deco {
  position: absolute;
  top: 65%;
  left: 21%;
  width: 15rem;
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

.form-section--song .section-kicker {
  color: rgba(251, 247, 241, 0.65);
}

.form-section--song .section-heading {
  color: var(--paper);
}

.form-section--song .section-copy {
  color: rgba(251, 247, 241, 0.8);
}

.form-section--song .separator {
  opacity: 0.35;
}

.form-section--song .button {
  margin-top: auto;
  background: var(--paper);
  border-color: var(--paper);
  color: var(--terracota);
}

.form-section--song .button:hover {
  background: var(--terra-strong);
  border-color: var(--terra-strong);
  color: var(--paper);
}


/* ============================
   RSVP SECTION
   ============================ */

.form-section--rsvp {
  isolation: isolate;
}

/* ============================
   INVITATION FORM
   ============================ */

.invitation-form {
  display: grid;
  gap: 1.15rem;
  margin-top: 1.5rem;
  text-align: left;
}

.field {
  display: grid;
  gap: 0.3rem;
}

.field span,
.choice-group legend {
  color: var(--terracota);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.65rem 0 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.2s;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--terracota);
}

.field textarea {
  min-height: 7rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(255, 250, 244, 0.6);
  resize: vertical;
}

.field select {
  width: 100%;
  padding: 0.65rem 0 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.field select:focus {
  border-color: var(--terracota);
}

.rsvp-step {
  display: grid;
  gap: 1.15rem;
}

[data-companion-name],
[data-partner-choice] {
  margin-top: 1rem;
}

.field--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.choice-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.85rem 0 0;
  padding: 0;
  border: 0;
}

.choice-group legend {
  grid-column: 1 / -1;
  margin-bottom: 0.55rem;
}

.choice-group label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.choice-group label:has(input:checked) {
  background: var(--terracota);
  border-color: var(--terracota);
  color: var(--paper);
}

.choice-group input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

/* ============================
   BUTTON
   ============================ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 22rem;
  min-height: 3rem;
  padding: 0.9rem 1.5rem;
  border: 1px solid var(--title-brown);
  border-radius: 0;
  background: var(--title-brown);
  color: var(--paper);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}

.button:hover {
  background: var(--terra-strong);
  border-color: var(--terra-strong);
}

/* ============================
   SONG MODAL
   ============================ */

.song-modal[hidden] {
  display: none;
}

.song-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
}

.song-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(57, 29, 17, 0.55);
}

.song-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  height: 100dvh;
  overflow: auto;
  padding: 3rem 2rem 2.5rem;
  background: var(--paper);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.song-modal__panel .section-heading {
  font-size: 2rem;
}

.song-modal__panel .section-copy {
  max-width: none;
  margin-left: 0;
  text-align: left;
}

.song-modal__panel .button {
  background: var(--terracota);
  border-color: var(--terracota);
  color: var(--paper);
  max-width: none;
}

.song-modal__panel .button:hover {
  background: var(--terra-strong);
  border-color: var(--terra-strong);
}

.song-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--title-brown);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 2.75rem;
  line-height: 1;
}

/* ============================
   FORM MESSAGES
   ============================ */

.form-message {
  max-width: 22rem;
  margin: 0 auto 1.25rem;
  padding: 0.75rem 1rem;
  border-left: 2px solid var(--terracota);
  background: rgba(232, 213, 196, 0.35);
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: left;
}

.form-message--error {
  border-left-color: var(--terra-strong);
}

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

.footer {
  margin: 0;
}

.footer__image {
  display: block;
  width: 100%;
  height: auto;
}

/* ============================
   DECORATIVE SHAPES
   ============================ */

.deco-shape {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  user-select: none;
}

/* Posicionado por contexto de sección */

.section--intro .deco-plant {
  top: 1.5rem;
  right: -1.5rem;
  width: 5.5rem;
  opacity: 0.3;
}

.event-section .deco-shape {
  top: 1rem;
  right: -5rem;
  width: 16rem;
  opacity: 0.82;
}

.form-section--song .deco-shape {
  bottom: 3rem;
  left: -4rem;
  width: 12rem;
  opacity: 0.78;
}

.form-section--rsvp .deco-shape {
  top: 3rem;
  right: -2.5rem;
  width: 8rem;
  opacity: 0.65;
}

.deco-plant {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  user-select: none;
}

/* ============================
   ASIDE SECTION LABELS
   ============================ */

.section-aside-label {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--terracota);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  border-right: 1px solid var(--line);
  opacity: 0.75;
}

.section-aside-label--right {
  left: auto;
  right: 0;
  transform: none;
  border-right: 0;
  border-left: 1px solid var(--line);
}

/* ============================
   COUNTDOWN TITLE
   ============================ */

.countdown-title {
  margin: 0 0 0.75rem;
  color: var(--terracota);
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
}

/* ============================
   ARROW LINK
   ============================ */

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--terra-strong);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: gap 0.2s;
}

.arrow-link::after {
  content: '→';
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0;
}

.arrow-link:hover {
  gap: 0.9rem;
}

.button--ghost {
  background: transparent;
  color: var(--terra-strong);
  border-color: var(--line);
}

.button--ghost:hover {
  background: transparent;
  color: var(--title-brown);
  border-color: var(--title-brown);
}

/* ============================
   DETAIL CARDS
   ============================ */

.detail-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0 auto 2.5rem;
  max-width: 22rem;
  text-align: center;
}

.detail-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--line);
  background: rgba(255, 250, 244, 0.7);
}

.detail-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  color: var(--terracota);
}

.detail-card__label {
  margin: 0 0 0.55rem;
  color: var(--terracota);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
}

.detail-card__value {
  margin: 0;
  color: var(--title-brown);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.1;
}

.detail-card__value span {
  display: block;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--muted);
  font-weight: 400;
}

.detail-card__sub {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-style: italic;
}

.detail-card__link {
  margin-top: 0.8rem;
}

.detail-card:first-child {
  border-radius: 60px 60px 0 0;
}

.detail-card:last-child {
  border-radius: 0 0 60px 60px;
}

/* ============================
   CHILDREN ROWS
   ============================ */

.rsvp-children__intro {
  margin: 1rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.child-row {
  display: grid;
  grid-template-columns: 1fr 5rem 2rem;
  gap: 0.75rem;
  align-items: end;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.child-row__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: border-color 0.2s, color 0.2s;
}

.child-row__remove:hover {
  border-color: var(--terra-strong);
  color: var(--terra-strong);
}

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

@media (max-width: 360px) {
  .section,
  .form-section,
  .event-section {
    padding-right: 1.45rem;
    padding-left: 1.45rem;
  }

  .event-heading,
  .section-heading {
    font-size: 1.9rem;
  }

  .event-detail--date dd {
    font-size: 2rem;
  }

  .countdown-value {
    font-size: 1.75rem;
  }

  .event-location h3 {
    font-size: 1.65rem;
  }
}
