/* Switch Flavours homepage — hand-built, no frameworks */
:root {
  --cream: #f6efe3;
  --cream-deep: #efe5d3;
  --ink: #221c15;
  --ink-soft: #5c5245;
  --raspberry: #a3163c;
  --raspberry-bright: #e0455a;
  --orange: #d96c2c;
  --leaf: #3e6b4f;
  --grape: #5d3a7a;
  --sky: #2c6e8a;
  --caramel: #a3622a;
  --radius: 20px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Space Grotesk", "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a { color: inherit; }

.wrap { width: min(1160px, 92vw); margin-inline: auto; position: relative; z-index: 2; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.top-strip {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  position: relative;
  z-index: 3;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgb(34 28 21 / 0.08);
  transition: box-shadow 0.3s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px rgb(34 28 21 / 0.10); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.7rem;
  gap: 1rem;
}

.brand img { width: 213px; height: auto; }

.primary-navigation {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-weight: 500;
}
.primary-navigation a {
  text-decoration: none;
  position: relative;
}
.primary-navigation a:not(.button)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--raspberry-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.primary-navigation a:not(.button):hover::after,
.primary-navigation a:not(.button):focus-visible::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* buttons */
.button {
  display: inline-block;
  background: var(--raspberry);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 2px solid var(--raspberry);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
}
.button:hover, .button:focus-visible {
  background: var(--raspberry-bright);
  border-color: var(--raspberry-bright);
  transform: translateY(-2px);
}
.button-small { padding: 0.45rem 1.1rem; font-size: 0.92rem; }
.button-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.button-ghost:hover, .button-ghost:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

/* type */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; font-weight: 600; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--raspberry); }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--raspberry);
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.section-lede { color: var(--ink-soft); max-width: 56ch; margin-top: 0.8rem; }

/* hero */
.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  overflow: hidden;
}
.glow {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(224 69 90 / 0.16), transparent 62%);
  top: -20vmax;
  right: -15vmax;
  pointer-events: none;
  transform: translate(var(--glow-x, 0), var(--glow-y, 0));
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.lede { font-size: 1.15rem; color: var(--ink-soft); margin-top: 1.2rem; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }

.hero-facts {
  display: flex;
  gap: 2.2rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
}
.hero-facts div { min-width: 90px; }
.hero-facts dt {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--raspberry);
  line-height: 1;
}
.hero-facts dd { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.3rem; }

.hero-art { position: relative; }
.hero-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgb(34 28 21 / 0.35);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.hero-chip {
  position: absolute;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgb(34 28 21 / 0.25);
}
.chip-one { top: 6%; left: -1.2rem; }
.chip-two { bottom: 8%; right: -0.8rem; background: var(--raspberry); }

/* gentle float, scroll-driven where supported */
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-chip { animation: floaty 5s ease-in-out infinite; }
.chip-two { animation-delay: -2.5s; }

/* marquee */
.marquee {
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
  padding: 0.9rem 0;
  position: relative;
  z-index: 2;
}
.marquee-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: marquee 40s linear infinite;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* shelves */
.shelves { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.4rem;
}
.shelf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.6rem 1.5rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--cream);
  overflow: hidden;
  min-height: 220px;
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.shelf-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(140% 110% at 85% -10%, rgb(255 255 255 / 0.28), transparent 55%);
}
.shelf-card:hover, .shelf-card:focus-visible {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow: 0 24px 44px -18px rgb(34 28 21 / 0.45);
}
.shelf-card h3 { font-size: 1.55rem; }
.shelf-card p { font-size: 0.92rem; opacity: 0.88; max-width: 26ch; }
.shelf-number {
  font-family: var(--font-display);
  font-size: 0.95rem;
  opacity: 0.7;
  letter-spacing: 0.1em;
}
.shelf-count {
  margin-top: auto;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}
.shelf-arrow {
  position: absolute;
  right: 1.3rem;
  bottom: 1.2rem;
  font-size: 1.3rem;
  transition: transform 0.25s ease;
}
.shelf-card:hover .shelf-arrow { transform: translateX(6px); }
.shelf-card.fruit { background: linear-gradient(150deg, #d94f63, var(--raspberry)); }
.shelf-card.dessert { background: linear-gradient(150deg, #c98a4b, var(--caramel)); }
.shelf-card.sweets { background: linear-gradient(150deg, #b45f9e, #7c2d5e); }
.shelf-card.drinks { background: linear-gradient(150deg, #4b90ad, var(--sky)); }
.shelf-card.mint { background: linear-gradient(150deg, #5d9c78, var(--leaf)); }
.shelf-card.extras { background: linear-gradient(150deg, #7a5fa0, var(--grape)); }

/* mixer */
.mixer {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}
.mixer .eyebrow { color: var(--raspberry-bright); }
.mixer h2 em { color: var(--raspberry-bright); }
.mixer .section-lede { color: rgb(246 239 227 / 0.75); }
.mixer-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.mixer-picker {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem 1rem;
  align-items: center;
  margin-top: 2rem;
  max-width: 420px;
}
.mixer-picker label { font-size: 0.9rem; color: rgb(246 239 227 / 0.8); }
.mixer-picker select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgb(246 239 227 / 0.3);
  background: rgb(246 239 227 / 0.08);
  color: var(--cream);
  width: 100%;
}
.mixer-picker select option { color: var(--ink); }
.mixer-picker .button { grid-column: 1 / -1; justify-self: start; margin-top: 0.4rem; }

.mixer-stage { text-align: center; }
.mixer-glass {
  width: min(260px, 60vw);
  height: 320px;
  margin-inline: auto;
  border: 3px solid rgb(246 239 227 / 0.55);
  border-top-width: 2px;
  border-radius: 18px 18px 60px 60px;
  position: relative;
  overflow: hidden;
  background: rgb(246 239 227 / 0.05);
}
.mixer-liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72%;
  background: var(--mix-colour, #b03060);
  transition: background 0.7s ease;
}
.mixer-liquid::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -25%;
  width: 150%;
  height: 28px;
  border-radius: 45%;
  background: inherit;
  animation: slosh 4s ease-in-out infinite;
}
@keyframes slosh {
  0%, 100% { transform: translateX(-6%) rotate(-1.5deg); }
  50% { transform: translateX(6%) rotate(1.5deg); }
}
.mixer-shine {
  position: absolute;
  top: 8%;
  left: 12%;
  width: 12%;
  height: 60%;
  border-radius: 999px;
  background: linear-gradient(rgb(255 255 255 / 0.35), transparent);
}
.mixer-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-top: 1.4rem;
  font-style: italic;
}
.mixer-quip { color: rgb(246 239 227 / 0.7); font-size: 0.95rem; margin-top: 0.4rem; min-height: 2.6em; }

/* ingredients */
.ingredients { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  margin-top: 2.4rem;
}
.ingredient-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgb(34 28 21 / 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ingredient-card:hover, .ingredient-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 24px 44px -18px rgb(34 28 21 / 0.3);
}
.ingredient-card img { width: 100%; height: 100%; object-fit: cover; }
.ingredient-body { padding: 1.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.ingredient-tag {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: var(--raspberry);
  font-weight: 700;
}
.ingredient-body h3 { font-size: 1.45rem; }
.ingredient-body p { color: var(--ink-soft); font-size: 0.95rem; }
.ingredient-link { margin-top: auto; font-weight: 700; color: var(--raspberry); }

/* about */
.about {
  background: var(--cream-deep);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.about-copy p + p { margin-top: 1rem; }
.about-copy .button { margin-top: 1.6rem; }

/* contact */
.contact { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.2rem;
}
.contact-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.7rem;
  border: 1px solid rgb(34 28 21 / 0.08);
}
.contact-card h3 { font-size: 1.25rem; margin-bottom: 0.7rem; color: var(--raspberry); }
.contact-card a { font-weight: 700; }
.contact-note { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.4rem; }
.contact-shop-link {
  display: inline-block;
  margin-top: 0.9rem;
  text-decoration: none;
  border-bottom: 2px solid var(--raspberry-bright);
}

/* footer */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 2.2rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-inner img { filter: brightness(0) invert(0.94) sepia(0.12); }
.footer-nav { display: flex; gap: 1.4rem; }
.footer-nav a { text-decoration: none; opacity: 0.85; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }
.footer-copy { font-size: 0.85rem; opacity: 0.7; }

/* scroll-driven underline flourish on section headers (progressive enhancement) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .shelves h2, .mixer h2, .ingredients h2, .about h2, .contact h2 {
      animation: header-sway linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
    @keyframes header-sway {
      from { transform: translateY(24px); letter-spacing: 0.02em; }
      to { transform: translateY(0); letter-spacing: 0; }
    }
  }
}

/* responsive */
@media (max-width: 960px) {
  .hero-inner, .mixer-inner, .about-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .shelf-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .ingredient-grid { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .menu-toggle { display: flex; }
  .primary-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 1.2rem 4vw 1.6rem;
    border-bottom: 1px solid rgb(34 28 21 / 0.1);
    box-shadow: 0 20px 30px rgb(34 28 21 / 0.12);
    display: none;
  }
  .primary-navigation.is-open { display: flex; }
  .header-inner { position: relative; }
}

@media (max-width: 560px) {
  .shelf-grid { grid-template-columns: 1fr; }
  .ingredient-card { grid-template-columns: 1fr; }
  .ingredient-card img { max-height: 260px; }
  .hero-facts { gap: 1.4rem; }
  .brand img { width: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track, .hero-chip, .mixer-liquid::before { animation: none; }
  .hero-frame, .glow { transform: none !important; }
  * { transition-duration: 0.01ms !important; }
}
