/* ===== Theme ===== */
:root {
  --c-primary: #8B9F82;
  --c-primary-dark: #6B7F64;
  --c-secondary: #C4A35A;
  --c-bg: #FEFBF3;
  --c-surface: #F5EFE0;
  --c-text: #2C2C2C;
  --c-text-light: #6B6B6B;
  --c-white: #FFFFFF;
  --f-heading: 'Cormorant Garamond', 'Georgia', serif;
  --f-body: 'Montserrat', 'Helvetica Neue', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,.06);
  --transition: .3s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body); font-weight: 400; font-size: 16px;
  line-height: 1.6; color: var(--c-text); background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary-dark); text-decoration: none; }
ul { list-style: none; }
.container { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(254,251,243,.85); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.05);
  transition: transform .3s ease;
  transition: transform var(--transition);
}
.nav--hidden { transform: translateY(-100%); }
.nav__inner {
  max-width: 720px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; height: 56px;
}
.nav__logo { font-family: var(--f-heading); font-size: 1.3rem; font-weight: 600; color: var(--c-text); }
.nav__burger {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav__burger span { width: 22px; height: 2px; background: var(--c-text); border-radius: 2px; transition: var(--transition); }
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__links {
  display: none; position: absolute; top: 56px; left: 0; right: 0;
  background: rgba(254,251,243,.97); backdrop-filter: blur(12px);
  padding: 16px 20px; border-bottom: 1px solid rgba(0,0,0,.05);
}
.nav__links.open { display: block; }
.nav__links li + li { margin-top: 12px; }
.nav__links a { font-size: .95rem; font-weight: 500; color: var(--c-text); transition: color var(--transition); }
.nav__links a:hover { color: var(--c-primary-dark); }

/* ===== Page sections (full-viewport feel) ===== */
.page-section {
  min-height: 100vh;
  padding: 72px 0;
  display: flex; align-items: center;
}
.page-section__center { width: 100%; }
.section--alt { background: var(--c-surface); }
.section__title {
  font-family: var(--f-heading); font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  text-align: center; margin-bottom: 32px; color: var(--c-text);
}
.section__title + .section__subtitle { margin-top: -24px; }
.section__subtitle { text-align: center; font-size: .95rem; color: var(--c-text-light); margin-bottom: 36px; }

/* ===== Hero (full viewport) ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--c-surface) 0%, var(--c-bg) 50%, #e8dece 100%);
  overflow: hidden; padding: 70px 0 48px;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(139,159,130,.12) 0%, transparent 70%),
              radial-gradient(ellipse at 70% 60%, rgba(196,163,90,.1) 0%, transparent 60%);
}
.hero__top { position: relative; padding: 0 20px; margin-bottom: 24px; }
.hero__date {
  font-weight: 300; font-size: .9rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--c-text-light); margin-bottom: 12px;
}
.hero__names {
  font-family: var(--f-heading); font-weight: 400;
  font-size: clamp(2.2rem, 8vw, 4.2rem); line-height: 1.1; margin-bottom: 10px;
}
.hero__amp { display: inline-block; font-style: italic; color: var(--c-secondary); margin: 0 .12em; }
.hero__headline { font-weight: 300; font-size: 1.05rem; color: var(--c-text-light); margin-bottom: 20px; }
.hero__divider { width: 60px; height: 1px; background: var(--c-secondary); margin: 0 auto 24px; }
.hero__scroll {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: var(--c-text-light); animation: bounce 2s ease infinite;
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== Countdown ===== */
.countdown { display: flex; align-items: center; justify-content: center; gap: 6px; }
.countdown__unit { text-align: center; min-width: 50px; }
.countdown__number {
  display: block; font-family: var(--f-heading);
  font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 500; line-height: 1;
}
.countdown__label { font-size: .65rem; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--c-text-light); }
.countdown__sep { font-family: var(--f-heading); font-size: 1.3rem; color: var(--c-secondary); margin-top: -14px; }
.countdown__done { font-family: var(--f-heading); font-size: 1.6rem; color: var(--c-secondary); font-style: italic; }

/* ===== Hero Carousel (inside hero) ===== */
.hero-carousel {
  position: relative; width: 100%; max-width: 520px;
  overflow: hidden; border-radius: var(--radius);
  box-shadow: var(--shadow); touch-action: pan-y; user-select: none;
}
.carousel__track { display: flex; transition: transform .4s ease; will-change: transform; }
.carousel__slide { flex: 0 0 100%; min-width: 0; }
.carousel__slide img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; }
.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.8); color: var(--c-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: background var(--transition); z-index: 2;
}
.carousel__btn:hover { background: var(--c-white); }
.carousel__btn--prev { left: 8px; }
.carousel__btn--next { right: 8px; }
.carousel__dots {
  display: flex; justify-content: center; gap: 6px; padding: 10px 0;
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.15));
}
.carousel__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.45); border: none; cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.carousel__dot--active { background: var(--c-white); transform: scale(1.3); }

/* ===== Place ===== */
.place-section {
  background: #2B3A2E; color: var(--c-white);
}
.place-section .section__title { color: var(--c-white); }
.place__logo {
  text-align: center; margin-bottom: 28px;
}
.place__logo img {
  max-width: 280px; width: 80%; height: auto; display: inline-block;
}
.place__info { text-align: center; }
.place__address {
  font-family: var(--f-heading); font-size: 1.2rem; margin-bottom: 6px;
  color: rgba(255,255,255,.9);
}
.place__transport {
  font-size: .9rem; color: rgba(255,255,255,.6); margin-bottom: 28px;
}
.place-section .btn--primary {
  background: var(--c-white); color: #2B3A2E;
}
.place-section .btn--primary:hover {
  background: rgba(255,255,255,.85);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 50px; font-family: var(--f-body);
  font-size: .95rem; font-weight: 500; cursor: pointer; border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn--primary { background: var(--c-primary); color: var(--c-white); border-color: var(--c-primary); }
.btn--primary:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(139,159,130,.3); }
.btn--outline { background: transparent; color: var(--c-primary-dark); border-color: var(--c-primary); }
.btn--outline:hover { background: var(--c-primary); color: var(--c-white); transform: translateY(-1px); }
.btn--lg { padding: 16px 40px; font-size: 1.05rem; width: 100%; justify-content: center; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ===== Timeline (enhanced) ===== */
.timeline { display: flex; flex-direction: column; position: relative; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; left: 15px; top: 12px; bottom: 12px;
  width: 2px; background: linear-gradient(to bottom, var(--c-primary), var(--c-secondary)); border-radius: 2px;
}
.timeline__item { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; position: relative; }
.timeline__item::before {
  content: ''; position: absolute; left: -33px; top: 22px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--c-bg); border: 2px solid var(--c-primary);
}
.timeline__icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.timeline__body { flex: 1; }
.timeline__title { font-weight: 600; font-size: 1.05rem; margin-bottom: 2px; }
.timeline__desc { font-size: .9rem; color: var(--c-text-light); line-height: 1.5; }

/* ===== Accommodation Carousel ===== */
.accom-carousel {
  position: relative; overflow: hidden; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 20px; touch-action: pan-y; user-select: none;
}
.accom-carousel__track { display: flex; transition: transform .45s ease; will-change: transform; }
.accom-carousel__slide { flex: 0 0 100%; min-width: 0; }
.accom-carousel__slide img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.accom-carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.8); color: var(--c-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: background var(--transition); z-index: 2;
}
.accom-carousel__btn:hover { background: var(--c-white); }
.accom-carousel__btn--prev { left: 10px; }
.accom-carousel__btn--next { right: 10px; }
.accom-carousel__dots {
  display: flex; justify-content: center; gap: 6px; padding: 10px 0;
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.18));
}
.accom-carousel__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.45); border: none; cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.accom-carousel__dot--active { background: var(--c-white); transform: scale(1.3); }
.accommodation__text { text-align: center; font-size: 1rem; line-height: 1.7; color: var(--c-text); }

/* ===== Dresscode Slider (3-visible on mobile, clickable) ===== */
/* ===== Dresscode placeholder ===== */
.dc-placeholder { max-width: 440px; margin: 0 auto; text-align: center; }
.dc-placeholder__cards {
  display: flex; gap: 14px; justify-content: center; margin-bottom: 24px;
}
.dc-placeholder__card {
  flex: 0 0 100px; height: 140px;
  border-radius: var(--radius);
  border: 2px dashed rgba(196,163,90,.35);
  background: linear-gradient(180deg, rgba(196,163,90,.06), rgba(196,163,90,.02));
  display: flex; align-items: center; justify-content: center;
}
.dc-placeholder__card span {
  font-family: var(--f-heading); font-size: 2.4rem; font-weight: 400;
  color: var(--c-secondary); opacity: .5;
}
.dc-placeholder__text {
  font-family: var(--f-heading); font-size: 1.05rem;
  color: var(--c-text-light); line-height: 1.6;
}

/* ===== RSVP Form ===== */
.rsvp-form { max-width: 480px; margin: 0 auto; }
.form-group { margin-bottom: 24px; }
.form-label {
  display: block; font-size: .85rem; font-weight: 500;
  letter-spacing: .03em; text-transform: uppercase;
  color: var(--c-text-light); margin-bottom: 8px;
}
.form-input {
  width: 100%; padding: 14px 16px; border: 2px solid #ddd;
  border-radius: var(--radius-sm); font-family: var(--f-body); font-size: 1rem;
  color: var(--c-text); background: var(--c-white);
  transition: border-color var(--transition), box-shadow var(--transition); outline: none;
}
.form-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(139,159,130,.15); }
.form-input::placeholder { color: #aaa; }
.form-textarea { resize: vertical; min-height: 110px; }


.radio-group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card__body {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 20px 12px; border: 2px solid #ddd; border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.radio-card input:checked + .radio-card__body { border-color: var(--c-primary); background: rgba(139,159,130,.08); }
.radio-card__body:hover { border-color: var(--c-primary); transform: translateY(-1px); }
.radio-card__icon { font-size: 1.4rem; font-weight: 600; }
.radio-card input[value="yes"]:checked + .radio-card__body .radio-card__icon { color: var(--c-primary); }
.radio-card input[value="no"]:checked + .radio-card__body .radio-card__icon { color: #c97070; }
.radio-card__text { font-size: .9rem; font-weight: 500; }

.rsvp-form__status { text-align: center; margin-top: 16px; font-size: .9rem; min-height: 24px; }
.rsvp-form__status--error { color: #c97070; }
.rsvp-form__status--sending { color: var(--c-text-light); }

.rsvp-thanks { text-align: center; padding: 40px 20px; max-width: 480px; margin: 0 auto; }
.rsvp-thanks__icon { font-size: 3rem; margin-bottom: 16px; }
.rsvp-thanks__title { font-family: var(--f-heading); font-size: 2rem; margin-bottom: 8px; }
.rsvp-thanks__text { font-size: 1rem; color: var(--c-text-light); }

.form-group--hidden {
  max-height: 0; overflow: hidden; opacity: 0;
  margin: 0; padding: 0;
  transition: max-height .4s ease, opacity .3s ease, margin .4s ease;
}
.form-group:not(.form-group--hidden) {
  max-height: 500px; opacity: 1;
  transition: max-height .4s ease, opacity .3s ease .1s, margin .4s ease;
}
.form-hint { font-size: .85rem; color: var(--c-text-light); margin-bottom: 12px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: .95rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--c-primary); }
.form-hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* ===== Letter overlay ===== */
.letter-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: #3a4a3c;
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(139,159,130,.25) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(139,159,130,.15) 0%, transparent 50%);
}
.letter-overlay.is-fade-out {
  opacity: 0;
  transition: opacity 1s ease;
}
.letter-overlay.is-hidden { display: none; }

/* --- Invitation card --- */
.inv-card {
  width: min(320px, 84vw);
  background: linear-gradient(180deg, #fdfaf2 0%, #f8f2e4 60%, #f3ecda 100%);
  border-radius: 14px;
  padding: 40px 30px 28px;
  box-shadow: 0 16px 56px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.1);
  border: 1px solid rgba(196,163,90,.12);
  display: flex; flex-direction: column; align-items: center;
  text-align: center; cursor: pointer;
  animation: cardFloat 4s ease-in-out infinite;
  position: relative; overflow: hidden;
}
/* Paper texture */
.inv-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* --- Ornaments --- */
.inv-card__ornament { width: 120px; }
.inv-card__ornament svg { display: block; width: 100%; }
.inv-card__ornament--top { margin-bottom: 18px; }
.inv-card__ornament--bottom { margin-top: 18px; }

/* --- Typography --- */
.inv-card__names {
  font-family: var(--f-heading); font-size: 2rem; font-weight: 500;
  color: var(--c-text); letter-spacing: .03em; margin: 0 0 10px; line-height: 1.3;
}
.inv-card__names span { color: var(--c-secondary); font-weight: 400; }
.inv-card__invite {
  font-family: var(--f-heading); font-size: 1.05rem; font-style: italic;
  color: #8a7a60; margin: 0 0 4px; line-height: 1.5;
}
.inv-card__divider { width: 80px; margin: 12px auto; }
.inv-card__divider svg { display: block; width: 100%; }
.inv-card__date {
  font-family: var(--f-body); font-size: .85rem; font-weight: 600;
  color: var(--c-text); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 4px;
}
.inv-card__venue {
  font-family: var(--f-body); font-size: .8rem; color: #8a7a60;
  letter-spacing: .03em; margin: 0;
}
.inv-card__hint {
  font-family: var(--f-heading); font-size: .95rem; color: rgba(138,122,96,.6);
  margin: 20px 0 0; letter-spacing: .02em;
  animation: hintPulse 2.5s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: .4; }
  50% { opacity: .9; }
}

/* ===== Gifts section ===== */
.gifts-section { background: var(--c-surface); }
.gifts-block { max-width: 560px; margin: 0 auto; text-align: center; }
.gifts-block__lead { font-family: var(--f-heading); font-size: 1.25rem; margin-bottom: 16px; color: var(--c-text); }
.gifts-block__text { font-size: .95rem; color: var(--c-text-light); line-height: 1.7; margin-bottom: 12px; }
.gifts-block__text:last-child { margin-bottom: 0; }

/* ===== Contacts ===== */
.contacts__links { display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* ===== Footer ===== */
.footer {
  text-align: center; padding: 32px 20px;
  font-family: var(--f-heading); font-size: 1rem; color: var(--c-text-light); font-style: italic;
}

/* ===== Scroll Reveal ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Desktop ===== */
@media (min-width: 768px) {
  .nav__burger { display: none; }
  .nav__links {
    display: flex !important; position: static; background: none;
    padding: 0; border: none; gap: 24px;
  }
  .nav__links li + li { margin-top: 0; }
  .container { padding: 0 32px; }
  .page-section { padding: 96px 0; }
  .hero { padding: 80px 0 56px; }
  .hero-carousel { max-width: 580px; }
  .countdown__unit { min-width: 60px; }
  .timeline { padding-left: 60px; }
  .timeline__item::before { left: -53px; }
  .contacts__links { flex-direction: row; justify-content: center; }
  .btn--lg { width: auto; min-width: 280px; }
  .rsvp-form { max-width: 520px; }
  .dc-placeholder__card { flex: 0 0 120px; height: 168px; }
}
