/* CSS Document - Valentine Proposal & Date Night */
:root {
  --wine: #881c34;
  --wine-dark: #501320;
  --wine-deep: #300711;
  --blush: #e5989b;
  --blush-light: #f5d0c5;
  --cream: #fff7f0;
  --cream-card: rgba(255, 247, 240, 0.96);
  --gold: #d4af37;
  --text-main: #33141b;
  --text-muted: #6e4650;
  --wine-glow: 0 10px 30px rgba(136, 28, 52, 0.35);
  --blush-glow: 0 0 20px rgba(229, 152, 155, 0.4);
  --ease-soft: cubic-bezier(0.25, 1, 0.5, 1);
}

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

body {
  font-family: 'Niramit', sans-serif;
  background-color: var(--wine-deep);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 10%, #66182a 0%, #300711 85%),
    radial-gradient(circle at 20% 80%, rgba(229, 152, 155, 0.25) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Headings */
h1, h2, h3 {
  font-family: 'Italiana', 'Niramit', serif;
  font-weight: 400;
  letter-spacing: 0.03em;
}

/* Ambient Rose Petals Canvas (T67) */
.petal-fall {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* App Viewport */
.app-viewport {
  max-width: 500px;
  margin: 0 auto;
  padding: 16px 18px 90px;
  position: relative;
  z-index: 10;
}

.top-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 24px;
}

.nav-btn {
  background: rgba(255, 247, 240, 0.15);
  border: 1px solid rgba(229, 152, 155, 0.45);
  color: var(--blush-light);
  font-family: 'Niramit', sans-serif;
  font-weight: 500;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.25s var(--ease-soft);
}

.nav-btn:hover, .nav-btn:focus-visible {
  background: var(--blush);
  color: var(--wine-deep);
}

/* Hero Section - 100dvh Lock Screen (EV2 Lesson) */
.hero-section {
  text-align: center;
  padding: 18px 6px 28px;
  position: relative;
  min-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.blush-badge {
  display: inline-block;
  background: rgba(229, 152, 155, 0.2);
  border: 1px solid rgba(229, 152, 155, 0.5);
  color: var(--blush-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 14px;
  border-radius: 16px;
  margin-bottom: 14px;
}

.hero-title {
  color: var(--cream);
  font-size: clamp(1.75rem, 7vw, 2.15rem);
  letter-spacing: 0.01em;
  line-height: 1.25;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
  color: var(--blush-light);
  font-size: 14px;
  line-height: 1.55;
  max-width: 400px;
  margin: 0 auto 28px;
  font-weight: 300;
  text-wrap: balance;
}

/* Polaroid Developing Gimmick */
.polaroid-stage {
  perspective: 1000px;
  width: 270px;
  margin: 0 auto;
  cursor: pointer;
  position: relative;
}

.polaroid-frame {
  background: #ffffff;
  padding: 14px 14px 20px;
  border-radius: 6px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(136, 28, 52, 0.3);
  transform: rotate(-2deg);
  transition: transform 0.6s var(--ease-soft), box-shadow 0.6s var(--ease-soft);
  position: relative;
}

.polaroid-stage:hover .polaroid-frame {
  transform: rotate(0deg) translateY(-6px) scale(1.03);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.55), var(--blush-glow);
}

.polaroid-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #2b0b14;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.couple-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Developing Mask Overlay (Argon Fix #2 - Warm sepia film tone + subtle shimmer) */
.photo-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, #6b2d3c 0%, #3e121e 65%, #2a0c14 100%);
  opacity: 0.96;
  transition: opacity 1.8s ease-in-out;
  pointer-events: none;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.5);
}

.photo-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 35%, rgba(229, 152, 155, 0.18) 50%, transparent 65%);
  background-size: 200% 200%;
  animation: photoShimmer 3.2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes photoShimmer {
  0% { background-position: -100% -100%; }
  100% { background-position: 200% 200%; }
}

.photo-overlay.developed {
  opacity: 0;
}

.polaroid-caption {
  margin-top: 14px;
  text-align: center;
}

.caption-handwriting {
  font-family: 'Niramit', cursive, serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--wine);
  font-style: italic;
  margin-bottom: 2px;
}

.caption-date {
  font-size: 11px;
  color: #9c7882;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.polaroid-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  background: rgba(229, 152, 155, 0.15);
  border: 1px dashed var(--blush);
  color: var(--blush-light);
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s var(--ease-soft);
}

.polaroid-hint:hover {
  background: rgba(229, 152, 155, 0.3);
  transform: translateY(-2px);
}

/* Content Reveal Container */
.content-reveal {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 1.2s var(--ease-soft), opacity 0.8s ease-in-out;
}

.content-reveal.expanded {
  max-height: 6000px;
  opacity: 1;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 22px;
}

/* Card Sections */
.card-section {
  background: var(--cream-card);
  border: 1px solid rgba(229, 152, 155, 0.45);
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  transition: background-color 0.4s var(--ease-soft);
}

/* Section Color Shift (T62 bg-shift) */
.card-section.bg-shift:hover {
  background: #fffcf9;
}

.section-tag {
  display: inline-block;
  background: rgba(136, 28, 52, 0.08);
  color: var(--wine);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(136, 28, 52, 0.2);
}

.card-title {
  color: var(--wine-dark);
  font-size: 20px;
  line-height: 1.35;
  margin-bottom: 8px;
}

/* Argon Fix #5: Unified Niramit font weight on Thai titles including trailing question marks */
[lang="th"] .card-title,
.card-title span[data-l="th"] {
  font-family: 'Niramit', serif;
  font-weight: 600;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* Countdown Section (T60) */
.countdown-box {
  text-align: center;
  background: linear-gradient(145deg, #fff7f0 0%, #faece9 100%);
  border: 1.5px solid var(--blush);
}

.cd-date-desc {
  font-size: 13px;
  font-weight: 600;
  color: var(--wine);
  margin-bottom: 16px;
}

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

.count-card {
  background: #ffffff;
  border: 1px solid rgba(229, 152, 155, 0.35);
  border-radius: 12px;
  padding: 10px 4px;
  box-shadow: 0 4px 10px rgba(136, 28, 52, 0.06);
}

.count-digit {
  font-family: 'Italiana', serif;
  font-size: 26px;
  color: var(--wine);
  line-height: 1.1;
}

.count-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Typewriter Love Letter Section (T59) */
.letter-card {
  background: #fffcf8;
  border-left: 4px solid var(--wine);
}

.typewriter-container {
  min-height: 110px;
  margin-top: 6px;
}

.typewriter {
  font-size: 14px;
  line-height: 1.7;
  color: var(--wine-dark);
  font-style: italic;
  white-space: pre-line;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: var(--wine);
  margin-left: 2px;
  vertical-align: middle;
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  50% { opacity: 0; }
}

.letter-signature {
  text-align: right;
  font-family: 'Italiana', serif;
  font-size: 15px;
  color: var(--wine);
  margin-top: 14px;
}

/* Evening Plan Timeline */
.timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 10px;
}

.step-row {
  display: flex;
  gap: 14px;
  position: relative;
}

.step-time {
  font-family: 'Italiana', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--wine);
  min-width: 48px;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blush);
  border: 2px solid var(--wine);
  margin-top: 6px;
  flex-shrink: 0;
}

.step-dot.ring-dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--wine-dark);
  margin-bottom: 2px;
}

.step-detail {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.highlight-step {
  background: rgba(229, 152, 155, 0.15);
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed var(--blush);
}

/* Playlist Section (Argon Fix #4 - 68px bottom clearance for floating CTA) */
.playlist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 68px;
}

.track-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid rgba(229, 152, 155, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
}

.track-item.highlight-track {
  border-color: var(--wine);
  background: #fff8f8;
}

.track-num {
  font-family: 'Italiana', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--wine);
}

.track-info {
  flex: 1;
}

.track-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.track-artist {
  font-size: 11px;
  color: var(--text-muted);
}

.track-tag {
  font-size: 10px;
  background: rgba(229, 152, 155, 0.2);
  color: var(--wine);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* Venue Section */
.venue-address {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 12px;
}

.venue-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.note-pill {
  font-size: 12px;
  background: #fbf0f2;
  color: var(--wine);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(136, 28, 52, 0.15);
}

.map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--wine);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 12px;
  transition: all 0.25s var(--ease-soft);
}

.map-btn:hover {
  background: var(--wine-dark);
  transform: translateY(-2px);
}

/* RSVP Form (Yes / Maybe Proposal) */
.rsvp-box {
  border: 2px solid var(--wine);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--wine-dark);
  margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  font-family: 'Niramit', sans-serif;
  font-size: 14px;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid rgba(136, 28, 52, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(136, 28, 52, 0.15);
}

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

/* Choice Cards (Yes / Maybe) */
.choice-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.choice-card {
  position: relative;
  cursor: pointer;
}

.choice-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-ui {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid rgba(229, 152, 155, 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  transition: all 0.25s var(--ease-soft);
}

.choice-card input[type="radio"]:checked + .choice-ui {
  background: #fff0f3;
  border-color: var(--wine);
  box-shadow: 0 4px 14px rgba(136, 28, 52, 0.15);
}

.choice-heart {
  font-size: 18px;
}

.choice-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--wine-dark);
}

.char-counter {
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.consent-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--wine);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.privacy-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--wine);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: #ffffff;
  border: 1px solid var(--blush);
  border-radius: 12px;
  padding: 14px 20px;
  font-family: 'Niramit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(136, 28, 52, 0.35);
  transition: all 0.25s var(--ease-soft);
}

.submit-btn:hover {
  background: linear-gradient(135deg, #a3223f 0%, var(--wine) 100%);
  transform: translateY(-2px);
}

.submit-status {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  display: none;
}

.submit-status.success {
  display: block;
  background: #fdf0f4;
  color: var(--wine);
  border: 1px solid rgba(136, 28, 52, 0.3);
}

.submit-status.error {
  display: block;
  background: #fff0f0;
  color: #991b1e;
  border: 1px solid rgba(153, 27, 30, 0.3);
}

/* RSVP Success Confirmation Card (EV2 Lesson) */
.rsvp-success-card {
  text-align: center;
  padding: 24px 16px;
  background: #ffffff;
  border: 1.5px solid var(--blush);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(136, 28, 52, 0.12);
  margin-top: 10px;
}

.success-heart {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 10px;
}

.success-title {
  color: var(--wine-dark);
  font-size: 18px;
  margin-bottom: 8px;
  font-family: 'Niramit', serif;
  font-weight: 600;
}

.success-badge {
  display: inline-block;
  background: rgba(229, 152, 155, 0.2);
  color: var(--wine);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(136, 28, 52, 0.25);
  margin-bottom: 12px;
}

.success-summary {
  font-size: 14px;
  color: var(--wine-deep);
  line-height: 1.5;
  margin-bottom: 14px;
}

.success-sweet-note {
  font-size: 13px;
  font-style: italic;
  color: var(--wine);
  margin-bottom: 20px;
  padding: 10px;
  background: #fff8f8;
  border-radius: 8px;
  border: 1px dashed rgba(229, 152, 155, 0.4);
}

.edit-rsvp-btn {
  background: none;
  border: 1px dashed var(--wine);
  color: var(--wine);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Niramit', sans-serif;
}

.edit-rsvp-btn:hover {
  background: rgba(136, 28, 52, 0.08);
}

/* Footer (Argon Fix #6 - Balanced wrap without orphan words) */
.footer-note {
  text-align: center;
  color: var(--blush-light);
  padding: 24px 10px;
}

.footer-quote {
  font-size: 13px;
  line-height: 1.6;
  font-style: italic;
  margin: 0 auto 6px;
  max-width: 28ch;
  text-wrap: balance;
}

.footer-sub {
  font-family: 'Italiana', serif;
  font-size: 13px;
  color: var(--blush);
  letter-spacing: 0.05em;
}

/* Sticky CTA (T50) */
.sticky-cta {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 80;
  display: none;
}

.sticky-cta.visible {
  display: block;
}

.sticky-pill-btn {
  background: var(--wine);
  color: #ffffff;
  border: 1px solid var(--blush);
  border-radius: 24px;
  padding: 10px 18px;
  font-family: 'Niramit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s var(--ease-soft);
}

.sticky-pill-btn:hover {
  transform: translateY(-2px);
  background: var(--wine-dark);
}

/* Privacy Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--cream);
  border: 2px solid var(--blush);
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  padding: 24px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.modal-title {
  color: var(--wine);
  font-size: 17px;
  margin-bottom: 12px;
}

.modal-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.modal-close {
  width: 100%;
  background: var(--wine);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Creator Credit Pill (Playbook Rule 2.1) */
.site-credit {
  position: fixed;
  bottom: 14px;
  left: 14px;
  background: rgba(48, 7, 17, 0.85);
  border: 1px solid rgba(229, 152, 155, 0.45);
  color: var(--blush-light);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 14px;
  backdrop-filter: blur(8px);
  z-index: 99;
  transition: all 0.2s;
}

.site-credit:hover {
  background: var(--blush);
  color: var(--wine-deep);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .petal-fall, .photo-overlay, .polaroid-frame {
    animation: none !important;
    transition: none !important;
  }
}
