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

:root {
  --color-bg: #faf8f5;
  --color-surface: #ffffff;
  --color-text: #2c2a28;
  --color-muted: #6b6560;
  --color-accent: #8b6f5c;
  --color-accent-dark: #6d5545;
  --color-error: #c0392b;
  --color-promo: #152238;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
  --shadow: 0 4px 24px rgba(44, 42, 40, 0.08);
  --radius: 8px;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

.hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--color-muted);
  margin-bottom: 2rem;
}

.cta-button {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.85rem 2rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  box-shadow: var(--shadow);
}

.cta-button:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
}

.cta-button:active {
  transform: translateY(0);
}

.promo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  width: calc(100% - 3rem);
  max-width: 800px;
  margin: 0 auto 2.5rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--color-promo) 0%, #1e3555 100%);
  color: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent;
}

.promo-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(21, 34, 56, 0.35);
}

.promo-badge {
  font-family: var(--font-sans);
  flex-shrink: 0;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.promo-text {
  font-size: clamp(0.875rem, 2.5vw, 0.95rem);
  flex: 1 1 12rem;
  text-align: center;
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.promo-cta {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  white-space: nowrap;
}

.carousel-section {
  padding: 2rem 0 4rem;
}

.carousel-section h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 1.5rem;
  font-weight: 600;
  padding: 0 1.5rem;
}

.carousel {
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: max-content;
  animation: carousel-scroll var(--carousel-duration, 40s) linear infinite;
}

.carousel:hover .carousel-track {
  animation-play-state: paused;
}

.carousel-slide {
  flex: 0 0 auto;
  width: clamp(180px, 24vw, 300px);
  aspect-ratio: 3 / 4;
  height: auto;
  padding: 0 0.35rem;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@keyframes carousel-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-1 * var(--carousel-loop-width, 50%)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 0.7rem;
    padding: 0 1rem;
  }

  .carousel-slide {
    width: clamp(140px, 40vw, 220px);
    aspect-ratio: 3 / 4;
    height: auto;
    padding: 0;
  }
}

.quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.quiz-modal.hidden {
  display: none;
}

.quiz-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 42, 40, 0.5);
}

.quiz-content {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(44, 42, 40, 0.2);
}

.quiz-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.quiz-progress {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.quiz-question {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quiz-option {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  background: var(--color-bg);
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.quiz-option:hover {
  border-color: var(--color-accent);
  background: #fff;
}

.quiz-content.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.quiz-error {
  color: var(--color-error);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  font-weight: 600;
}

.quiz-error.hidden {
  display: none;
}

.quiz-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.quiz-close:hover {
  color: var(--color-text);
}

.flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  pointer-events: none;
}

.flash-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 600px) {
  .promo-banner {
    flex-direction: column;
    align-items: stretch;
    width: calc(100% - 2rem);
    margin-bottom: 2rem;
    padding: 1rem;
    gap: 0.75rem;
  }

  .promo-banner:hover {
    transform: none;
  }

  .promo-badge {
    align-self: center;
  }

  .promo-text {
    flex: none;
    text-align: center;
  }

  .promo-cta {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.5rem 1rem;
    white-space: normal;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
  }

  .carousel-slide {
    width: clamp(150px, 42vw, 220px);
    aspect-ratio: 3 / 4;
    height: auto;
  }
}
