/* =============================================================================
   CrissyBakes — Design System
   style.css
   ============================================================================= */

/* =============================================================================
   Section 1 — Google Fonts
   ============================================================================= */

/* =============================================================================
   Section 2 — CSS Custom Properties
   ============================================================================= */

:root {
  /* Brand Colors */
  --color-pink-light: #fce8ef;
  --color-pink:       #f4b8c8;
  --color-pink-dark:  #e8889e;
  --color-white:      #ffffff;
  --color-charcoal:   #2d2d2d;
  --color-gray-light: #f7f7f7;
  --color-gray-mid:   #888888;
  --color-gray-accessible: #555555;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Lato', system-ui, sans-serif;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Spacing (4px base) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Layout */
  --container-max: 1100px;
  --nav-height: 70px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* =============================================================================
   Section 3 — CSS Reset and Base Styles
   ============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-pink-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-charcoal);
}

a:focus-visible {
  outline: 2px solid var(--color-pink-dark);
  outline-offset: 2px;
}

/* =============================================================================
   Section 4 — Typography Scale
   ============================================================================= */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--color-charcoal);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, var(--text-5xl));
}

h2 {
  font-size: clamp(1.5rem, 3vw, var(--text-3xl));
}

h3 {
  font-size: var(--text-xl);
}

p {
  margin-bottom: var(--space-4);
  max-width: 65ch;
}

/* =============================================================================
   Section 5 — Layout Utilities
   ============================================================================= */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-16) 0;
}

.section--alt {
  background: var(--color-gray-light);
}

/* =============================================================================
   Section 6 — Button Styles
   ============================================================================= */

.btn {
  display: inline-block;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition-base), color var(--transition-base), transform var(--transition-fast);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--color-pink-dark);
  color: var(--color-white);
}

.btn--primary:hover {
  background: #d4708a;
  color: var(--color-white);
}

.btn--outline {
  background: transparent;
  border-color: var(--color-pink-dark);
  color: var(--color-pink-dark);
}

.btn--outline:hover {
  background: var(--color-pink-dark);
  color: var(--color-white);
}

/* =============================================================================
   Section 7 — Navigation
   ============================================================================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  height: var(--nav-height);
}

.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.nav__logo-img {
  height: 44px;
  width: 44px;
  object-fit: contain;
  border-radius: var(--radius-full);
}

.nav__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-charcoal);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav__links a {
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-charcoal);
  padding: var(--space-2) 0;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-pink-dark);
  transition: width var(--transition-base);
}

.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after {
  width: 100%;
}

/* Hamburger button */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  width: 44px;
  height: 44px;
}

.nav__toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-charcoal);
  transition: transform var(--transition-base), opacity var(--transition-base);
  transform-origin: center;
}

/* Open state */
.nav--open .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav--open .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav__toggle { display: flex; }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-6);
    box-shadow: var(--shadow-md);
    text-align: center;
  }

  .nav--open .nav__links { display: flex; }
}

/* =============================================================================
   Section 8 — Hero Section
   ============================================================================= */

.hero {
  background: linear-gradient(135deg, var(--color-pink-light) 0%, var(--color-white) 60%);
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding: var(--space-16) 0;
}

.hero__content { max-width: 600px; }

.hero__eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-pink-dark);
  margin-bottom: var(--space-4);
}

.hero__title { margin-bottom: var(--space-6); }

.hero__tagline {
  font-size: var(--text-lg);
  color: var(--color-gray-accessible);
  margin-bottom: var(--space-8);
  max-width: 50ch;
}

.hero__actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* =============================================================================
   Section 9 — Page Section Generic Styles
   ============================================================================= */

.section__header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section__title { margin-bottom: var(--space-4); }

.section__subtitle {
  color: var(--color-gray-accessible);
  font-size: var(--text-lg);
  max-width: 55ch;
  margin: 0 auto;
}

/* =============================================================================
   Section 10 — Footer
   ============================================================================= */

.footer {
  background: var(--color-charcoal);
  color: var(--color-white);
  padding: var(--space-12) 0 var(--space-8);
  text-align: center;
}

.footer__logo { margin: 0 auto var(--space-4); }

.footer__tagline {
  color: var(--color-pink-light);
  margin-bottom: var(--space-6);
}

.footer__nav {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.footer__nav a {
  color: rgba(255,255,255,0.8);
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer__nav a:hover { color: var(--color-pink); }

.footer__copy {
  color: rgba(255,255,255,0.5);
  font-size: var(--text-sm);
}

/* =============================================================================
   Section 11 — Animations
   ============================================================================= */

/* Fade-up entrance animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale-in for cards/images */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation utility classes */
.animate-fade-up {
  animation: fadeUp var(--transition-slow) ease both;
}

.animate-scale-in {
  animation: scaleIn var(--transition-slow) ease both;
}

/* Stagger delays for lists of animated elements */
.animate-delay-1 { animation-delay: 100ms; }
.animate-delay-2 { animation-delay: 200ms; }
.animate-delay-3 { animation-delay: 300ms; }
.animate-delay-4 { animation-delay: 400ms; }

/* Intersection Observer reveal — hidden until JS adds .is-visible */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card hover lift */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* =============================================================================
   Section 12 — About Page Styles
   ============================================================================= */

.about-hero {
  background: linear-gradient(135deg, var(--color-pink-light) 0%, var(--color-white) 100%);
  padding: var(--space-16) 0;
  text-align: center;
}

.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.about-story__image {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .about-story { grid-template-columns: 1fr; }
}

/* =============================================================================
   Section 13 — Contact Page Styles
   ============================================================================= */

.contact-hero {
  background: linear-gradient(135deg, var(--color-pink-light) 0%, var(--color-white) 100%);
  padding: var(--space-16) 0;
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.contact-info__label {
  font-weight: 600;
  color: var(--color-pink-dark);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.contact-form .form-group { margin-bottom: var(--space-6); }

.contact-form label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  color: var(--color-charcoal);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  background: var(--color-white);
  transition: border-color var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-pink-dark);
}

.contact-form textarea { min-height: 140px; resize: vertical; }

/* =============================================================================
   Section 14 — Product Gallery Styles
   ============================================================================= */

/* Gallery section tab-like category labels */
.category-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-pink-dark);
  background: var(--color-pink-light);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-4);
  margin-bottom: var(--space-6);
}

/* Gallery grid — responsive, equal-height photo tiles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

/* Card image area — replaces Phase 1 inline style placeholders */
.card__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* Card body — replaces Phase 1 inline style padding */
.card__body {
  padding: var(--space-6);
}

.card__body h3 {
  margin-bottom: var(--space-2);
}

.card__body p {
  color: var(--color-gray-accessible);
  font-size: var(--text-sm);
  margin-bottom: 0;
}

/* =============================================================================
   Section 15 — Menu / Pricing Styles
   ============================================================================= */

/* Menu grid — three columns, drops to 2 then 1 on small screens */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
}

/* Individual menu card */
.menu-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.menu-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.menu-card__body {
  padding: var(--space-6);
}

.menu-card__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-charcoal);
  margin-bottom: var(--space-2);
}

.menu-card__desc {
  color: var(--color-gray-accessible);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.menu-card__price {
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--color-pink-dark);
}

/* Hours list on contact page */
.hours-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: var(--text-sm);
  max-width: 100%;
}

.hours-list li:last-child {
  border-bottom: none;
}

.hours-list .day {
  font-weight: 600;
  color: var(--color-charcoal);
}

.hours-list .time {
  color: var(--color-gray-accessible);
}


/* =============================================================================
   Section 9 — Phase 3 Utilities
   ============================================================================= */

.section--center { text-align: center; }

.section__cta { text-align: center; margin-top: var(--space-8); }

.section__cta-heading { margin-bottom: var(--space-4); }

.section__cta-text {
  color: var(--color-gray-accessible);
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

.footer__logo--round { border-radius: var(--radius-full); }

.footer__phone { color: var(--color-pink); }

/* About page */
.hero__tagline--narrow { max-width: 55ch; margin: 0 auto 2rem; }

.about-story__image--placeholder {
  height: 400px;
  background: linear-gradient(135deg, var(--color-pink-light), var(--color-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
}

.about-story__placeholder-icon { font-size: 5rem; }

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.card--centered { padding: 2rem; text-align: center; }

.card__icon { font-size: 2.5rem; margin-bottom: 1rem; }

.card__icon-heading { margin-bottom: 0.75rem; }

.card__muted { color: var(--color-gray-accessible); }

/* Contact page */
.contact-section__heading { margin-bottom: 1.5rem; }

.contact-info__phone {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-charcoal);
}

.contact-info__note {
  font-size: var(--text-xs);
  color: var(--color-gray-accessible);
  margin-top: var(--space-2);
  margin-bottom: 0;
}

.contact-info__item--spaced { margin-top: 2rem; }

.btn--lg { font-size: 1.125rem; }

.btn--full { width: 100%; }

/* Products page */
.menu-section { margin-bottom: var(--space-16); }

.menu-section--last { margin-bottom: 0; }

.section__header--left { text-align: left; margin-bottom: var(--space-8); }

.menu-pricing-note {
  text-align: center;
  color: var(--color-gray-accessible);
  font-size: var(--text-sm);
  margin-top: var(--space-12);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================================================
   Section 16 — Accessibility: Skip Link + Focus Styles (WCAG AA)
   ============================================================================= */

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-charcoal);
  color: var(--color-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: var(--space-2);
}

/* Focus styles — WCAG AA visible focus for all interactive elements */
:focus-visible {
  outline: 3px solid var(--color-pink-dark);
  outline-offset: 3px;
}
/* Remove default outline only when focus-visible is supported */
:focus:not(:focus-visible) {
  outline: none;
}

/* Ensure buttons have explicit focus ring */
.btn:focus-visible {
  outline: 3px solid var(--color-charcoal);
  outline-offset: 3px;
}

/* Form inputs focus */
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 3px solid var(--color-pink-dark);
  outline-offset: 0;
  border-color: var(--color-pink-dark);
}

/* =============================================================================
   Section 17 — Hero Split Layout & Cake Animation
   ============================================================================= */

/* Remove padding from hero — hero__split handles internal spacing */
.hero { padding: 0; }

.hero__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  padding: var(--space-16) 0;
}

@media (max-width: 768px) {
  .hero__split {
    grid-template-columns: 1fr;
    padding: var(--space-12) 0;
  }
  .hero-visual { display: none; }
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cake container — floats gently after build completes */
.cake-anim {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 320px;
  padding: 0 10px 20px;
  animation: cakeFloat 4s ease-in-out infinite 3.2s;
}

/* Sparkle ring — absolute overlay around the cake */
.cake-anim__sparkle-ring {
  position: absolute;
  inset: -20px;
  pointer-events: none;
  z-index: 10;
}

.sparkle {
  position: absolute;
  opacity: 0;
  color: var(--color-pink-dark);
  animation: sparkleRise 2.5s ease-in-out infinite;
  user-select: none;
  line-height: 1;
}

.sparkle::before { content: '✦'; }

.sparkle:nth-child(1) { top: 10%; left: 5%;   animation-delay: 2.5s;  font-size: 0.8rem;  }
.sparkle:nth-child(2) { top: 25%; right: 3%;  animation-delay: 2.8s;  font-size: 1.1rem;  }
.sparkle:nth-child(3) { top: 52%; left: 0%;   animation-delay: 3.1s;  font-size: 0.6rem;  }
.sparkle:nth-child(4) { top: 70%; right: 6%;  animation-delay: 2.65s; font-size: 0.9rem;  }
.sparkle:nth-child(5) { top: 3%;  left: 36%;  animation-delay: 2.9s;  font-size: 0.7rem;  }
.sparkle:nth-child(6) { top: 5%;  right: 28%; animation-delay: 3.2s;  font-size: 1rem;    }
.sparkle:nth-child(7) { top: 42%; left: 2%;   animation-delay: 3.4s;  font-size: 0.65rem; }
.sparkle:nth-child(8) { top: 82%; left: 22%;  animation-delay: 3.0s;  font-size: 1.2rem;  }

/* Cake topper — flower emoji that pops in with spring overshoot */
.cake-anim__topper {
  font-size: 2.2rem;
  margin-bottom: 2px;
  opacity: 0;
  transform: scale(0) translateY(10px);
  animation: topperPop 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) 2.2s forwards;
  position: relative;
  z-index: 6;
}

/* Shared cake layer base */
.cake-anim__layer {
  opacity: 0;
  transform: translateY(20px) scaleX(0.8);
  animation: layerRise 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  position: relative;
}

.cake-anim__layer--top {
  width: 148px;
  height: 56px;
  background: linear-gradient(180deg, #fef4f7 0%, #fce8ef 100%);
  border-radius: 8px 8px 2px 2px;
  box-shadow: inset 0 -3px 6px rgba(232,136,158,0.12), 0 4px 10px rgba(232,136,158,0.18);
  animation-delay: 1.8s;
  z-index: 4;
}

.cake-anim__layer--mid {
  width: 208px;
  height: 66px;
  background: linear-gradient(180deg, #f8cfdd 0%, #f4b8c8 100%);
  border-radius: 8px 8px 2px 2px;
  box-shadow: inset 0 -3px 6px rgba(232,136,158,0.15), 0 5px 12px rgba(232,136,158,0.25);
  animation-delay: 1.2s;
  z-index: 3;
}

.cake-anim__layer--base {
  width: 268px;
  height: 76px;
  background: linear-gradient(180deg, #f0a2b9 0%, #e8889e 100%);
  border-radius: 8px 8px 2px 2px;
  box-shadow: inset 0 -3px 6px rgba(200,80,110,0.18), 0 6px 16px rgba(232,136,158,0.3);
  animation-delay: 0.5s;
  z-index: 2;
}

/* Frosting strips between layers — wider than the layer above, drip rounded bottom */
.cake-anim__frosting {
  background: linear-gradient(180deg, #fffcfd 0%, #fff0f5 100%);
  border-radius: 2px 2px 8px 8px;
  opacity: 0;
  transform: translateY(10px) scaleX(0.8);
  animation: layerRise 0.4s ease forwards;
  position: relative;
  z-index: 5;
}

.cake-anim__frosting--upper {
  width: 174px;
  height: 13px;
  animation-delay: 1.56s;
}

.cake-anim__frosting--lower {
  width: 234px;
  height: 15px;
  animation-delay: 0.96s;
}

/* Plate at the base */
.cake-anim__plate {
  width: 300px;
  height: 13px;
  background: linear-gradient(180deg, #f2f2f2 0%, #e4e4e4 100%);
  border-radius: var(--radius-full);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(10px) scaleX(0.8);
  animation: layerRise 0.4s ease 0.2s forwards;
  z-index: 1;
}

/* Cake build keyframes */
@keyframes layerRise {
  from { opacity: 0; transform: translateY(20px) scaleX(0.8); }
  to   { opacity: 1; transform: translateY(0)     scaleX(1);   }
}

@keyframes topperPop {
  0%   { opacity: 0; transform: scale(0) translateY(10px); }
  60%  { opacity: 1; transform: scale(1.35) translateY(-5px); }
  80%  { transform: scale(0.9) translateY(2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes sparkleRise {
  0%   { opacity: 0; transform: translateY(0)    scale(0.4); }
  20%  { opacity: 1; transform: translateY(-6px)  scale(1);   }
  70%  { opacity: 0.6; transform: translateY(-16px) scale(0.75); }
  100% { opacity: 0; transform: translateY(-26px) scale(0.3); }
}

@keyframes cakeFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* =============================================================================
   Section 18 — About Page: Real Photos, Mosaic & Quote
   ============================================================================= */

/* Story section — real baker photo */
.about-story__img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
}

/* Behind-the-scenes photo mosaic section */
.about-gallery {
  padding: var(--space-16) 0;
  background: var(--color-gray-light);
}

.about-mosaic {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 240px 240px;
  gap: var(--space-4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-mosaic__main {
  grid-row: span 2;
}

.about-mosaic__main img,
.about-mosaic__side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.about-mosaic__main:hover img,
.about-mosaic__side:hover img {
  transform: scale(1.04);
}

.about-mosaic__main,
.about-mosaic__side {
  overflow: hidden;
}

@media (max-width: 768px) {
  .about-mosaic {
    grid-template-columns: 1fr;
    grid-template-rows: 240px 180px 180px;
  }
  .about-mosaic__main { grid-row: span 1; }
}

/* Pull quote section */
.about-quote {
  padding: var(--space-16) 0;
  text-align: center;
  background: var(--color-white);
}

.about-quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  color: var(--color-charcoal);
  line-height: 1.5;
  max-width: 680px;
  margin: 0 auto var(--space-6);
  position: relative;
  padding: 0 var(--space-8);
}

.about-quote blockquote::before {
  content: '\201C';
  font-size: 5rem;
  color: var(--color-pink);
  line-height: 0;
  position: absolute;
  top: 0.55rem;
  left: 0;
  font-family: Georgia, serif;
  opacity: 0.7;
}

.about-quote cite {
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-pink-dark);
}

/* =============================================================================
   Section 19 — Products Page: Expressive Grid Layout
   ============================================================================= */

.products-section {
  margin-bottom: var(--space-16);
}

.products-section:last-of-type {
  margin-bottom: 0;
}

.products-section__header {
  margin-bottom: var(--space-12);
}

/* Base product grid */
.products-grid {
  display: grid;
  gap: var(--space-6);
}

/* Featured layout: large left card spanning 2 rows, 2 smaller on right */
.products-grid--featured {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
}

/* Quad: 4 equal columns */
.products-grid--quad {
  grid-template-columns: repeat(4, 1fr);
}

/* Treats: tall featured left, 2x2 right */
.products-grid--treats {
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: auto auto;
}

@media (max-width: 960px) {
  .products-grid--featured { grid-template-columns: 1fr 1fr; }
  .products-grid--quad     { grid-template-columns: repeat(2, 1fr); }
  .products-grid--treats   { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .products-grid--featured,
  .products-grid--quad,
  .products-grid--treats { grid-template-columns: 1fr; }
  .product-card--featured,
  .product-card--treats-featured { grid-row: span 1; }
}

/* Featured cards span 2 rows */
.product-card--featured       { grid-row: span 2; }
.product-card--treats-featured { grid-row: span 2; }

/* Base product card */
.product-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card__img {
  width: 100%;
  object-fit: cover;
  display: block;
}

/* Standard card image height */
.product-card:not(.product-card--featured):not(.product-card--treats-featured) .product-card__img {
  height: 200px;
}

/* Featured tall image */
.product-card--featured .product-card__img,
.product-card--treats-featured .product-card__img {
  height: 400px;
}

.product-card__body {
  padding: var(--space-6);
}

.product-card__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-charcoal);
  margin-bottom: var(--space-2);
}

.product-card__desc {
  color: var(--color-gray-accessible);
  font-size: var(--text-sm);
  margin-bottom: 0;
}

.product-card__badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-pink-dark);
  background: var(--color-pink-light);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  margin-bottom: var(--space-2);
}

/* Order note at page bottom */
.products-cta-note {
  text-align: center;
  color: var(--color-gray-accessible);
  font-size: var(--text-sm);
  margin-top: var(--space-12);
  padding: var(--space-6) var(--space-8);
  background: var(--color-pink-light);
  border-radius: var(--radius-md);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

.products-cta-note a { font-weight: 600; }
