html {
  scroll-behavior: smooth;
}
body {
  font-family: 'DM Sans', system-ui, sans-serif;
}
header nav a {
  position: relative;
  padding: 6px 2px;
  transition: color 0.25s ease;
}
header nav a::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #e8573d;
  transform: translate(-6px, -50%) scale(0);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
header nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: #e8573d;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
header nav a:hover {
  color: #e8573d;
}
header nav a:hover::before,
header nav a[aria-current='page']::before {
  transform: translate(0, -50%) scale(1);
}
header nav a:hover::after,
header nav a[aria-current='page']::after {
  transform: scaleX(1);
}
header nav a[aria-current='page'] {
  color: #e8573d;
}

header .mobile-menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.25s ease;
}
header .mobile-menu a::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #e8573d;
  transform: scale(0);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
header .mobile-menu a:hover,
header .mobile-menu a[aria-current='page'] {
  color: #e8573d;
}
header .mobile-menu a:hover::before,
header .mobile-menu a[aria-current='page']::before {
  transform: scale(1);
}

.wavy-underline {
  text-decoration: underline wavy;
  text-decoration-color: #e8573d;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}
.fun-rotate {
  transform: rotate(-2deg);
}
.fun-rotate-alt {
  transform: rotate(1.5deg);
}
.blob-shape {
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(2deg);
  }
}
@keyframes float-slow {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}
.animate-float {
  animation: float 6s ease-in-out infinite;
}
.animate-float-slow {
  animation: float-slow 8s ease-in-out infinite;
}
.animate-float-delay {
  animation: float 6s ease-in-out 2s infinite;
}
.squiggle-divider {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30' preserveAspectRatio='none'%3E%3Cpath d='M0 15 Q 150 0 300 15 Q 450 30 600 15 Q 750 0 900 15 Q 1050 30 1200 15' stroke='%23E8573D' fill='none' stroke-width='2.5' opacity='0.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  height: 30px;
}
.logo-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%;
  background: linear-gradient(135deg, #6c4ab6, #e8573d);
  color: white;
  font-family: 'Style Script', cursive;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(108, 74, 182, 0.25);
}
.logo-monogram-sm {
  width: 30px;
  height: 30px;
  font-size: 0.95rem;
}
.card-hover {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-4px) rotate(0deg) !important;
  box-shadow:
    0 20px 40px -12px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(108, 74, 182, 0.08);
}
.sticker {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1.5px dashed;
  transform: rotate(-1deg);
}
.nav-open .mobile-menu {
  display: flex;
}

.blob-shape-alt {
  border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}
.animate-wiggle {
  animation: wiggle 4s ease-in-out infinite;
}

.paper-note {
  position: relative;
  background: #fff;
  padding: 1.5rem 1.75rem;
  border-radius: 6px;
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.18);
}
.paper-note::before,
.paper-note::after {
  content: '';
  position: absolute;
  width: 56px;
  height: 18px;
  background: rgba(253, 230, 138, 0.85);
  top: -9px;
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.1);
}
.paper-note::before {
  left: 12%;
  transform: rotate(-4deg);
}
.paper-note::after {
  right: 12%;
  transform: rotate(3deg);
}

.recipe-card {
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 30px 60px -28px rgba(45, 43, 85, 0.28),
    0 4px 10px rgba(45, 43, 85, 0.06);
  position: relative;
}
.recipe-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1.5px dashed rgba(108, 74, 182, 0.25);
  border-radius: 12px;
  pointer-events: none;
}
.marker-label {
  font-family: 'Style Script', cursive;
  color: #6c4ab6;
  line-height: 1;
}
.corkboard {
  background-color: #fffbf5;
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(232, 87, 61, 0.05) 0,
      transparent 40%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(108, 74, 182, 0.05) 0,
      transparent 40%
    );
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
  background: linear-gradient(135deg, #ff8e53, #e8573d);
  color: white;
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow: 0 8px 18px -8px rgba(232, 87, 61, 0.55);
  flex-shrink: 0;
}
.pull-quote {
  font-family: 'Fraunces', serif;
  font-style: italic;
}
.ingredient-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px dashed rgba(45, 43, 85, 0.18);
  padding: 8px 14px;
  border-radius: 9999px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  color: #2d2b55;
}

@keyframes steam {
  0% {
    transform: translateY(0) scaleX(1);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-14px) scaleX(1.15);
    opacity: 0.85;
  }
  100% {
    transform: translateY(-28px) scaleX(0.9);
    opacity: 0;
  }
}
.animate-steam {
  animation: steam 4s ease-in-out infinite;
}
.animate-steam-delay {
  animation: steam 4s ease-in-out 1.3s infinite;
}
.animate-steam-delay-2 {
  animation: steam 4s ease-in-out 2.6s infinite;
}
.steam {
  position: absolute;
  width: 10px;
  height: 22px;
  border-radius: 9999px;
  background: linear-gradient(
    to top,
    rgba(108, 74, 182, 0.35),
    transparent
  );
  filter: blur(1px);
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse-ring {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.55;
  }
}
.animate-spin-slow {
  animation: spin-slow 28s linear infinite;
}
.animate-pulse-ring {
  animation: pulse-ring 4s ease-in-out infinite;
}
.grid-paper {
  background-image:
    linear-gradient(
      to right,
      rgba(108, 74, 182, 0.08) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      rgba(108, 74, 182, 0.08) 1px,
      transparent 1px
    );
  background-size: 32px 32px;
}

/* ─── Shared scorecard styles ─────────────────────────────────────────────── */

@keyframes stamp-in {
  0% {
    opacity: 0;
    transform: scale(1.6) rotate(-18deg);
  }
  60% {
    opacity: 1;
    transform: scale(0.92) rotate(-8deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-6deg);
  }
}
.report-paper {
  position: relative;
  background: #fff;
  border-radius: 6px;
  padding: 2rem 2rem 2.25rem;
  box-shadow:
    0 30px 60px -25px rgba(45, 43, 85, 0.35),
    0 0 0 1px rgba(108, 74, 182, 0.06);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    rgba(93, 173, 226, 0.18) 31px,
    rgba(93, 173, 226, 0.18) 32px
  );
}
.report-paper::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 52px;
  width: 2px;
  background: rgba(232, 87, 61, 0.4);
}
.tape {
  position: absolute;
  width: 82px;
  height: 24px;
  background: rgba(253, 230, 138, 0.85);
  box-shadow: 0 4px 8px -4px rgba(0, 0, 0, 0.2);
}
.tape.tl {
  top: -12px;
  left: 8%;
  transform: rotate(-6deg);
}
.tape.tr {
  top: -12px;
  right: 8%;
  transform: rotate(5deg);
  background: rgba(125, 211, 252, 0.7);
}
.reveal-card {
  position: relative;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  background: linear-gradient(165deg, #2d2b55 0%, #3b3478 100%);
  color: #fff;
  box-shadow: 0 30px 70px -25px rgba(45, 43, 85, 0.55);
  overflow: hidden;
}
.reveal-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle,
    rgba(253, 230, 138, 0.25),
    transparent 65%
  );
}
.grade-stamp {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 1.75rem;
  color: #fff;
  background: radial-gradient(
    circle at 30% 25%,
    #9b7ed9,
    #6c4ab6 55%,
    #3a2478
  );
  box-shadow:
    0 8px 20px -8px rgba(108, 74, 182, 0.5),
    inset -3px -3px 6px rgba(0, 0, 0, 0.25),
    inset 3px 3px 5px rgba(255, 255, 255, 0.25);
  transform: rotate(-8deg);
  border: 2px dashed rgba(255, 255, 255, 0.35);
}
.grade-stamp[data-grade] {
  animation: stamp-in 0.5s ease-out;
}
.grade-stamp[data-state='progress'] {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: #fffbf5;
  color: #6c4ab6;
  border: 2px dashed rgba(108, 74, 182, 0.55);
  box-shadow: 0 4px 12px -6px rgba(108, 74, 182, 0.25);
  transform: rotate(-4deg);
}
.meter-track {
  position: relative;
  height: 18px;
  background-color: #fef3c7;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(25% - 1.5px),
    rgba(108, 74, 182, 0.22) calc(25% - 1.5px),
    rgba(108, 74, 182, 0.22) 25%
  );
  border-radius: 999px;
  border: 1.5px solid rgba(108, 74, 182, 0.22);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(45, 43, 85, 0.1);
}
.meter-fill {
  position: relative;
  height: 100%;
  width: 0%;
  background:
    repeating-linear-gradient(
      -38deg,
      rgba(255, 255, 255, 0.2) 0 5px,
      transparent 5px 11px
    ),
    linear-gradient(90deg, #ff8e53, #e8573d 40%, #6c4ab6);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 2px 4px rgba(232, 87, 61, 0.18);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Reduced motion ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
