/* ==========================================================================
   Sandra's 38th Birthday – Mosel Weekend Gift
   Premium Wine-Country Aesthetic
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Palette */
  --cream:        #FAF7F2;
  --cream-dark:   #F0EBE3;
  --warm-gray:    #B8AFA6;
  --warm-gray-dk: #7A7268;
  --burgundy:     #722F37;
  --burgundy-deep:#5A1E25;
  --gold:         #C9A85C;
  --gold-light:   #E2D1A2;
  --gold-shimmer: #F0E4C4;
  --text-dark:    #2C2520;
  --text-body:    #4A4340;
  --white:        #FFFFFF;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-3xl: 10rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background-color: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-dark);
  font-weight: 400;
  line-height: 1.25;
}

/* ==========================================================================
   INTRO / BALLOON ANIMATION
   ========================================================================== */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s ease-out, visibility 1s;
}

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

.balloon-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Individual balloon */
.balloon {
  position: absolute;
  bottom: -180px;
  width: 60px;
  opacity: 0;
  animation: floatUp 4s ease-out forwards;
}

.balloon svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}

/* Stagger delays are set via inline styles */

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-120vh) rotate(var(--sway, 5deg));
    opacity: 0;
  }
}

/* The "38" number reveal */
.number-reveal {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: scale(0.8);
  animation: revealNumber 1.5s ease-out forwards;
  animation-delay: 3s;
}

.number-reveal .number {
  font-family: var(--font-display);
  font-size: clamp(5rem, 20vw, 12rem);
  color: transparent;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  letter-spacing: 0.05em;
  font-weight: 700;
}

@keyframes revealNumber {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Small decorative confetti around the 38 */
.confetti-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0;
  animation: confettiBurst 2s ease-out forwards;
  animation-delay: 3.5s;
}

@keyframes confettiBurst {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(1);
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(44, 37, 32, 0.3) 0%,
    rgba(44, 37, 32, 0.55) 50%,
    rgba(44, 37, 32, 0.7) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-lg);
  max-width: 700px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1.2s ease-out forwards;
  animation-delay: 0.3s;
}

.hero-content .deco-line {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto var(--space-md);
}

.hero-content h1 {
  font-size: clamp(1.8rem, 5.5vw, 3.2rem);
  color: var(--white);
  margin-bottom: var(--space-md);
  letter-spacing: 0.02em;
}

.hero-content h1 .name {
  display: block;
  color: var(--gold-light);
  font-size: 1.15em;
  margin-top: 0.15em;
}

.hero-content .subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  color: rgba(255,255,255,0.85);
  font-weight: 300;
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto;
}

.hero-content .subtitle em {
  color: var(--gold-light);
  font-style: italic;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
  animation-delay: 1.5s;
}

.scroll-indicator span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.6);
}

.scroll-indicator .scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50%      { opacity: 1;   transform: scaleY(1); }
}

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

/* ==========================================================================
   ROUTE SECTION  – The Mosel River Path
   ========================================================================== */
.route-section {
  position: relative;
  padding: var(--space-2xl) 0;
  background: var(--cream);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.route-section.locked {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  pointer-events: none;
}

.route-section.revealing {
  opacity: 1;
  max-height: none;
  overflow: visible;
  padding: var(--space-2xl) 0;
}

.route-header {
  text-align: center;
  padding: 0 var(--space-lg);
  margin-bottom: var(--space-xl);
}

.route-header .section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: var(--space-xs);
}

.route-header h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
}

.route-header p {
  max-width: 500px;
  margin: 0 auto;
  color: var(--warm-gray-dk);
  font-size: 0.95rem;
}

/* River SVG path */
.river-path-container {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  z-index: 0;
}

.river-path-container svg {
  width: 100%;
  height: 100%;
}

.river-line-bg {
  stroke: var(--cream-dark);
  stroke-width: 3;
  fill: none;
}

.river-line {
  stroke: var(--gold);
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  transition: stroke-dashoffset 0.05s linear;
}

/* Station timeline – mobile vertical */
.stations {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* The thin timeline line (mobile) */
.stations::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--cream-dark);
}

.stations .timeline-progress {
  position: absolute;
  left: 30px;
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--gold), var(--gold-light));
  transition: height 0.05s linear;
  z-index: 1;
}

/* Station card */
.station {
  position: relative;
  padding-left: 65px;
  margin-bottom: var(--space-2xl);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Timeline dot */
.station .dot {
  position: absolute;
  left: 22px;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--cream-dark);
  z-index: 2;
  transition: border-color 0.6s, box-shadow 0.6s;
}

.station.visible .dot {
  border-color: var(--gold);
  box-shadow: 0 0 0 6px rgba(201, 168, 92, 0.15);
}

.station .station-number {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.station .station-image {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: var(--space-md);
  box-shadow: 0 20px 60px rgba(44, 37, 32, 0.12);
}

.station .station-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.station:hover .station-image img {
  transform: scale(1.03);
}

.station h3 {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--text-dark);
  margin-bottom: var(--space-xs);
}

.station p {
  font-size: 0.95rem;
  color: var(--warm-gray-dk);
  line-height: 1.7;
  max-width: 500px;
}

/* ==========================================================================
   VOUCHER SECTION
   ========================================================================== */
.voucher-section {
  position: relative;
  padding: var(--space-3xl) var(--space-lg);
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
  text-align: center;
  overflow: hidden;
}

.voucher-section .section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: var(--space-xs);
}

.voucher-section h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  margin-bottom: var(--space-xl);
}

/* 3D Flip Card */
.voucher-wrapper {
  perspective: 1200px;
  display: inline-block;
  width: 100%;
  max-width: 480px;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.voucher-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

.voucher-card {
  position: relative;
  width: 100%;
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.voucher-card.flipped {
  transform: rotateY(180deg);
}

.voucher-face {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 25px 60px rgba(114, 47, 55, 0.2),
    0 0 0 1px rgba(201, 168, 92, 0.2);
}

/* Front of voucher */
.voucher-front {
  background: linear-gradient(145deg, var(--burgundy) 0%, var(--burgundy-deep) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.voucher-front .seal {
  width: 80px;
  height: 80px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.voucher-front .seal svg {
  width: 36px;
  height: 36px;
  fill: var(--gold);
}

.voucher-front h3 {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  margin-bottom: var(--space-xs);
}

.voucher-front .tap-hint {
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(226, 209, 162, 0.6);
  margin-top: var(--space-sm);
}

.voucher-front .voucher-front-sub {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(226, 209, 162, 0.75);
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-top: var(--space-xs);
}

/* Shimmer effect on front */
.voucher-front::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(240, 228, 196, 0.08) 45%,
    rgba(240, 228, 196, 0.15) 50%,
    rgba(240, 228, 196, 0.08) 55%,
    transparent 60%
  );
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { transform: translateX(-200%); }
  100% { transform: translateX(200%); }
}

/* Back of voucher */
.voucher-back {
  background: linear-gradient(145deg, var(--cream) 0%, var(--white) 100%);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  text-align: center;
}

.voucher-back .ornament {
  width: 50px;
  height: 2px;
  background: var(--gold);
  margin-bottom: var(--space-sm);
}

.voucher-back .voucher-for {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xs);
}

.voucher-back h4 {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2.8vw, 1.2rem);
  color: var(--burgundy);
  margin-bottom: var(--space-xs);
  line-height: 1.5;
}

.voucher-back .voucher-details {
  font-size: 0.78rem;
  color: var(--warm-gray-dk);
  line-height: 1.6;
  max-width: 320px;
}

.voucher-back .voucher-validity {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--warm-gray);
  margin-top: var(--space-xs);
}

.voucher-back .stamp {
  margin-top: var(--space-sm);
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
}

/* Gold decorative border on back */
.voucher-back::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid var(--gold-light);
  border-radius: 10px;
  pointer-events: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  background: var(--cream-dark);
}

.site-footer .heart {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.15); }
  30%      { transform: scale(1); }
  45%      { transform: scale(1.1); }
}

.site-footer p {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--warm-gray-dk);
  font-style: italic;
}

/* ==========================================================================
   RESPONSIVE  –  DESKTOP  ( >= 768px )
   ========================================================================== */
@media (min-width: 768px) {
  /* Stations: alternate left/right */
  .stations {
    padding: 0 var(--space-xl);
  }

  .stations::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .stations .timeline-progress {
    left: 50%;
    transform: translateX(-50%);
  }

  .station {
    width: 50%;
    padding-left: 0;
    margin-bottom: var(--space-3xl);
  }

  .station .dot {
    left: auto;
  }

  /* Odd stations: left side */
  .station:nth-of-type(odd) {
    margin-left: 0;
    padding-right: 60px;
    text-align: right;
  }

  .station:nth-of-type(odd) .dot {
    right: -9px;
    left: auto;
  }

  .station:nth-of-type(odd) p {
    margin-left: auto;
  }

  .station:nth-of-type(odd) {
    transform: translateX(-20px);
  }

  .station:nth-of-type(odd).visible {
    transform: translateX(0);
  }

  /* Even stations: right side */
  .station:nth-of-type(even) {
    margin-left: 50%;
    padding-left: 60px;
    text-align: left;
  }

  .station:nth-of-type(even) .dot {
    left: -9px;
  }

  .station:nth-of-type(even) {
    transform: translateX(20px);
  }

  .station:nth-of-type(even).visible {
    transform: translateX(0);
  }

  .station .station-image img {
    height: 320px;
  }

  /* Hero */
  .hero-content h1 {
    font-size: 3.2rem;
  }
}

@media (min-width: 1024px) {
  .station .station-image img {
    height: 360px;
  }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
