/* Color Palette */
:root {
  --color-yellow: #F7C442;
  --color-green: #8CC63F;
  --color-orange: #FF8210;
  --color-bg: #FCFBF8;
  --color-text: #2c2c2c;
  --color-paper: #ffffff;
  --color-ink: #1a1a1a;
  
  /* Hand-drawn border-radius patterns */
  --br-hand-drawn: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --br-hand-drawn-btn: 255px 25px 225px 25px / 25px 225px 25px 255px;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 1.15rem;
}

h1, h2, h3, h4, .logo {
  font-family: 'Fredoka', sans-serif;
  color: var(--color-ink);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.bg-white {
  background-color: var(--color-paper) !important;
}

/* Notebook Background */
.bg-notebook-squares {
  background-color: var(--color-paper);
  background-image: 
    linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 0.5cm 0.5cm;
}

/* Hand-drawn borders and boxes */
.scribble-box {
  background: var(--color-paper);
  border: 3px solid var(--color-ink);
  border-radius: var(--br-hand-drawn);
  padding: 25px;
  box-shadow: 6px 6px 0px rgba(0,0,0,0.1);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.scribble-box:nth-child(even) {
  border-radius: 15px 225px 15px 255px / 255px 15px 225px 15px;
  transform: rotate(1deg);
}

.scribble-box:nth-child(odd) {
  transform: rotate(-1deg);
}

.scribble-box:hover {
  transform: translateY(-8px) scale(1.02) rotate(0deg);
  box-shadow: 10px 10px 0px rgba(0,0,0,0.15);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  border: 4px solid var(--color-ink);
  border-radius: var(--br-hand-drawn-btn);
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 4px 4px 0 var(--color-ink);
  color: var(--color-ink);
  letter-spacing: 1px;
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--color-ink);
}

.btn-yellow { background-color: var(--color-yellow); }
.btn-green { background-color: var(--color-green); }
.btn-orange { background-color: var(--color-orange); }

.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-4px) rotate(-2deg);
}

.btn:nth-child(even):hover {
  transform: translateY(-4px) rotate(2deg);
}

/* Marker Highlights */
.marker-highlight {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.marker-highlight::after {
  content: '';
  position: absolute;
  bottom: 8%;
  left: -3%;
  width: 106%;
  height: 45%;
  z-index: -1;
  transform: rotate(-2deg);
  border-radius: 6px 12px 4px 8px / 3px 6px 4px 3px;
  opacity: 0.85;
}

.highlight-orange::after { background-color: var(--color-orange); }
.highlight-green::after { background-color: var(--color-green); }
.highlight-yellow::after { background-color: var(--color-yellow); }

/* Navigation */
.main-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--color-paper);
  border-bottom: 4px solid var(--color-ink);
  border-radius: 0 0 15px 255px / 0 0 15px 15px;
  z-index: 1000;
  padding: 12px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
}

.logo {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-orange);
  text-shadow: 2px 2px 0px rgba(0,0,0,0.15);
  transform: rotate(-3deg);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 35px;
}

.nav-links a {
  font-size: 1.3rem;
  font-weight: bold;
  position: relative;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--color-orange);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  bottom: -6px;
  left: 0;
  background-color: var(--color-ink);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 28px;
  height: 4px;
  margin: 6px auto;
  transition: all 0.3s ease-in-out;
  background-color: var(--color-ink);
  border-radius: 4px;
}

/* Container padding and width handling */
.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Sections */
section {
  padding: 100px 20px;
  width: 100%;
}

.section-title {
  text-align: center;
  font-size: 3.5rem;
  margin-bottom: 60px;
  transform: rotate(-1.5deg);
}

/* Wavy Section Dividers */
.section-wavy-top {
  position: relative;
}

.section-wavy-top::before {
  content: '';
  position: absolute;
  top: -44px;
  left: 0;
  width: 100%;
  height: 46px; /* 2px overlap */
  background: inherit;
  -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg preserveAspectRatio='none' viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg preserveAspectRatio='none' viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  transform: scaleY(-1);
  z-index: 10;
  pointer-events: none;
}
.bg-notebook-squares.section-wavy-top::before {
  background-image: none !important;
}

.section-wavy-bottom {
  position: relative;
}

.section-wavy-bottom::after {
  content: '';
  position: absolute;
  bottom: -44px;
  left: 0;
  width: 100%;
  height: 46px; /* 2px overlap */
  background: inherit;
  -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg preserveAspectRatio='none' viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg preserveAspectRatio='none' viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  z-index: 10;
  pointer-events: none;
}

/* Service Section Background Colors based on primary brand colors */
.about-section {
  background-color: #fff3e0; /* light orange */
}
.freebies-section {
  background-color: #e8f5e9; /* light green */
}


/* Hero Section */
.hero-section {
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 80px;
  width: 100%;
  display: flex;
  align-items: center;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.hero-content {
  flex: 1;
  padding-right: 50px;
  max-width: 600px;
  margin-left: auto;
}

.hero-content h1 {
  font-size: 5rem;
  line-height: 1.05;
  margin-bottom: 25px;
  transform: rotate(-1deg);
}

.hero-content p {
  font-size: 1.6rem;
  margin-bottom: 45px;
  color: var(--color-text);
  background-color: rgba(255, 255, 255, 0.8);
  padding: 10px;
  border-radius: 10px;
}

.hero-buttons {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  margin-right: auto;
}

/* Placeholders */
.scribble-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-paper);
  border: 4px solid var(--color-ink);
  border-radius: var(--br-hand-drawn);
  font-family: 'Fredoka', sans-serif;
  font-size: 2.2rem;
  color: var(--color-ink);
  text-align: center;
  padding: 20px;
  background-image: repeating-linear-gradient(60deg, transparent, transparent 15px, rgba(0,0,0,0.03) 15px, rgba(0,0,0,0.03) 30px);
}

.group-placeholder {
  width: 450px;
  height: 450px;
  border-radius: 48% 52% 45% 55% / 54% 47% 53% 46%;
  background-color: var(--color-yellow);
  box-shadow: 15px 15px 0px rgba(0,0,0,0.05);
  animation: float 6s ease-in-out infinite;
  transform: rotate(2deg);
}

@keyframes float {
  0% { transform: translateY(0px) rotate(2deg); }
  50% { transform: translateY(-15px) rotate(-1deg); }
  100% { transform: translateY(0px) rotate(2deg); }
}

/* About Section */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 45px;
}

.team-member {
  text-align: center;
}

.team-member h3 {
  font-size: 2.2rem;
  margin: 20px 0 10px;
  color: var(--color-orange);
  transform: rotate(-1.5deg);
}

.team-member .scribble-img-placeholder {
  width: 170px;
  height: 170px;
  margin: 0 auto;
  border-radius: 55% 45% 40% 60% / 50% 55% 45% 50%;
  border-width: 3px;
}

.girl-placeholder { background-color: var(--color-orange); color: white; }
.raven-placeholder { background-color: #b0bec5; }
.chicken-placeholder { background-color: var(--color-yellow); }
.beaver-placeholder { background-color: var(--color-green); color: white;}

/* Books Section */
.books-section {
  max-width: 100%;
}

.books-container {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.book-card {
  width: 380px;
  display: flex;
  flex-direction: column;
}

.book-cover {
  height: 280px;
  background-color: var(--color-yellow);
  border: 4px solid var(--color-ink);
  border-radius: 5px 25px 5px 25px / 25px 5px 25px 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 3rem;
  margin-bottom: 25px;
  background-image: repeating-linear-gradient(-60deg, transparent, transparent 15px, rgba(255,255,255,0.2) 15px, rgba(255,255,255,0.2) 30px);
  color: var(--color-ink);
}

.book-info h3 {
  font-size: 2rem;
  margin-bottom: 12px;
  transform: rotate(1deg);
}

.book-info p {
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Freebies Section */
.freebies-section {
  text-align: center;
}
.section-description {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 40px;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

/* Contact Section */
.contact-section {
  text-align: center;
  max-width: 100%;
}

.contact-section p {
  margin-bottom: 50px;
  font-size: 1.4rem;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
  text-align: left;
  max-width: 850px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  font-weight: bold;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.8rem;
  transform: rotate(-1deg);
}

.hand-drawn-input {
  padding: 15px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.25rem;
  border: 3px solid var(--color-ink);
  border-radius: var(--br-hand-drawn);
  background-color: var(--color-paper);
  transition: all 0.3s ease;
}

.hand-drawn-input:focus {
  outline: none;
  box-shadow: 6px 6px 0px rgba(0,0,0,0.1);
  border-color: var(--color-orange);
  transform: scale(1.01);
}

.contact-form .btn {
  margin-top: 15px;
  align-self: flex-start;
}

/* Footer */
.main-footer {
  background-color: var(--color-ink);
  color: var(--color-paper);
  padding: 80px 20px 30px;
  margin-top: 80px;
}

.hand-drawn-top {
  border-top: 4px solid var(--color-ink);
  border-radius: 15px 255px 0 0 / 15px 15px 0 0;
  position: relative;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-logo {
  font-family: 'Fredoka', sans-serif;
  font-size: 3rem;
  color: var(--color-yellow);
  transform: rotate(-3deg);
}

.footer-links {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 1.5rem;
  position: relative;
}

.footer-links a:hover {
  color: var(--color-orange);
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: var(--color-paper);
  color: var(--color-ink);
  border-radius: 50% 45% 55% 40% / 40% 55% 45% 50%;
  font-weight: bold;
  border: 3px solid var(--color-paper);
  transition: all 0.3s;
}

.social-links a:hover {
  background-color: var(--color-green);
  border-color: var(--color-green);
  color: var(--color-paper);
  transform: scale(1.15) rotate(8deg);
}

.copyright {
  text-align: center;
  margin-top: 60px;
  font-size: 1.1rem;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 990px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding-top: 120px;
  }
  
  .hero-content {
    padding-right: 0;
    margin-left: 0;
    margin-bottom: 50px;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-image {
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(10px) rotate(45deg); }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 75px;
    gap: 0;
    flex-direction: column;
    background-color: var(--color-paper);
    width: 100%;
    text-align: center;
    transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-bottom: 4px solid var(--color-ink);
    border-radius: 0 0 15px 255px / 0 0 15px 15px;
    box-shadow: 0 15px 20px rgba(0,0,0,0.1);
    padding: 20px 0;
  }

  .nav-links li { margin: 20px 0; }
  .nav-links.active { left: 0; }
  
  .hero-content h1 { font-size: 3.8rem; }
  .section-title { font-size: 2.8rem; }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
