/* ==========================================================================
   Reneva Learning Co. - Custom Editorial & Mobile-First Stylesheet
   Designed for Renee Powell - https://renevalearning.net
   Color Palette:
     Deep Navy: #1B2253 (text, headings, footer, nav)
     Hot Pink:  #F0357F (primary buttons, key accents, links - action only)
     Blush:     #FCE4EC (tutoring sections)
     Baby Blue: #DDEEFB (babysitting sections)
     Cream:     #FAF6F0 (main page background)
     Mint:      #DFF5E1 (accent tag)
     Butter:    #FFF1C9 (accent highlight)
     Gold:      #E0A93B (ratings / accents)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Nunito:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Pacifico&family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;0,900;1,400;1,600&display=swap');

:root {
  --navy: #1B2253;
  --navy-light: #2A3370;
  --navy-dark: #12173B;
  --navy-soft: #384280;
  --pink: #F0357F;
  --pink-hover: #D82269;
  --pink-light: #FDEDF3;
  --blush: #FCE4EC;
  --blush-dark: #F8BBD0;
  --baby-blue: #DDEEFB;
  --baby-blue-dark: #B9DCF7;
  --cream: #FAF6F0;
  --cream-card: #FFFFFF;
  --mint: #DFF5E1;
  --butter: #FFF1C9;
  --gold: #E0A93B;
  --border-subtle: #E8E2D8;
  --text-muted: #535C7A;
  
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
  --font-script: 'Pacifico', 'Caveat', cursive;
  --font-accent-script: 'Caveat', cursive;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.625; /* body 16/26 on mobile */
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Hierarchy strictly following design rules */
h1, .h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy);
  font-size: 2.25rem; /* 36px on mobile */
  line-height: 1.16;   /* 42px on mobile */
  letter-spacing: -0.025em;
  margin-top: 0;
  margin-bottom: 1rem;
}

h2, .h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy);
  font-size: 1.75rem; /* 28px on mobile */
  line-height: 1.21;   /* 34px on mobile */
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

h3, .h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--navy);
  font-size: 1.375rem; /* 22px on mobile */
  line-height: 1.27;   /* 28px on mobile */
  letter-spacing: -0.015em;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

h4, .h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--navy);
  font-size: 1.125rem;
  line-height: 1.35;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  h1, .h1 {
    font-size: 3rem;
    line-height: 1.15;
  }
  h2, .h2 {
    font-size: 2.25rem;
    line-height: 1.18;
  }
  h3, .h3 {
    font-size: 1.5rem;
    line-height: 1.25;
  }
}

@media (min-width: 1024px) {
  h1, .h1 {
    font-size: 4rem;    /* 64px on desktop */
    line-height: 1.09;   /* 70px on desktop */
  }
  h2, .h2 {
    font-size: 2.75rem; /* 44px on desktop */
    line-height: 1.18;   /* 52px on desktop */
  }
  h3, .h3 {
    font-size: 1.75rem; /* 28px on desktop */
    line-height: 1.28;   /* 36px on desktop */
  }
  body {
    font-size: 1.125rem; /* 18px on desktop */
    line-height: 1.66;    /* 30px on desktop */
  }
}

p {
  max-width: 65ch; /* max line length ~65 characters */
  margin-top: 0;
  margin-bottom: 1.25rem;
}

/* Script Typography Rules: Only 1-3 words per page */
.font-script {
  font-family: var(--font-script);
}

.font-accent-script {
  font-family: var(--font-accent-script);
}

.script-eyebrow {
  font-family: var(--font-accent-script);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pink);
  display: inline-block;
  letter-spacing: 0.02em;
}

/* Touch targets: min 48x48px */
.touch-target {
  min-height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Buttons System */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--pink);
  color: #FFFFFF !important;
  font-family: var(--font-body);
  font-size: 1rem; /* 16px */
  font-weight: 700;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(240, 53, 127, 0.25);
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: var(--pink-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(240, 53, 127, 0.35);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(240, 53, 127, 0.2);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

.btn-primary:disabled,
.btn-primary[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: transparent;
  color: var(--navy) !important;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  border: 2px solid var(--navy);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-secondary:hover {
  background-color: var(--navy);
  color: #FFFFFF !important;
}

.btn-secondary:active {
  background-color: var(--navy-dark);
  color: #FFFFFF !important;
  transform: translateY(1px);
}

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

.btn-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  position: relative;
  transition: all 0.2s ease;
  padding: 0.5rem 0;
  min-height: 48px;
}

.btn-link-arrow .arrow-icon {
  transition: transform 0.2s ease;
}

.btn-link-arrow:hover {
  color: var(--pink);
}

.btn-link-arrow:hover .arrow-icon {
  transform: translateX(4px);
}

/* Hand-drawn SVG Highlights & Underlines */
.brush-highlight {
  position: relative;
  display: inline-block;
  z-index: 1;
  white-space: nowrap;
}

.brush-highlight::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 4px;
  height: 40%;
  background: var(--butter);
  z-index: -1;
  border-radius: 4px;
  transform: rotate(-1deg) skewX(-2deg);
  opacity: 0.85;
}

.brush-highlight-pink::before {
  background: #FFE3EE;
  bottom: 2px;
  height: 45%;
}

.hand-drawn-underline {
  position: relative;
  display: inline-block;
}

.hand-drawn-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 20 2, 45 10, 98 4' stroke='%23F0357F' stroke-width='3.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* Organic Hand-Drawn Badge */
.brush-badge {
  background-color: #FFFFFF;
  border: 2px dashed #F0357F;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(240, 53, 127, 0.15);
  position: relative;
  transform: rotate(-2deg);
  transition: transform 0.3s ease;
}

.brush-badge:hover {
  transform: rotate(0deg) scale(1.02);
}

/* Layout Panels */
.panel-tutoring {
  background-color: var(--blush);
  border-radius: 20px;
  border: 1px solid rgba(240, 53, 127, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.panel-babysitting {
  background-color: var(--baby-blue);
  border-radius: 20px;
  border: 1px solid rgba(27, 34, 83, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.panel-tutoring:hover,
.panel-babysitting:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(27, 34, 83, 0.08);
}

/* Sticky Bottom Action Bar for Mobile */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  padding: 10px 16px;
  z-index: 90;
  display: flex;
  gap: 10px;
  box-shadow: 0 -4px 20px rgba(27, 34, 83, 0.08);
}

@media (min-width: 768px) {
  .mobile-bottom-bar {
    display: none !important;
  }
}

/* Horizontal Swipe Scroller for Mobile with Peek */
.mobile-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 16px;
  padding-bottom: 8px;
  padding-right: 24px; /* Peek of next card */
}

.mobile-carousel::-webkit-scrollbar {
  display: none;
}

.carousel-card {
  flex: 0 0 85%;
  max-width: 320px;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .mobile-carousel {
    display: grid;
    overflow-x: visible;
    padding-right: 0;
  }
  .carousel-card {
    flex: unset;
    max-width: unset;
  }
}

/* Full-Screen Mobile Navigation Overlay - Solid Deep Navy (#1B2253) */
.mobile-nav-overlay {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background-color: #1B2253 !important;
  color: #FFFFFF !important;
  z-index: 99999 !important;
  padding: 20px 20px 28px 20px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box !important;
}

.mobile-nav-overlay.is-open {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  animation: mobileMenuSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.nav-link-mobile {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 12px 14px !important;
  margin-bottom: 4px !important;
  border-radius: 12px !important;
  background-color: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  font-family: var(--font-heading) !important;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.nav-link-mobile:hover,
.nav-link-mobile:active {
  background-color: rgba(240, 53, 127, 0.16) !important;
  border-color: rgba(240, 53, 127, 0.4) !important;
  color: #FFFFFF !important;
  transform: translateX(4px) !important;
}

.nav-link-mobile.active,
.nav-link-mobile[aria-current="page"] {
  background-color: rgba(240, 53, 127, 0.2) !important;
  border-color: #F0357F !important;
  border-left: 4px solid #F0357F !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
}

.nav-link-mobile .link-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.nav-link-mobile .link-icon-wrap {
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: #F0357F !important;
}

.nav-link-mobile:hover .link-icon-wrap,
.nav-link-mobile.active .link-icon-wrap {
  background-color: #F0357F !important;
  color: #FFFFFF !important;
}

.nav-link-mobile .link-arrow {
  width: 18px !important;
  height: 18px !important;
  color: rgba(255, 255, 255, 0.4) !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}

.nav-link-mobile:hover .link-arrow {
  color: #F0357F !important;
  transform: translateX(3px) !important;
}

/* Form Inputs System */
.form-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  background-color: #FFFFFF;
  border: 1.5px solid #D5CEBE;
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27, 34, 83, 0.15);
}

.form-input.is-error {
  border-color: #E53935;
  background-color: #FFF8F8;
}

.form-input.is-success {
  border-color: #2E7D32;
  background-color: #F6FFF7;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--navy);
  margin-bottom: 6px;
}

/* Accordion Styles */
.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: color 0.2s ease;
}

.accordion-header:hover {
  color: var(--pink);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
  padding: 0;
}

.accordion-content.is-open {
  max-height: 800px;
  padding: 12px 0 24px;
}

.accordion-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

/* Device Simulator Toolbar */
.device-toolbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #12173B;
  color: #FAF6F0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  border-bottom: 2px solid var(--pink);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.device-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.device-btn.active,
.device-btn:hover {
  background: var(--pink);
  border-color: var(--pink);
}

.simulator-frame {
  margin: 0 auto;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.35s ease, box-shadow 0.35s ease;
  background: var(--cream);
  min-height: 100vh;
  position: relative;
}

.simulator-frame.mode-mobile {
  width: 390px;
  max-width: 390px;
  border: 10px solid #2B3044;
  border-radius: 46px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  margin-top: 24px;
  margin-bottom: 60px;
  overflow: hidden;
}

.simulator-frame.mode-tablet {
  width: 768px;
  max-width: 768px;
  border: 10px solid #2B3044;
  border-radius: 36px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  margin-top: 24px;
  margin-bottom: 60px;
  overflow: hidden;
}

.simulator-frame.mode-desktop {
  width: 1440px;
  max-width: 1440px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  margin-top: 16px;
  margin-bottom: 40px;
}

.simulator-frame.mode-fluid {
  width: 100%;
  max-width: 100%;
  border: none;
  box-shadow: none;
  margin: 0;
}

/* ==========================================================================
   HEADER NAVIGATION INTEGRITY
   Guarantees navigation links never wrap or break across lines under any screen width.
   ========================================================================== */
header nav {
  flex-wrap: nowrap !important;
}

header nav a {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* ==========================================================================
   SIMULATOR FRAME CONTAINER OVERRIDES
   Ensures Mobile (390px) and Tablet (768px) views collapse desktop nav
   and show the sleek mobile/tablet layout even inside wide desktop browser viewports.
   ========================================================================== */

/* Mobile Mode (390px) */
.simulator-frame.mode-mobile header nav {
  display: none !important;
}

.simulator-frame.mode-mobile header .desktop-cta {
  display: none !important;
}

.simulator-frame.mode-mobile header #mobile-menu-btn {
  display: flex !important;
}

.simulator-frame.mode-mobile .mobile-bottom-bar {
  display: flex !important;
}

.simulator-frame.mode-mobile .mobile-carousel {
  display: flex !important;
  overflow-x: auto !important;
}

.simulator-frame.mode-mobile .carousel-card {
  flex: 0 0 85% !important;
  max-width: 320px !important;
}

.simulator-frame.mode-mobile .mobile-nav-overlay {
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 36px !important;
}

/* Tablet Mode (768px) */
.simulator-frame.mode-tablet header nav {
  display: none !important;
}

.simulator-frame.mode-tablet header #mobile-menu-btn {
  display: flex !important;
}

.simulator-frame.mode-tablet header .desktop-cta {
  display: flex !important;
}

.simulator-frame.mode-tablet .mobile-nav-overlay {
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 26px !important;
}

/* Subtle image grading */
.img-warm-grade {
  filter: contrast(1.02) saturate(1.05) sepia(0.04);
}

/* Subtle fade in */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.4s ease forwards;
}
