/* ═══════════════════════════════════════
   CRESCENT SCHOOL — STYLESHEET
   Sections:
   1. Reset & Variables
   2. Base (body, nav, footer)
   3. Scroll Reveal
   4. Home — Hero
   5. Home — Teal Body
   6. Home — Carousel
   7. Home — Video
   8. About
   9. About — Slideshow
   10. Gallery Main
   11. Gallery — Album Grid
   12. Lightbox Overlay
   13. Contact
   14. Floating Instagram Button
═══════════════════════════════════════ */


/* ─── 1. RESET & VARIABLES ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --yellow:    #FFD600;
  --coral:     #E8604C;
  --teal:      #00BCD4;
  --dark-gray: #555;
  --mid-gray:  #888;
  --light-bg:  #f2f2f2;
  --white:     #fff;
  --text:      #444;
}


/* ─── 2. BASE ─── */
body { font-family: 'Poppins', sans-serif; background: var(--light-bg); color: var(--text); }

.page        { display: none; }
.page.active { display: block; }

nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-top: 7px solid var(--yellow);
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.nav-logo         { cursor: pointer; }
.nav-logo svg     { height: 52px; }
.nav-links        { display: flex; gap: 40px; }
.nav-links a {
  font-family: 'Poppins', sans-serif; font-weight: 400; font-size: .95rem;
  color: var(--text); text-decoration: none; cursor: pointer;
  transition: color .2s; letter-spacing: .03em;
}
.nav-links a:hover,
.nav-links a.active { color: var(--coral); }

footer {
  background: var(--teal); text-align: center; padding: 18px;
  font-family: 'Poppins', sans-serif; font-size: .85rem;
  color: var(--white); letter-spacing: .02em;
}


/* ─── 3. SCROLL REVEAL ─── */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible   { opacity: 1; transform: translateY(0); }
.reveal-delay-1   { transition-delay: 0.12s; }
.reveal-delay-2   { transition-delay: 0.24s; }
.reveal-delay-3   { transition-delay: 0.36s; }


/* ─── 4. HOME — HERO ─── */
.home-hero {
  position: relative; height: 95vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  overflow: hidden; text-align: center; padding-bottom: 10%;
}
.splash { position: absolute; pointer-events: none; }

.splash-top-right  { width: 220px; height: auto; top: 10px; right: 10%; }
.splash-bottom-left{ width: 260px; height: auto; bottom: 70px; left: 10%; }

.hero-title-wrap { position: relative; display: inline-block; padding: 70px 100px; z-index: 2; }

.splash-top-left {
  width: 90px; height: auto;
  bottom: calc(100% - 70px); left: -10px; z-index: 2;
}
.splash-bottom-right {
  width: 90px; height: auto;
  top: calc(100% - 70px); right: -10px;
  transform: scale(-1, -1); transform-origin: center; z-index: 2;
}

.hero-title { position: relative; z-index: 1; }
.hero-title .crescent {
  font-size: clamp(3rem, 9vw, 6rem); font-weight: 900;
  color: var(--coral); display: block; letter-spacing: .04em;
}
.hero-title .sub {
  font-size: clamp(1.6rem, 4.5vw, 3rem); font-weight: 300;
  color: var(--dark-gray); display: block; letter-spacing: .08em;
}

.brushstroke-divider {
  position: absolute; bottom: 0; left: 0;
  width: 100%; height: 60px;
  display: block; object-fit: fill; z-index: 1;
}


/* ─── 5. HOME — TEAL BODY ─── */
.home-teal-body { background: var(--teal); padding: 28px 48px 40px; }
.home-teal-body p { font-size: 1rem; line-height: 1.7; color: var(--white); max-width: 1000px; margin: 0 auto; }


/* ─── 6. HOME — CAROUSEL ─── */
.home-carousel-section { background: var(--yellow); padding: 40px 0; overflow: hidden; }
.carousel-track-wrap   { overflow: hidden; width: 100%; }

@keyframes carousel-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.carousel-track {
  display: flex; width: max-content;
  animation: carousel-scroll 24s linear infinite;
}
.carousel-track:hover { animation-play-state: paused; }
.carousel-slide       { flex-shrink: 0; width: 220px; padding: 8px 12px; }

.reel-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 3/4;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  border-radius: 12px; text-decoration: none; cursor: pointer;
  transition: transform .2s, opacity .2s; position: relative; overflow: hidden;
}
.reel-card::before { content: ''; position: absolute; inset: 0; border-radius: 12px; transition: background .2s; }
.reel-card:hover::before { background: rgba(0,0,0,.4); }
.reel-card:hover          { transform: scale(1.04); }
.reel-play {
  position: relative; z-index: 1;
  width: 56px; height: 56px;
  background: rgba(255,255,255,.3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff; backdrop-filter: blur(4px);
}


/* ─── 7. HOME — VIDEO ─── */
.home-video-section { display: flex; justify-content: center; padding-bottom: 40px; }
.video-frame-wrap {
  position: relative;
  background-image: url('media-border.svg'); background-size: 100% 100%; background-repeat: no-repeat;
  padding: 25px; width: 100%; max-width: 1080px;
}
.video-placeholder { position: relative; z-index: 1; background: var(--dark-gray); border-radius: 3px; aspect-ratio: 16/9; width: 100%; }


/* ─── 8. ABOUT ─── */
.about-content {
  padding: 60px 48px; display: grid; grid-template-columns: 1fr 1.3fr;
  gap: 48px; align-items: start; max-width: 960px; margin: 0 auto;
}
.about-photo {
  background: var(--dark-gray); border-radius: 6px; aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 1.4rem; font-weight: 300;
}
.about-text   { padding-top: 8px; }
.about-text p { font-size: 1rem; line-height: 1.8; color: var(--text); }


/* ─── 9. ABOUT — SLIDESHOW ─── */
.about-video-section { padding: 40px 48px 70px; display: flex; justify-content: center; }
.about-slideshow {
  position: relative; width: 100%; max-width: 820px; aspect-ratio: 16/9;
  border-radius: 6px; overflow: hidden;
  background-image: url('media-border.svg'); background-size: 100% 100%; background-repeat: no-repeat;
}
.about-slideshow .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease; padding: 25px; }
.about-slideshow .slide.active { opacity: 1; }
.about-slideshow .slide img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; display: block; }

.slide-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.slide-dot  { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: background .2s; border: none; }
.slide-dot.active { background: var(--white); }

.slide-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.2); border: none; color: #fff;
  font-size: 2rem; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10; transition: background .2s; backdrop-filter: blur(4px);
}
.slide-nav:hover { background: rgba(255,255,255,.4); }
.slide-nav.prev  { left: 18px; }
.slide-nav.next  { right: 18px; }


/* ─── 10. GALLERY MAIN ─── */
#page-gallery.active { display: flex; flex-direction: column; min-height: calc(100vh - 79px); }

.gallery-main-content {
  padding: 60px 4%;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4%; margin: 0 auto;
}

.album-card { width: 250px; cursor: pointer; text-align: center; transition: transform .2s; }
.album-card:hover { transform: scale(1.03); }

.album-cover-wrap { position: relative; width: 100%; aspect-ratio: 4/3; margin-bottom: 20px; }

.stack-img { position: absolute; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; transition: transform 0.25s ease; }
.stack-img.back  { top: 10px; left: -10px; transform: rotate(-3deg); z-index: 0; box-shadow: 0 10px 20px rgba(0,0,0,0.25); }
.stack-img.mid   { top: 10px; left:  14px; transform: rotate(3deg);  z-index: 1; box-shadow: 0  8px 16px rgba(0,0,0,0.22); }
.stack-img.front { top:  0;   left:   0;   transform: rotate(-1deg); z-index: 2; box-shadow: 0 14px 30px rgba(0,0,0,0.3);  }

.album-card:hover .back  { transform: rotate(-5deg); }
.album-card:hover .mid   { transform: rotate(4deg); }
.album-card:hover .front { transform: translateY(-4px); }

.album-label { font-family: 'Poppins', sans-serif; font-size: 1rem; color: var(--dark-gray); font-weight: 400; margin-top: 8px; }


/* ─── 11. GALLERY — ALBUM GRID ─── */
.album-grid-content { background: var(--light-bg); padding: 48px; }
.album-grid-content .back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Poppins', sans-serif; font-size: .88rem; color: var(--mid-gray);
  cursor: pointer; margin-bottom: 28px; border: none; background: none; transition: color .2s;
}
.album-grid-content .back-btn:hover { color: var(--coral); }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 860px; margin: 0 auto; }
.photo-thumb {
  background: var(--dark-gray); border-radius: 4px; aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 1rem; font-weight: 300;
  cursor: pointer; transition: opacity .2s; overflow: hidden; width: 100%;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb:hover { opacity: .85; }


/* ─── 12. LIGHTBOX OVERLAY ─── */
.lightbox-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center;
  pointer-events: none;
}
.lightbox-overlay.open { display: flex; pointer-events: all; }
.lightbox-overlay img  { max-width: 88vw; max-height: 85vh; border-radius: 4px; object-fit: contain; user-select: none; }

.lb-close {
  position: fixed; top: 20px; right: 24px;
  background: none; border: none; color: #fff; font-size: 2.4rem; line-height: 1;
  cursor: pointer; opacity: .8; transition: opacity .2s; z-index: 1001;
}
.lb-close:hover { opacity: 1; }

.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); border: none; color: var(--white);
  font-size: 2.6rem; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: .8; transition: opacity .2s, background .2s; z-index: 1001;
}
.lb-nav:hover { opacity: 1; background: rgba(255,255,255,.28); }
.lb-nav.prev  { left: 16px; }
.lb-nav.next  { right: 16px; }


/* ─── 13. CONTACT ─── */
.contact-content { padding: 70px 48px; max-width: 680px; margin: 0 auto; }
.contact-content h2 { font-family: 'Poppins', sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--coral); margin-bottom: 8px; }
.contact-intro { font-size: 1rem; line-height: 1.8; color: var(--text); margin-bottom: 36px; }
.contact-form  { display: flex; flex-direction: column; gap: 18px; }
.form-row      { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field    { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-family: 'Poppins', sans-serif; font-size: .8rem; font-weight: 700; color: var(--dark-gray); letter-spacing: .05em; text-transform: uppercase; }
.form-field input,
.form-field textarea { border: 2px solid #ddd; border-radius: 4px; padding: 10px 14px; font-family: 'Poppins', sans-serif; font-size: .95rem; color: var(--text); outline: none; transition: border-color .2s; background: var(--white); }
.form-field input:focus,
.form-field textarea:focus { border-color: var(--coral); }
.form-field textarea { resize: vertical; min-height: 110px; }
.submit-btn {
  align-self: flex-start; background: var(--coral); color: var(--white);
  border: none; border-radius: 4px; padding: 12px 36px;
  font-family: 'Poppins', sans-serif; font-size: .95rem; font-weight: 700;
  letter-spacing: .05em; cursor: pointer; transition: background .2s, transform .1s;
}
.submit-btn:hover  { background: #d44f3b; }
.submit-btn:active { transform: scale(.97); }


/* ─── 14. FLOATING INSTAGRAM BUTTON ─── */
.float-instagram {
  position: fixed; bottom: 28px; right: 28px;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.25); z-index: 1002;
  transition: transform .2s, box-shadow .2s;
}
.float-instagram:hover { transform: scale(1.12); box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.float-instagram svg   { width: 26px; height: 26px; fill: #fff; }
