/* ================================================================
   STYLE.CSS — Visual theme: Dreamy Pastel
   ================================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lato:wght@300;400&display=swap');

/* --- CSS Variables (tweak colors/fonts here easily) --- */
:root {
  --color-bg:         #fdf6f0;
  --color-hero-start: #f9d5e5;
  --color-hero-end:   #d5e8f9;
  --color-accent:     #c9a0c2;
  --color-text:       #4a3f5c;
  --color-text-light: #8a7a9a;
  --color-paper:      #fffdf7;
  --color-paper-shadow: rgba(180, 160, 200, 0.25);
  --color-quote-bg:   #f0eaff;
  --font-heading:     'Playfair Display', serif;
  --font-body:        'Lato', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* ================================================================
   SECTION 1: HERO / HEADER
   ================================================================ */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--color-hero-start) 0%, var(--color-hero-end) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 40px 20px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-text-light);
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 5vw, 3.2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--color-accent);
  margin-bottom: 24px;
}

.hero-message {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--color-text-light);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Falling Petals --- */
.petals-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.petal {
  position: absolute;
  top: -30px;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 40% 40%, #f9b8d4, #e48ac0);
  border-radius: 0 60% 0 60%;
  animation: fall linear infinite;
}

@keyframes fall {
  0%   { transform: translateY(-40px) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: 0; }
}

/* ================================================================
   SHARED SECTION LABEL
   ================================================================ */
.section-label {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent);
  margin-bottom: 32px;
  letter-spacing: 0.04em;
}

/* ================================================================
   SECTION 2: PHOTO SLIDESHOW
   ================================================================ */
.slideshow-section {
  padding: 70px 0 60px;
  overflow: hidden;
}

.slideshow-track-wrapper {
  overflow: hidden;
  width: 100%;
}

.slideshow-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: scrollLeft 40s linear infinite;
}

/* Slow it down or speed it up by changing "40s" above */
@keyframes scrollLeft {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-1 * var(--track-width, 2000px))); }
}

.slideshow-track:hover {
  animation-play-state: paused; /* Pause on hover */
}

.slide-photo {
  width: 320px;
  height: 240px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(180, 140, 200, 0.2);
  flex-shrink: 0;
  animation: fadePhoto 6s ease-in-out infinite alternate;
}

@keyframes fadePhoto {
  0%   { opacity: 0.85; }
  100% { opacity: 1; }
}

/* ================================================================
   SECTION 3: POEMS
   ================================================================ */
.poems-section {
  padding: 70px 20px 60px;
  background: linear-gradient(180deg, var(--color-bg) 0%, #ede9f7 100%);
}

.poem-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  transition: filter 0.4s ease;
}

/* Password Protection Styles */
.poems-section {
  position: relative;
}

/* Locked state - blur the poems and arrows */
.poems-section.locked .poem-carousel {
  filter: blur(12px) brightness(0.7);
  pointer-events: none;
  user-select: none;
}

/* Password Overlay */
.password-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  display: none;
}

.password-overlay.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-box {
  background: rgba(255, 255, 255, 0.95);
  padding: 32px 40px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(100, 80, 120, 0.3);
  text-align: center;
  min-width: 280px;
}

.password-hint {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 20px;
  font-style: italic;
}

.password-box input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid var(--color-accent);
  border-radius: 8px;
  background: #fff;
  color: var(--color-text);
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.password-box input:focus {
  border-color: #9a6b94;
}

.password-box button {
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: var(--font-body);
}

.password-box button:hover {
  background: #a6709e;
  transform: scale(1.02);
}

.password-error {
  color: #c44;
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 1.2em;
}

/* Hide overlay when unlocked */
.poems-section.unlocked .password-overlay {
  display: none !important;
}

.poems-section.unlocked .poem-carousel {
  filter: none;
  pointer-events: auto;
  user-select: auto;
}

/* Paper card */
.poem-paper {
  background: var(--color-paper);
  border-radius: 4px;
  padding: 48px 52px;
  max-width: 540px;
  width: 100%;
  min-height: 360px;
  box-shadow:
    0 2px 4px var(--color-paper-shadow),
    0 8px 32px var(--color-paper-shadow),
    inset 0 0 0 1px rgba(200, 180, 220, 0.15);
  position: relative;
  /* Subtle lined-paper lines */
  background-image: repeating-linear-gradient(
    transparent,
    transparent 31px,
    #e8e0f0 31px,
    #e8e0f0 32px
  );
  background-attachment: local;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Paper fold corner */
.poem-paper::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(225deg, var(--color-bg) 50%, var(--color-paper-shadow) 50%);
  border-top-left-radius: 4px;
}

.poem-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--color-accent);
  margin-bottom: 20px;
  text-align: center;
}

.poem-body {
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 2;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.poem-body span {
  display: block;
}

.poem-counter {
  text-align: right;
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-top: 16px;
}

/* Arrows */
.poem-arrow {
  background: none;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.poem-arrow:hover {
  background: var(--color-accent);
  color: #fff;
  transform: scale(1.08);
}

/* Flip animation */
@keyframes flipIn {
  from { opacity: 0; transform: rotateY(12deg) scale(0.97); }
  to   { opacity: 1; transform: rotateY(0deg) scale(1); }
}

.poem-paper.flip-in {
  animation: flipIn 0.35s ease forwards;
}

/* ================================================================
   SECTION 4: QUOTE OF THE DAY
   ================================================================ */
.quote-section {
  padding: 70px 20px 60px;
  background: var(--color-bg);
}

.quote-card {
  max-width: 620px;
  margin: 0 auto;
  background: var(--color-quote-bg);
  border-left: 4px solid var(--color-accent);
  border-radius: 12px;
  padding: 36px 44px;
  box-shadow: 0 4px 24px rgba(180, 140, 200, 0.12);
  text-align: center;
}

.quote-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.75;
  margin-bottom: 16px;
}

.quote-author {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--color-text-light);
  letter-spacing: 0.06em;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  text-align: center;
  padding: 32px 20px;
  font-size: 0.88rem;
  color: var(--color-text-light);
  border-top: 1px solid rgba(200, 180, 220, 0.3);
  font-style: italic;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 600px) {
  .poem-paper { padding: 32px 24px; }
  .poem-carousel { gap: 14px; }
  .quote-card { padding: 28px 24px; }
  .slide-photo { width: 240px; height: 180px; }
}
