/* =========================================
   Little Sunshine Preschool – Under Construction
   style.css
   ========================================= */

:root {
  --color-primary: #498dc8;
  --color-primary-dark: #377ab8;
  --color-secondary: #fcbc08;
  --color-secondary-dark: #e0a500;
  --color-pink: #F687B3;
  --color-green: #48BB78;
  --color-bg-loader: linear-gradient(135deg, #FFFDF0 0%, #E8F5FF 100%);
  --font-main: 'Nunito', sans-serif;
}

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

html,
body {
  height: 100%;
  width: 100%;
  overflow-y: visible;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: #ffffff;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* =========================================
   PREMIUM LOADER SCREEN
   ========================================= */
/* =========================================
   PREMIUM LOADER SCREEN
   ========================================= */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg-loader);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s cubic-bezier(0.55, 0, 0.1, 1), visibility 0.6s;
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.loader-overlay.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
}

/* External Sun SVG Animation Styles */
.lss {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lsb {
  opacity: 0;
  transform: scaleY(0);
  transform-origin: 100px 85px;
  transform-box: view-box;
}

.lss.on .lsb {
  animation: lsBR 0.55s cubic-bezier(0.34, 1.3, 0.64, 1) 0.1s forwards;
}

@keyframes lsBR {
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.lsh {
  opacity: 0;
  transform: scaleX(0);
  transform-origin: 100px 88px;
  transform-box: view-box;
}

.lss.on .lsh {
  animation: lsHZ 0.4s ease-out 0.48s forwards;
}

@keyframes lsHZ {
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

.lsr {
  opacity: 0;
  transform: scale(0.05);
  transform-box: view-box;
}

.lss.on .lsr {
  animation: lsRO 0.38s cubic-bezier(0.34, 1.5, 0.64, 1) forwards;
}

@keyframes lsRO {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lse {
  opacity: 0;
  transform: scale(0);
  transform-box: fill-box;
  transform-origin: center;
}

.lss.on .lse {
  animation: lsEP 0.28s cubic-bezier(0.34, 1.7, 0.64, 1) forwards;
}

@keyframes lsEP {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lsm {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
}

.lss.on .lsm {
  animation: lsSD 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.9s forwards;
}

@keyframes lsSD {
  to {
    stroke-dashoffset: 0;
  }
}

/* Authentic Human-Crafted Loader Copy Styles */
.loader-text-group {
  align-self: flex-start;
  margin-top: 1px;
  /* adjust this value to move the loader text vertically */
  max-width: 480px;
  padding: 0 20px;
}

.loader-text-main {
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.45;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 1.1s forwards;
}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   ANIMATED BACKGROUND ELEMENTS
   ========================================= */

.background-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  /* Strictly behind everything */
  pointer-events: none;
}

/* Animated Bubbles floating gently */
.bubble {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: floatBubble 6s infinite ease-in-out;
}

/* Yellow bubbles with unique animation delays */
.bubble--yellow-lg {
  width: 160px;
  height: 160px;
  background: #FFF0A0;
  opacity: 0.75;
  top: -40px;
  left: -40px;
  animation-duration: 8s;
  animation-delay: 0s;
}

.bubble--yellow-sm {
  width: 70px;
  height: 70px;
  background: #FFF0A0;
  opacity: 0.6;
  top: 55%;
  left: 20px;
  animation-duration: 7s;
  animation-delay: -1s;
}

.bubble--yellow-md {
  width: 110px;
  height: 110px;
  background: #FFF0A0;
  opacity: 0.65;
  bottom: 120px;
  left: 60px;
  animation-duration: 9s;
  animation-delay: -4s;
}

.bubble--yellow-xs {
  width: 22px;
  height: 22px;
  background: #FFF0A0;
  opacity: 0.5;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  animation-duration: 8s;
  animation-delay: -2s;
}

/* Blue bubbles with unique animation delays */
.bubble--blue-lg {
  width: 130px;
  height: 130px;
  background: #D6E9F8;
  opacity: 0.7;
  top: 40px;
  right: -20px;
  animation-duration: 10s;
  animation-delay: -2s;
}

.bubble--blue-sm {
  width: 55px;
  height: 55px;
  background: #D6E9F8;
  opacity: 0.6;
  top: 35%;
  right: 40px;
  animation-duration: 9s;
  animation-delay: -3s;
}

.bubble--blue-xs {
  width: 40px;
  height: 40px;
  background: #D6E9F8;
  opacity: 0.5;
  top: 60%;
  right: 20px;
  animation-duration: 6s;
  animation-delay: -5s;
}

/* =========================================
   CUTE CHILD ELEMENTS (A, B, C, D, block, star)
   ========================================= */

.child-element {
  position: absolute;
  font-weight: 900;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  font-family: var(--font-main);
  animation: floatLetters 6s infinite ease-in-out;
}

.element-a {
  font-size: 80px;
  color: #fcbc08;
  top: 15%;
  left: 15%;
  --rot: -15deg;
  transform: rotate(var(--rot));
  animation-delay: 0s;
  animation-duration: 6s;
}

.element-b {
  font-size: 60px;
  color: #498dc8;
  top: 20%;
  right: 20%;
  --rot: 10deg;
  transform: rotate(var(--rot));
  animation-delay: -1.5s;
  animation-duration: 7s;
}

.element-c {
  font-size: 70px;
  color: #F687B3;
  bottom: 25%;
  left: 25%;
  --rot: 20deg;
  transform: rotate(var(--rot));
  animation-delay: -3s;
  animation-duration: 8s;
}

.element-d {
  font-size: 90px;
  color: #48BB78;
  bottom: 30%;
  right: 15%;
  --rot: -10deg;
  transform: rotate(var(--rot));
  animation-delay: -4.5s;
  animation-duration: 6.5s;
}

.element-block {
  width: 50px;
  height: 50px;
  background: #fcbc08;
  border-radius: 8px;
  top: 45%;
  left: 10%;
  --rot: 45deg;
  transform: rotate(var(--rot));
  opacity: 0.2;
  animation: floatLetters 8s infinite ease-in-out;
}

.element-star {
  font-size: 40px;
  color: #fcbc08;
  top: 10%;
  right: 10%;
  animation: starPulse 3s infinite ease-in-out;
}

/* =========================================
   FLOATING CLOUDS
   ========================================= */
.cloud {
  position: absolute;
  fill: #fff;
  opacity: 0.25;
  z-index: -1;
  pointer-events: none;
}

.cloud svg {
  width: 120px;
  height: auto;
}

.cloud-1 {
  top: 15%;
  left: -150px;
  animation: floatCloudRight 50s infinite linear;
}

.cloud-2 {
  top: 45%;
  right: -150px;
  animation: floatCloudLeft 60s infinite linear;
}

/* =========================================
   MAIN CONTENT & STAGGERED ANIMATIONS
   ========================================= */

main.main {
  position: relative;
  z-index: 10;
  flex: 1;
  /* Pushes footer to the bottom */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* Staggered on-load transitions */
.animate-on-load {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 1.1s cubic-bezier(0.175, 0.885, 0.32, 1.2),
    transform 1.1s cubic-bezier(0.175, 0.885, 0.32, 1.2);
  will-change: transform, opacity;
}

.animate-on-load.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition-delay: var(--anim-delay, 0s);
}

.logo-card {
  margin-top: 10px;
  margin-bottom: 50px;
  display: inline-flex;
}

.logo-img {
  max-width: 250px;
  height: auto;
  animation: gentleLogoPulse 5s infinite ease-in-out;
}

.heading {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 16px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.description {
  font-size: 1.1rem;
  font-weight: 700;
  color: #4A5568;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* =========================================
   LAUNCHING MESSAGE
   ========================================= */

.launching-container {
  margin-top: 40px;
  margin-bottom: 30px;
}

.launching-text {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: softPulse 2.5s infinite ease-in-out;
}

/* =========================================
   CONTACT INFO & INTERACTIVE BUTTONS
   ========================================= */

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  font-family: var(--font-main);
  gap: 10px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

/* SVG icons scaling on button hover */
.btn svg {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn:hover svg {
  transform: scale(1.2) rotate(-8deg);
}

.btn:hover {
  transform: translateY(-4px);
}

.btn:active {
  transform: translateY(-1px);
}

.btn--email {
  background-color: var(--color-primary);
  color: white;
}

.btn--email:hover {
  background-color: var(--color-primary-dark);
  box-shadow: 0 8px 24px rgba(73, 141, 200, 0.35);
}

.btn--phone {
  background-color: var(--color-secondary);
  color: white;
}

.btn--phone:hover {
  background-color: var(--color-secondary-dark);
  box-shadow: 0 8px 24px rgba(252, 188, 8, 0.35);
}

@media (max-width: 768px) {
  .contact-buttons {
    flex-direction: column;
    width: calc(100% - 40px);
    max-width: 340px;
    margin: 20px auto 0 auto;
    align-items: stretch;
    gap: 15px;
  }

  .btn {
    font-size: 0.85rem;
    padding: 12px 16px;
    border-radius: 50px;
    justify-content: center;
    /* Allow wrapping — but only at the space between label and email */
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    text-align: center;
    /* Stack icon + text as a column so label and email sit on separate lines */
    flex-direction: column;
    gap: 2px;
    line-height: 1.4;
  }

  /* Keep SVG icon above the text, centered */
  .btn svg {
    margin-bottom: 2px;
  }
}

/* Safety harness for extremely narrow viewports (e.g. iPhone SE at 320px) */
@media (max-width: 375px) {
  .heading {
    font-size: 1.65rem;
  }

  .description {
    font-size: 0.95rem;
  }

  .launching-text {
    font-size: 1.6rem;
  }

  .logo-img {
    max-width: 180px;
  }

  .contact-buttons {
    width: calc(100% - 32px);
    max-width: 300px;
  }

  .btn {
    font-size: 0.82rem;
    padding: 11px 12px;
  }
}

/* =========================================
   WAVY SEPARATOR & FOOTER
   ========================================= */

.wave-wrapper {
  width: 100%;
  line-height: 0;
  z-index: 5;
  margin-top: auto;
  /* Pushes wave/footer to very bottom */
}

.wave-svg {
  width: 100%;
  height: 40px;
  display: block;
}

.footer {
  width: 100%;
  background-color: var(--color-primary);
  padding: 14px 20px;
  text-align: center;
  z-index: 5;
}

.footer-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

/* =========================================
   KEYFRAME ANIMATIONS
   ========================================= */

@keyframes sunFloat {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-10px) scale(1.05);
  }
}

@keyframes spinRays {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes textPulse {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(0.97);
  }

  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes floatBubble {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

@keyframes floatLetters {

  0%,
  100% {
    transform: translateY(0) rotate(var(--rot, 0deg));
  }

  50% {
    transform: translateY(-15px) rotate(calc(var(--rot, 0deg) + 5deg));
  }
}

@keyframes starPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.3;
  }

  50% {
    transform: scale(1.25);
    opacity: 0.65;
  }
}

@keyframes floatCloudRight {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(100vw + 300px));
  }
}

@keyframes floatCloudLeft {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-100vw - 300px));
  }
}

@keyframes softPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.04);
    opacity: 0.85;
  }
}

@keyframes gentleLogoPulse {

  0%,
  100% {
    transform: scale(1) translateY(0);
  }

  50% {
    transform: scale(1.02) translateY(-6px);
  }
}

/* =========================================
   RESPONSIVE LAYOUTS
   ========================================= */

@media (max-width: 768px) {

  html,
  body {
    overflow-y: auto;
    /* Fallback for small screens */
  }

  .heading {
    font-size: 2rem;
  }

  .logo-card {
    padding: 10px;
    margin-bottom: 25px;
  }

  /* Hide letter decorative elements on small viewports for legibility */
  .element-a,
  .element-b,
  .element-c,
  .element-d,
  .element-block {
    display: none !important;
  }

  .bubble {
    opacity: 0.15;
  }
}