/* ═══════════════════════════════════════════════
   Japandi Pregnancy Announcement — Style System
   Reference: design-guide.md
   ═══════════════════════════════════════════════ */

/* ── Reset & Tokens ─────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Foundations */
  --color-bg: #F5F0EB;
  --color-bg-alt: #EDE6DD;
  --color-surface: #E8E0D6;

  /* Text */
  --color-ink: #2C2825;
  --color-text: #3A3632;
  --color-text-muted: #8A8279;

  /* Accent: Terracotta / Golden Oak */
  --color-accent: #C4956A;
  --color-accent-soft: #D4B896;
  --color-accent-deep: #A67B52;

  /* Highlight: Sage Green (baby reveal only) */
  --color-highlight: #A7C4A0;
  --color-highlight-soft: #C5D9C1;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-card: 0 1px 4px rgba(58, 54, 50, 0.06);
  --shadow-lift: 0 4px 12px rgba(58, 54, 50, 0.08);

  /* Transitions */
  --ease-out-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration-normal: 0.4s;
  --duration-slow: 0.8s;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Washi Paper Texture Overlay ────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.28;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  mix-blend-mode: multiply;
}

/* ── Typography ─────────────────────────────── */
.font-display {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
}

h1,
h2,
.hero-title {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 300;
  color: var(--color-ink);
}

h3 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 500;
}

/* ── Page Container ─────────────────────────── */
.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 3rem);
}


/* ═══════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: var(--space-lg);
}

.hero-title {
  font-size: clamp(2.8rem, 9vw, 4.5rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--color-ink);
  letter-spacing: -0.02em;
  opacity: 0;
  animation: heroFadeIn 1.4s var(--ease-out-soft) 0.3s forwards;
}

.hero-ampersand {
  display: block;
  font-size: 0.5em;
  font-weight: 300;
  color: var(--color-accent);
  margin: 0.15em 0;
  font-style: italic;
}

.hero-subtitle {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: var(--color-text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: var(--space-md);
  opacity: 0;
  animation: heroFadeIn 1.2s var(--ease-out-soft) 0.9s forwards;
}

.hero-divider {
  width: 48px;
  height: 2px;
  background: var(--color-accent-soft);
  border: none;
  margin: var(--space-md) auto;
  opacity: 0;
  animation: heroFadeIn 1s var(--ease-out-soft) 1.2s forwards;
}

.scroll-indicator {
  position: absolute;
  bottom: clamp(2rem, 5vh, 3.5rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: heroFadeIn 0.8s var(--ease-out-soft) 2.2s forwards;
}

.scroll-indicator span {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.scroll-chevron {
  width: 20px;
  height: 20px;
  border-right: 1.5px solid var(--color-accent);
  border-bottom: 1.5px solid var(--color-accent);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out 2.8s infinite;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: rotate(45deg) translateY(0);
  }

  50% {
    transform: rotate(45deg) translateY(6px);
  }
}


/* ═══════════════════════════════════════════════
   TIMELINE SECTION
   ═══════════════════════════════════════════════ */
.timeline-section {
  padding: var(--space-2xl) 0 var(--space-xl);
}

.timeline-section-title {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--color-ink);
  letter-spacing: -0.01em;
}

.timeline {
  position: relative;
  padding-left: 40px;
}

/* Vertical timeline line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 15px;
  width: 2px;
  background: linear-gradient(to bottom,
      transparent 0%,
      var(--color-accent-soft) 3%,
      var(--color-accent) 15%,
      var(--color-accent) 85%,
      var(--color-accent-soft) 97%,
      transparent 100%);
}


/* ── Timeline Event ─────────────────────────── */
.timeline-event {
  position: relative;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  /* Scroll reveal initial state */
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out-soft),
    transform 0.7s var(--ease-out-soft);
}

.timeline-event.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Timeline dot */
.event-dot {
  position: absolute;
  left: -33px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  border: 2.5px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-accent-soft);
  z-index: 2;
  transition: transform 0.3s var(--ease-out-soft);
}

/* Event card */
.event-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-normal) var(--ease-out-soft),
    box-shadow var(--duration-normal) var(--ease-out-soft);
}

.event-date {
  display: block;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.event-title {
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.event-icon {
  font-style: normal;
  font-size: 1.15em;
}


/* ── Event Photos (stacked gallery) ─────────── */
.event-photos {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.event-photos img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}


/* ═══════════════════════════════════════════════
   BABY REVEAL — THE UNFORGETTABLE MOMENT
   ═══════════════════════════════════════════════ */
.timeline-event--reveal .event-dot {
  width: 20px;
  height: 20px;
  left: -37px;
  top: 2px;
  background: var(--color-highlight);
  box-shadow: 0 0 0 3px var(--color-highlight-soft),
    0 0 16px rgba(167, 196, 160, 0.3);
  animation: heartbeat 1.4s ease-in-out infinite;
}

.event-card--reveal {
  background: linear-gradient(135deg,
      var(--color-highlight-soft) 0%,
      #dce9d9 50%,
      var(--color-bg-alt) 100%);
  border: 1.5px solid var(--color-highlight);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.event-card--reveal::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at center,
      rgba(167, 196, 160, 0.15) 0%,
      transparent 60%);
  pointer-events: none;
}

.event-card--reveal .event-date {
  font-size: 0.85rem;
  color: var(--color-accent-deep);
  font-weight: 400;
}

.event-card--reveal .event-title {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  font-weight: 600;
  color: var(--color-ink);
  justify-content: center;
  margin: var(--space-sm) 0;
}

.reveal-icon {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  margin-bottom: var(--space-xs);
  animation: heartbeat 1.4s ease-in-out infinite;
}

.loading-bar {
  width: 80%;
  max-width: 200px;
  height: 4px;
  background: var(--color-surface);
  border-radius: 2px;
  margin: var(--space-sm) auto 0;
  overflow: hidden;
}

.loading-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,
      var(--color-highlight) 0%,
      var(--color-accent) 100%);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.loading-fill.animate {
  animation: loadingProgress 3.5s var(--ease-out-soft) forwards;
}

@keyframes heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  15% {
    transform: scale(1.12);
  }

  30% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.08);
  }

  60% {
    transform: scale(1);
  }
}

@keyframes loadingProgress {
  0% {
    width: 0%;
  }

  20% {
    width: 15%;
  }

  50% {
    width: 45%;
  }

  75% {
    width: 72%;
  }

  90% {
    width: 88%;
  }

  100% {
    width: 100%;
  }
}


/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.footer {
  text-align: center;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  color: var(--color-text-muted);
  font-weight: 300;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.footer-heart {
  display: inline-block;
  color: var(--color-accent);
  animation: heartbeat 1.4s ease-in-out infinite;
  font-size: 1.2em;
}


/* ═══════════════════════════════════════════════
   HOVER EFFECTS (desktop only)
   ═══════════════════════════════════════════════ */
@media (hover: hover) and (pointer: fine) {
  .event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
  }

  .timeline-event:hover .event-dot {
    transform: scale(1.3);
  }

  .timeline-event--reveal:hover .event-dot {
    transform: scale(1.1);
  }
}


/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 480px) {
  .timeline {
    padding-left: 32px;
  }

  .timeline::before {
    left: 11px;
  }

  .event-dot {
    left: -27px;
    width: 10px;
    height: 10px;
  }

  .timeline-event--reveal .event-dot {
    width: 18px;
    height: 18px;
    left: -31px;
  }

  .event-card {
    padding: var(--space-sm);
  }
}


/* ═══════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .timeline-event {
    opacity: 1;
    transform: none;
  }

  .hero-title,
  .hero-subtitle,
  .hero-divider,
  .scroll-indicator {
    opacity: 1;
  }
}