/* ============================================
   Child Learning Resources - Main Stylesheet
   ============================================ */

/* -----------------
   CSS Variables
   ----------------- */
:root {
  --color-cream: #FFF8F0;
  --color-peach: #FFCDB2;
  --color-coral: #FF8A6C;
  --color-teal: #2EC4B6;
  --color-teal-dark: #1A9E92;
  --color-navy: #1D3557;
  --color-sky: #A8DADC;
  --color-sunshine: #FFD166;
  --color-sunshine-dark: #E5B84A;
  --font-display: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

/* -----------------
   Reset & Base
   ----------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: var(--color-cream);
  color: var(--color-navy);
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height for mobile */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -----------------
   Background Shapes
   ----------------- */
.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float 20s ease-in-out infinite;
  will-change: transform;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: var(--color-teal);
  top: -100px;
  right: -50px;
  animation-delay: 0s;
}

.shape-2 {
  width: 200px;
  height: 200px;
  background: var(--color-coral);
  bottom: 10%;
  left: -80px;
  animation-delay: -5s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  background: var(--color-sunshine);
  top: 40%;
  right: 5%;
  animation-delay: -10s;
}

.shape-4 {
  width: 250px;
  height: 250px;
  background: var(--color-sky);
  bottom: -80px;
  right: 20%;
  animation-delay: -15s;
}

.shape-5 {
  width: 120px;
  height: 120px;
  background: var(--color-peach);
  top: 20%;
  left: 10%;
  animation-delay: -8s;
}

/* -----------------
   Animations
   ----------------- */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  25% { transform: translateY(-20px) rotate(5deg) scale(1.02); }
  50% { transform: translateY(10px) rotate(-3deg) scale(0.98); }
  75% { transform: translateY(-15px) rotate(2deg) scale(1.01); }
}

@keyframes pop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* -----------------
   Main Container
   ----------------- */
.container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* -----------------
   Logo Area
   ----------------- */
.logo-area {
  margin-bottom: 20px;
  animation: fadeInDown 0.8s ease-out;
}

.logo-icon {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.logo-block {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  animation: pop 0.5s ease-out backwards;
}

.logo-block:nth-child(1) { background: var(--color-coral); animation-delay: 0.2s; }
.logo-block:nth-child(2) { background: var(--color-teal); animation-delay: 0.3s; }
.logo-block:nth-child(3) { background: var(--color-sunshine); animation-delay: 0.4s; }
.logo-block:nth-child(4) { background: var(--color-sky); animation-delay: 0.5s; }

/* -----------------
   Typography
   ----------------- */
h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.1;
  margin-bottom: 8px;
  animation: fadeInDown 0.8s ease-out 0.2s backwards;
}

.tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 500;
  color: var(--color-teal-dark);
  margin-bottom: 32px;
  animation: fadeInDown 0.8s ease-out 0.3s backwards;
}

.description {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--color-navy);
  max-width: 600px;
  margin-bottom: 48px;
  opacity: 0.85;
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

/* -----------------
   Survey Section
   ----------------- */
.survey-section {
  width: 100%;
  max-width: 560px;
  animation: fadeInUp 0.8s ease-out 0.5s backwards;
}

.survey-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-coral);
  margin-bottom: 20px;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* -----------------
   Survey Buttons
   ----------------- */
.survey-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 32px;
  border: none;
  border-radius: 16px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.survey-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.survey-btn:hover::before,
.survey-btn:focus::before {
  left: 100%;
}

.survey-btn:focus {
  outline: 3px solid var(--color-navy);
  outline-offset: 3px;
}

.survey-btn-families {
  background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-teal-dark) 100%);
  color: white;
  box-shadow: 0 8px 24px rgba(46, 196, 182, 0.35);
}

.survey-btn-families:hover,
.survey-btn-families:focus {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(46, 196, 182, 0.45);
}

.survey-btn-families:active {
  transform: translateY(-1px) scale(1.01);
}

.survey-btn-businesses {
  background: linear-gradient(135deg, var(--color-sunshine) 0%, var(--color-sunshine-dark) 100%);
  color: var(--color-navy);
  box-shadow: 0 8px 24px rgba(255, 209, 102, 0.35);
}

.survey-btn-businesses:hover,
.survey-btn-businesses:focus {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(255, 209, 102, 0.45);
}

.survey-btn-businesses:active {
  transform: translateY(-1px) scale(1.01);
}

.btn-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.btn-title {
  line-height: 1.2;
}

.btn-subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.8;
  font-family: var(--font-body);
}

/* -----------------
   Footer Info
   ----------------- */
.footer-info {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 2px dashed var(--color-peach);
  animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.footer-text {
  font-size: 0.95rem;
  color: var(--color-navy);
  opacity: 0.7;
  line-height: 1.6;
}

.footer-text strong {
  color: var(--color-teal-dark);
  font-weight: 600;
}

.location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-coral);
}

/* -----------------
   Contact Section
   ----------------- */
.contact-section {
  margin-top: 40px;
  animation: fadeInUp 0.8s ease-out 0.7s backwards;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  border: 2px solid var(--color-navy);
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: none;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.contact-btn:hover,
.contact-btn:focus {
  background: var(--color-navy);
  color: var(--color-cream);
  transform: translateY(-2px);
}

.contact-btn:focus {
  outline: 3px solid var(--color-teal);
  outline-offset: 3px;
}

.contact-btn:active {
  transform: translateY(0);
}

.contact-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--color-navy);
  opacity: 0.6;
  line-height: 1.5;
}

/* -----------------
   Responsive: Small Mobile (up to 480px)
   ----------------- */
@media (max-width: 480px) {
  .container {
    padding: 32px 20px;
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  }

  .survey-btn {
    padding: 18px 24px;
    font-size: 1.1rem;
  }

  .description {
    font-size: 1.05rem;
  }

  .shape-1 { width: 200px; height: 200px; }
  .shape-2 { width: 150px; height: 150px; }
  .shape-3 { width: 100px; height: 100px; }
  .shape-4 { width: 180px; height: 180px; }
  .shape-5 { width: 80px; height: 80px; }
}

/* -----------------
   Responsive: Tablet and up (600px+)
   ----------------- */
@media (min-width: 600px) {
  .button-group {
    flex-direction: row;
    gap: 20px;
  }

  .survey-btn {
    flex: 1;
    padding: 28px 24px;
  }
}

/* -----------------
   Responsive: Tablet landscape and small desktop (768px+)
   ----------------- */
@media (min-width: 768px) {
  .container {
    padding: 60px 40px;
  }

  .logo-block {
    width: 22px;
    height: 22px;
  }

  .description {
    font-size: 1.2rem;
  }

  .footer-info {
    margin-top: 72px;
  }
}

/* -----------------
   Responsive: Desktop (1024px+)
   ----------------- */
@media (min-width: 1024px) {
  .container {
    padding: 80px 40px;
  }

  .survey-section {
    max-width: 620px;
  }

  .survey-btn {
    padding: 32px 32px;
    font-size: 1.25rem;
  }

  .btn-icon {
    font-size: 1.6rem;
  }
}

/* -----------------
   Responsive: Large desktop (1200px+)
   ----------------- */
@media (min-width: 1200px) {
  .shape-1 { width: 400px; height: 400px; }
  .shape-2 { width: 280px; height: 280px; }
  .shape-3 { width: 200px; height: 200px; }
  .shape-4 { width: 320px; height: 320px; }
  .shape-5 { width: 160px; height: 160px; }
}

/* -----------------
   High contrast mode support
   ----------------- */
@media (prefers-contrast: high) {
  .survey-btn {
    border: 2px solid currentColor;
  }
  
  .shape {
    opacity: 0.08;
  }
}

/* -----------------
   Dark mode support (future-proofing)
   ----------------- */
@media (prefers-color-scheme: dark) {
  /* 
   * Uncomment below to enable dark mode in the future:
   *
   * :root {
   *   --color-cream: #1a1a2e;
   *   --color-navy: #eaeaea;
   * }
   */
}
