/* ==========================================================================
   Welcoming Baby Noah — Baby Shower Stylesheet
   Palette: #5a6b5c #c47b59 #e8dccb #2b332c #fcfbf9
   Fonts: Outfit, Athiti
   Tricks: T04 (Card stack), T23 (Animated gradient @property), T77 (Fold reveal)
   ========================================================================== */

/* T23 Animated Gradient Property */
@property --gradient-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  --c-sage: #5a6b5c;
  --c-sage-dark: #445346;
  --c-sage-light: #edf2ee;
  --c-clay: #c47b59;
  --c-clay-dark: #ab6443;
  --c-clay-light: #faede7;
  --c-oat: #e8dccb;
  --c-oat-light: #f7f4ed;
  --c-charcoal: #2b332c;
  --c-charcoal-muted: #5e6b60;
  --c-cream: #fcfbf9;
  --c-card-bg: #ffffff;
  --c-border: #ede8df;
  --c-border-strong: #ded6c9;

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Athiti', sans-serif;

  --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-gentle: cubic-bezier(0.33, 1, 0.68, 1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 9999px;

  --shadow-sm: 0 4px 12px rgba(43, 51, 44, 0.05);
  --shadow-md: 0 8px 24px rgba(43, 51, 44, 0.07);
  --shadow-warm: 0 12px 32px rgba(196, 123, 89, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  color: var(--c-charcoal);
  background-color: var(--c-cream);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: 
    radial-gradient(circle at 15% 15%, rgba(90, 107, 92, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(196, 123, 89, 0.05) 0%, transparent 45%),
    var(--c-cream);
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(252, 251, 249, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(222, 214, 201, 0.6);
  z-index: 100;
}

.brand-badge {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--c-sage-dark);
  background: var(--c-sage-light);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.nav-controls {
  display: flex;
  gap: 8px;
}

.control-btn {
  background: #ffffff;
  border: 1px solid var(--c-border-strong);
  color: var(--c-charcoal);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-gentle), background-color 0.2s ease;
}

.control-btn:active {
  transform: scale(0.94);
}

/* ==========================================================================
   Page Container & Layout
   ========================================================================== */
.page-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 52px 16px 32px;
}

/* ==========================================================================
   HERO LOCK SCREEN (100dvh before reveal)
   ========================================================================== */
.hero-screen {
  min-height: calc(100dvh - 52px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 24px 8px; /* 52px header + 24px = 76px top clearance before badge */
  transition: min-height 0.6s var(--ease-smooth);
}

.hero-content {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: var(--c-oat-light);
  color: var(--c-sage-dark);
  border: 1px solid var(--c-border-strong);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 7.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-charcoal);
  margin-bottom: 12px;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.title-main {
  background: linear-gradient(135deg, var(--c-sage-dark), var(--c-clay));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--c-charcoal-muted);
  max-width: 380px;
  margin-bottom: 24px;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Baby Mobile Gimmick
   ========================================================================== */
.mobile-container {
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
  position: relative;
}

.baby-mobile-stage {
  cursor: pointer;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s var(--ease-gentle);
}

.mobile-svg {
  width: 100%;
  height: auto;
  transform: scale(1.18);
  transform-origin: 160px 55px;
  filter: drop-shadow(0 8px 16px rgba(43, 51, 44, 0.12));
}

/* Gentle swaying */
.drop-1 {
  transform-origin: 80px 55px;
  animation: sway-left 3.4s infinite ease-in-out alternate;
}
.drop-2 {
  transform-origin: 160px 55px;
  animation: sway-center 2.8s infinite ease-in-out alternate;
}
.drop-3 {
  transform-origin: 240px 55px;
  animation: sway-right 3.6s infinite ease-in-out alternate;
}

@keyframes sway-left {
  0% { transform: rotate(-3.5deg); }
  100% { transform: rotate(4deg); }
}
@keyframes sway-center {
  0% { transform: rotate(2.5deg); }
  100% { transform: rotate(-2.5deg); }
}
@keyframes sway-right {
  0% { transform: rotate(4deg); }
  100% { transform: rotate(-3.5deg); }
}

/* On-tap spin animation */
.baby-mobile-stage.spinning .mobile-svg {
  animation: mobile-spin 1.8s var(--ease-gentle);
}

@keyframes mobile-spin {
  0% { transform: scale(1) rotate(0deg); }
  35% { transform: scale(1.08) rotate(180deg); }
  70% { transform: scale(1.03) rotate(340deg); }
  100% { transform: scale(1) rotate(360deg); }
}

.mobile-prompt {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid var(--c-clay);
  color: var(--c-clay-dark);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(196, 123, 89, 0.2);
  animation: pulse-bounce 2.2s infinite ease-in-out;
}

.prompt-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-clay);
  box-shadow: 0 0 0 0 rgba(196, 123, 89, 0.5);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(196, 123, 89, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(196, 123, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(196, 123, 89, 0); }
}

@keyframes pulse-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Unfold Banner */
.unfold-banner {
  margin-top: 24px;
  padding: 20px;
  background: #ffffff;
  border: 1.5px solid var(--c-sage);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-warm);
  animation: banner-enter 0.6s var(--ease-gentle) both;
  width: 100%;
}

.unfold-chime {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.unfold-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--c-sage-dark);
  margin-bottom: 6px;
}

.unfold-desc {
  font-size: 0.92rem;
  color: var(--c-charcoal-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.scroll-nudge-pill {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(90, 107, 92, 0.08);
  color: var(--c-sage-dark);
  border: 1px solid rgba(90, 107, 92, 0.18);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.nudge-arrow {
  font-size: 1.4rem;
  color: var(--c-sage);
  animation: bounce-arrow 1.4s infinite ease-in-out;
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@keyframes banner-enter {
  0% { opacity: 0; transform: scale(0.9) translateY(18px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================================================
   Section Cards & T77 Paper Fold Reveal
   ========================================================================== */
.section-card {
  background: var(--c-card-bg);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-top: 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

/* T77 fold-reveal */
.fold-reveal {
  transform-origin: top center;
  transition: transform 0.5s var(--ease-gentle), opacity 0.5s ease;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--c-charcoal);
}

.botanical-icon {
  font-size: 1.3rem;
  color: var(--c-sage);
}

/* ==========================================================================
   Event Details Info Grid
   ========================================================================== */
.info-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.item-icon {
  font-size: 1.5rem;
  line-height: 1;
  padding: 10px;
  background: var(--c-sage-light);
  border-radius: var(--radius-md);
}

.item-body {
  flex: 1;
}

.item-label {
  font-size: 0.8rem;
  color: var(--c-charcoal-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.item-val {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-charcoal);
}

.item-sub {
  font-size: 0.9rem;
  color: var(--c-charcoal-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.item-note {
  font-size: 0.82rem;
  color: var(--c-sage-dark);
  margin-top: 4px;
}

.map-action {
  margin-top: 10px;
}

.btn-primary, .btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s var(--ease-gentle), box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-sage), var(--c-sage-dark));
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(90, 107, 92, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(90, 107, 92, 0.35);
}

.btn-secondary {
  background: #ffffff;
  border: 1.5px solid var(--c-clay);
  color: var(--c-clay-dark);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--c-clay-light);
  transform: translateY(-1px);
}

.btn-full {
  margin-top: 10px;
}

/* ==========================================================================
   Gender Reveal Card
   ========================================================================== */
.gender-stage {
  display: flex;
  justify-content: center;
}

.gender-scratch-card {
  width: 100%;
  max-width: 380px;
  min-height: 120px;
  background: #fdfbf7;
  border: 1.5px dashed var(--c-clay);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  cursor: pointer;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s var(--ease-gentle);
}

.gender-scratch-card:hover {
  border-color: var(--c-clay-dark);
  background: #ffffff;
  transform: scale(1.01);
}

.scratch-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scratch-icon {
  font-size: 2rem;
}

.scratch-prompt {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-clay-dark);
}

.result-badge {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.result-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #0284c7;
  margin-bottom: 6px;
}

.result-sub {
  font-size: 0.88rem;
  color: var(--c-charcoal-muted);
}

/* ==========================================================================
   Theme & Registry
   ========================================================================== */
.theme-box, .wishlist-box {
  background: #fcfbf9;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.theme-header, .wishlist-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.box-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-charcoal);
}

.theme-name {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--c-sage-dark);
  margin-bottom: 4px;
}

.theme-desc, .wishlist-body {
  font-size: 0.9rem;
  color: var(--c-charcoal-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.swatches {
  display: flex;
  gap: 8px;
}

.swatch {
  height: 26px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ==========================================================================
   T04 Advice Wall (Card Stack)
   ========================================================================== */
.advice-intro {
  font-size: 0.92rem;
  color: var(--c-charcoal-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* T04 card-stack */
.card-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.advice-note {
  background: #ffffff;
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-sage);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  animation: note-in 0.4s var(--ease-gentle) both;
}

@keyframes note-in {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.note-text {
  font-size: 0.92rem;
  color: var(--c-charcoal);
  line-height: 1.5;
  margin-bottom: 6px;
}

.note-author {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-clay-dark);
  text-align: right;
}

.add-advice-box {
  background: var(--c-oat-light);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
}

.add-advice-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-charcoal);
  margin-bottom: 10px;
}

.advice-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   RSVP Form & Segmented Control
   ========================================================================== */
.rsvp-intro {
  font-size: 0.92rem;
  color: var(--c-charcoal-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-charcoal);
}

.req {
  color: #ef4444;
  margin-left: 2px;
}

/* Segmented Control for Attendance */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: #f4f0ea;
  padding: 4px;
  border-radius: var(--radius-pill);
}

.segmented-control input[type="radio"] {
  display: none;
}

.segment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--c-charcoal-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease-gentle);
  text-align: center;
  user-select: none;
}

.segmented-control input[type="radio"]:checked + .segment-btn {
  background: #ffffff;
  color: var(--c-charcoal);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#attend-yes:checked + .segment-btn {
  color: var(--c-sage-dark);
}

#attend-no:checked + .segment-btn {
  color: #8c9b8e;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--c-charcoal);
  background: #ffffff;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--c-sage);
  box-shadow: 0 0 0 3px rgba(90, 107, 92, 0.15);
}

.label-with-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-count {
  font-size: 0.8rem;
  color: #9ca3af;
  font-family: var(--font-display);
}

.consent-group {
  margin-top: 4px;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  width: 20px;
  height: 20px;
  min-width: 20px;
  background-color: #ffffff;
  border: 1.5px solid var(--c-border-strong);
  border-radius: 6px;
  display: inline-block;
  position: relative;
  margin-top: 2px;
  transition: all 0.2s ease;
  pointer-events: none;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--c-sage);
  border-color: var(--c-sage);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark::after {
  display: block;
}

.consent-text {
  font-size: 0.84rem;
  color: var(--c-charcoal-muted);
  line-height: 1.45;
}

.input-error {
  display: none;
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 2px;
}

.input-error.visible {
  display: block;
}

/* Success Card */
.rsvp-success-card {
  text-align: center;
  padding: 24px 16px;
  background: var(--c-sage-light);
  border: 1.5px solid var(--c-sage);
  border-radius: var(--radius-md);
  margin-top: 16px;
  animation: banner-enter 0.5s var(--ease-gentle) both;
}

.success-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.success-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--c-sage-dark);
  margin-bottom: 8px;
}

.success-message {
  font-size: 0.95rem;
  color: var(--c-charcoal-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.demo-badge-note {
  font-size: 0.8rem;
  color: var(--c-sage-dark);
  font-style: italic;
}

/* ==========================================================================
   Footer & Credit
   ========================================================================== */
.page-footer {
  margin-top: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-bottom: 72px; /* Bottom safe zone >= 68px */
}

.hosts-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.signature-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.signature-label {
  font-size: 0.85rem;
  color: var(--c-charcoal-muted);
  letter-spacing: 0.04em;
}

.signature-names {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-charcoal);
  text-wrap: balance;
  text-align: center;
}

.nobrk {
  white-space: nowrap;
  display: inline-block;
}

/* Static credit pill in natural footer flow */
.footer-credit {
  margin-top: 12px;
}

.credit-pill {
  display: inline-block;
  background: #ffffff;
  color: #64748b;
  border: 1px solid var(--c-border-strong);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.credit-pill:hover {
  color: var(--c-charcoal);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.hidden {
  display: none !important;
}

@media (max-width: 360px) {
  .page-container {
    padding-left: 12px;
    padding-right: 12px;
  }
}
