/* =========================================
   PETER RABBIT BABY SHOWER — MAIN STYLES
   ========================================= */

/* Font stacks — loaded via wp_head in functions.php, not @import */

/*
 * Metric-matched fallback fonts — size-adjust makes Georgia approximate
 * Playfair Display / Cormorant Garamond so font-swap causes zero CLS.
 * Values tuned to match x-height and cap-height of each Google Font.
 */
@font-face {
  font-family: 'Playfair Display Fallback';
  src: local('Georgia');
  size-adjust: 97%;
  ascent-override: 98%;
  descent-override: 27%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Cormorant Garamond Fallback';
  src: local('Georgia');
  size-adjust: 94%;
  ascent-override: 96%;
  descent-override: 25%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Crimson Pro Fallback';
  src: local('Georgia');
  size-adjust: 96%;
  ascent-override: 97%;
  descent-override: 26%;
  line-gap-override: 0%;
}

/* ---- CSS Variables ---- */
:root {
  /* Primary palette — soft blue gingham theme */
  --gingham-blue:  #cbe4f4;   /* darkest blue square */
  --gingham-light: #e5f2fa;   /* medium/base blue */
  --sky:           #cbe4f4;   /* hero background sky */
  --sky-deep:      #9dbfd8;   /* deeper sky accent */
  --sage:          #8fb89a;   /* soft sage green */
  --sage-light:    #b8d4be;
  --sage-dark:     #5a8a6a;
  --cream:         #f4f8fb;   /* near-white blue tinted */
  --warm-white:    #fdfefe;
  --parchment:     #f7f3ee;   /* card backgrounds */
  --dusty-blue:    #7aaac4;
  --pale-blue:     #d8ecf5;
  --slate-blue:    #4a7a9b;   /* text on light */
  --soft-yellow:   #f5e9a8;   /* buttercup accent */
  --blush:         #f0ddd4;
  --dark:          #232628;   /* deep navy-slate for text */
  --white:         #ffffff;

  --font-display: 'Playfair Display', 'Playfair Display Fallback', Georgia, serif;
  --font-body:    'Cormorant Garamond', 'Cormorant Garamond Fallback', Georgia, serif;
  --font-light:   'Crimson Pro', 'Crimson Pro Fallback', Georgia, serif;

  --section-ease: cubic-bezier(0.76, 0, 0.24, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: #ffffff;
  color: var(--dark);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* ---- Header / Nav ---- */
.site-header {
  position: fixed;
  top: var(--adminbar-h, 0px);
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 0.9rem 2.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

/* Frosted glass pill background — always legible */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--header-bg, rgba(255,255,255,0.75));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border, rgba(0,0,0,0.08));
  transition: background 0.5s ease, border-color 0.5s ease;
  pointer-events: none;
}

.site-title {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-style: italic;
  color: var(--header-text, #232628);
  letter-spacing: 0.06em;
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: color 0.5s ease;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  gap: 0.25rem;
  position: relative;
  z-index: 1;
}

.header-nav a {
  font-family: var(--font-light);
  font-size: clamp(0.72rem, 1.1vw, 0.87rem);
  color: var(--header-text, #232628);
  text-decoration: none;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  transition: color 0.5s ease, background 0.3s ease, opacity 0.3s ease;
  opacity: 0.65;
}

.header-nav a:hover {
  opacity: 1;
  background: var(--header-hover, rgba(0,0,0,0.06));
}

.header-nav a.active {
  opacity: 1;
  background: var(--header-active-bg, rgba(0,0,0,0.1));
  color: var(--header-active-text, #232628);
  font-weight: 600;
}

/* Hamburger + mobile menu: hidden on desktop, shown via mobile media query */
.nav-hamburger { display: none; }
.mobile-menu   { display: none; }

/* ---- Section Progress Dots (hidden) ---- */
.section-dots {
  display: none;
}

/* ---- GSAP Section Structure ---- */

/* Header height token — accounts for WP admin bar when logged in */
:root {
  --header-h: 52px;  /* our header */
  --adminbar-h: 0px; /* overridden below when WP admin bar is present */
  --top-offset: calc(var(--adminbar-h) + var(--header-h));
}

/* WP admin bar is 32px on desktop, 46px on mobile */
.admin-bar {
  --adminbar-h: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar {
    --adminbar-h: 46px;
  }
}

section.panel {
  position: fixed;
  inset: 0;
  height: 100%;
  width: 100%;
  visibility: hidden;
  overflow: hidden;
}

section.panel .outer,
section.panel .inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

section.panel .bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  box-sizing: border-box;
  padding-top: var(--top-offset);
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Tall content sections need scrollable .bg so forms aren't clipped */
#section-rsvp .bg,
#section-details .bg {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Image-based backgrounds need cover */
#section-details .bg {
  background-size: cover;
}

/* Gingham sections must tile, not stretch */
#section-rsvp .bg,
#section-hero .bg,
#section-registry .bg {
  background-size: auto;
}

/* ---- Decorative SVG Layer ---- */
.rabbit-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0.12;
  z-index: 2;
}

/* ---- Botanical border ---- */
.botanical-border {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(90, 150, 190, 0.25);
  margin: 1.5rem;
  pointer-events: none;
  z-index: 3;
  border-radius: 4px;
}

.botanical-border::before,
.botanical-border::after {
  content: '✦';
  position: absolute;
  color: rgba(90,150,190,0.4);
  font-size: 0.8rem;
}

.botanical-border::before { top: -0.5rem; left: 50%; transform: translateX(-50%); }
.botanical-border::after  { bottom: -0.5rem; left: 50%; transform: translateX(-50%); }

/* =========================================
   SECTION 1 — HERO / WELCOME
   ========================================= */

#section-hero .bg {
  /* Gingham: base=white, single=#f0f6fb, crossed=#e2eef8 */
  background-color: #ffffff;
  background-size: auto;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(150, 195, 230, 0.14) 28px,
      rgba(150, 195, 230, 0.14) 56px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 28px,
      rgba(150, 195, 230, 0.14) 28px,
      rgba(150, 195, 230, 0.14) 56px
    );
}

/* Arched frame card — matches the theme_colors.png invite style */
.hero-arch-card {
  position: relative;
  z-index: 10;
  background: #ffffff;
  border: 1.5px solid rgba(160, 200, 230, 0.5);
  border-radius: 180px 180px 24px 24px;
  /* Width: flexible, but max-height drives the layout */
  width: clamp(260px, 38vw, 480px);
  /* Never taller than the space below header, with breathing room */
  max-height: calc(100vh - var(--top-offset) - 3rem);
  margin-top: 0.5rem;
  padding: clamp(1rem, 2.5vh, 2.5rem) clamp(1.5rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.3rem, 0.8vh, 0.8rem);
  box-shadow: 0 8px 48px rgba(100, 160, 200, 0.18), 0 2px 12px rgba(0,0,0,0.06);
  text-align: center;
  isolation: isolate;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Peter Rabbit watercolour img — scales with available height, pushed up into the arch */
.hero-arch-rabbit {
  width: clamp(80px, 18vh, 200px);
  height: auto;
  display: block;
  margin-top: clamp(-0.5rem, -0.8vh, -0.25rem);
  margin-bottom: 0;
  flex-shrink: 1;
}

.hero-arch-tagline {
  font-family: 'Caveat', var(--font-display), cursive;
  font-size: clamp(0.8rem, 1.8vh, 1.1rem);
  color: #3a6a8a;
  font-style: italic;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.2rem, 0.5vh, 0.6rem);
  padding: 0;
}

.hero-eyebrow {
  font-family: var(--font-light);
  font-size: clamp(0.7rem, 1.2vh, 0.85rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #3a6a8a;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vh, 3.2rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--dark);
  text-shadow: none;
  letter-spacing: -0.01em;
}

.hero-title em {
  font-style: italic;
  color: #3a6a8a;
  font-weight: 400;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.6vh, 1.1rem);
  font-weight: 300;
  font-style: italic;
  color: #4a7a5a;
  letter-spacing: 0.04em;
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gingham-blue), transparent);
  margin: 0 auto;
}

.hero-date-badge {
  background: var(--pale-blue);
  border: 1px solid var(--gingham-blue);
  border-radius: 100px;
  padding: clamp(0.3rem, 0.6vh, 0.45rem) 1.5rem;
  font-family: var(--font-light);
  font-size: clamp(0.7rem, 1.1vh, 0.85rem);
  color: #2a5070;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}

.scroll-hint {
  position: absolute;
  bottom: clamp(0.75rem, 2.5vh, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--dusty-blue);
  font-family: var(--font-light);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}

/* Hide scroll hint when there's no room */
@media (max-height: 560px) {
  .scroll-hint { display: none; }
}

.scroll-hint svg {
  width: 20px;
  opacity: 0.6;
  stroke: var(--dusty-blue);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* hero-rabbit-svg removed — replaced by .hero-arch-rabbit img */

/* =========================================
   SECTION 2 — EVENT DETAILS
   ========================================= */

#section-details .bg {
  background-color: var(--warm-white);
  background-image:
    radial-gradient(ellipse at 10% 90%, rgba(138,180,200,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 10%, rgba(143,184,154,0.12) 0%, transparent 50%);
}

.details-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: clamp(0.75rem, 1.5vh, 2rem);
  padding-bottom: clamp(1.5rem, 3vh, 3rem);
  max-width: 900px;
  width: 90%;
  max-height: calc(100vh - var(--top-offset) - 1rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.section-eyebrow {
  font-family: var(--font-light);
  font-size: clamp(0.7rem, 1.2vh, 0.85rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--dusty-blue);
  margin-bottom: clamp(0.4rem, 0.8vh, 1rem);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.5vh, 4.0rem);
  font-weight: 400;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: clamp(0.8rem, 1.5vh, 2rem);
}

.section-title em {
  font-style: italic;
  color: var(--slate-blue);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.6rem, 1.2vh, 2rem);
  margin-top: clamp(0.8rem, 1.5vh, 2.5rem);
  justify-items: center;
}

.detail-card {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(120,170,210,0.25);
  border-radius: 12px;
  padding: clamp(0.75rem, 2vh, 2rem) clamp(0.6rem, 1.5vw, 1.5rem);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.detail-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(100,160,210,0.14);
}

.detail-icon-img {
  width: clamp(32px, 4.5vh, 52px);
  height: clamp(32px, 4.5vh, 52px);
  object-fit: contain;
  margin-bottom: clamp(0.3rem, 0.6vh, 0.75rem);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.detail-label {
  font-family: var(--font-light);
  font-size: clamp(0.65rem, 0.9vh, 0.8rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dusty-blue);
  margin-bottom: clamp(0.2rem, 0.4vh, 0.5rem);
}

.detail-value {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.8vh, 1.4rem);
  color: var(--dark);
  font-style: italic;
  line-height: 1.3;
}

.detail-note {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.2vh, 0.9rem);
  color: var(--sage-dark);
  margin-top: 0.3rem;
  font-style: normal;
}

.notes-box {
  margin-top: clamp(0.8rem, 1.5vh, 2.5rem);
  background: linear-gradient(135deg, rgba(138,180,200,0.08), rgba(143,184,154,0.08));
  border: 1px solid rgba(120,170,210,0.25);
  border-radius: 12px;
  padding: clamp(0.75rem, 1.5vh, 1.5rem) clamp(1rem, 2vw, 2rem);
}

.notes-text {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.6vh, 1.1rem);
  font-style: italic;
  line-height: 1.7;
  color: var(--dark);
}

/* =========================================
   SECTION 3 — GALLERY SLIDER
   ========================================= */

#section-gallery .bg {
  background-color: #cbe4f4;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 100%, rgba(143,184,154,0.15) 0%, transparent 50%);
}

.gallery-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1100px;
  padding: clamp(0.5rem, 1vh, 1rem) clamp(0.75rem, 1.5vw, 2rem);
  padding-bottom: clamp(0.5rem, 1vh, 1.5rem);
  max-height: calc(100vh - var(--top-offset) - 0.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  text-align: center;
}

.gallery-content .section-title { color: #232628; }
.gallery-content .section-eyebrow { color: rgba(35,38,40,0.65); }

.gallery-slider {
  position: relative;
  margin-top: clamp(0.5rem, 1vh, 1.5rem);
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.15);
}

.gallery-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}

.gallery-slide {
  min-width: 100%;
  /* Taller slider area — fills more of the viewport */
  height: clamp(240px, 58vh, 620px);
  background: rgba(35,38,40,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Landscape photos: fill the slide edge-to-edge */
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Portrait photos: show the full image, centered, with a soft blurred backdrop */
.gallery-slide--portrait {
  background: rgba(180, 210, 230, 0.2);
}

.gallery-slide--portrait img {
  object-fit: contain;
  width: auto;
  max-width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

/* Blurred copy of the portrait image fills the slide behind the sharp version */
.gallery-slide-backdrop {
  position: absolute !important;
  inset: -20px;
  width: calc(100% + 40px) !important;
  height: calc(100% + 40px) !important;
  max-width: none !important;
  object-fit: cover !important;
  filter: blur(28px) saturate(1.2) brightness(1.05);
  opacity: 0.45;
  z-index: 1 !important;
  pointer-events: none;
}

.gallery-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: rgba(35,38,40,0.45);
}

.gallery-placeholder-icon {
  font-size: clamp(1.5rem, 3vh, 3.0rem);
  opacity: 0.4;
}

.gallery-placeholder-text {
  font-family: var(--font-light);
  font-size: clamp(0.75rem, 1.2vh, 0.9rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: clamp(0.4rem, 0.8vh, 1rem);
}

.gallery-btn {
  width: clamp(36px, 4.5vh, 48px);
  height: clamp(36px, 4.5vh, 48px);
  border-radius: 50%;
  border: 1.5px solid rgba(35,38,40,0.35);
  background: rgba(35,38,40,0.08);
  color: #232628;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.gallery-btn:hover {
  background: rgba(35,38,40,0.18);
  border-color: #232628;
}

.gallery-dots {
  display: flex;
  gap: 0.5rem;
}

.gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(35,38,40,0.3);
  cursor: pointer;
  transition: all 0.3s;
}

.gallery-dot.active {
  background: #232628;
  transform: scale(1.5);
}

.gallery-upload-hint {
  margin-top: clamp(0.4rem, 0.8vh, 1rem);
  font-family: var(--font-light);
  font-size: clamp(0.72rem, 1vh, 0.87rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(35,38,40,0.45);
}

/* =========================================
   SECTION 4 — REGISTRY (BABYLIST)
   ========================================= */

#section-registry .bg {
  /* Gingham: base=white, single=#f0f6fb, crossed=#e2eef8 */
  background-color: #ffffff;
  background-size: auto;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(150, 195, 230, 0.14) 28px,
      rgba(150, 195, 230, 0.14) 56px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 28px,
      rgba(150, 195, 230, 0.14) 28px,
      rgba(150, 195, 230, 0.14) 56px
    );
}

.registry-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: clamp(0.75rem, 1.5vh, 2rem);
  padding-bottom: clamp(1.5rem, 3vh, 3rem);
  max-width: 560px;
  width: 90%;
  max-height: calc(100vh - var(--top-offset) - 1rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.registry-content .section-title { color: var(--dark); }
.registry-content .section-eyebrow { color: var(--dusty-blue); }

.registry-description {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.6vh, 1.1rem);
  font-style: italic;
  color: rgba(42,61,74,0.7);
  line-height: 1.6;
  margin-bottom: clamp(0.6rem, 1.2vh, 1.5rem);
}

/* ---- Featured Registry Card ---- */
.registry-featured-card {
  background: #ffffff;
  border: 1.5px solid rgba(120,170,210,0.3);
  border-radius: 20px;
  padding: clamp(1rem, 2vh, 2rem) clamp(1rem, 2vw, 2rem) clamp(0.75rem, 1.5vh, 1.5rem);
  box-shadow: 0 12px 50px rgba(100,160,210,0.15), 0 2px 8px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
  margin-bottom: clamp(0.6rem, 1.2vh, 1.25rem);
}

/* Subtle watercolour wash in corner */
.registry-featured-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,212,232,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.registry-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: clamp(0.6rem, 1.2vh, 1.25rem);
  padding-top: clamp(0.25rem, 0.5vh, 0.5rem);
}

.registry-brand-icon {
  width: clamp(44px, 7vh, 72px);
  height: clamp(44px, 7vh, 72px);
  object-fit: contain;
  margin-bottom: 0.2rem;
}

.registry-brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vh, 2.2rem);
  font-weight: 600;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.registry-brand-tagline {
  font-family: var(--font-light);
  font-size: clamp(0.7rem, 1vh, 0.85rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dusty-blue);
}

.registry-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120,170,210,0.3), transparent);
  margin: clamp(0.6rem, 1.2vh, 1.25rem) 0;
}

/* Gift category pills */
.registry-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.35rem, 0.7vh, 0.6rem);
  margin-bottom: 0.5rem;
}

.registry-category {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background: var(--pale-blue);
  border-radius: 12px;
  padding: clamp(0.4rem, 0.8vh, 0.7rem) 0.5rem;
  font-size: clamp(1.0rem, 1.8vh, 1.3rem);
  transition: transform 0.2s;
}

.registry-category:hover {
  transform: translateY(-2px);
}

.registry-category span {
  font-family: var(--font-light);
  font-size: clamp(0.65rem, 0.9vh, 0.8rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate-blue);
}

.babylist-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--sky-deep), var(--slate-blue));
  color: white;
  text-decoration: none;
  padding: clamp(0.6rem, 1.2vh, 0.9rem) 2.5rem;
  border-radius: 100px;
  font-family: var(--font-light);
  font-size: clamp(0.85rem, 1.4vh, 1.0rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.3s;
  box-shadow: 0 6px 24px rgba(74,122,155,0.35);
  margin-top: 0.25rem;
}

.babylist-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(74,122,155,0.45);
}

.registry-card-note {
  font-family: var(--font-light);
  font-size: clamp(0.72rem, 1vh, 0.87rem);
  color: rgba(74,122,155,0.6);
  letter-spacing: 0.08em;
  margin-top: clamp(0.4rem, 0.8vh, 1rem);
}

.registry-coming-soon {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--dusty-blue);
  font-size: clamp(0.9rem, 1.5vh, 1.05rem);
}

.registry-note {
  font-family: var(--font-light);
  font-size: clamp(0.75rem, 1.1vh, 0.9rem);
  color: rgba(42,61,74,0.5);
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* ---- "or" divider between Babylist and Venmo ---- */
.registry-or-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: clamp(0.5rem, 1vh, 1rem) 0;
}

.registry-or-divider::before,
.registry-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120,170,210,0.3), transparent);
}

.registry-or-divider span {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(0.85rem, 1.4vh, 1.0rem);
  color: rgba(74,122,155,0.5);
}

/* ---- Venmo card ---- */
.registry-venmo-card {
  background: #ffffff;
  border: 1.5px solid rgba(61, 149, 206, 0.25);
  border-radius: 16px;
  padding: clamp(0.75rem, 1.5vh, 1.25rem) clamp(1rem, 2vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(61, 149, 206, 0.1);
}

.venmo-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.venmo-logo {
  flex-shrink: 0;
  height: clamp(14px, 2vh, 18px);
  width: auto;
}

.venmo-handle {
  font-family: var(--font-light);
  font-size: clamp(0.72rem, 1vh, 0.87rem);
  color: rgba(42,61,74,0.55);
  letter-spacing: 0.05em;
}

.venmo-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #3D95CE;
  color: white;
  text-decoration: none;
  padding: clamp(0.45rem, 0.9vh, 0.65rem) clamp(1rem, 2vw, 1.5rem);
  border-radius: 100px;
  font-family: var(--font-light);
  font-size: clamp(0.75rem, 1.2vh, 0.9rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(61, 149, 206, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.venmo-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61, 149, 206, 0.4);
  background: #2d7fb8;
}

/* =========================================
   SECTION 5 — LIBRARY
   ========================================= */

#section-library .bg {
  background-color: #e0e8cd;
}

.library-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: clamp(0.75rem, 1.5vh, 2rem);
  padding-bottom: clamp(1.5rem, 3vh, 3rem);
  max-width: 620px;
  width: 92%;
  max-height: calc(100vh - var(--top-offset) - 1rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.5rem, 1.2vh, 1.5rem);
}

.library-image {
  width: clamp(120px, 22vh, 280px);
  height: auto;
  border-radius: 16px;
  object-fit: cover;
}

.library-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.8vh, 2.8rem);
  font-weight: 600;
  color: var(--dark);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.library-title em {
  font-style: italic;
  color: #6a8c5a;
  font-weight: 400;
}

.library-optional {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.4vh, 1.0rem);
  font-style: italic;
  font-weight: 400;
  color: rgba(42,61,74,0.5);
  letter-spacing: 0.02em;
}

.library-description {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.8vh, 1.2rem);
  font-style: italic;
  color: rgba(42,61,74,0.75);
  line-height: 1.6;
  max-width: 440px;
}

.library-note {
  font-size: clamp(0.85rem, 1.5vh, 1.0rem);
  color: rgba(42,51,24,0.6);
  margin-top: -0.5rem;
}

/* ---- "Books We Already Have" slider ---- */
.library-already-have {
  width: 100%;
  margin-top: clamp(0.3rem, 0.6vh, 0.75rem);
}

.library-already-label {
  font-family: var(--font-light);
  font-size: clamp(0.65rem, 0.9vh, 0.8rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(42,51,24,0.5);
  margin-bottom: clamp(0.4rem, 0.8vh, 0.75rem);
}

.library-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.library-book-slider {
  display: flex;
  gap: clamp(0.6rem, 1.2vw, 1rem);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 0.25rem 0;
  flex: 1;
  min-width: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.library-book-slider::-webkit-scrollbar {
  display: none;
}

.library-slider-btn {
  flex-shrink: 0;
  width: clamp(28px, 3.5vh, 36px);
  height: clamp(28px, 3.5vh, 36px);
  border-radius: 50%;
  border: 1px solid rgba(42,51,24,0.2);
  background: rgba(255,255,255,0.6);
  color: rgba(42,51,24,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.library-slider-btn:hover {
  background: rgba(255,255,255,0.9);
  border-color: rgba(42,51,24,0.4);
  color: rgba(42,51,24,0.9);
}

.library-book {
  width: clamp(80px, 14vw, 105px);
  min-width: clamp(80px, 14vw, 105px);
  text-align: center;
  flex-shrink: 0;
}

.library-book img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.library-book-no-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.5);
  border-radius: 4px;
  font-size: 1.2rem;
  border: 1px solid rgba(42,51,24,0.15);
}

.library-book-title {
  font-family: var(--font-light);
  font-size: clamp(0.6rem, 1vh, 0.75rem);
  color: rgba(42,51,24,0.75);
  line-height: 1.3;
  margin-top: 0.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.library-book-author {
  font-family: var(--font-light);
  font-size: clamp(0.5rem, 0.8vh, 0.65rem);
  color: rgba(42,51,24,0.45);
  line-height: 1.2;
  margin-top: 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================
   SECTION 6 — RSVP
   ========================================= */

#section-rsvp .bg {
  /* Yellow gingham: base=#fff, single stripe≈#fffde0, crossed=#fffaca */
  background-color: #ffffff;
  background-size: auto;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(255, 246, 147, 0.286) 28px,
      rgba(255, 246, 147, 0.286) 56px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 28px,
      rgba(255, 246, 147, 0.286) 28px,
      rgba(255, 246, 147, 0.286) 56px
    );
}

.rsvp-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: clamp(0.75rem, 1.5vh, 2rem);
  padding-bottom: clamp(2rem, 4vh, 4rem);
  max-width: 640px;
  width: 90%;
}

#section-rsvp .section-title em {
  color: #d2a741;
}

.rsvp-content .section-title { color: #1a1a0a; }
.rsvp-content .section-eyebrow { color: #d2a741; }

.rsvp-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.6vh, 1.1rem);
  font-style: italic;
  color: rgba(26,26,10,0.65);
  margin-bottom: clamp(0.75rem, 1.5vh, 2rem);
}

.rsvp-form {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(190,165,80,0.25);
  border-radius: 16px;
  padding: clamp(1rem, 2.5vh, 2.5rem);
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.5rem, 1vh, 1rem);
  margin-bottom: clamp(0.5rem, 1vh, 1rem);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: clamp(0.5rem, 1vh, 1rem);
}

.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-family: var(--font-light);
  font-size: clamp(0.7rem, 0.9vh, 0.85rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #4a3d00;
}

.label-optional {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(74,61,0,0.5);
  font-size: 0.65rem;
}

.form-input,
.form-select,
.form-textarea {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(190,165,80,0.3);
  border-radius: 8px;
  padding: clamp(0.5rem, 1vh, 0.75rem) 1rem;
  color: var(--dark);
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.5vh, 1.05rem);
  transition: all 0.3s;
  width: 100%;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: rgba(42,61,74,0.35); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: rgba(180,150,0,0.6);
  background: rgba(255,255,255,0.95);
}

.form-select option { background: white; color: var(--dark); }

.form-textarea { resize: vertical; min-height: clamp(70px, 10vh, 100px); height: clamp(70px, 10vh, 100px); }

.rsvp-radio-group {
  display: flex;
  gap: 1rem;
  margin-bottom: clamp(0.5rem, 1vh, 1rem);
}

.rsvp-radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.5vh, 1.05rem);
  color: #1a1a0a;
}

.rsvp-radio-label input[type="radio"] {
  accent-color: #c8a800;
  width: 16px;
  height: 16px;
}

.btn-submit {
  width: 100%;
  padding: clamp(0.6rem, 1.2vh, 1rem);
  background: #fff0a6;
  border: 1.5px solid rgba(180,150,0,0.3);
  border-radius: 100px;
  color: #3a2e00;
  font-family: var(--font-light);
  font-size: clamp(0.85rem, 1.4vh, 1.0rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: clamp(0.3rem, 0.6vh, 0.5rem);
  box-shadow: 0 4px 18px rgba(180,150,0,0.2);
}

.btn-submit:hover {
  background: #ffe870;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(180,150,0,0.3);
}

.form-success {
  display: none;
  text-align: center;
  padding: clamp(1rem, 2vh, 2rem);
  color: #1a1a0a;
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vh, 2.0rem);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.form-success p {
  font-family: var(--font-body);
  opacity: 0.8;
  font-size: clamp(0.95rem, 1.6vh, 1.1rem);
  font-style: italic;
}

/* =========================================
   SECTION BACKGROUNDS — Soft patterns
   ========================================= */

.leaf-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M40 10 Q55 25 55 40 Q55 60 40 70 Q25 60 25 40 Q25 25 40 10Z' fill='%23ffffff' /%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 1;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
  /* Tall sections start from top on mobile so content isn't clipped */
  #section-rsvp .bg,
  #section-details .bg {
    justify-content: flex-start;
    padding-bottom: 2rem;
  }

  .details-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .details-content {
    padding: 1rem;
  }

  .detail-card {
    padding: 1.25rem 0.75rem;
  }

  .detail-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .header-nav {
    display: none;
  }

  /* ---- Hamburger button ---- */
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 101;
    border-radius: 8px;
    transition: background 0.2s;
  }
  .nav-hamburger:hover {
    background: var(--header-hover, rgba(0,0,0,0.06));
  }
  .nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--header-text, #232628);
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.5s ease;
    transform-origin: center;
  }
  /* X state when open */
  .nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ---- Mobile menu overlay ---- */
  .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(240, 248, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .mobile-menu.is-open {
    opacity: 1;
    pointer-events: all;
  }
  .mobile-menu nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }
  .mobile-nav-link {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    font-style: italic;
    color: var(--dark);
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    letter-spacing: 0.02em;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
  }
  .mobile-nav-link:hover,
  .mobile-nav-link.active {
    opacity: 1;
    color: var(--slate-blue);
  }
  .mobile-nav-link.active {
    background: rgba(155, 191, 216, 0.2);
  }

  .rsvp-form {
    padding: 1.5rem;
  }

  .notes-box {
    margin-top: 1rem;
  }
}

@media (max-width: 480px) {
  .babylist-embed-wrapper {
    padding: 1.5rem;
  }
}

/* =========================================
   LOADING SCREEN
   ========================================= */

.loading-screen {
  position: fixed;
  inset: 0;
  background: #f0f6fb;
  z-index: 9999;
  display: none; /* JS reveals immediately — hidden by default prevents CLS */
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  contain: layout style;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-rabbit {
  /* Square: matches natural 1:1 aspect ratio, sized to actual display px */
  width: 175px;
  height: 175px;
  object-fit: contain;
  animation: bunnyBob 1.2s ease-in-out infinite;
}

@keyframes bunnyBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

.loading-text {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--slate-blue);
  font-size: 1rem;
  letter-spacing: 0.15em;
}

/* =========================================
   UTILITY
   ========================================= */

.clip-text {
  overflow: hidden;
}

.will-change-transform {
  will-change: transform;
}
