/* ==========================================
   WEDDING SITE — IVAN & LORA
   Palette: whites, powder blues, steel blues
   ========================================== */

:root {
  --white:        #ffffff;
  --cream:        #f7f5f2;
  --blue-100:     #e8eff8;
  --blue-200:     #cddaec;
  --blue-300:     #a8bfd8;
  --blue-400:     #7a9ec0;
  --blue-500:     #5580a4;
  --blue-dark:    #2e4f6b;
  --text-dark:    #1a2a38;
  --text-mid:     #4a6070;
  --text-light:   #7a96ab;
  --gold:         #c8b89a;
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Jost', sans-serif;
  --ease-spring:  cubic-bezier(.34,1.56,.64,1);
}

/* ── Reset ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--cream);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-weight: 300;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ── Scrollbar ─────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--blue-100); }
::-webkit-scrollbar-thumb { background: var(--blue-300); border-radius: 3px; }

/* ==========================================
   PETALS ANIMATION
   ========================================== */
.petals {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.petals span {
  position: absolute;
  top: -40px;
  display: block;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 35% 35%, #dce9f5, #a8bfd8);
  border-radius: 50% 0 50% 0;
  opacity: 0;
  animation: petal-fall linear infinite;
}
.petals span:nth-child(1)  { left:5%;  animation-duration:12s; animation-delay:0s;   width:10px; height:10px; }
.petals span:nth-child(2)  { left:15%; animation-duration:16s; animation-delay:2s;   width:16px; height:16px; }
.petals span:nth-child(3)  { left:28%; animation-duration:14s; animation-delay:4s;   }
.petals span:nth-child(4)  { left:40%; animation-duration:18s; animation-delay:1s;   width:8px;  height:8px;  }
.petals span:nth-child(5)  { left:55%; animation-duration:13s; animation-delay:5s;   width:12px; height:12px; }
.petals span:nth-child(6)  { left:65%; animation-duration:17s; animation-delay:3s;   }
.petals span:nth-child(7)  { left:75%; animation-duration:15s; animation-delay:7s;   width:18px; height:18px; }
.petals span:nth-child(8)  { left:83%; animation-duration:11s; animation-delay:6s;   width:9px;  height:9px;  }
.petals span:nth-child(9)  { left:90%; animation-duration:20s; animation-delay:2.5s; }
.petals span:nth-child(10) { left:96%; animation-duration:14s; animation-delay:8s;   width:11px; height:11px; }

@keyframes petal-fall {
  0%   { transform: translateY(0) rotate(0deg) translateX(0); opacity:0; }
  5%   { opacity: .7; }
  90%  { opacity: .4; }
  100% { transform: translateY(110vh) rotate(720deg) translateX(60px); opacity:0; }
}

/* ==========================================
   REVEAL ANIMATION
   ========================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg,
    #dce9f5 0%,
    #c4d6ec 30%,
    #e8f0f8 60%,
    #f0e8e0 100%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(168,191,216,.25) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23a8bfd8' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.08);
}

/* Decorative floral rings */
.hero::after {
  content: '';
  position: absolute;
  width: min(700px, 120vw);
  height: min(700px, 120vw);
  border-radius: 50%;
  border: 1px solid rgba(168,191,216,.3);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation: ring-pulse 6s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1);   opacity:.3; }
  50%       { transform: translate(-50%,-50%) scale(1.04); opacity:.6; }
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero__pre {
  font-family: var(--font-sans);
  font-size: clamp(.65rem, 1.5vw, .8rem);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--blue-500);
  animation-delay: .2s;
}

.hero__names {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1;
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  gap: .5em;
  animation-delay: .4s;
}

.hero__name {
  display: inline-block;
  animation: name-enter .9s var(--ease-spring) both;
}
.hero__name:first-child { animation-delay: .5s; }
.hero__name:last-child  { animation-delay: .7s; }

@keyframes name-enter {
  from { opacity:0; transform: translateY(20px) scale(.96); }
  to   { opacity:1; transform: none; }
}

.hero__amp {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 300;
  color: var(--gold);
  font-size: .6em;
  margin-top: -.1em;
  animation: name-enter .9s var(--ease-spring) .6s both;
}

.hero__date {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-sans);
  font-size: clamp(.8rem, 2vw, 1rem);
  letter-spacing: .25em;
  color: var(--blue-500);
  animation-delay: .9s;
}
.date-line {
  width: clamp(30px,8vw,70px);
  height: 1px;
  background: var(--blue-300);
}

/* ==========================================
   BUTTON
   ========================================== */
.btn {
  display: inline-block;
  padding: .85rem 2.5rem;
  border: 1.5px solid var(--blue-400);
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 400;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--blue-dark);
  background: transparent;
  cursor: pointer;
  transition: background .3s, color .3s, transform .3s var(--ease-spring), box-shadow .3s;
  position: relative;
  overflow: hidden;
  animation-delay: 1.1s;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blue-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
  z-index: -1;
}
.btn:hover::before { transform: scaleX(1); }
.btn:hover {
  color: var(--white);
  box-shadow: 0 8px 30px rgba(85,128,164,.3);
  transform: translateY(-2px);
}
.btn--form {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: block;
  padding: 1rem 2rem;
  font-size: .9rem;
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white);
}
.btn--form::before { background: var(--blue-500); }
.btn--form:hover { box-shadow: 0 8px 30px rgba(46,79,107,.35); }

/* ==========================================
   SCROLL HINT
   ========================================== */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-hint span {
  display: block;
  width: 24px;
  height: 38px;
  border: 1.5px solid var(--blue-400);
  border-radius: 12px;
  position: relative;
}
.scroll-hint span::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--blue-400);
  border-radius: 50%;
  animation: scroll-dot 2s ease-in-out infinite;
}
@keyframes scroll-dot {
  0%,100% { transform: translateX(-50%) translateY(0); opacity:1; }
  80%      { transform: translateX(-50%) translateY(16px); opacity:0; }
}

/* ==========================================
   SECTIONS SHARED
   ========================================== */
.section { padding: clamp(4rem,10vw,8rem) 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 clamp(1.5rem,5vw,3rem); }

.section__label {
  font-family: var(--font-sans);
  font-size: .72rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--blue-400);
  text-align: center;
  margin-bottom: .75rem;
}
.section__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem,5vw,3.2rem);
  font-weight: 300;
  font-style: italic;
  color: var(--blue-dark);
  text-align: center;
  margin-bottom: 3rem;
}

/* ==========================================
   INVITATION
   ========================================== */
.invitation { background: var(--white); }

.invitation__inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 3.5rem 2.5rem;
  border: 1px solid var(--blue-200);
  border-radius: 28px;
  background: linear-gradient(160deg, var(--cream) 0%, var(--white) 60%, var(--blue-100) 100%);
  position: relative;
  overflow: hidden;
}
.invitation__inner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168,191,216,.18), transparent 70%);
  pointer-events: none;
}
.invitation__inner::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,184,154,.12), transparent 70%);
  pointer-events: none;
}
.invitation__ornament {
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  letter-spacing: .3em;
}
.invitation__title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--blue-dark);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}
.invitation__text {
  font-size: clamp(.9rem, 2vw, 1rem);
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 2rem;
}
.invitation__divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 auto 1.75rem;
  max-width: 260px;
}
.invitation__divider span:not(.invitation__diamond) {
  flex: 1;
  height: 1px;
  background: var(--blue-200);
}
.invitation__diamond {
  color: var(--gold);
  font-size: .6rem;
}
.invitation__sub {
  font-size: .9rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 2rem;
  line-height: 1.6;
}
.invitation__names {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-style: italic;
  color: var(--blue-dark);
  font-weight: 300;
}

/* ==========================================
   COUNTDOWN
   ========================================== */
.countdown {
  position: relative;
  background: var(--blue-dark);
  color: var(--white);
  overflow: hidden;
  padding: clamp(5rem,12vw,9rem) 0;
}
.countdown__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 20% 50%, rgba(85,128,164,.4), transparent),
    radial-gradient(ellipse 50% 60% at 80% 50%, rgba(122,158,192,.2), transparent);
}
.countdown .container { position: relative; z-index: 1; }
.countdown__grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.countdown__item {
  text-align: center;
  min-width: 100px;
}
.countdown__num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(3rem,10vw,5.5rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  text-shadow: 0 0 40px rgba(200,220,240,.3);
  transition: transform .3s var(--ease-spring);
}
.countdown__num.tick { transform: scale(1.1); }
.countdown__label {
  display: block;
  font-family: var(--font-sans);
  font-size: .7rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--blue-300);
  margin-top: .5rem;
}
.countdown__sep {
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 1rem;
}

/* ==========================================
   DETAILS
   ========================================== */
.details { background: var(--cream); }
.details__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 2rem;
}
.details__card {
  background: var(--white);
  border: 1px solid var(--blue-200);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform .4s var(--ease-spring), box-shadow .4s;
  position: relative;
  overflow: hidden;
}
.details__card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--blue-300), var(--blue-400));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
}
.details__card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(122,158,192,.18); }
.details__card:hover::after { transform: scaleX(1); }

.details__icon {
  width: 56px; height: 56px;
  margin: 0 auto 1.5rem;
  background: var(--blue-100);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blue-500);
}
.details__icon svg { width: 22px; height: 22px; }
.details__card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--blue-dark);
  margin-bottom: .75rem;
}
.details__card p {
  font-size: .9rem;
  color: var(--text-mid);
  line-height: 1.7;
}
.details__card p:first-of-type {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--blue-500);
  margin-bottom: .5rem;
}

/* ==========================================
   RSVP
   ========================================== */
.rsvp {
  position: relative;
  overflow: hidden;
  background: var(--white);
}
.rsvp__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(168,191,216,.15), transparent),
    radial-gradient(ellipse 50% 60% at 100% 0%, rgba(200,220,240,.12), transparent);
  pointer-events: none;
}
.rsvp .container { position: relative; z-index: 1; }
.rsvp__sub {
  text-align: center;
  color: var(--text-mid);
  font-size: .9rem;
  margin-top: -2rem;
  margin-bottom: 3rem;
}
.rsvp__sub strong { color: var(--blue-dark); }

.rsvp__form {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 580px) {
  .form__row { grid-template-columns: 1fr; }
}
.form__group { display: flex; flex-direction: column; gap: .4rem; }
.form__group--full { grid-column: 1 / -1; }

.form__group label {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-500);
  font-weight: 400;
}
.form__group input,
.form__group select,
.form__group textarea {
  padding: .85rem 1rem;
  border: 1.5px solid var(--blue-200);
  border-radius: 12px;
  background: var(--cream);
  font-family: var(--font-sans);
  font-size: .9rem;
  color: var(--text-dark);
  transition: border-color .3s, box-shadow .3s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form__group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a9ec0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(122,158,192,.15);
}
.form__group textarea { resize: vertical; min-height: 90px; }

.form__radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text-mid);
  padding: .7rem 1.2rem;
  border: 1.5px solid var(--blue-200);
  border-radius: 50px;
  transition: border-color .3s, background .3s;
  background: var(--cream);
}
.radio-label input { display: none; }
.radio-label:has(input:checked) {
  border-color: var(--blue-400);
  background: var(--blue-100);
  color: var(--blue-dark);
}
.radio-label:hover { border-color: var(--blue-300); }

.form__success {
  text-align: center;
  padding: 1.5rem;
  background: var(--blue-100);
  border-radius: 12px;
  color: var(--blue-dark);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  animation: fade-in .5s ease;
}
.form__error {
  text-align: center;
  padding: 1rem;
  background: #fde8e8;
  border-radius: 12px;
  color: #8b2020;
  font-size: .85rem;
}
@keyframes fade-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: var(--blue-dark);
  color: var(--white);
  text-align: center;
  padding: 4rem 2rem;
}
.footer__ornament {
  font-size: .9rem;
  letter-spacing: .5em;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.footer__names {
  font-family: var(--font-serif);
  font-size: clamp(2rem,6vw,3.5rem);
  font-weight: 300;
  font-style: italic;
  color: var(--white);
  margin-bottom: .75rem;
}
.footer__date {
  font-family: var(--font-sans);
  font-size: .85rem;
  letter-spacing: .3em;
  color: var(--blue-300);
  margin-bottom: 2rem;
}
.footer__love {
  font-size: .8rem;
  color: var(--blue-400);
}

/* ==========================================
   RESPONSIVE TWEAKS
   ========================================== */
@media (max-width: 768px) {
  .hero__names { flex-direction: column; gap: .1em; }
  .hero__amp { font-size: .4em; margin: -.3em 0; }
  .countdown__grid { gap: .5rem; }
  .countdown__item { min-width: 70px; }
  .countdown__sep { display: none; }
  .story__grid, .details__grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .countdown__num { font-size: 2.5rem; }
  .details__card, .story__item { padding: 2rem 1.5rem; }
}

/* ==========================================
   MAP SECTION
   ========================================== */
.map-section { background: var(--white); }

.map-section__wrap {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  border: 1px solid var(--blue-200);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 50px rgba(122,158,192,.15);
}

.map-section__info {
  background: var(--blue-dark);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.map-section__venue {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.map-section__venue-icon {
  width: 44px; height: 44px;
  background: rgba(168,191,216,.2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blue-300);
  flex-shrink: 0;
}
.map-section__venue-icon svg { width: 20px; height: 20px; }

.map-section__venue h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--white);
  margin-bottom: .5rem;
}
.map-section__venue p {
  font-size: .88rem;
  color: var(--blue-300);
  line-height: 1.6;
}
.map-section__time {
  margin-top: .6rem !important;
  color: var(--gold) !important;
  font-weight: 400;
  font-size: .85rem !important;
}

.map-section__btn {
  display: inline-block;
  padding: .8rem 1.5rem;
  border: 1.5px solid var(--blue-300);
  border-radius: 50px;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
  text-align: center;
  transition: background .3s, border-color .3s, transform .3s var(--ease-spring);
}
.map-section__btn:hover {
  background: var(--blue-400);
  border-color: var(--blue-400);
  transform: translateY(-2px);
}

.map-section__embed {
  height: 380px;
  position: relative;
}
.map-section__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .map-section__wrap {
    grid-template-columns: 1fr;
  }
  .map-section__embed {
    height: 260px;
  }
}

/* Details card map link */
.details__map-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1rem;
  font-size: .78rem;
  font-family: var(--font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-400);
  border-bottom: 1px solid var(--blue-200);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.details__map-link:hover {
  color: var(--blue-dark);
  border-color: var(--blue-dark);
}

/* ==========================================
   LOADING STATE OVERLAY
   ========================================== */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity .6s ease, visibility .6s;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }
.page-loader__text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2rem;
  color: var(--white);
  animation: loader-pulse 1.5s ease-in-out infinite;
}
@keyframes loader-pulse {
  0%,100% { opacity:.3; } 50% { opacity:1; }
}
