/* Base Reset for Story Page */
.story-page {
  font-family: var(--font-brand);
  color: var(--charcoal);
  background-color: var(--light-bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.story-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* Typography Overrides */
.story-page h1, .story-page h2, .story-page h3 {
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--black);
  text-transform: uppercase;
}

/* --- HERO SECTION --- */
.story-hero {
  padding: 6rem 0 5rem;
  background-color: var(--yellow);
  background-image: radial-gradient(rgba(0,0,0,0.05) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.story-hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%);
  opacity: 0.8;
  z-index: 0;
  animation: float-y 6s ease-in-out infinite;
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--black);
  color: var(--yellow);
  border-radius: 100px;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  border: 2px solid var(--white);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
  transform: rotate(-2deg);
  animation: wiggle 3s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--white), 6px 6px 0 rgba(0,0,0,0.1);
  -webkit-text-stroke: 2px var(--black);
  z-index: 1;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--black);
  max-width: 650px;
  margin: 0 auto;
  font-weight: 700;
  background: var(--white);
  padding: 1.25rem;
  border: var(--border-thick);
  border-radius: 16px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.05);
  transform: rotate(1deg);
  position: relative;
  z-index: 1;
}

.hero-visuals {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
}

.hero-sticker {
  font-size: 2.5rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-hard);
  border: var(--border-thick);
  transition: transform 0.3s var(--ease-elastic), box-shadow 0.3s ease;
  cursor: default;
  animation: float-y 5s ease-in-out infinite;
}

.hero-sticker:hover {
  transform: translateY(-5px) rotate(5deg) scale(1.1);
  box-shadow: var(--shadow-hover);
}

.hero-sticker:nth-child(1) { animation-delay: 0s; transform: rotate(-3deg); }
.hero-sticker:nth-child(2) { animation-delay: 1.5s; margin-top: 1.5rem; transform: rotate(3deg); }
.hero-sticker:nth-child(3) { animation-delay: 0.8s; transform: rotate(-2deg); }

/* --- SECTIONS --- */
.section-divider {
  position: absolute;
  bottom: -1px; /* Slight overlap to prevent gaps */
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 2;
  pointer-events: none;
}

.section-divider svg {
  width: 100%;
  height: 25px; /* Thinner divider */
  display: block;
}

.bg-graph-paper {
  background-color: var(--light-bg);
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 20px 20px;
}

.bg-notebook {
  background-color: var(--white);
  background-image: linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 100% 2rem;
}

.story-section {
  padding: 3rem 0 4rem; /* Reduced top padding, kept bottom space for divider */
  position: relative;
}

.bg-white { background-color: var(--white); }
.bg-light { background-color: var(--light-bg); }
.bg-yellow { background-color: var(--yellow); }
.bg-black { 
  background-color: var(--black); 
  color: var(--white); 
}

/* Specific overrides for black section */
.bg-black .section-title {
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--charcoal);
}

.bg-black .story-card {
  background: var(--charcoal);
  border-color: var(--yellow);
  color: var(--white);
  box-shadow: 6px 6px 0 var(--yellow);
}

.bg-black .story-card .card-title { color: var(--yellow); }
.bg-black .story-card .card-text { color: #e0e0e0; }
.bg-black .story-card:hover {
  background: var(--white);
  border-color: var(--black);
  box-shadow: 10px 10px 0 var(--black);
}
.bg-black .story-card:hover .card-title,
.bg-black .story-card:hover .card-text { color: var(--black); }

/* Section Title */
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  display: block;
  font-weight: 900;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  text-shadow: 2px 2px 0 var(--white);
}

/* --- CARDS & GRID --- */
.values-grid, .problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.story-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-hard);
  border: var(--border-thick);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
  position: relative;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.story-card:hover {
  transform: translate(-6px, -6px) rotate(1deg) scale(1.02);
  box-shadow: 12px 12px 0 var(--black);
  z-index: 2;
  background-color: #FFFDF5;
}

.card-icon {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  transition: transform 0.2s var(--ease-elastic);
  animation-duration: 2.5s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

/* Varied animations for cards */
.story-card:nth-child(odd) .card-icon {
  animation-name: bounce-sm;
}

.story-card:nth-child(even) .card-icon {
  animation-name: wiggle;
  animation-delay: 1s;
}

.story-card:hover .card-icon {
  transform: scale(1.25) rotate(12deg);
  animation-play-state: paused;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--black);
}

.card-text {
  color: var(--gray-text);
  font-size: 1rem;
  font-weight: 500;
}

/* --- IDEA LIST --- */
.idea-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  list-style: none;
  padding: 0;
}

.idea-item {
  background: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  color: var(--black);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: var(--border-thick);
  transition: transform 0.2s ease, background-color 0.2s;
  animation: float-y 4s ease-in-out infinite;
}

.idea-item:nth-child(2) { animation-delay: 1s; }
.idea-item:nth-child(3) { animation-delay: 2s; }
.idea-item:nth-child(4) { animation-delay: 1.5s; }

.idea-item:hover {
  transform: scale(1.05) rotate(-3deg);
  background: var(--yellow);
  animation-play-state: paused;
}

.check-icon {
  color: var(--black);
  font-weight: 900;
}

/* --- STEPS (How It Works) --- */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .steps-container {
    flex-direction: row;
    align-items: stretch;
  }
}

.step-card {
  flex: 1;
  background: var(--white);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-hard);
  border: var(--border-thick);
  transition: transform 0.2s var(--transition-standard);
}

.step-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hover);
}

.step-number {
  background: var(--black);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--yellow);
  margin: 0 auto 1.5rem;
  font-size: 1.1rem;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
  border: 2px solid var(--black);
}

/* Animation for step card icons (which are divs without class) */
.step-card > div:nth-of-type(2) {
  font-size: 4.5rem !important;
  display: inline-block;
  margin-bottom: 1.5rem !important;
  transition: transform 0.2s var(--ease-elastic);
  animation-duration: 4s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.step-card:nth-child(1) > div:nth-of-type(2) { animation-name: wiggle; }
.step-card:nth-child(2) > div:nth-of-type(2) { animation-name: bounce-sm; animation-delay: 0.5s; }
.step-card:nth-child(3) > div:nth-of-type(2) { animation-name: spin-slow; animation-duration: 10s; animation-timing-function: linear; }

.step-card:hover > div:nth-of-type(2) {
  transform: scale(1.2) rotate(-10deg);
  animation-play-state: paused;
}

/* --- TIMELINE --- */
.timeline-wrapper {
  position: relative;
  max-width: 800px;
  margin: 3rem auto 0;
  padding: 1rem 0;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px; /* Mobile default */
  width: 0;
  border-left: 3px dashed var(--black);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 60px; /* Space for line */
  opacity: 0;
}

.timeline-item.visible {
  animation: pop-in-up 0.5s var(--ease-elastic) forwards;
}

.timeline-dot {
  position: absolute;
  left: 20px;
  top: 0;
  width: 24px;
  height: 24px;
  background: var(--yellow);
  border: 3px solid var(--black);
  border-radius: 50%;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
  z-index: 2;
  animation: bounce-sm 2s ease-in-out infinite;
  margin-left: -12px; /* Center dot on line (half of width) */
}

.timeline-content {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  border: var(--border-thick);
  text-align: left;
  position: relative;
  transition: transform 0.4s var(--ease-elastic);
  animation: float-y 4s ease-in-out infinite;
}

.timeline-content:hover {
  animation-play-state: paused;
  transform: scale(1.05) rotate(1deg);
  z-index: 10;
}

.timeline-item:nth-child(odd) .timeline-content {
  animation-delay: 0.5s;
}

.timeline-item:nth-child(even) .timeline-content {
  animation-delay: 1s;
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 15px;
  left: -14px;
  width: 14px;
  height: 14px;
  background: var(--white);
  border-left: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
  transform: rotate(45deg);
  z-index: 2;
}

.timeline-year {
  display: inline-block;
  font-weight: 900;
  background: var(--yellow);
  color: var(--black);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  border: 2px solid var(--black);
  transform: rotate(-2deg);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .timeline-line { left: 50%; }
  .timeline-item { padding: 0; width: 100%; margin-bottom: 4rem; }
  .timeline-dot { left: 50%; width: 30px; height: 30px; margin-left: -15px; }
  
  .timeline-content { width: 42%; margin-left: auto; }
  .timeline-item:nth-child(even) .timeline-content { margin-left: 0; margin-right: auto; text-align: right; }
  
  .timeline-content::before { left: -16px; width: 16px; height: 16px; border-width: 3px; }
  .timeline-item:nth-child(even) .timeline-content::before {
    left: auto; right: -16px;
    border-left: none; border-bottom: none;
    border-right: 3px solid var(--black); border-top: 3px solid var(--black);
  }
  
  .timeline-item:nth-child(even) .timeline-year { transform: rotate(2deg); }
}

/* --- FOUNDER NOTE --- */
.founder-section {
  padding-top: 0;
  padding-bottom: 0.2rem;
}

.founder-note {
  max-width: 700px;
  margin: 3rem auto 0;
  background-color: #fff;
  background-image: radial-gradient(#E5E7EB 1px, transparent 1px);
  background-size: 20px 20px;
  padding: 2.5rem;
  border-radius: 4px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.1);
  transform: rotate(-1deg);
  position: relative;
  border: var(--border-thick);
  z-index: 1;
  transition: transform 0.3s ease;
}

.founder-note:hover {
  transform: rotate(0deg) scale(1.01);
  z-index: 5;
}

.founder-note::before { /* Tape */
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 120px;
  height: 35px;
  background-color: rgba(255, 216, 77, 0.9);
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quote-icon {
  font-family: serif;
  font-size: 4rem;
  line-height: 1;
  color: var(--yellow);
  margin-bottom: 1rem;
  text-shadow: 2px 2px 0 var(--black);
}

.founder-text {
  font-family: var(--font-hand);
  font-size: 1.8rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  color: var(--charcoal);
}

.founder-name {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1rem;
  color: var(--black);
}

/* --- UTILITIES --- */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

.story-cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2rem;
  background: var(--black);
  color: var(--yellow);
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 50px;
  transition: transform 0.2s ease;
  border: 2px solid var(--black);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
  animation: pulse-scale 2s ease-in-out infinite;
}

.story-cta:hover {
  transform: scale(1.05);
  box-shadow: 6px 6px 0 rgba(0,0,0,0.2);
  animation-play-state: paused;
}

/* --- FLOATING ICONS (Parallax) --- */
.parallax-wrapper {
  pointer-events: auto; /* Ensure hover works */
  transition: transform 0.1s linear; /* Smooth parallax */
  z-index: 3 !important; /* Bring icons in front of section dividers */
}

@media (max-width: 767px) {
  .parallax-wrapper {
    display: none !important; /* Hide icons on mobile */
  }
}

.floating-icon {
  font-size: 4rem;
  display: inline-block;
  filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.1));
  animation: float-y 3s ease-in-out infinite;
  transition: transform 0.3s var(--ease-elastic);
  cursor: pointer;
}

.floating-icon:hover {
  transform: scale(1.3) rotate(15deg);
  animation-play-state: paused;
}

/* Stagger floating icons */
.parallax-wrapper:nth-child(odd) .floating-icon {
  animation-duration: 3.5s;
  animation-name: wiggle;
}

.parallax-wrapper:nth-child(even) .floating-icon {
  animation-duration: 2.5s;
  animation-delay: 1s;
}
