:root {
  --lavender-50: #f5f1ff;
  --lavender-100: #e8e0ff;
  --lavender-200: #d6cdf4;
  --lavender-500: #8e7cc3;
  --purple-900: #342b4f;
  --purple-700: #514675;
  --cream: #fff8ef;
  --milk: #fffdf9;
  --cookie: #6b3d2e;
  --cookie-dark: #3f241c;
  --cocoa: #9b643e;
  --sky: #30a7cf;
  --text: #352f3d;
  --muted: #6f687a;
  --shadow: 0 20px 50px rgba(52, 43, 79, 0.14);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

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

figure {
  margin: 0;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  max-width: 820px;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 248, 239, 0.92);
  border-bottom: 1px solid rgba(81, 70, 117, 0.12);
  backdrop-filter: blur(16px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.logo-text {
  color: var(--purple-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

nav a {
  color: var(--purple-700);
  font-size: 0.96rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

nav a:hover,
nav a:focus {
  color: var(--cookie);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  border: 1px solid rgba(81, 70, 117, 0.18);
  border-radius: 8px;
  background: var(--milk);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--purple-900);
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.72), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(48, 167, 207, 0.16), transparent 26%),
    linear-gradient(135deg, var(--lavender-100), var(--lavender-200) 58%, #eee8ff);
  min-height: 660px;
  padding: 58px 0 64px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(255, 248, 239, 0), var(--cream));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 1.06fr);
  align-items: center;
  gap: 52px;
}

.hero-grid > *,
.flavour-card > * {
  min-width: 0;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  color: var(--cookie);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 12px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

h1 {
  color: var(--purple-900);
  font-size: clamp(3rem, 6.6vw, 5.1rem);
  line-height: 0.98;
  margin-bottom: 22px;
}

h1 span {
  display: block;
}

h2 {
  color: var(--purple-900);
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.08;
  margin-bottom: 18px;
}

.tagline {
  color: var(--purple-700);
  font-size: 1.18rem;
  max-width: 560px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 30px;
}

.hero-points span,
.benefit-grid span {
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid rgba(81, 70, 117, 0.14);
  border-radius: 999px;
  color: var(--purple-900);
  font-weight: 800;
  padding: 10px 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  background: var(--cookie);
  box-shadow: 0 12px 24px rgba(107, 61, 46, 0.22);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid rgba(81, 70, 117, 0.18);
  color: var(--purple-900);
}

.hero-visual {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  width: 100%;
}

.product-shot {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  max-width: 100%;
  border: 1px solid rgba(81, 70, 117, 0.16);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.9), transparent 42%),
    linear-gradient(135deg, #efeaff, #d7cdf5);
  box-shadow: var(--shadow);
}

.hero-product-shot {
  width: min(430px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 8px;
}

.compact-product-shot {
  min-height: 520px;
  border-radius: 8px;
}

.product-gallery {
  width: 100%;
}

[data-product-gallery] {
  position: relative;
  width: 100%;
  min-height: 520px;
  border-radius: 8px;
  overflow: hidden;
}

.gallery-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.gallery-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.gallery-slide img {
  position: absolute;
  inset: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
}

.gallery-slide img.zoomed {
  transform: translate(0, 0) scale(2);
  cursor: grab;
}

.gallery-slide img.zoomed:active {
  cursor: grabbing;
}

.gallery-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.9);
  color: var(--purple-900);
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(52, 43, 79, 0.14);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.gallery-control:hover,
.gallery-control:focus {
  transform: translateY(-50%) scale(1.05);
  background: rgba(255, 255, 255, 1);
}

.gallery-control.prev {
  left: 14px;
}

.gallery-control.next {
  right: 14px;
}

.gallery-control.zoom-close {
  display: none;
  top: 14px;
  right: 14px;
  transform: none;
  font-size: 1rem;
  width: 38px;
  height: 38px;
}

.gallery.zoom-active .gallery-control.zoom-close {
  display: grid;
}

.gallery-control.zoom-close:hover,
.gallery-control.zoom-close:focus {
  transform: scale(1.05);
}

.gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.8);
}

.gallery-dot {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(81, 70, 117, 0.2);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.7);
  cursor: pointer;
}

.gallery-dot.active {
  background: var(--purple-900);
  border-color: var(--purple-900);
}

.gallery-dot:focus-visible {
  outline: 2px solid rgba(48, 167, 207, 0.7);
  outline-offset: 2px;
}

.product-shot figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.88);
  color: var(--purple-900);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 9px 14px;
}

@media (max-width: 920px) {
  [data-product-gallery] {
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  [data-product-gallery] {
    min-height: 360px;
  }
}

@media (max-width: 480px) {
  [data-product-gallery] {
    min-height: 320px;
  }

  .gallery-control {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .gallery-dots {
    bottom: 12px;
    gap: 8px;
  }
}
.product-shot figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.88);
  color: var(--purple-900);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 9px 14px;
}

.product-shot.is-missing {
  min-height: 360px;
  padding: 28px;
  text-align: center;
}

.product-shot.is-missing::before {
  content: "Pack photo";
  color: var(--purple-900);
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 7vw, 2.25rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 10px;
  max-width: 100%;
}

.product-shot.is-missing::after {
  content: "img/product-cream-cookie.png";
  color: var(--cookie);
  display: block;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.cookie {
  position: absolute;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 35%, #8a5138 0 3px, transparent 4px),
    radial-gradient(circle at 66% 44%, #8a5138 0 3px, transparent 4px),
    radial-gradient(circle at 50% 68%, #8a5138 0 2px, transparent 3px),
    radial-gradient(circle, var(--cookie-dark) 0 34%, #f4efe7 35% 45%, var(--cookie-dark) 46% 66%, #2a1813 67%);
  box-shadow: 0 10px 18px rgba(63, 36, 28, 0.22);
  z-index: -1;
}

.cookie-one {
  right: -18px;
  top: 48px;
  transform: rotate(28deg);
}

.cookie-two {
  bottom: 52px;
  left: -18px;
  transform: rotate(-18deg);
}

.brand-story,
.product-section,
.ingredients-section,
.contact-section {
  padding: 84px 0;
}

.brand-story {
  background: var(--cream);
  text-align: center;
}

.brand-story p:not(.eyebrow),
.section-heading p:not(.eyebrow),
.flavour-content p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.product-section {
  background:
    linear-gradient(90deg, rgba(255, 253, 249, 0.88), rgba(255, 248, 239, 0.68)),
    var(--lavender-50);
}

.section-heading {
  margin: 0 auto 38px;
  max-width: 780px;
  text-align: center;
}

.product-list {
  display: grid;
  gap: 22px;
}

.flavour-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 34px;
  border: 1px solid rgba(81, 70, 117, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 18px 42px rgba(52, 43, 79, 0.09);
  padding: 22px;
}

.flavour-content {
  padding: 20px 12px;
}

.flavour-content h3 {
  color: var(--purple-900);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.05;
  margin-bottom: 14px;
}

.benefit-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 26px;
}

.benefit-grid span {
  font-size: 0.92rem;
  padding: 9px 13px;
}

.ingredients-section {
  background: var(--milk);
}

.ingredient-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.ingredient,
.contact-card {
  border: 1px solid rgba(81, 70, 117, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 12px 30px rgba(52, 43, 79, 0.08);
}

.ingredient {
  min-height: 250px;
  padding: 22px 18px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ingredient:hover {
  box-shadow: 0 18px 38px rgba(52, 43, 79, 0.13);
  transform: translateY(-4px);
}

.ingredient img {
  width: 104px;
  height: 104px;
  border: 6px solid var(--lavender-50);
  border-radius: 50%;
  margin: 0 auto 16px;
  object-fit: cover;
}

.ingredient h3 {
  color: var(--purple-900);
  font-size: 1.15rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

.ingredient p {
  color: var(--muted);
  font-size: 0.96rem;
}

.contact-section {
  background:
    radial-gradient(circle at top left, rgba(48, 167, 207, 0.14), transparent 24%),
    var(--lavender-50);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.contact-card {
  min-height: 176px;
  padding: 26px;
}

.contact-label {
  color: var(--cookie);
  display: block;
  font-size: 0.8rem;
  font-weight: 900;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.contact-card p {
  color: var(--muted);
  margin-bottom: 8px;
}

.contact-card a {
  color: var(--purple-900);
  font-weight: 800;
  text-decoration: none;
}

.contact-card a:hover,
.contact-card a:focus {
  color: var(--cookie);
}

footer {
  background: var(--purple-900);
  color: rgba(255, 253, 249, 0.82);
  padding: 24px 0;
  text-align: center;
}

@media (max-width: 920px) {
  .hero {
    padding-top: 44px;
  }

  .hero-grid,
  .flavour-card {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .flavour-content {
    max-width: min(760px, 100%);
    position: static;
    text-align: center;
  }

  .hero-points,
  .hero-actions,
  .benefit-grid {
    justify-content: center;
  }

  .hero-visual {
    min-height: auto;
  }

  .ingredient-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .container {
    width: min(1120px, calc(100% - 28px));
  }

  .navbar {
    min-height: 68px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  nav {
    position: absolute;
    top: 68px;
    left: 14px;
    right: 14px;
  }

  nav ul {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(81, 70, 117, 0.14);
    border-radius: 8px;
    background: var(--milk);
    box-shadow: var(--shadow);
  }

  nav ul.active {
    display: flex;
  }

  nav a {
    display: block;
    padding: 14px 18px;
  }

  nav li + li {
    border-top: 1px solid rgba(81, 70, 117, 0.1);
  }

  .hero {
    min-height: auto;
    padding: 42px 0 56px;
  }

  .hero-grid,
  .hero-copy,
  .hero-visual,
  .hero-actions {
    max-width: calc(100vw - 28px);
    width: calc(100vw - 28px);
  }

  h1 {
    font-size: clamp(2.35rem, 10vw, 3.35rem);
    line-height: 1.04;
    overflow-wrap: anywhere;
  }

  .tagline {
    font-size: 1.03rem;
    max-width: 100%;
  }

  .hero-product-shot {
    width: min(100%, 360px);
    aspect-ratio: 4 / 5;
  }

  .compact-product-shot {
    min-height: 420px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    margin-inline: auto;
    max-width: 340px;
  }

  .btn {
    width: 100%;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .ingredient-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .hero-copy,
  .hero-actions {
    max-width: 340px;
    width: 100%;
  }

  .tagline {
    max-width: 320px;
    margin-inline: auto;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-product-shot {
    width: min(100%, 340px);
    aspect-ratio: 1 / 1;
  }

  .product-shot figcaption {
    left: 12px;
    right: 12px;
    text-align: center;
  }

  .flavour-card {
    padding: 14px;
  }

  .benefit-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ingredient-list {
    grid-template-columns: 1fr;
  }
}
