/* ==========================================================================
   A THOUSAND LITTLE THINGS — STYLESHEET
   A personal, dreamy scrapbook website from Yash to Arni.
   Aesthetic: Pinterest-inspired romantic scrapbook, soft blush/cream, polaroids.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Core Color Palette */
  --color-ivory: #FFF9F4;
  --color-ivory-light: #FFFCF9;
  --color-blush: #F6E6E8;
  --color-blush-soft: #FCF4F5;
  --color-dusty-rose: #D8A7AA;
  --color-rose-deep: #C28286;
  --color-rose-glow: rgba(216, 167, 170, 0.35);
  --color-muted-brown: #8A716D;
  --color-muted-light: #A38C88;
  --color-deep-text: #51413F;
  --color-white: #FFFFFF;
  --color-card-bg: #FFFDFC;
  --color-sunlight: rgba(255, 238, 204, 0.55);

  /* Scrapbook Washi Accents */
  --washi-rose: rgba(216, 167, 170, 0.6);
  --washi-cream: rgba(214, 198, 179, 0.6);
  --washi-sage: rgba(186, 199, 185, 0.6);
  --washi-amber: rgba(235, 204, 166, 0.6);

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-handwriting: 'Caveat', cursive, sans-serif;

  /* Shadows & Depth */
  --shadow-polaroid: 0 12px 28px -6px rgba(81, 65, 63, 0.12), 0 4px 10px -2px rgba(81, 65, 63, 0.06);
  --shadow-polaroid-hover: 0 24px 40px -8px rgba(81, 65, 63, 0.22), 0 8px 16px -4px rgba(81, 65, 63, 0.12);
  --shadow-paper: 0 16px 40px -10px rgba(138, 113, 109, 0.16), 0 6px 14px -3px rgba(138, 113, 109, 0.08);
  --shadow-card: 0 10px 30px -5px rgba(138, 113, 109, 0.1);
  --shadow-glow: 0 0 25px rgba(216, 167, 170, 0.35);

  /* Border Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   2. GLOBAL RESETS & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  background-color: var(--color-ivory);
}

body {
  font-family: var(--font-sans);
  color: var(--color-deep-text);
  background-color: var(--color-ivory);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(246, 230, 232, 0.45) 0%, transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(246, 230, 232, 0.4) 0%, transparent 45%);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-ivory);
}
::-webkit-scrollbar-thumb {
  background: var(--color-dusty-rose);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-rose-deep);
}

/* Text Selection */
::selection {
  background: var(--color-blush);
  color: var(--color-deep-text);
}

/* Scroll Progress Bar at the top */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-dusty-rose), var(--color-rose-deep));
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* Interactive Floating Petals Canvas */
.petals-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 3;
}

/* Subtle Paper Grain Overlay */
.ambient-noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Containers & Layout Helpers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 760px;
}
.container-medium {
  max-width: 960px;
}
.text-center {
  text-align: center;
}

/* Section Styling */
.section {
  padding: 120px 0;
  position: relative;
  z-index: 4;
}

/* Section Headers */
.section-header {
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-muted-brown);
  margin-bottom: 12px;
}
.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 500;
  color: var(--color-deep-text);
  line-height: 1.25;
  margin-bottom: 14px;
}
.section-subtext {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--color-muted-brown);
  max-width: 580px;
  margin: 0 auto;
}

/* Decorative Heading Divider */
.heading-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}
.divider-line {
  display: inline-block;
  width: 50px;
  height: 1px;
  background: var(--color-dusty-rose);
  opacity: 0.6;
}
.divider-icon {
  color: var(--color-dusty-rose);
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   3. FLOATING MUSIC PLAYER
   -------------------------------------------------------------------------- */
.music-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.music-player-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 10px;
  background: rgba(255, 252, 249, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(216, 167, 170, 0.4);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-polaroid);
  transition: var(--transition-smooth);
}
.music-player:hover .music-player-inner {
  box-shadow: var(--shadow-polaroid-hover);
  border-color: var(--color-dusty-rose);
  transform: translateY(-2px);
}

/* Vinyl Disc */
.vinyl-disc {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #392F2E;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.5s linear;
}
.music-playing .vinyl-disc {
  animation: spinVinyl 3.6s linear infinite;
}
@keyframes spinVinyl {
  100% { transform: rotate(360deg); }
}
.vinyl-grooves {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}
.vinyl-center {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-dusty-rose);
  border: 2px solid #FFF9F4;
}

/* Equalizer Bars */
.music-eq {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
  width: 14px;
}
.eq-bar {
  width: 2px;
  height: 3px;
  background: var(--color-dusty-rose);
  border-radius: 1px;
  transition: height 0.2s ease;
}
.music-playing .eq-bar:nth-child(1) { animation: eqBounce 0.8s ease-in-out infinite alternate; }
.music-playing .eq-bar:nth-child(2) { animation: eqBounce 1.1s ease-in-out 0.2s infinite alternate; }
.music-playing .eq-bar:nth-child(3) { animation: eqBounce 0.7s ease-in-out 0.4s infinite alternate; }
.music-playing .eq-bar:nth-child(4) { animation: eqBounce 1.0s ease-in-out 0.1s infinite alternate; }

@keyframes eqBounce {
  0% { height: 3px; }
  100% { height: 14px; }
}

/* Info Text */
.music-info {
  display: flex;
  flex-direction: column;
}
.music-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-deep-text);
  line-height: 1.2;
}
.music-status {
  font-size: 0.7rem;
  color: var(--color-muted-brown);
}

/* Music Toggle Button */
.music-btn {
  background: var(--color-blush);
  border: 1px solid var(--color-dusty-rose);
  color: var(--color-deep-text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.music-btn:hover {
  background: var(--color-dusty-rose);
  color: var(--color-white);
  transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   4. SECTION 1: HERO (THE OPENING EXPERIENCE)
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 80px 24px 60px;
  z-index: 4;
}

.hero-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(300px, 60vw, 750px);
  height: clamp(300px, 60vw, 750px);
  background: radial-gradient(circle, rgba(246, 230, 232, 0.75) 0%, rgba(255, 249, 244, 0.1) 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  max-width: 680px;
  margin: 0 auto;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}
.editorial-pill {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(216, 167, 170, 0.4);
  border-radius: var(--radius-pill);
  color: var(--color-muted-brown);
  font-weight: 500;
}
.hero-date {
  font-family: var(--font-handwriting);
  font-size: 1.25rem;
  color: var(--color-dusty-rose);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3.4rem, 9vw, 6rem);
  font-weight: 400;
  font-style: italic;
  color: var(--color-deep-text);
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  color: var(--color-muted-brown);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 38px;
}

/* 3D Envelope Illustration */
.envelope-wrapper {
  margin: 0 auto 32px;
  width: 200px;
  cursor: pointer;
  perspective: 800px;
  transition: transform 0.4s var(--transition-spring);
}
.envelope-wrapper:hover {
  transform: translateY(-4px) scale(1.02);
}

.envelope {
  position: relative;
  width: 190px;
  height: 120px;
  margin: 0 auto;
  background: var(--color-blush);
  border-radius: 6px;
  box-shadow: var(--shadow-polaroid);
  transition: var(--transition-smooth);
}

/* Envelope Back */
.envelope-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #EED7DA;
  border-radius: 6px;
}

/* Letter Peek Inside */
.letter-preview {
  position: absolute;
  bottom: 6px;
  left: 10px;
  width: 170px;
  height: 100px;
  background: #FFFDFC;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(81, 65, 63, 0.08);
  padding: 10px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  border: 1px solid rgba(216, 167, 170, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.letter-preview-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.preview-line {
  font-family: var(--font-handwriting);
  font-size: 0.95rem;
  color: var(--color-deep-text);
  line-height: 1.25;
}
.preview-heart {
  color: var(--color-dusty-rose);
  font-size: 1rem;
  margin-top: 4px;
}

/* Envelope Front Pocket (triangle folds) */
.envelope-pocket {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 95px 70px 95px;
  border-color: transparent transparent var(--color-blush) transparent;
  z-index: 3;
  border-radius: 0 0 6px 6px;
  filter: drop-shadow(0 -1px 3px rgba(81, 65, 63, 0.06));
}

/* Top Flap */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 72px 95px 0 95px;
  border-color: #EAC9CE transparent transparent transparent;
  transform-origin: top center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 4;
}

/* Wax Seal */
.envelope-seal {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #D8A7AA 0%, #BA7B80 100%);
  box-shadow: 0 3px 8px rgba(81, 65, 63, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.seal-icon {
  width: 16px;
  height: 16px;
  color: #FFFDFC;
}

/* Hover or Open State of Envelope */
.envelope-wrapper:hover .envelope-flap,
.envelope-wrapper.is-open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}
.envelope-wrapper:hover .letter-preview,
.envelope-wrapper.is-open .letter-preview {
  transform: translateY(-46px);
}
.envelope-wrapper:hover .envelope-seal,
.envelope-wrapper.is-open .envelope-seal {
  transform: translateX(-50%) scale(0.9);
  opacity: 0.85;
}

.envelope-hint {
  font-family: var(--font-handwriting);
  font-size: 1.15rem;
  color: var(--color-muted-brown);
  margin-top: 14px;
  letter-spacing: 0.02em;
}

/* Signature */
.hero-signature {
  font-family: var(--font-handwriting);
  font-size: 2.1rem;
  color: var(--color-dusty-rose);
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}

/* Hero Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: #FFFDFC;
  border: 1px solid var(--color-dusty-rose);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-deep-text);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(216, 167, 170, 0.25);
  transition: var(--transition-smooth);
}
.btn-primary:hover {
  background: var(--color-blush);
  border-color: var(--color-rose-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(216, 167, 170, 0.35);
}
.btn-arrow {
  transition: transform 0.3s ease;
}
.btn-primary:hover .btn-arrow {
  transform: translateY(3px);
}

/* Scroll Cue */
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.scroll-cue-line {
  display: block;
  width: 1px;
  height: 38px;
  background: linear-gradient(to bottom, var(--color-dusty-rose), transparent);
  animation: scrollPulse 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes scrollPulse {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  50.1% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* --------------------------------------------------------------------------
   5. SECTION 2: A LITTLE LETTER
   -------------------------------------------------------------------------- */
.letter-section {
  background: radial-gradient(circle at 50% 50%, rgba(246, 230, 232, 0.35) 0%, transparent 65%);
}

.letter-sheet {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  padding: clamp(36px, 7vw, 68px);
  box-shadow: var(--shadow-paper);
  position: relative;
  border: 1px solid rgba(216, 167, 170, 0.35);
  background-image: 
    linear-gradient(rgba(216, 167, 170, 0.05) 1px, transparent 1px);
  background-size: 100% 32px;
}

/* Washi Tape Styles */
.washi-tape {
  position: absolute;
  height: 22px;
  width: 90px;
  backdrop-filter: blur(2px);
  box-shadow: 0 2px 5px rgba(81, 65, 63, 0.08);
  z-index: 6;
  opacity: 0.9;
}
.washi-tape-center {
  top: -11px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
}
.washi-tape-left {
  top: -11px;
  left: 20px;
  transform: rotate(-3deg);
}
.washi-tape-right {
  top: -11px;
  right: 20px;
  transform: rotate(2deg);
}
.washi-rose { background: var(--washi-rose); }
.washi-cream { background: var(--washi-cream); }
.washi-sage { background: var(--washi-sage); }

/* Vintage Stamp in top right */
.letter-stamp {
  position: absolute;
  top: 24px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stamp-border {
  width: 52px;
  height: 62px;
  border: 2px dashed rgba(216, 167, 170, 0.7);
  padding: 3px;
  background: #FFF9F4;
}
.stamp-inner {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(216, 167, 170, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-muted-brown);
}
.stamp-flower {
  width: 22px;
  height: 22px;
  stroke: var(--color-dusty-rose);
}
.stamp-text {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-top: 2px;
}
.stamp-val {
  font-size: 0.55rem;
  color: var(--color-dusty-rose);
}
.postal-cancel {
  position: absolute;
  right: 18px;
  top: 15px;
  width: 80px;
  pointer-events: none;
}

/* Pressed Flower Illustration */
.pressed-flower-accent {
  position: absolute;
  top: -30px;
  left: -20px;
  width: 50px;
  height: 100px;
  opacity: 0.85;
  pointer-events: none;
}

/* Letter Content */
.letter-body {
  position: relative;
  z-index: 2;
}
.letter-salutation {
  font-family: var(--font-handwriting);
  font-size: 2.1rem;
  color: var(--color-deep-text);
  margin-bottom: 24px;
  line-height: 1.2;
}
.letter-p {
  font-family: var(--font-sans);
  font-size: 1.08rem;
  line-height: 2;
  color: var(--color-deep-text);
  margin-bottom: 22px;
  font-weight: 300;
  letter-spacing: 0.01em;
}
.letter-closing {
  margin-top: 40px;
  text-align: right;
}
.letter-signoff {
  font-family: var(--font-handwriting);
  font-size: 2.3rem;
  color: var(--color-dusty-rose);
}

.letter-footer-botanical {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  opacity: 0.65;
}

/* --------------------------------------------------------------------------
   6. SECTION 3: OUR LITTLE MEMORY BOOK (SCRAPBOOK GALLERY)
   -------------------------------------------------------------------------- */
.scrapbook-section {
  position: relative;
}

/* Asymmetrical Scrapbook Canvas */
.scrapbook-canvas {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px 24px;
  padding: 20px 0 40px;
  position: relative;
}

/* Polaroid Card Design */
.polaroid-card {
  position: relative;
  background: var(--color-card-bg);
  padding: 14px 14px 28px 14px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-polaroid);
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease, z-index 0.1s;
  z-index: 5;
  border: 1px solid rgba(216, 167, 170, 0.25);
  display: flex;
  flex-direction: column;
}

/* Hover State: Straightens and lifts */
.polaroid-card:hover {
  transform: translateY(-8px) scale(1.03) rotate(0deg) !important;
  box-shadow: var(--shadow-polaroid-hover);
  z-index: 20;
}

/* Photo Frame */
.polaroid-photo-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 2px;
  background: #F3ECE6;
  aspect-ratio: 4 / 5;
}
.polaroid-card.aspect-square .polaroid-photo-frame {
  aspect-ratio: 1 / 1;
}
.polaroid-card.aspect-landscape .polaroid-photo-frame {
  aspect-ratio: 5 / 4;
}

.polaroid-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
  filter: sepia(0.06) contrast(0.98) brightness(1.02);
}
.polaroid-card:hover .polaroid-photo-frame img {
  transform: scale(1.05);
}

/* Photo Fallback / Placeholder */
.polaroid-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, #FFF0F2 0%, #F5E5E8 100%);
  color: var(--color-muted-brown);
}
.fallback-camera-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  opacity: 0.6;
}

/* Handwritten Polaroid Caption Area */
.polaroid-caption {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.polaroid-note {
  font-family: var(--font-handwriting);
  font-size: 1.35rem;
  color: var(--color-deep-text);
  line-height: 1.25;
}
.polaroid-date {
  font-size: 0.72rem;
  color: var(--color-muted-light);
  letter-spacing: 0.05em;
  margin-top: 4px;
  font-weight: 400;
}

/* Asymmetrical Scrapbook Grid Placement */
.scrapbook-col-4 {
  grid-column: span 4;
}
.scrapbook-col-5 {
  grid-column: span 5;
}
.scrapbook-col-6 {
  grid-column: span 6;
}
.scrapbook-col-7 {
  grid-column: span 7;
}

/* Subtle staggered vertical offsets */
.offset-top-sm { margin-top: 30px; }
.offset-top-md { margin-top: 60px; }
.offset-top-lg { margin-top: 90px; }

.scrapbook-footer-note {
  text-align: center;
  margin-top: 32px;
}
.scrapbook-hint {
  font-family: var(--font-handwriting);
  font-size: 1.2rem;
  color: var(--color-dusty-rose);
}

/* --------------------------------------------------------------------------
   7. SECTION 4: SAME CLASSROOM, DIFFERENT FEELINGS
   -------------------------------------------------------------------------- */
.classroom-section {
  position: relative;
  background: linear-gradient(180deg, var(--color-ivory) 0%, #FAF0E8 50%, var(--color-ivory) 100%);
  padding: 140px 0;
  overflow: hidden;
}

/* Photographic Classroom Background Placeholder */
.classroom-bg-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  filter: sepia(0.2) contrast(0.95);
  pointer-events: none;
  z-index: 1;
}

/* Cinematic Sunlight Ray Effect */
.classroom-sunlight {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 80%;
  height: 140%;
  background: radial-gradient(ellipse at 80% 20%, rgba(255, 238, 204, 0.45) 0%, rgba(255, 246, 235, 0.15) 50%, transparent 80%);
  transform: rotate(-15deg);
  pointer-events: none;
  z-index: 1;
}

/* Window Mullion Shadow Overlay */
.classroom-window-shadows {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    repeating-linear-gradient(
      -35deg,
      transparent,
      transparent 180px,
      rgba(81, 65, 63, 0.02) 180px,
      rgba(81, 65, 63, 0.02) 200px
    );
  pointer-events: none;
  z-index: 2;
}

.classroom-card {
  position: relative;
  background: rgba(255, 252, 249, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(216, 167, 170, 0.35);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 8vw, 80px) clamp(28px, 6vw, 64px);
  box-shadow: var(--shadow-paper);
  text-align: center;
  z-index: 3;
}

.classroom-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  font-weight: 500;
  color: var(--color-muted-brown);
  margin-bottom: 36px;
  text-transform: uppercase;
}
.tag-pin {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-dusty-rose);
}

.classroom-quote-container {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}
.quote-mark {
  font-family: var(--font-serif);
  font-size: 5rem;
  color: var(--color-dusty-rose);
  opacity: 0.35;
  line-height: 0.5;
  margin-bottom: 20px;
}

.classroom-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.8vw, 2.35rem);
  font-weight: 400;
  font-style: italic;
  color: var(--color-deep-text);
  line-height: 1.45;
  margin-bottom: 28px;
}

.classroom-subquote {
  font-family: var(--font-handwriting);
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  color: var(--color-dusty-rose);
  line-height: 1.35;
  margin-bottom: 24px;
}

.classroom-reflection {
  font-size: 0.98rem;
  color: var(--color-muted-brown);
  font-weight: 300;
  letter-spacing: 0.02em;
}

.classroom-divider-botanical {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  opacity: 0.75;
}

/* --------------------------------------------------------------------------
   8. SECTION 5: THINGS I WISH I HAD SAID
   -------------------------------------------------------------------------- */
.unspoken-section {
  position: relative;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 20px;
}

/* Base Scrapbook Card */
.scrap-card {
  position: relative;
  background: var(--color-card-bg);
  border-radius: var(--radius-sm);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(216, 167, 170, 0.3);
  transition: transform 0.4s var(--transition-spring), box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
}
.scrap-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-polaroid-hover);
}

.card-number {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--color-dusty-rose);
  margin-bottom: 12px;
  display: block;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-deep-text);
  line-height: 1.3;
  margin-bottom: 14px;
}

.card-detail {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  color: var(--color-muted-brown);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-tagline {
  font-family: var(--font-handwriting);
  font-size: 1.15rem;
  color: var(--color-dusty-rose);
  display: block;
}

/* Unique Card Variations */

/* 1. Sticky Note Style */
.sticky-note {
  background: #FFF5F7;
  border-color: #F3D2D6;
}
.card-pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #F0B3B7, #BA7A80);
  box-shadow: 0 2px 5px rgba(81, 65, 63, 0.2);
}
.card-corner-fold {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 24px 24px;
  border-color: transparent transparent var(--color-ivory) transparent;
  filter: drop-shadow(-2px -2px 2px rgba(81, 65, 63, 0.08));
}

/* 2. Lined Notebook Scrap */
.notebook-scrap {
  background: #FFFDF9;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 27px,
    rgba(216, 167, 170, 0.25) 28px
  );
  padding-left: 42px;
}
.binder-holes {
  position: absolute;
  left: 14px;
  top: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
.binder-holes span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-ivory);
  border: 1px solid rgba(138, 113, 109, 0.3);
}

/* 3. Parchment Scrap */
.parchment-scrap {
  background: #FAF6F0;
  border-color: #E6D8CA;
}

/* 4. Kraft Card */
.kraft-card {
  background: #F8F2EB;
  border-color: #DFD3C6;
}
.pressed-leaf-icon {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 1.4rem;
  opacity: 0.8;
}

/* 5. Deckled Gold Card */
.deckled-card {
  background: #FFFDFC;
  border: 1px solid rgba(216, 167, 170, 0.5);
  box-shadow: 0 0 15px rgba(216, 167, 170, 0.15);
}

/* --------------------------------------------------------------------------
   9. SECTION 6: THE FINAL MESSAGE
   -------------------------------------------------------------------------- */
.closing-section {
  padding: 120px 0 80px;
  background: radial-gradient(circle at 50% 60%, rgba(246, 230, 232, 0.5) 0%, transparent 70%);
}

.final-card {
  background: var(--color-card-bg);
  border: 1px solid rgba(216, 167, 170, 0.35);
  border-radius: var(--radius-md);
  padding: clamp(48px, 8vw, 84px) clamp(28px, 6vw, 64px);
  box-shadow: var(--shadow-paper);
  text-align: center;
  position: relative;
}

.final-card-accent-top {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  opacity: 0.7;
}

.final-message-content {
  max-width: 600px;
  margin: 0 auto;
}

.final-p {
  font-family: var(--font-sans);
  font-size: 1.12rem;
  font-weight: 300;
  line-height: 2;
  color: var(--color-deep-text);
  margin-bottom: 28px;
}

.final-highlight {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-style: italic;
  font-weight: 400;
  color: var(--color-deep-text);
  line-height: 1.5;
  margin: 36px 0;
}

.final-take-care {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-deep-text);
  margin-bottom: 32px;
}

.final-signature-container {
  margin-top: 24px;
}

.final-signature {
  font-family: var(--font-handwriting);
  font-size: 2.6rem;
  color: var(--color-dusty-rose);
  letter-spacing: 0.04em;
}

.final-botanical-spray {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  opacity: 0.7;
}

/* Peaceful Footer */
.peaceful-footer {
  margin-top: 64px;
}
.btn-top {
  background: none;
  border: 1px solid rgba(216, 167, 170, 0.4);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: var(--color-muted-brown);
  cursor: pointer;
  transition: var(--transition-fast);
  margin-bottom: 24px;
}
.btn-top:hover {
  background: var(--color-blush);
  border-color: var(--color-dusty-rose);
  color: var(--color-deep-text);
}
.footer-note {
  font-family: var(--font-handwriting);
  font-size: 1.15rem;
  color: var(--color-muted-light);
}

/* --------------------------------------------------------------------------
   10. LIGHTBOX MODAL
   -------------------------------------------------------------------------- */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.lightbox-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(81, 65, 63, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
  padding: 20px;
}

.lightbox-polaroid {
  background: var(--color-card-bg);
  padding: 18px 18px 28px;
  border-radius: var(--radius-sm);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  max-width: 480px;
  width: 100%;
  position: relative;
  transform: scale(0.94);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox-modal.is-active .lightbox-polaroid {
  transform: scale(1);
}

.lightbox-photo-wrap {
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #F3ECE6;
}
.lightbox-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox-caption-area {
  margin-top: 18px;
  text-align: center;
}
.lightbox-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-style: italic;
  color: var(--color-deep-text);
  margin-bottom: 6px;
}
.lightbox-caption {
  font-family: var(--font-handwriting);
  font-size: 1.4rem;
  color: var(--color-dusty-rose);
  line-height: 1.35;
  margin-bottom: 8px;
}
.lightbox-date {
  font-size: 0.75rem;
  color: var(--color-muted-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: #FFFDFC;
  cursor: pointer;
  padding: 6px;
  transition: transform 0.2s ease;
}
.lightbox-close:hover {
  transform: scale(1.15);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 252, 249, 0.85);
  border: 1px solid var(--color-dusty-rose);
  color: var(--color-deep-text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 5;
}
.lightbox-nav:hover {
  background: var(--color-dusty-rose);
  color: #FFFDFC;
  transform: translateY(-50%) scale(1.08);
}
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

/* --------------------------------------------------------------------------
   11. SCROLL REVEAL ANIMATIONS
   -------------------------------------------------------------------------- */
.reveal-item {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   12. RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .scrapbook-col-4,
  .scrapbook-col-5,
  .scrapbook-col-6,
  .scrapbook-col-7 {
    grid-column: span 6;
  }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }

  .scrapbook-canvas {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 10px 0;
  }
  .scrapbook-col-4,
  .scrapbook-col-5,
  .scrapbook-col-6,
  .scrapbook-col-7 {
    grid-column: 1 / -1;
  }
  .offset-top-sm,
  .offset-top-md,
  .offset-top-lg {
    margin-top: 0;
  }

  /* Keep mobile polaroid rotation very subtle to avoid overflowing */
  .polaroid-card {
    max-width: 380px;
    margin: 0 auto;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .music-player {
    bottom: 16px;
    right: 16px;
  }

  .letter-sheet {
    padding: 36px 20px 32px;
  }
  .letter-stamp {
    position: static;
    margin-bottom: 20px;
    justify-content: flex-end;
  }

  .classroom-card {
    padding: 40px 20px;
  }
  .final-card {
    padding: 44px 20px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 3.2rem;
  }
  .envelope-wrapper {
    width: 160px;
  }
  .envelope {
    width: 160px;
    height: 105px;
  }
  .letter-preview {
    width: 140px;
    height: 85px;
    bottom: 4px;
    left: 10px;
  }
  .preview-line {
    font-size: 0.82rem;
  }
  .envelope-pocket {
    border-width: 0 80px 60px 80px;
  }
  .envelope-flap {
    border-width: 62px 80px 0 80px;
  }
  .envelope-seal {
    top: 45px;
    width: 30px;
    height: 30px;
  }
  .seal-icon {
    width: 14px;
    height: 14px;
  }
}

/* --------------------------------------------------------------------------
   13. ACCESSIBILITY: PREFERS-REDUCED-MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .petals-canvas {
    display: none !important;
  }
  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
  }
  .polaroid-card {
    transform: none !important;
  }
}
