/* ── Design tokens ──────────────────────────────────────────────────────────── */
:root {
  --cream:       #FFF8F0;
  --blush:       #F4A5AE;
  --blush-dark:  #E8838E;
  --sage:        #A8C5A0;
  --sage-dark:   #7FA875;
  --gold:        #D4AF37;
  --gold-light:  #F0D060;
  --text-dark:   #3A2A1A;
  --text-mid:    #6B5040;
  --text-light:  #9A7A60;
  --white:       #FFFFFF;
  --shadow:      rgba(58, 42, 26, 0.12);

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Lato', system-ui, -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px;

  --transition: 0.25s ease;
}

/* ── Reset & base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background-color: var(--cream);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
}

/* Subtle petal pattern background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(244,165,174,0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(168,197,160,0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(212,175,55,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ── Confetti ───────────────────────────────────────────────────────────────── */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ── Landing page ───────────────────────────────────────────────────────────── */
.landing-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

.landing-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.flower-row {
  font-size: 1.5rem;
  letter-spacing: 0.3rem;
  margin: 0.5rem 0;
  animation: gentle-float 4s ease-in-out infinite alternate;
}

@keyframes gentle-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-6px); }
}

.birthday-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 7vw, 3.6rem);
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.25;
  margin: 0.75rem 0;
}

.name-highlight {
  font-style: italic;
  color: var(--blush-dark);
  display: inline-block;
  animation: name-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@keyframes name-pop {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.landing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 540px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 48px var(--shadow);
  animation: card-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  border: 1px solid rgba(244,165,174,0.2);
}

@keyframes card-rise {
  from { transform: translateY(32px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.gift-label {
  font-size: 0.8rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.gift-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.gift-description {
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 2rem;
}

.landing-footer {
  margin-top: 2rem;
  color: var(--text-light);
  font-size: 0.9rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ── CTA Button ─────────────────────────────────────────────────────────────── */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--blush) 0%, var(--blush-dark) 100%);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(244,165,174,0.45);
  transition: transform var(--transition), box-shadow var(--transition);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(244,165,174,0.55);
}

.cta-button:active { transform: translateY(0); }

.cta-button--disabled {
  background: linear-gradient(135deg, #d8cdd0 0%, #b8a8ac 100%);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.65;
}

.cta-arrow { font-size: 1.1rem; }

/* ── Datepicker page ────────────────────────────────────────────────────────── */
.datepicker-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 2rem 1.5rem 5rem;
  position: relative;
  z-index: 1;
}

.page-header {
  text-align: center;
  width: 100%;
  max-width: 440px;
  margin-bottom: 2rem;
}

.back-link {
  display: inline-block;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  transition: color var(--transition);
}
.back-link:hover { color: var(--blush-dark); }

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5.5vw, 2.3rem);
  font-weight: 400;
  color: var(--text-dark);
}

.page-subtitle {
  color: var(--text-mid);
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

.error-banner {
  background: #fde8ea;
  color: #c0392b;
  border: 1px solid #f5c6cb;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  max-width: 440px;
  width: 100%;
}

/* ── Calendar ───────────────────────────────────────────────────────────────── */
.calendar-wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 6px 32px var(--shadow);
  animation: card-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  border: 1px solid rgba(244,165,174,0.15);
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding: 0 0.25rem;
}

.month-label {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
}

.month-nav-btn {
  background: none;
  border: 2px solid var(--blush);
  color: var(--blush-dark);
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
  line-height: 1;
}
.month-nav-btn:hover  { background: var(--blush); color: var(--white); }
.month-nav-btn:disabled { opacity: 0.3; cursor: default; }
.month-nav-btn:disabled:hover { background: none; color: var(--blush-dark); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.day-header {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04rem;
  color: var(--text-light);
  padding: 4px 0 6px;
  text-transform: uppercase;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 400;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform 0.15s;
  border: 2px solid transparent;
  color: var(--text-dark);
  user-select: none;
}

.cal-day:hover {
  background: rgba(244,165,174,0.14);
  border-color: var(--blush);
}

.cal-day.today {
  border-color: var(--sage);
  font-weight: 600;
  color: var(--sage-dark);
}

.cal-day.selected {
  background: linear-gradient(135deg, var(--blush) 0%, var(--blush-dark) 100%);
  color: var(--white);
  font-weight: 600;
  border-color: transparent;
  transform: scale(1.1);
  box-shadow: 0 3px 14px rgba(244,165,174,0.5);
}

.cal-day.other-month {
  color: var(--text-light);
  opacity: 0.38;
  pointer-events: none;
}

.cal-day.past {
  color: #c8b8ae;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Selection preview ──────────────────────────────────────────────────────── */
.selection-preview {
  margin-top: 1.75rem;
  text-align: center;
  max-width: 440px;
  width: 100%;
}

.selection-text {
  color: var(--text-mid);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  min-height: 1.6em;
  font-family: var(--font-serif);
  font-style: italic;
  transition: all 0.3s ease;
}

/* ── Confirmed page ─────────────────────────────────────────────────────────── */
.confirmed-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

.confirmed-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  max-width: 540px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 48px var(--shadow);
  animation: card-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  border: 1px solid rgba(244,165,174,0.2);
}

.confirmed-icon {
  font-size: 3.5rem;
  animation: gentle-float 3s ease-in-out infinite alternate;
  display: block;
  margin-bottom: 1rem;
}

.confirmed-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5.5vw, 2.5rem);
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.date-display {
  background: linear-gradient(135deg, #fff0f2 0%, #fff8f0 100%);
  border: 2px solid var(--blush);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.date-label {
  font-size: 0.72rem;
  letter-spacing: 0.16rem;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 600;
}

.date-value {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 3.5vw, 1.4rem);
  font-weight: 600;
  color: var(--blush-dark);
}

.confirmed-message {
  color: var(--text-mid);
  line-height: 1.9;
  font-size: 1rem;
}

.confirmed-flowers {
  font-size: 1.4rem;
  letter-spacing: 0.25rem;
  margin-top: 1.5rem;
  animation: gentle-float 4s ease-in-out infinite alternate;
  display: block;
}

/* ── Schedule link (on confirmed card) ─────────────────────────────────────── */
.schedule-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04rem;
  border: 1.5px solid rgba(168,197,160,0.6);
  border-radius: var(--radius-xl);
  padding: 0.6rem 1.4rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.schedule-link:hover {
  color: var(--sage-dark);
  border-color: var(--sage);
  background: rgba(168,197,160,0.08);
}

/* ── Schedule page ──────────────────────────────────────────────────────────── */
.schedule-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 2rem 1.5rem 5rem;
  position: relative;
  z-index: 1;
}

/* Timeline container */
.timeline {
  max-width: 540px;
  width: 100%;
  position: relative;
  padding-left: 2.5rem;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--blush), var(--sage));
  border-radius: 2px;
}

/* Station card */
.station-card {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  animation: card-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  position: relative;
}

.station-dot {
  position: absolute;
  left: -2.5rem;
  top: 0.85rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--blush);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--shadow);
  font-size: 1rem;
}

.station-dot--locked {
  border-color: #ddd;
  background: #f5f5f5;
}

.station-body {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  width: 100%;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid rgba(244,165,174,0.15);
}

.station-time {
  font-size: 0.75rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.station-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.station-location {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blush-dark);
  margin-bottom: 0.15rem;
}

.station-address {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}

.station-description {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.7;
}

.station-card--locked .station-body {
  background: #fafafa;
  border-color: #eee;
  box-shadow: none;
}

.station-teaser {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

/* Empty state */
.schedule-empty {
  max-width: 400px;
  width: 100%;
  text-align: center;
  padding: 3rem 1.5rem;
  animation: card-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.schedule-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: gentle-float 4s ease-in-out infinite alternate;
}

.schedule-empty-text {
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.8;
}

/* ── Nope page ──────────────────────────────────────────────────────────────── */
.nope-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.nope-content { text-align: center; opacity: 0.35; }
.nope-flower  { font-size: 2rem; margin-bottom: 0.75rem; }
.nope-text    { font-size: 0.85rem; color: var(--text-light); }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .landing-card, .confirmed-card { padding: 1.75rem 1.25rem; }
  .calendar-wrapper { padding: 1rem 0.75rem; }
  .cal-day { font-size: 0.8rem; }
  .cta-button { padding: 0.8rem 1.6rem; font-size: 0.95rem; }
}
