/* ==========================================================================
   LITTLE DOODLE — Wedding Storybook
   Design tokens
   ========================================================================== */
:root{
  /* --- color: warm paper / stationery palette --- */
  --c-ivory: #FBF6EE;
  --c-cream: #F4EEE1;
  --c-beige: #EAE0CB;
  --c-taupe: #A9896C;
  --c-sage: #93A084;
  --c-terracotta: #C1785A;
  --c-blush: #E8C9BE;
  --c-ink: #3B322A;
  --c-ink-soft: #6B5F52;
  --c-paper-line: rgba(59,50,42,0.12);

  /* --- type --- */
  --f-display: "Playfair Display", "Times New Roman", serif;
  --f-script: "Caveat", cursive;
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --fs-hero: clamp(2.5rem, 8vw, 4rem);
  --fs-h2: clamp(1.8rem, 5vw, 2.5rem);
  --fs-h3: clamp(1.25rem, 3.5vw, 1.55rem);
  --fs-body: 1.05rem;
  --fs-small: 0.92rem;

  /* --- layout --- */
  --gutter: 6vw;
  --max-w: 640px;
  --radius-card: 4px;
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-reveal: 1200ms;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--c-ivory);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
button{ font-family: inherit; cursor: pointer; }
a{ color: inherit; }
h1, h2, h3, p{ margin: 0; }

/* subtle paper texture, no external image needed */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(rgba(59,50,42,0.025) 1px, transparent 1px);
  background-size: 3px 3px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html{ scroll-behavior: auto; }
}

/* ==========================================================================
   Doodle icon base
   ========================================================================== */
.doodle{
  display: inline-block;
  color: var(--c-taupe);
  line-height: 0;
}
.doodle svg{ width: 100%; height: 100%; display: block; }

/* ambient floating doodles */
.doodle-float{
  position: absolute;
  width: 40px;
  height: 40px;
  opacity: 0.55;
  animation: sway 7s ease-in-out infinite;
}
@keyframes sway{
  0%, 100%{ transform: translateY(0) rotate(-3deg); }
  50%{ transform: translateY(-10px) rotate(3deg); }
}
@keyframes heartbeat{
  0%, 100%{ transform: scale(1); }
  50%{ transform: scale(1.14); }
}
.doodle-heartbeat{ animation: heartbeat 1.8s ease-in-out infinite; transform-origin: center; }

/* ==========================================================================
   Scroll reveal system (Fade Up, Fade Down, Scale, and Directional)
   Slow, majestic & elegant transition curves
   ========================================================================== */
.reveal,
.reveal-up{
  opacity: 0;
  transform: translateY(38px);
  transition: opacity var(--dur-reveal) var(--ease-luxury),
              transform var(--dur-reveal) var(--ease-luxury);
  will-change: opacity, transform;
}
.reveal-down{
  opacity: 0;
  transform: translateY(-36px);
  transition: opacity var(--dur-reveal) var(--ease-luxury),
              transform var(--dur-reveal) var(--ease-luxury);
  will-change: opacity, transform;
}
.reveal-left{
  opacity: 0;
  transform: translateX(-38px);
  transition: opacity var(--dur-reveal) var(--ease-luxury),
              transform var(--dur-reveal) var(--ease-luxury);
  will-change: opacity, transform;
}
.reveal-right{
  opacity: 0;
  transform: translateX(38px);
  transition: opacity var(--dur-reveal) var(--ease-luxury),
              transform var(--dur-reveal) var(--ease-luxury);
  will-change: opacity, transform;
}
.reveal-scale{
  opacity: 0;
  transform: translateY(22px) scale(0.92);
  transition: opacity var(--dur-reveal) var(--ease-luxury),
              transform var(--dur-reveal) var(--ease-luxury);
  will-change: opacity, transform;
}

.reveal.is-visible,
.reveal-up.is-visible,
.reveal-down.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible{
  opacity: 1;
  transform: translate(0, 0);
}
.reveal-scale.is-visible{
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ==========================================================================
   Cover / Opening screen
   ========================================================================== */
#cover{
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-ivory);
  padding: 24px 16px;
  overflow-y: auto;
  transition: transform 0.9s var(--ease-soft), opacity 0.8s var(--ease-soft), visibility 0s linear 0.9s;
}
#cover.is-open{
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.cover-inner{
  text-align: center;
  width: 100%;
  max-width: 440px;
  margin: auto;
  position: relative;
}
.cover-frame{
  border: 1px solid var(--c-paper-line);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  padding: clamp(32px, 5vh, 48px) clamp(22px, 5vw, 36px);
  position: relative;
  box-shadow: 0 10px 30px rgba(59, 50, 42, 0.06);
}
.cover-frame::before{
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(169, 137, 108, 0.28);
  border-radius: 6px;
  pointer-events: none;
}
.cover-frame::after{
  display: none;
}

.cover-doodle{
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  color: var(--c-terracotta);
}
.cover-eyebrow{
  display: block;
  font-family: var(--f-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--c-ink-soft);
  margin-bottom: 10px;
}
.cover-names{
  font-family: var(--f-display);
  font-size: clamp(2.3rem, 7.5vw, 3.2rem);
  font-style: normal;
  font-weight: 600;
  color: var(--c-ink);
  line-height: 1.2;
}
.cover-amp{
  display: inline-block;
  font-family: var(--f-script);
  font-size: 1.25em;
  color: var(--c-terracotta);
  margin: 0 8px;
  vertical-align: middle;
}
.cover-date{
  margin-top: 14px;
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--c-ink-soft);
}
.cover-guest{
  margin-top: 22px;
  padding: 14px 18px;
  background: rgba(251, 246, 238, 0.9);
  border: 1px solid var(--c-paper-line);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--c-ink-soft);
  line-height: 1.5;
}
.cover-guest strong{
  display: block;
  margin-top: 5px;
  color: var(--c-ink);
  font-size: 1.18rem;
  font-weight: 600;
}
.btn-open{
  margin-top: 26px;
  border: none;
  background: var(--c-ink);
  color: var(--c-ivory);
  padding: 14px 34px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(59, 50, 42, 0.15);
  transition: background 0.3s var(--ease-soft), color 0.3s var(--ease-soft), transform 0.2s var(--ease-soft), box-shadow 0.3s var(--ease-soft);
}
.btn-open:hover{
  background: var(--c-terracotta);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(193, 120, 90, 0.28);
}
.btn-open:active{
  transform: translateY(0) scale(0.97);
}

/* ==========================================================================
   Page shell / sections
   ========================================================================== */
main{ position: relative; z-index: 1; }
.section{
  padding: clamp(60px, 12vw, 100px) clamp(20px, 6vw, 36px);
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}
.section-alt{ background: var(--c-cream); }
.section-inner{ position: relative; z-index: 1; }

.eyebrow-doodle{
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  color: var(--c-terracotta);
}
.section-kicker{
  display: block;
  text-align: center;
  font-family: var(--f-script);
  font-size: 1.6rem;
  color: var(--c-terracotta);
  margin-bottom: 6px;
}
.section-title{
  text-align: center;
  font-family: var(--f-display);
  font-size: var(--fs-h2);
  font-style: normal;
  font-weight: 600;
  line-height: 1.25;
  color: var(--c-ink);
}
.section-sub{
  text-align: center;
  max-width: 38ch;
  margin: 14px auto 0;
  color: var(--c-ink-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ==========================================================================
   Hero
   ========================================================================== */
#hero{ padding-top: clamp(80px, 14vw, 120px); text-align: center; }
.hero-doodle{
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  color: var(--c-sage);
}
.hero-kicker{
  font-family: var(--f-script);
  font-size: 1.8rem;
  color: var(--c-terracotta);
}
.hero-names{
  margin-top: 10px;
  font-family: var(--f-display);
  font-style: normal;
  font-weight: 600;
  font-size: var(--fs-hero);
  line-height: 1.15;
}
.hero-date{
  margin-top: 16px;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--c-ink-soft);
}
.hero-note{
  margin-top: 26px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--c-ink-soft);
  max-width: 38ch;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Our Little Story — storybook timeline
   ========================================================================== */
.timeline{
  position: relative;
  margin-top: clamp(32px, 8vw, 48px);
  padding-left: 32px;
}
.timeline::before{
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 9px;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom, var(--c-paper-line) 0 6px, transparent 6px 11px
  );
}
.timeline-item{
  position: relative;
  padding-bottom: clamp(28px, 7vw, 40px);
}
.timeline-item:last-child{ padding-bottom: 0; }
.timeline-mark{
  position: absolute;
  left: -32px;
  top: 2px;
  width: 22px;
  height: 22px;
  color: var(--c-terracotta);
}
.timeline-title{
  font-family: var(--f-display);
  font-style: normal;
  font-weight: 600;
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.timeline-text{
  color: var(--c-ink-soft);
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 44ch;
}

/* ==========================================================================
   Meet the Couple
   ========================================================================== */
.couple-grid{
  margin-top: clamp(32px, 8vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 8vw, 56px);
}
.couple-card{ text-align: center; }
.polaroid{
  width: 72%;
  max-width: 250px;
  margin: 0 auto;
  background: #fff;
  padding: 10px 10px 28px;
  box-shadow: 0 10px 24px rgba(59,50,42,0.12);
  position: relative;
  border-radius: 2px;
  transform: none;
}
.polaroid img{
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background: var(--c-beige);
  filter: sepia(0.04) saturate(0.98);
}
.polaroid.tilt-left{ transform: none; }
.polaroid.tilt-right{ transform: none; }
.polaroid-caption{
  position: absolute;
  bottom: 8px;
  left: 0; right: 0;
  font-family: var(--f-script);
  font-size: 1.25rem;
  color: var(--c-ink-soft);
}
.couple-ring{
  width: 32px;
  height: 32px;
  margin: 16px auto 8px;
  color: var(--c-taupe);
}
.couple-name{
  font-family: var(--f-display);
  font-style: normal;
  font-weight: 600;
  font-size: 1.75rem;
}
.couple-parents{
  margin-top: 8px;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--c-ink-soft);
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}
.couple-and{
  text-align: center;
  font-family: var(--f-script);
  font-size: 2.4rem;
  color: var(--c-terracotta);
}

/* ==========================================================================
   The Day — events
   ========================================================================== */
.event-cards{
  margin-top: clamp(28px, 7vw, 40px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 5vw, 32px);
}
.event-card{
  border: 1px solid var(--c-paper-line);
  padding: clamp(28px, 6vw, 40px) clamp(20px, 5vw, 32px);
  text-align: center;
  position: relative;
  background: var(--c-ivory);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(59,50,42,0.05);
}
.section-alt .event-card{ background: var(--c-ivory); }
.event-label{
  font-family: var(--f-script);
  font-size: 1.7rem;
  color: var(--c-terracotta);
}
.event-row{
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--c-ink-soft);
  font-size: 1.02rem;
}
.event-row .doodle{ width: 22px; height: 22px; flex-shrink: 0; }
.event-venue{
  margin-top: 8px;
  font-family: var(--f-display);
  font-style: normal;
  font-weight: 600;
  font-size: 1.25rem;
}
.btn-outline{
  margin-top: 22px;
  display: inline-block;
  border: 1.5px solid var(--c-ink);
  padding: 11px 26px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  background: transparent;
  color: var(--c-ink);
  text-decoration: none;
  transition: background 0.3s var(--ease-soft), color 0.3s var(--ease-soft);
}
.btn-outline:hover{ background: var(--c-ink); color: var(--c-ivory); }

/* ==========================================================================
   Countdown
   ========================================================================== */
.countdown-lede{
  text-align: center;
  font-family: var(--f-script);
  font-size: 1.7rem;
  color: var(--c-terracotta);
  margin-top: clamp(24px, 6vw, 36px);
}
.countdown-grid{
  margin-top: clamp(20px, 5vw, 32px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 2.5vw, 16px);
}
.countdown-unit{
  text-align: center;
  border: 1px dashed var(--c-paper-line);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: clamp(14px, 3.5vw, 24px) clamp(6px, 1.5vw, 12px);
}
.countdown-num{
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-style: normal;
  font-weight: 600;
  color: var(--c-ink);
}
.countdown-label{
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--c-ink-soft);
}

/* ==========================================================================
   Gallery — scrapbook
   ========================================================================== */
.scrapbook{
  margin-top: clamp(28px, 7vw, 40px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 5vw, 32px);
}
.scrap-item{ position: relative; }
.scrap-item:nth-child(odd) .polaroid{ transform: none; }
.scrap-item:nth-child(even) .polaroid{ transform: none; }
.scrap-item .polaroid{ width: 100%; max-width: none; padding: 8px 8px 24px; }
.scrap-item .polaroid img{ aspect-ratio: 1/1; }
.scrap-item .polaroid-caption{ font-size: 0.98rem; }
.scrap-tape{
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 48px; height: 16px;
  background: rgba(193,120,90,0.28);
}

/* ==========================================================================
   RSVP
   ========================================================================== */
.form-card{
  margin-top: clamp(28px, 7vw, 40px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 4vw, 24px);
}
.field{ display: flex; flex-direction: column; gap: 8px; }
.field label{
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--c-ink-soft);
}
.field input,
.field select,
.field textarea{
  border: none;
  border-bottom: 1.5px solid var(--c-paper-line);
  background: transparent;
  padding: 12px 4px;
  font-family: var(--f-body);
  font-size: 1.05rem;
  color: var(--c-ink);
  transition: border-color 0.3s var(--ease-soft);
}
.field textarea{ resize: vertical; min-height: 80px; }
.field input:focus,
.field select:focus,
.field textarea:focus{
  outline: none;
  border-color: var(--c-terracotta);
}
.btn-solid{
  margin-top: 16px;
  align-self: center;
  border: none;
  background: var(--c-ink);
  color: var(--c-ivory);
  padding: 14px 40px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  box-shadow: 0 4px 16px rgba(59, 50, 42, 0.15);
  transition: transform 0.2s var(--ease-soft), background 0.3s var(--ease-soft);
}
.btn-solid:hover{ background: var(--c-terracotta); }
.btn-solid:active{ transform: scale(0.96); }
.form-feedback{
  text-align: center;
  font-family: var(--f-script);
  font-size: 1.35rem;
  color: var(--c-sage);
  min-height: 1.4em;
}

/* ==========================================================================
   Guestbook / Little Notes
   ========================================================================== */
.notes-list{
  margin-top: clamp(24px, 6vw, 36px);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 3.5vw, 20px);
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}
.note-card{
  position: relative;
  background: var(--c-cream);
  border: 1px solid var(--c-paper-line);
  border-radius: 6px;
  padding: clamp(16px, 4vw, 24px);
}
.section-alt .note-card{ background: var(--c-ivory); }
.note-card::before{
  content: "";
  position: absolute;
  top: -6px; left: 24px;
  width: 36px; height: 12px;
  background: rgba(169,137,108,0.3);
  transform: none;
}
.note-name{
  font-family: var(--f-display);
  font-style: normal;
  font-weight: 600;
  font-size: 1.18rem;
}
.note-text{
  margin-top: 8px;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--c-ink-soft);
}
.note-empty{
  text-align: center;
  color: var(--c-ink-soft);
  font-size: 1.02rem;
  margin-top: 24px;
}

/* ==========================================================================
   Gift
   ========================================================================== */
.gift-cards{
  margin-top: clamp(24px, 6vw, 36px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 4vw, 24px);
}
.gift-card{
  border: 1px solid var(--c-paper-line);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  padding: clamp(24px, 5vw, 36px);
  text-align: center;
  box-shadow: 0 4px 14px rgba(59, 50, 42, 0.04);
}
.gift-bank{
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--c-ink-soft);
}
.gift-number{
  margin-top: 8px;
  font-family: var(--f-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.gift-name{
  margin-top: 6px;
  font-size: 0.98rem;
  color: var(--c-ink-soft);
}
.btn-copy{
  margin-top: 18px;
  border: 1.5px solid var(--c-ink);
  background: transparent;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--c-ink);
  transition: background 0.3s var(--ease-soft), color 0.3s var(--ease-soft);
}
.btn-copy:hover{ background: var(--c-ink); color: var(--c-ivory); }
.btn-copy.is-copied{ background: var(--c-sage); color: #fff; border-color: var(--c-sage); }

/* ==========================================================================
   Closing
   ========================================================================== */
#closing{ text-align: center; padding-bottom: clamp(80px, 16vw, 130px); }
.closing-doodle{ width: 60px; height: 60px; margin: 0 auto 18px; color: var(--c-terracotta); }
.closing-text{
  font-family: var(--f-display);
  font-style: normal;
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.4;
  max-width: 28ch;
  margin: 0 auto;
}
.closing-hashtag{
  margin-top: 16px;
  font-family: var(--f-script);
  font-size: 1.5rem;
  color: var(--c-terracotta);
}
.closing-thanks{
  margin-top: 30px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-ink-soft);
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Floating navigation (bottom, mobile-first) with Dynamic Click & Tab Animations
   ========================================================================== */
.floating-nav{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 0);
  z-index: 60;
  display: flex;
  gap: 6px;
  background: rgba(251, 246, 238, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--c-paper-line);
  border-radius: 999px;
  padding: 6px 8px;
  box-shadow: 0 10px 30px rgba(59,50,42,0.14), 0 2px 8px rgba(59,50,42,0.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-luxury), transform 0.6s var(--ease-luxury);
}
.floating-nav.is-shown{
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

/* Floating dynamic label pill above active tab */
.nav-label-pill{
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.9);
  background: var(--c-ink);
  color: var(--c-ivory);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.45s var(--ease-luxury), opacity 0.35s var(--ease-luxury), left 0.4s var(--ease-luxury);
  box-shadow: 0 4px 14px rgba(59,50,42,0.22);
  white-space: nowrap;
  z-index: 70;
}
.nav-label-pill.is-visible{
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
.nav-label-pill::after{
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--c-ink);
}

.nav-item{
  position: relative;
  border: none;
  background: transparent;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-ink-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.35s var(--ease-luxury), color 0.35s var(--ease-luxury), transform 0.35s var(--ease-luxury), box-shadow 0.35s var(--ease-luxury);
}
.nav-item .doodle{
  width: 20px;
  height: 20px;
  transition: transform 0.35s var(--ease-luxury), color 0.35s var(--ease-luxury);
}
.nav-item:hover{
  color: var(--c-ink);
  background: rgba(59, 50, 42, 0.06);
}
.nav-item:active{
  transform: scale(0.88);
}
.nav-item.is-active{
  background: var(--c-ink);
  color: var(--c-ivory);
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(59,50,42,0.24);
}
.nav-item.is-active .doodle{
  color: var(--c-ivory);
  animation: doodlePop 0.55s var(--ease-luxury);
}
.nav-item.is-clicked{
  animation: navPulse 0.5s var(--ease-luxury);
}

/* Click ripple animation ring */
.nav-item::before{
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--c-terracotta);
  opacity: 0;
  pointer-events: none;
}
.nav-item.has-ripple::before{
  animation: navRipple 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes navRipple{
  0%{ transform: scale(0.7); opacity: 0.9; }
  100%{ transform: scale(1.5); opacity: 0; }
}

@keyframes navPulse{
  0%{ transform: scale(0.85); }
  50%{ transform: scale(1.2); }
  100%{ transform: scale(1.08); }
}

@keyframes doodlePop{
  0%{ transform: scale(0.8) translateY(0); }
  50%{ transform: scale(1.24) translateY(-3px); }
  100%{ transform: scale(1) translateY(0); }
}

/* Target section gentle highlight when smoothly navigated */
.section-target-active{
  animation: sectionSoftFocus 1.2s var(--ease-luxury);
}
@keyframes sectionSoftFocus{
  0%{ filter: brightness(1.04); }
  100%{ filter: brightness(1); }
}

/* ==========================================================================
   Floating music button
   ========================================================================== */
.music-btn{
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 60;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--c-paper-line);
  background: rgba(251, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--c-ink);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(59,50,42,0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-soft), transform 0.3s var(--ease-soft), background 0.3s var(--ease-soft);
}
.music-btn:hover{
  transform: scale(1.08);
  background: rgba(251, 246, 238, 1);
}
.music-btn:active{
  transform: scale(0.92);
}
.music-btn.is-shown{ opacity: 1; pointer-events: auto; }
.music-btn .note{ transition: transform 0.3s var(--ease-soft); }
.music-btn.is-playing .note{ animation: sway 1.6s ease-in-out infinite; }

/* ==========================================================================
   Divider doodle between sections
   ========================================================================== */
.section-divider{
  display: flex;
  justify-content: center;
  margin-top: clamp(36px, 8vw, 60px);
  color: var(--c-paper-line);
}
.section-divider .doodle{ width: 140px; height: 14px; color: var(--c-taupe); opacity: 0.5; }

/* ==========================================================================
   Utility
   ========================================================================== */
.visually-hidden{
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ==========================================================================
   Tablet / Desktop — keep the stationery feel, don't just stretch mobile
   ========================================================================== */
@media (min-width: 768px){
  :root{ --gutter: 4vw; }
  .section{ padding: 100px var(--gutter) 90px; max-width: 720px; }
  #hero{ padding-top: 120px; }
  .couple-grid{ flex-direction: row; align-items: flex-start; justify-content: center; gap: 40px; }
  .couple-card{ flex: 1; max-width: 280px; }
  .couple-and{ align-self: center; margin-top: 40px; }
  .event-cards{ flex-direction: row; }
  .event-card{ flex: 1; }
  .scrapbook{ grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .countdown-grid{ max-width: 480px; margin-left: auto; margin-right: auto; }
  .cover-frame{ padding: 48px 40px; }
}

@media (min-width: 1024px){
  body{ background: var(--c-beige); }
  main{
    max-width: 860px;
    margin: 0 auto;
    background: var(--c-ivory);
    box-shadow: 0 0 80px rgba(59,50,42,0.12);
  }
  .section{ max-width: 680px; }
  .floating-nav{ bottom: 28px; }
}
