/* RESET + BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Legacy Variables (kept for backwards compatibility) */
  --padding: 1.5rem;
  --color-black: #000;
  --color-white: #fff;
  --color-grey: #777;
  --color-light: #efefef;
  --color-text: var(--color-black);
  --color-text-grey: var(--color-grey);
  --color-background: var(--color-white);
  
  /* Brand Colors */
  --color-coral: #EE5C47;
  --color-coral-dark: #DD4A37;
  --color-coral-darker: #D52C14;
  
  /* Grayscale - Revised Scale */
  --color-gray-50: #FAFAFA;
  --color-gray-100: #F5F5F5;
  --color-gray-200: #EFEFEF;
  --color-gray-300: #E8E8E8;
  --color-gray-400: #D1D1D1;
  --color-gray-500: #AAA;
  --color-gray-600: #888;
  --color-gray-700: #777;
  --color-gray-800: #555;
  
  /* Text Colors */
  --color-text-primary: #282828;
  --color-text-secondary: #21201C;
  
  /* Typography */
  --font-family-sans: "acumin-pro", system-ui, -apple-system, sans-serif;
  --font-family-serif: "p22-mackinac-pro", Georgia, serif;
}

/* Custom text selection color */
::selection {
  background: var(--color-coral);
  color: #fff;
}

/* Firefox compatibility */
::-moz-selection {
  background: var(--color-coral);
  color: #fff;
}

/* Full-width base */
html, body {
  width: 100%;
  scroll-behavior: smooth;
  min-width: 100%;
  max-width: 100%; /* Add this */
  font-family: var(--font-family-sans);
  color: var(--color-text);
  background: var(--color-background);
  margin: 0;
  padding: 0;
}

/* Additional constraint for all direct children */
body > * {
  max-width: 100%;
}

/* Utility */
.bg-light {
  background-color: var(--color-light);
}
.color-grey {
  color: var(--color-text-grey);
}

/* NAVBAR / HEADER */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1100;
  width: 100%;
  max-width: 100vw; /* Add this */
  background: #fff;
  height: 64px;
  border-bottom: 1px solid #eaeaea;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-content {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0 3rem;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Navbar logo link styles */
.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.logo-link:hover {
  text-decoration: none;
}

.logo-link:hover .navbar-title {
  color: #222;
}

/* PIXAR-STYLE SQUASH & STRETCH BOUNCE */
.navbar-logo {
  cursor: pointer;
  display: block;
  flex-shrink: 0;
  transform-origin: center;
  transition: filter 0.3s ease;
}

/* Trigger bounce on hover */
.logo-link:hover .navbar-logo {
  animation: pixar-bounce 0.8s cubic-bezier(0.28, 0.84, 0.42, 1);
}

/* The iconic Pixar bounce with squash & stretch */
@keyframes pixar-bounce {
  0% {
    transform: scale(1, 1) rotate(0deg);
  }
  /* Anticipation - squash down */
  15% {
    transform: scale(1.15, 0.85) rotate(-3deg);
  }
  /* Launch up - stretch tall */
  30% {
    transform: scale(0.9, 1.15) rotate(3deg);
  }
  /* Peak of bounce - slight stretch */
  45% {
    transform: scale(0.95, 1.05) rotate(-2deg);
  }
  /* Coming down - compress */
  60% {
    transform: scale(1.1, 0.9) rotate(2deg);
  }
  /* Settle bounce */
  75% {
    transform: scale(0.98, 1.02) rotate(-1deg);
  }
  /* Final micro-settle */
  90% {
    transform: scale(1.01, 0.99) rotate(0.5deg);
  }
  100% {
    transform: scale(1, 1) rotate(0deg);
  }
}

.navbar-title {
  font-family: var(--font-family-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  line-height: 1;
  margin: 0;
  padding: 0;
}

/* HAMBURGER MENU */
.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1101;
}

.hamburger-menu span {
  width: 30px;
  height: 2px;
  background: #282828;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-menu:hover span {
  background: #EE5C47;
}

/* Hamburger animation when menu is open */
.hamburger-menu.open span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

.hamburger-menu.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* SIDEBAR OVERLAY */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1200;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* SIDEBAR MENU */
.sidebar-menu {
  position: fixed;
  top: 0;
  right: 0; /* Changed from right: -450px */
  width: 450px;
  max-width: 85vw;
  height: 100vh;
  background: #FEFCF9;
  box-shadow: none;
  transform: translateX(100%); /* Add this to hide it off-screen */
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
  z-index: 1201;
  overflow-y: auto;
  padding: 2rem 3rem;
  display: flex;
  flex-direction: column;
}

.sidebar-menu.open {
  transform: translateX(0); /* Changed from right: 0 */
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.3);
}

/* Sidebar Logo - LEFT ALIGNED */
.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 4rem;
  gap: 1rem;
  text-decoration: none;
  transition: filter 0.3s ease;
}

.sidebar-logo:hover {
  filter: brightness(0.85);
}

.sidebar-logo-svg {
  width: 60px; /* Reduced from 80px (25% smaller) */
  height: 60px; /* Reduced from 80px (25% smaller) */
  transform-origin: center;
}

/* Removed Pixar bounce animation from sidebar logo */

/* Sidebar Close Button */
.sidebar-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  font-size: 2.5rem;
  color: #282828;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
  font-weight: 300;
}

.sidebar-close:hover {
  color: #EE5C47;
}

/* Sidebar Navigation */
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-nav li {
  margin: 0;
}

.sidebar-nav a {
  font-family: var(--font-family-serif);
  font-size: 2.5rem;
  font-weight: 500;
  color: #282828;
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  line-height: 1.2;
}

.sidebar-nav a:hover {
  color: #EE5C47;
}

/* Sidebar Footer Info */
.sidebar-footer {
  margin-top: 3rem;
  padding-top: 0;
  position: relative;
  z-index: 2;
}

.sidebar-tagline {
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
  color: #8D8B89;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.sidebar-email {
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
  color: #8D8B89;
  text-decoration: none;
  font-weight: 300;
  display: block;
  margin-bottom: 0;
  transition: color 0.3s ease;
}

.sidebar-email:hover {
  color: #EE5C47;
}

/* Sidebar Background Shapes */
.sidebar-shapes {
  position: absolute;
  bottom: 50px;
  left: 40%;
  transform: translateX(-50%);
  width: 250px;
  max-width: 80%;
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}

/* FOOTER FULL WIDTH */
.site-footer {
  width: 100%;
  min-width: 100%;
  background: #282828;
  color: #fff;
  padding: 4rem 2rem 1.25rem 2rem;
  font-family: var(--font-family-sans);
  margin-top: 0;
  position: relative;
  min-height: 250px;
  overflow: visible;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* Footer Logo - Centered */
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  cursor: pointer;
  position: absolute;
  top: 42%;
  left: 47.5%;
  transform: translate(-50%, -50%);
  text-decoration: none;
  color: inherit;
  z-index: 3;
}

.footer-logo:hover .footer-logo-text {
  color: #fff;
}

.footer-logo-svg {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  transform-origin: center;
}

/* Apply the same Pixar bounce to footer logo */
.footer-logo:hover .footer-logo-svg {
  animation: pixar-bounce 0.8s cubic-bezier(0.28, 0.84, 0.42, 1);
}

.footer-st0 {
  fill: #EE5C47 !important;
}

.footer-logo-text {
  font-family: var(--font-family-serif);
  font-size: 2.25rem;
  font-weight: 500;
  color: #fff;
  line-height: 1;
}

.footer-badge {
  position: absolute;
  width: 130px;
  height: 130px;
  top: 35%;
  left: 100%;
  transform: translate(-30%, -50%);
  z-index: 1;
  opacity: .04;
  pointer-events: none;
}

/* Make sure logo elements are above badge */
.footer-logo-svg,
.footer-logo-text {
  position: relative;
  z-index: 2;
}

.footer-tagline {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  text-align: center;
  color: #8D8B89;
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  white-space: nowrap;
  z-index: 3;
}

.footer-tagline-emphasis {
  color: #5B5A59;
}

.footer-copyright {
  position: absolute;
  bottom: 1rem;
  left: 1.25rem;
  font-size: 0.875rem;
  color: #888;
  margin: 0;
  z-index: 3;
}

.footer-icons {
  position: absolute;
  bottom: 1rem;
  right: 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  z-index: 3;
}

.footer-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-icons a:hover {
  opacity: 0.7;
  transform: translateY(-2px);
}

.footer-icon {
  width: 24px;
  height: 24px;
  display: block;
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

@media screen and (max-width: 768px) {
  /* Header adjustments */
  .header-content {
    padding: 0 1.5rem; /* Increased from 1rem */
  }
  
  .navbar-title {
    font-size: 1.625rem; /* Increased from 1.5rem */
  }
  
  .navbar-logo {
    width: 40px; /* Increased from 32px */
    height: 40px; /* Increased from 32px */
  }
  
  /* Make hamburger menu bigger */
  .hamburger-menu {
    width: 32px; /* Decreased from 36px */
    height: 25px; /* Decreased from 28px */
  }
  
  .hamburger-menu span {
    width: 32px; /* Decreased from 36px */
    height: 2.5px; /* Decreased from 3px */
  }
  
  /* Sidebar - full width on mobile */
  .sidebar-menu {
    width: 100%;
    max-width: 100%;
    padding: 2rem 2rem;
  }
  
  .sidebar-nav a {
    font-size: 2.75rem !important; /* Final size that works well */
  }
  
  /* Footer adjustments */
  .site-footer {
    padding: 3rem 1rem 10px 1rem; /* Changed bottom padding from 5rem to 10px */
    min-height: auto;
  }
  
  /* Fix footer badge overflow on mobile */
  .footer-badge {
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 300px !important; /* Increased from 100px - now 3x bigger */
    opacity: .03 !important;
  }
  
  /* Increase sidebar footer text on mobile */
  .sidebar-tagline {
    font-size: 1.125rem; /* Increased from 0.95rem */
  }
  
  .sidebar-email {
    font-size: 1.125rem; /* Increased from 0.95rem */
  }
  
  .footer-logo {
    position: static;
    transform: none;
    margin-bottom: 0.5rem; /* Reduced to bring tagline very close to logo */
  }
  
  .footer-copyright,
  .footer-icons,
  .footer-tagline {
    position: static;
    transform: none;
    margin-top: 1rem;
    white-space: normal;
  }
  
  .footer-tagline {
    text-align: center;
    max-width: 250px;
    margin: 0 auto 0.5rem auto; /* Remove top margin, keep small bottom margin */
    order: 1; /* Move tagline to be first after logo */
  }
  
  .footer-copyright {
    text-align: center;
    margin-top: 0.5rem; /* Reduced from 1rem */
    order: 3; /* Move to bottom of flex container */
  }
  
  .footer-icons {
    justify-content: center;
    margin-top: 0.5rem; /* Reduced from .5rem to bring closer to tagline */
    order: 2; /* Keep icons above copyright */
  }
  
  .footer-content {
    gap: 0; /* Remove gap since we're controlling spacing with margins */
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .footer-logo-text {
    font-size: 1.75rem;
  }
  
  .footer-logo-svg {
    width: 42px;
    height: 42px;
  }
}

/* ==========================================
   ABOUT ILLUSTRATION ANIMATIONS
   Pick ONE of the 5 options below by uncommenting it!
   ========================================== */

.about-illustration {
  cursor: pointer;
  transform-origin: center;
  transition: filter 0.3s ease;
}

/* Also apply to about page portrait */
.story-portrait-img {
  cursor: pointer;
  transform-origin: center;
  transition: filter 0.3s ease;
}

/* ===== OPTION 2: HAPPY BOUNCE ===== */
/* Cheerful up-and-down bounce with head bob */
.about-illustration:hover,
.story-portrait-img:hover {
  animation: happy-bounce 0.9s cubic-bezier(0.28, 0.84, 0.42, 1);
}

@keyframes happy-bounce {
  0% {
    transform: translateY(0) scale(1, 1);
  }
  15% {
    transform: translateY(0) scale(1.03, 0.97);
  }
  30% {
    transform: translateY(-12px) scale(0.98, 1.02);
  }
  45% {
    transform: translateY(-15px) scale(1, 1);
  }
  60% {
    transform: translateY(0) scale(1.05, 0.95);
  }
  75% {
    transform: translateY(-4px) scale(0.99, 1.01);
  }
  90% {
    transform: translateY(0) scale(1.01, 0.99);
  }
  100% {
    transform: translateY(0) scale(1, 1);
  }
}

/* ===== OPTION 3: CURIOUS LEAN ===== */
/* Leans forward like "Oh, hello there!" */
/*
.about-illustration:hover {
  animation: curious-lean 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes curious-lean {
  0% {
    transform: scale(1) translateY(0) rotate(0deg);
  }
  20% {
    transform: scale(1.02) translateY(-3px) rotate(-1deg);
  }
  40% {
    transform: scale(1.08) translateY(-5px) rotate(-3deg);
  }
  60% {
    transform: scale(1.1) translateY(-6px) rotate(-4deg);
  }
  75% {
    transform: scale(1.05) translateY(-3px) rotate(-2deg);
  }
  90% {
    transform: scale(1.02) translateY(-1px) rotate(-1deg);
  }
  100% {
    transform: scale(1) translateY(0) rotate(0deg);
  }
}
*/

/* ===== OPTION 4: BREATHING/IDLE ===== */
/* Gentle breathing - very subtle and calming */
/*
.about-illustration:hover {
  animation: breathing 2.5s ease-in-out infinite;
}

@keyframes breathing {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}
*/

/* ===== OPTION 5: HEAD TILT ===== */
/* Inquisitive head tilt to the side */
/*
.about-illustration:hover {
  animation: head-tilt 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes head-tilt {
  0% {
    transform: rotate(0deg) scale(1);
  }
  15% {
    transform: rotate(-2deg) scale(1.01);
  }
  35% {
    transform: rotate(-8deg) scale(1.04);
  }
  55% {
    transform: rotate(-10deg) scale(1.05);
  }
  70% {
    transform: rotate(-8deg) scale(1.03);
  }
  85% {
    transform: rotate(-9deg) scale(1.04);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}
*/

/* ===== OPTION 6: EXCITED WIGGLE ===== */
/* Quick side-to-side wiggle with personality */
/*
.about-illustration:hover {
  animation: excited-wiggle 0.6s cubic-bezier(0.36, 0, 0.66, -0.56);
}

@keyframes excited-wiggle {
  0%, 100% {
    transform: rotate(0deg) translateX(0);
  }
  10% {
    transform: rotate(-4deg) translateX(-3px);
  }
  25% {
    transform: rotate(5deg) translateX(4px);
  }
  40% {
    transform: rotate(-5deg) translateX(-4px);
  }
  55% {
    transform: rotate(4deg) translateX(3px);
  }
  70% {
    transform: rotate(-3deg) translateX(-2px);
  }
  85% {
    transform: rotate(2deg) translateX(1px);
  }
}
*/

/* Extra small mobile devices */
@media screen and (max-width: 480px) {
  .sidebar-nav a {
    font-size: 1.75rem;
  }
}

/* ==========================================
   SCROLL INDICATOR (BULLET) ANIMATION
   ========================================== */

.scroll-indicator {
  cursor: pointer;
}

.scroll-indicator img {
  transform-origin: center;
  transition: filter 0.3s ease;
}

/* Apply the same Pixar bounce to the bullet */
.scroll-indicator:hover img {
  animation: pixar-bounce 0.8s cubic-bezier(0.28, 0.84, 0.42, 1);
}
/* ==========================================
   404 ERROR PAGE
   ========================================== */

.error-page {
  background: #fff;
  min-height: 100vh;
  margin: 0;
  padding: 0 2rem 8rem 2rem;
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-content {
  max-width: 700px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 4rem 2rem;
}

.error-bullet {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.error-content h1 {
  font-family: var(--font-family-serif);
  font-size: clamp(6rem, 15vw, 10rem);
  font-weight: 600;
  color: #EE5C47;
  margin: 0;
  line-height: 1;
  letter-spacing: -0.02em;
}

.error-content h2 {
  font-family: var(--font-family-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  color: #282828;
  margin: 0;
  line-height: 1.2;
}

.error-content p {
  font-family: var(--font-family-sans);
  font-size: 1.25rem;
  line-height: 1.6;
  color: rgba(40, 40, 40, 0.8);
  margin: 0;
  max-width: 500px;
}

.error-content .button {
  border: none;
  color: #fff;
  padding: 12px 64px 12px 70px;
  background: #EE5C47;
  border-radius: 8px;
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
  font-weight: 450;
  transition: all 0.4s ease;
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  box-shadow: none;
}

.error-content .button::after {
  content: '';
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M13 7l5 5m0 0l-5 5m5-5H6'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.4s ease;
  display: inline-block;
}

.error-content .button:hover {
  background: #DD4A37;
  transform: none;
}

.error-content .button:hover::after {
  transform: translateX(4px);
}

.error-content .button:active {
  transform: scale(0.98);
}

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

.error-content h1 {
  animation: fadeIn 0.6s ease-out;
}

.error-content h2 {
  animation: fadeIn 0.6s ease-out 0.1s backwards;
}

.error-content p {
  animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.error-content .button {
  animation: fadeIn 0.6s ease-out 0.3s backwards;
}

@media screen and (max-width: 768px) {
  .error-page {
    padding: 0 1.5rem 4rem 1.5rem;
  }
  
  .error-content {
    padding: 2rem 1rem;
    gap: 1.5rem;
  }
  
  .error-content h1 {
    font-size: 5rem;
  }
  
  .error-content h2 {
    font-size: 1.75rem;
  }
  
  .error-content p {
    font-size: 1.125rem;
  }
  
  .error-bullet {
    width: 50px;
    height: 50px;
  }
  
  .error-content .button {
    width: 100%;
    justify-content: center;
  }
}
