/* ============================================
   Marina & Fernando - Wedding Invitations
   Palette: Olive + Pastel Blue
   ============================================ */

:root {
  --bg: #F7F6F2;
  --bg-soft: #FBFAF7;
  --olive: #7A8B6E;
  --olive-dark: #5E6B54;
  --olive-light: #A3B095;
  --sky: #A8C8D8;
  --sky-soft: #D4E6EE;
  --sky-light: #E8F1F5;
  --ink: #2E2E2E;
  --ink-soft: #595959;
  --ink-muted: #888888;
  --white: #FFFFFF;
  --shadow: rgba(58, 58, 58, 0.06);
  --shadow-strong: rgba(58, 58, 58, 0.12);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 0;
}

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

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

button {
  font-family: inherit;
}

/* Selection */
::selection {
  background: var(--sky-soft);
  color: var(--olive-dark);
}

/* Utility */
.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 12px;
  font-weight: 500;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 2.8rem);
  color: var(--olive-dark);
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* Floral decorations */
.floral-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floral-corner {
  position: absolute;
  width: 180px;
  height: 230px;
  background-image: url('../assets/floral-corner.png?v=15');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.95;
  will-change: transform;
}

.floral-corner.top-left {
  top: -40px;
  left: -50px;
  transform: rotate(-12deg);
}

.floral-corner.top-right {
  top: -40px;
  right: -197px;
  transform: scaleX(-1);
}

.eucalyptus {
  position: absolute;
  width: 220px;
  height: 220px;
  background-image: url('../assets/eucalyptus.png?v=15');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.55;
  will-change: transform;
}

.eucalyptus.bottom-left {
  bottom: -40px;
  left: -80px;
  transform: rotate(-25deg);
}

.eucalyptus.bottom-right {
  bottom: -40px;
  right: -80px;
  transform: scaleX(-1) rotate(-25deg);
}

/* Subtle SVG leaves for ambient motion */
.leaves-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.leaf {
  position: absolute;
  width: 100px;
  height: 100px;
  opacity: 0.08;
  background-image: url('../assets/hojas.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  will-change: transform;
}

.leaf-1 { top: 20%; left: 5%; transform: rotate(15deg); }
.leaf-2 { top: 40%; right: 8%; transform: rotate(-20deg); }
.leaf-3 { top: 70%; left: 10%; transform: rotate(45deg); }

/* Welcome overlay */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.welcome-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-names {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.8rem, 6.5vw, 4.5rem);
  color: var(--olive-dark);
  margin-bottom: 12px;
  line-height: 1.15;
  max-width: 100%;
  overflow-wrap: break-word;
}

.welcome-date {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 40px;
}

.welcome-guest-label {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.welcome-guest-name {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  color: var(--olive-dark);
  margin-bottom: 40px;
}

.welcome-btn {
  display: inline-block;
  padding: 16px 44px;
  background: var(--olive);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.welcome-btn:hover {
  background: var(--olive-dark);
  transform: translateY(-2px);
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 100px 24px 80px;
  overflow: hidden;
}



.hero-content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 560px;
  padding: 60px 16px 0;
  margin: 0 auto;
}

.hero-content > * {
  opacity: 1;
  animation: fadeInUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.hero-content .hero-eyebrow { animation-delay: 0.1s; }
.hero-content .hero-names { animation-delay: 0.3s; }
.hero-content .hero-date { animation-delay: 0.5s; }
.hero-content .hero-intro { animation-delay: 0.7s; }
.hero-content .countdown-label { animation-delay: 0.9s; }
.hero-content .countdown { animation-delay: 1s; }
.hero-content .scroll-cue { animation-delay: 1.3s; }

@media (prefers-reduced-motion: reduce) {
  .hero-content > * {
    opacity: 1;
    animation: none;
  }
}

.hero-eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 16px;
  font-weight: 500;
}

.hero-names {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.7rem, 6.5vw, 6rem);
  color: var(--olive-dark);
  line-height: 1.2;
  margin-bottom: 18px;
  max-width: 100%;
  overflow-wrap: break-word;
  padding: 0 8px;
}

.hero-names.big {
  font-size: clamp(2.2rem, 8.5vw, 7.5rem);
}

.hero-names .amp {
  font-size: 0.5em;
  color: var(--sky);
  display: inline-block;
  margin: 0 6px;
  transform: translateY(-6px);
}

.hero-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.2rem, 3.8vw, 1.6rem);
  color: var(--ink);
  margin-bottom: 26px;
}

.hero-date-line {
  margin-bottom: 18px;
}

.hero-date-line:last-child {
  margin-bottom: 0;
}

.hero-date-desc {
  display: block;
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto 6px;
  line-height: 1.45;
}

.hero-date-full {
  display: block;
  font-size: clamp(1.2rem, 3.8vw, 1.6rem);
  font-weight: 600;
  color: var(--olive-dark);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-date .day {
  display: inline-block;
  font-size: 1.4em;
  color: var(--olive);
  font-weight: 600;
  margin: 0 4px;
}

.hero-intro {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 460px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* Countdown */
.countdown-label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.countdown-cell {
  background: var(--white);
  border: 1px solid var(--sky-soft);
  border-radius: 12px;
  padding: 14px 10px;
  min-width: 64px;
  box-shadow: 0 4px 20px var(--shadow);
}

.countdown-cell .num {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.9rem;
  color: var(--olive-dark);
  line-height: 1;
}

.countdown-cell .lbl {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 6px;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  z-index: 3;
}

/* Sections */
section {
  padding: 80px 0;
  position: relative;
}

section.alt {
  background: var(--bg-soft);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

/* Itinerary */
.itinerary {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

.itinerary::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--sky), transparent);
}

.itinerary-item {
  display: flex;
  gap: 22px;
  margin-bottom: 32px;
  position: relative;
}

.itinerary-item:last-child {
  margin-bottom: 0;
}

.itinerary-time {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--sky);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--olive-dark);
  flex-shrink: 0;
  z-index: 2;
  box-shadow: 0 3px 12px var(--shadow);
}

.itinerary-body {
  padding-top: 4px;
}

.itinerary-date {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 4px;
  font-weight: 500;
}

.itinerary-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--olive-dark);
  margin-bottom: 4px;
}

.itinerary-body p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--sky-soft);
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 6px 30px var(--shadow);
  text-align: center;
}

.card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--olive-dark);
  margin-bottom: 10px;
}

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

/* Map */
.map-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--sky-soft);
  margin: 20px 0 16px;
  background: var(--bg-soft);
  min-height: 220px;
}

.map-wrap iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.map-wrap iframe.is-loaded {
  opacity: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.btn-primary {
  background: var(--olive);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--olive-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(122, 139, 110, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--olive);
  border: 1.5px solid var(--olive);
}

.btn-outline:hover {
  background: var(--olive);
  color: var(--white);
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

@media (min-width: 480px) {
  .btn-group {
    flex-direction: row;
  }
}

/* Gift section */
.gift-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--olive-dark);
  margin-bottom: 12px;
}

.gift-alias {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--sky-soft);
}

.gift-alias p {
  margin-bottom: 12px;
  font-size: 0.92rem;
}

.alias-box {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--sky-soft);
  border-radius: 12px;
  padding: 10px 14px;
  max-width: 100%;
}

.alias-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--olive-dark);
  letter-spacing: 0.04em;
}

.alias-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--olive);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.alias-copy:hover {
  background: var(--olive-dark);
}

.alias-copy svg {
  width: 14px;
  height: 14px;
}

.alias-copy.copied {
  background: var(--olive-dark);
}

/* Gift card floral frame */
.gift-card-wrap {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.gift-card-wrap .floral-corner {
  width: 130px;
  height: 165px;
  z-index: 1;
}

.gift-card-wrap .floral-corner.gift-tl {
  top: -56px;
  left: -41px;
  transform: rotate(-173deg) !important;
}

.gift-card-wrap .floral-corner.gift-tr {
  top: -56px;
  right: -36px;
  transform: scaleX(-1) rotate(-173deg) !important;
}

.gift-card-wrap .floral-corner.gift-bl {
  bottom: -50px;
  left: -40px;
  transform: scaleX(-1) rotate(-352deg) !important;
}

.gift-card-wrap .floral-corner.gift-br {
  bottom: -50px;
  right: -39px;
  transform: scaleX(-1) scaleY(-1) rotate(189deg) !important
}

/* RSVP */
.rsvp-card {
  background: var(--white);
  border: 1.5px solid var(--sky-soft);
  border-radius: 20px;
  padding: 36px 24px;
  box-shadow: 0 8px 36px var(--shadow);
}

.rsvp-deadline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--sky-light);
  color: var(--olive-dark);
  padding: 12px 22px;
  border-radius: 50px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0 auto 28px;
  display: flex;
  justify-content: center;
  width: fit-content;
}

.rsvp-deadline svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.field {
  margin-bottom: 22px;
  text-align: left;
}

.field label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
  font-weight: 500;
}

.field input[type="text"],
.field input[type="number"],
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--sky-soft);
  border-radius: 10px;
  background: var(--bg);
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px var(--sky-light);
}

.field textarea {
  resize: vertical;
  min-height: 90px;
}

.radio-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.radio-opt {
  text-align: center;
  padding: 14px 10px;
  border: 1.5px solid var(--sky-soft);
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
}

.radio-opt:hover {
  border-color: var(--sky);
}

.radio-opt.active {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--white);
}

.radio-opt input {
  display: none;
}

.submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--olive);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
}

.submit-btn:hover {
  background: var(--olive-dark);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.rsvp-thanks {
  text-align: center;
  padding: 30px 0;
  display: none;
}

.rsvp-thanks h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--olive-dark);
  margin-bottom: 12px;
}

.rsvp-thanks p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.rsvp-thanks p.rsvp-thanks-big {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--olive-dark);
  line-height: 1.3;
}

.form-error {
  color: #C44D56;
  font-size: 0.85rem;
  margin-top: 14px;
  text-align: center;
  display: none;
  font-weight: 500;
}

/* Footer */
footer {
  padding: 60px 24px;
  text-align: center;
  background: var(--bg-soft);
}

.footer-names {
  font-family: 'Dancing Script', cursive;
  font-size: 2.2rem;
  color: var(--olive-dark);
  margin-bottom: 8px;
}

.footer-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
}

/* Music toggle */
.music-btn {
  position: fixed;
  bottom: 18px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--olive);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(74, 86, 58, 0.35);
  z-index: 50;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.music-btn:hover {
  background: var(--olive-dark);
  transform: scale(1.05);
}

.music-btn svg {
  width: 20px;
  height: 20px;
}

.music-btn .bar {
  transform-origin: bottom;
  animation: eq 1s ease-in-out infinite;
}

.music-btn.paused .bar {
  animation-play-state: paused;
}

.bar:nth-child(2) {
  animation-delay: 0.15s;
}

.bar:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes eq {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  .alias-box {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 8px;
    padding: 12px;
  }

  .alias-value {
    font-size: 1.05rem;
    word-break: break-word;
  }

  .alias-copy {
    justify-content: center;
    width: 100%;
    padding: 10px 12px;
  }

  .radio-opt {
    font-size: 0.82rem;
    padding: 12px 8px;
    min-height: 48px;
  }

  .hero {
    padding: 80px 16px 60px;
  }

  .hero-content {
    padding: 40px 12px 0;
  }

  section {
    padding: 64px 0;
  }

  .card {
    padding: 28px 20px;
  }

  .rsvp-card {
    padding: 28px 20px;
  }

  .countdown {
    gap: 8px;
  }

  .countdown-cell {
    min-width: 52px;
    padding: 10px 6px;
  }

  .countdown-cell .num {
    font-size: 1.5rem;
  }

  .itinerary::before {
    left: 20px;
  }

  .itinerary-time {
    width: 44px;
    height: 44px;
    font-size: 0.74rem;
  }

  .floral-corner {
    width: 140px;
    height: 180px;
  }

  .floral-corner.top-left {
    top: -30px;
    left: -57px;
  }

  .floral-corner.top-right {
    top: -30px;
    right: -170px;
    transform: scaleX(-1);
  }

  .eucalyptus {
    width: 170px;
    height: 170px;
  }

  .eucalyptus.bottom-left {
    bottom: -30px;
    left: -55px;
  }

  .eucalyptus.bottom-right {
    bottom: -30px;
    right: -55px;
  }

  .map-wrap iframe {
    height: 280px;
  }
}
