/* ════════════════════════════════════════
   SECTIONS — Page-specific styles
   ════════════════════════════════════════ */

/* ── Gate / Auth Screens ── */
.gate-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: var(--space-xl);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.gate-screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
}

.gate-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
  animation: fadeInUp 0.8s var(--ease-out) both;
}

.gate-card .ornament {
  display: block;
  width: 60px;
  height: 1px;
  background: var(--sage);
  margin: 0 auto var(--space-lg);
  position: relative;
}

.gate-card .ornament::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: var(--sage);
  border-radius: 50%;
}

.gate-card h1 {
  font-size: clamp(1.6rem, 5vw, 2rem);
  color: var(--olive);
  margin-bottom: var(--space-sm);
}

.gate-card .subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2xl);
  font-style: italic;
}

.gate-card .field {
  margin-bottom: var(--space-lg);
}

.gate-card .btn {
  margin-top: var(--space-sm);
}

/* ── Main Invitation Container ── */
.invitation {
  display: none;
  min-height: 100vh;
}

.invitation.visible {
  display: block;
  animation: fadeIn 1s var(--ease-out) both;
}

/* ── Hero Section ── */
.hero {
  --hero-height: 100vh;
  --hero-fit: cover;
  --hero-pos: center 30%;

  position: relative;
  min-height: var(--hero-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl);
  overflow: hidden;
  background: var(--olive-deep);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: inherit;
  background-size: cover;
  background-position: center center;
  filter: blur(20px) brightness(0.6);
  transform: scale(1.05);
}

.hero-bg img {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: var(--hero-fit);
  object-position: var(--hero-pos);
  z-index: 1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 50%,
      rgba(20, 20, 20, 0.35) 0%,
      rgba(20, 20, 20, 0.1) 45%,
      transparent 75%
    ),
    linear-gradient(
      180deg,
      rgba(20, 20, 20, 0.2) 0%,
      rgba(20, 20, 20, 0.3) 25%,
      rgba(20, 20, 20, 0.45) 50%,
      rgba(20, 20, 20, 0.65) 75%,
      rgba(20, 20, 20, 0.8) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 3;
  color: var(--white);
  max-width: var(--max-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30vh;
}

.hero-top {
  text-align: center;
  margin-top: 10rem;
}

.hero-lower {
  text-align: center;
}

.hero-content .prelude {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 1;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
  animation: fadeInUp 1s var(--ease-out) 0.3s both;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
  animation: fadeInUp 1s var(--ease-out) 0.5s both;
}

.hero-content h1 .ampersand {
  display: block;
  font-size: 0.5em;
  opacity: 0.7;
  margin: var(--space-xs) 0;
  font-style: italic;
}

.hero-content .tagline {
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-style: italic;
  color: var(--white);
  opacity: 1;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
  animation: fadeInUp 1s var(--ease-out) 0.7s both;
}

.hero-content .hero-date {
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 1;
  margin-bottom: var(--space-xl);
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
  animation: fadeInUp 1s var(--ease-out) 0.9s both;
}

.hero-content .btn {
  animation: fadeInUp 1s var(--ease-out) 1.1s both;
}

.hero-scroll-indicator {
  margin-top: var(--space-lg);
  animation: bounce 2s infinite;
}

.hero-scroll-indicator svg {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Sections Common ── */
.section {
  padding: var(--space-3xl) var(--space-xl);
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  color: var(--olive);
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Welcome Section ── */
.welcome {
  text-align: center;
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-3xl);
}

.welcome p {
  font-size: clamp(1.05rem, 3vw, 1.15rem);
  line-height: 1.9;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto;
}

.welcome .names-highlight {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.2rem);
  color: var(--olive);
  margin-bottom: var(--space-lg);
}

/* ── Details Card ── */
.details-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-card);
  margin: 0 var(--space-xl);
  max-width: var(--max-width-wide);
  margin-left: auto;
  margin-right: auto;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--cream-dark);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-muted);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  color: var(--olive);
}

.detail-icon svg {
  width: 20px;
  height: 20px;
}

.detail-text {
  flex: 1;
}

.detail-text .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.detail-text .value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

.detail-text .value-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Notes ── */
.notes-list {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--cream-dark);
}

.notes-list h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.notes-list li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.notes-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--sage);
  border-radius: 50%;
}

/* ── Location ── */
.location-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.location-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 1rem 1.2rem;
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) ease;
}

.location-btn:hover,
.location-btn:focus-visible {
  border-color: var(--sage);
  background: var(--sage-muted);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.location-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.location-btn span {
  font-weight: 600;
  font-size: 0.95rem;
}

.location-btn small {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Dress Code ── */
.dresscode {
  text-align: center;
}

.dresscode .dresscode-label {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--olive);
  margin-bottom: var(--space-md);
}

.dresscode .dresscode-tones {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.color-palette {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.color-swatch .swatch-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.color-swatch .swatch-name {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── RSVP Section ── */
.rsvp-section {
  background: var(--white);
  margin: var(--space-3xl) var(--space-xl);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-card);
  max-width: var(--max-width-wide);
  margin-left: auto;
  margin-right: auto;
}

.rsvp-form .field {
  margin-bottom: var(--space-lg);
}

.rsvp-form .radio-group {
  margin-bottom: var(--space-lg);
}

.rsvp-form textarea {
  min-height: 100px;
  resize: vertical;
}

/* ── Success Message ── */
.success-message {
  display: none;
}

.success-message.visible {
  display: block;
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.success-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  max-width: 400px;
  margin: 0 auto;
  animation: fadeInUp 2s var(--ease-out) 0.9s both;
}

.success-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.success-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.success-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 40%,
    rgba(20, 20, 20, 0.6) 100%
  );
}

.success-card-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.success-card-badge svg {
  width: 22px;
  height: 22px;
  color: var(--olive);
}

.success-card-body {
  background: var(--white);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.success-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--olive);
  margin-bottom: var(--space-xs);
  line-height: 1.4;
}

.success-card-body p {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}

/* ── Closing Section ── */
.closing {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  position: relative;
}

.closing .closing-ornament {
  display: block;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sage), transparent);
  margin: 0 auto var(--space-2xl);
}

.closing h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  color: var(--olive);
  font-weight: 400;
  font-style: italic;
  margin-bottom: var(--space-lg);
}

.closing .couple-names {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.2rem);
  color: var(--olive);
  margin-bottom: var(--space-xl);
}

.closing .footer-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-2xl);
}

/* ── Photo Moments ── */
.photo-moment {
  text-align: center;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-xl);
}

.photo-frame {
  margin: 0 auto;
  max-width: 100%;
}

.photo-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.photo-quote {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3vw, 1.15rem);
  font-style: italic;
  font-weight: 400;
  color: var(--olive);
  margin-top: var(--space-xl);
  letter-spacing: 0.01em;
  line-height: 1.6;
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (min-width: 640px) {
  .hero {
    --hero-fit: contain;
    --hero-pos: center center;
  }

  .hero-bg img {
    max-height: 85vh;
    max-width: min(90vw, 560px);
    width: auto;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  }

  .hero-content {
    max-width: 540px;
  }

  .hero-content h1 {
    font-size: clamp(3rem, 6vw, 4rem);
  }

  .hero-content .tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  }

  .photo-frame {
    max-width: 560px;
  }
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-4xl) var(--space-xl);
  }

  .details-card {
    padding: var(--space-2xl) var(--space-3xl);
  }

  .rsvp-section {
    padding: var(--space-3xl);
  }

  .location-buttons {
    flex-direction: row;
  }

  .location-btn {
    flex: 1;
  }

  .hero-bg img {
    max-width: min(85vw, 480px);
  }

  .photo-moment {
    padding: var(--space-4xl) var(--space-xl);
  }
}

@media (min-width: 1024px) {
  :root {
    --max-width: 520px;
    --max-width-wide: 640px;
  }

  .hero {
    min-height: 90vh;
    padding: var(--space-3xl) var(--space-4xl);
  }

  .hero-bg img {
    max-height: 82vh;
    max-width: min(70vw, 560px);
  }

  .hero-content {
    max-width: 640px;
  }

  .hero-content .prelude {
    font-size: 0.9rem;
    letter-spacing: 0.25em;
  }

  .hero-content h1 {
    font-size: clamp(3.2rem, 5.5vw, 4.5rem);
  }

  .hero-content .tagline {
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    margin-bottom: var(--space-md);
  }

  .hero-content .hero-date {
    font-size: 1rem;
    letter-spacing: 0.2em;
    margin-bottom: var(--space-3xl);
  }

  .photo-frame {
    max-width: 640px;
  }
}

@media (min-width: 1280px) {
  .hero {
    min-height: 88vh;
  }

  .hero-bg img {
    max-height: 80vh;
    max-width: min(60vw, 620px);
  }

  .hero-content {
    max-width: 700px;
  }

  .hero-content h1 {
    font-size: clamp(3.5rem, 5vw, 5rem);
  }
}

@media (min-width: 1440px) {
  .hero {
    padding: var(--space-4xl) 8vw;
  }

  .hero-bg img {
    max-width: min(55vw, 680px);
  }
}
