/* Haven's Labor & Delivery Tracker - Vintage Nursery & Blush Floral Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Playfair+Display:ital,wght@0,400..700;1,400..700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-parchment: #fffdfa;
  --bg-card: #ffffff;
  --bg-card-soft: #fcf8f5;
  --blush-50: #fdf2f4;
  --blush-100: #fce7ec;
  --blush-200: #fbcfe8;
  --blush-400: #f472b6;
  --rose-600: #e11d48;
  --rose-700: #be185d;
  --rose-800: #9d174d;
  --sage-100: #eef3ef;
  --sage-600: #69826f;
  --sage-700: #516957;
  --text-main: #374151;
  --text-muted: #6b7280;
  --border-delicate: #f5dde3;
  --shadow-warm: 0 8px 30px rgba(190, 24, 93, 0.06);
  --shadow-pop: 0 12px 36px rgba(190, 24, 93, 0.12);
  --radius-card: 20px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-parchment);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(252, 231, 236, 0.6) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(238, 243, 239, 0.6) 0%, transparent 40%);
}

/* Subtle floral top border ornament */
.top-ornament {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #fbcfe8, #f472b6, #e11d48, #f472b6, #fbcfe8);
}

.container {
  width: 100%;
  max-width: 640px;
  padding: 24px 18px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Passcode Gate Screen */
#gate-view {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.invitation-card {
  background: var(--bg-card);
  border: 1px solid var(--border-delicate);
  border-radius: 28px;
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow-pop);
  position: relative;
  width: 100%;
  max-width: 440px;
}

.ribbon-icon {
  font-size: 42px;
  margin-bottom: 12px;
  display: inline-block;
  animation: floatBow 3s ease-in-out infinite;
}

@keyframes floatBow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}

.gate-calligraphy {
  font-family: 'Great Vibes', cursive;
  font-size: 46px;
  color: var(--rose-700);
  line-height: 1.1;
  margin-bottom: 6px;
}

.gate-sub {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pin-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 16px;
}

.pin-digit {
  width: 52px;
  height: 64px;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  border: 2px solid var(--border-delicate);
  border-radius: var(--radius-sm);
  background: var(--bg-parchment);
  color: var(--rose-800);
  transition: all 0.2s ease;
  outline: none;
}

.pin-digit:focus {
  border-color: var(--rose-700);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.15);
}

.gate-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Shake animation for invalid PIN */
.shake {
  animation: shakeAnim 0.4s ease-in-out;
}

@keyframes shakeAnim {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Header & Storyboard */
header.story-header {
  text-align: center;
  padding: 12px 0 6px;
}

.hero-botanical {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--sage-600);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.hero-title {
  font-family: 'Great Vibes', cursive;
  font-size: 58px;
  color: var(--rose-700);
  line-height: 1.05;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(190, 24, 93, 0.08);
}

.hero-sub {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--text-muted);
}

/* Cards Baseline */
.haven-card {
  background: var(--bg-card);
  border: 1px solid var(--border-delicate);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-warm);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Countdown Card */
.countdown-card {
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, var(--blush-50) 100%);
  border: 1px solid var(--border-delicate);
}

.countdown-label {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-style: italic;
  color: var(--rose-700);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.countdown-unit {
  background: #ffffff;
  border: 1px solid var(--border-delicate);
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  box-shadow: 0 2px 8px rgba(190, 24, 93, 0.04);
}

.unit-number {
  font-size: 26px;
  font-weight: 700;
  color: var(--rose-800);
  line-height: 1;
}

.unit-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 4px;
  font-weight: 600;
}

/* Live Status Card */
.status-card {
  border-left: 4px solid var(--rose-700);
  background: #ffffff;
}

.status-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blush-100);
  color: var(--rose-800);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pulse-heart {
  display: inline-block;
  animation: heartPulse 1.5s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

.status-time {
  font-size: 12px;
  color: var(--text-muted);
}

.status-current-phase {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--rose-800);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-note-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--blush-50);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--rose-700);
}

/* Baby Born Announcement Hero (Conditional) */
.baby-hero {
  background: linear-gradient(135deg, #fdf2f4 0%, #ffffff 50%, #fce7ec 100%);
  border: 2px solid var(--rose-700);
  text-align: center;
  padding: 30px 20px;
}

.baby-hero-title {
  font-family: 'Great Vibes', cursive;
  font-size: 46px;
  color: var(--rose-800);
  margin-bottom: 6px;
}

.baby-hero-sub {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--rose-700);
  margin-bottom: 20px;
}

.baby-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.stat-box {
  background: #ffffff;
  border: 1px solid var(--border-delicate);
  padding: 12px 8px;
  border-radius: var(--radius-sm);
}

.stat-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--rose-800);
}

.stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.baby-photo-frame {
  margin-top: 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 20px rgba(190, 24, 93, 0.15);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.baby-photo-frame img {
  width: 100%;
  display: block;
}

/* SMS Alert Subscription Card */
.sms-card {
  background: linear-gradient(135deg, #ffffff 0%, var(--sage-100) 100%);
  border: 1px solid #d5e4d7;
}

.sms-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--sage-700);
  margin-bottom: 6px;
}

.sms-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

.sms-form {
  display: flex;
  gap: 8px;
}

.sms-input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #c2d6c5;
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  background: #ffffff;
}

.sms-input:focus {
  border-color: var(--sage-700);
  box-shadow: 0 0 0 3px rgba(105, 130, 111, 0.15);
}

.sms-btn {
  background: var(--sage-700);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.sms-btn:hover {
  background: var(--sage-600);
}

.sms-msg {
  font-size: 12px;
  margin-top: 8px;
  font-weight: 600;
}

.sms-msg.success { color: #047857; }
.sms-msg.error { color: #b91c1c; }

/* Timeline Section */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--rose-800);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.timeline-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.timeline-card {
  background: #ffffff;
  border: 1px solid var(--border-delicate);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: 0 2px 10px rgba(190, 24, 93, 0.03);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.timeline-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--rose-700);
  background: var(--blush-50);
  padding: 4px 10px;
  border-radius: 999px;
}

.timeline-time {
  font-size: 11.5px;
  color: var(--text-muted);
}

.timeline-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main);
}

.timeline-photo {
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  max-width: 100%;
}

.timeline-photo img {
  width: 100%;
  display: block;
}

/* Love & Prayers Guestbook */
.guestbook-card {
  background: #ffffff;
}

.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--border-delicate);
}

.guest-input, .guest-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-delicate);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  background: var(--bg-parchment);
}

.guest-textarea {
  min-height: 70px;
  resize: vertical;
}

.guest-input:focus, .guest-textarea:focus {
  border-color: var(--rose-700);
  background: #ffffff;
}

.guest-btn {
  background: var(--rose-700);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  align-self: flex-end;
  transition: background 0.15s ease;
}

.guest-btn:hover {
  background: var(--rose-800);
}

.guestbook-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.guest-item {
  background: var(--blush-50);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.guest-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.guest-name {
  font-weight: 700;
  color: var(--rose-800);
}

.guest-date {
  color: var(--text-muted);
}

.guest-msg {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text-main);
}

/* Footer */
footer {
  text-align: center;
  padding: 24px 0 12px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.dad-lock-link {
  color: #d1d5db;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease;
}

.dad-lock-link:hover {
  color: var(--rose-700);
}

/* Responsive */
@media (max-width: 480px) {
  .hero-title { font-size: 46px; }
  .gate-calligraphy { font-size: 38px; }
  .pin-digit { width: 44px; height: 56px; font-size: 24px; }
  .sms-form { flex-direction: column; }
}
