/* ── Variables ── */
:root {
  --green-dark: #2D4A2D;
  --green-mid: #4A6741;
  --green-light: #8FAF6A;
  --cream: #F5F0E8;
  --blush: #E8C4B8;
  --white: #FDFCF9;
  --rsvp-bg: #F0F5EC;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Forum', 'Tinos', serif;
  background: var(--cream);
  color: var(--green-dark);
  overflow-x: hidden;
}

/* ════════════════════════════════════
   SECTION 1 — HERO
════════════════════════════════════ */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Hero image background */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/static/hero.jpg');
  background-size: cover;
  background-position: center top;
  animation: paintFlow 24s ease-in-out infinite alternate;
}

@keyframes paintFlow {
  0%   { transform: scale(1);    filter: brightness(1); }
  50%  { transform: scale(1.04); filter: brightness(1.03); }
  100% { transform: scale(1.02); filter: brightness(0.97); }
}

/* Dark overlay so text stays readable */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30, 55, 28, 0.25) 0%,
    rgba(20, 40, 18, 0.15) 50%,
    rgba(30, 55, 28, 0.35) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(65px, 9vw, 100px);
  font-style: italic;
  font-weight: 400;
  color: var(--white);
  line-height: 1;
  text-shadow:
    0 2px 40px rgba(0,0,0,0.25),
    0 0 80px rgba(232, 196, 184, 0.2);
  letter-spacing: 0;
}

.hero-date {
  font-family: 'Bodoni Moda', serif;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 600;
  font-style: normal;
  color: var(--cream);
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

/* Arrow */
.hero-arrow {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: arrowPulse 2.4s ease-in-out infinite;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.hero-arrow:hover { opacity: 1; }

@keyframes arrowPulse {
  0%, 100% { transform: translateX(-50%) translateY(0);   opacity: 0.7; }
  50%       { transform: translateX(-50%) translateY(8px); opacity: 0.45; }
}

/* ════════════════════════════════════
   SECTION 2 — INVITATION & PROGRAM
════════════════════════════════════ */
.invitation {
  position: relative;
  min-height: 100vh;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  overflow: hidden;
}

/* Embossed photo background */
.invitation::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/static/invitation2.png');
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.invitation-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.inv-greeting {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 400;
  color: var(--green-dark);
  text-align: center;
  margin-bottom: 16px;
}

.inv-text {
  font-family: 'Forum', 'Tinos', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--green-mid);
  line-height: 1.7;
  margin-bottom: 36px;
}

.inv-divider {
  width: 220px;
  height: 1px;
  background: var(--blush);
  margin: 0 auto 36px;
  opacity: 0.8;
}

.inv-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 400;
  color: var(--green-dark);
  text-align: center;
  margin-bottom: 16px;
}

.inv-venue {
  font-family: 'Forum', 'Tinos', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--green-mid);
  line-height: 1.6;
  margin-bottom: 36px;
}

.venue-name,
.venue-address {
  display: inline-block;
  white-space: nowrap;
}

.venue-name {
  font-size: 17px;
}

.venue-address {
  font-size: 16px;
}

.address-link {
  color: inherit;
  font-family: 'Forum', 'Tinos', serif;
  font-size: 16px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.address-link:hover {
  color: var(--green-dark);
}

.program-list {
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 0;
}

.program-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--green-mid);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.program-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.program-time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--green-dark);
}

.program-desc {
  line-height: 1.45;
}

.program-location,
.program-note {
  display: inline-block;
  margin-top: 11px;
  font-family: 'Forum', 'Tinos', serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  color: var(--green-mid);
}

.program-location {
  margin-bottom: -3px;
}

.program-note {
  display: inline-block;
  margin-top: 2px;
}


/* Scroll-reveal for invitation section items */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════
   SECTION 3 — RSVP
════════════════════════════════════ */
.rsvp {
  position: relative;
  min-height: 100vh;
  background: var(--rsvp-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  overflow: hidden;
}

.rsvp::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/static/anketa.png');
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.rsvp > * {
  position: relative;
  z-index: 1;
}

.rsvp-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 400;
  color: var(--green-dark);
  text-align: center;
  margin-bottom: 16px;
}

.rsvp-intro {
  max-width: 520px;
  font-family: 'Forum', 'Tinos', serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--green-mid);
  line-height: 1.6;
  text-align: center;
  margin-bottom: 40px;
}

.rsvp-form {
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Field group */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-family: 'Forum', 'Tinos', serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--green-mid);
  text-transform: none;
}

/* Text input / textarea */
.field-input,
.field-textarea {
  font-family: 'Forum', 'Tinos', serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--green-dark);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--green-mid);
  padding: 8px 0;
  outline: none;
  width: 100%;
  transition: border-color 0.25s ease;
  resize: none;
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: #9ab090;
  font-weight: 300;
}

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

.field-textarea {
  overflow: hidden;
}

/* Custom radio buttons */
.radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.radio-option {
  position: relative;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-label {
  display: inline-block;
  font-family: 'Forum', 'Tinos', serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--green-mid);
  border: 1px solid var(--green-mid);
  border-radius: 100px;
  padding: 7px 22px;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
  white-space: nowrap;
}

.radio-option input[type="radio"]:checked + .radio-label {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}

.radio-option:hover .radio-label {
  border-color: var(--green-dark);
  color: var(--green-dark);
}

/* Conditional fields */
.conditional-fields {
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.4s ease;
}

.conditional-fields.shown {
  max-height: 600px;
  opacity: 1;
}

/* Submit button */
.submit-btn {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--white);
  background: var(--green-dark);
  border: none;
  border-radius: 100px;
  padding: 14px 48px;
  cursor: pointer;
  align-self: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(45, 74, 45, 0.28);
  background: var(--green-mid);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Success message */
.rsvp-success {
  display: none;
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 400px;
  animation: fadeUp 0.7s ease forwards;
}

.rsvp-success.shown {
  display: flex;
}

.success-text {
  font-family: 'Dancing Script', cursive;
  font-size: 36px;
  font-weight: 600;
  color: var(--green-dark);
  line-height: 1.3;
}

.success-sub {
  font-family: 'Forum', 'Tinos', serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--green-mid);
}

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