/* ===================== Design tokens ===================== */
:root {
  --cream: #f6efdc;
  --cream-alt: #ece1c4;
  --paper: #fffdf7;
  --sage: #2e6b45;
  --sage-light: #5c8967;
  --sage-pale: #e1e9de;
  --mustard: #e3ae3d;
  --mustard-dark: #c98f27;
  --ink: #2e2a1f;
  --ink-soft: rgba(46, 42, 31, 0.7);
  --ink-faint: rgba(46, 42, 31, 0.5);
  --radius: 20px;
  --max-w: 1140px;
  --shadow: 0 14px 30px rgba(46, 42, 31, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Baloo 2", Georgia, sans-serif;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.section {
  padding: 96px 24px;
}

.section--alt {
  background: var(--cream-alt);
}

.section--dark {
  background: var(--sage-pale);
  color: var(--ink);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  background: rgba(227, 174, 61, 0.25);
  color: var(--mustard-dark);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
}

.section-heading {
  font-size: clamp(2rem, 4vw, 2.75rem);
  max-width: 640px;
}

.section-intro {
  margin-top: 16px;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.section--dark .section-intro {
  color: var(--ink-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.btn--primary {
  background: var(--sage);
  color: var(--paper);
  box-shadow: var(--shadow);
}

.btn--primary:hover {
  background: var(--sage-light);
}

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

.btn--outline:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ===================== Header ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sage);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  /* stop the browser from nudging scroll position to compensate for the
     header's own animated resize — that feedback loop is what caused the
     shrink/grow flicker */
  overflow-anchor: none;
}

.nav-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 30px 24px;
  transition: padding 0.25s ease;
}

.site-header.is-scrolled .nav-bar {
  padding: 10px 24px;
}

.nav-side {
  display: none;
  gap: 28px;
  align-items: center;
}

.nav-side--left {
  grid-column: 1;
}

.nav-side--right {
  grid-column: 3;
  justify-content: flex-end;
}

.nav-link {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--paper);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--mustard);
}

.brand {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The rounded "badge" background lives on its own wrapper, never on the
   image itself — border-radius on an <img> clips the artwork inside it,
   which was cutting into the logo's letterforms. The wrapper only ever
   draws a background shape around the logo; it never clips its content,
   so the full logo stays visible no matter how tight the curve is. */
.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  padding: 14px 52px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transition: padding 0.25s ease, border-radius 0.25s ease;
}

.logo-badge img {
  height: 70px;
  width: auto;
  display: block;
  transition: height 0.25s ease;
}

.site-header.is-scrolled .logo-badge {
  padding: 8px 26px;
}

.site-header.is-scrolled .logo-badge img {
  height: 34px;
}

.nav-toggle {
  grid-column: 3;
  justify-self: end;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--paper);
  border-radius: 2px;
}

.mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: var(--sage);
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.mobile-nav.is-open {
  max-height: 400px;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  padding: 12px 24px 20px;
}

.mobile-nav-link {
  padding: 12px 0;
  font-weight: 700;
  color: var(--paper);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-nav-link:hover {
  color: var(--mustard);
}

@media (min-width: 900px) {
  .nav-side {
    display: flex;
  }
  .nav-toggle,
  .mobile-nav {
    display: none;
  }
}

/* ===================== Hero ===================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 24px 120px;
  text-align: center;
}

.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.float-shape {
  position: absolute;
  opacity: 0.22;
  animation: floaty 7s ease-in-out infinite;
}

.float-shape--0 { color: var(--sage); }
.float-shape--1 { color: var(--mustard-dark); }
.float-shape--2 { color: var(--sage-light); }
.float-shape--3 { color: var(--mustard); }

.float-shape .icon {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-16px) rotate(var(--r, 0deg)); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.hero-headline {
  margin-top: 20px;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
}

.hero-sub {
  margin: 24px auto 0;
  max-width: 560px;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.hero-ctas {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===================== Flavors ===================== */
.flavor-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.flavor-card {
  text-align: center;
}

.bag-wrap {
  max-width: 210px;
  margin: 0 auto;
}

.bag-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.bag-body {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 2;
}

.bag-seal {
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 2;
}

.bag-rule {
  stroke: var(--ink-faint);
  stroke-width: 1;
}

.bag-title {
  font-family: "Baloo 2", Georgia, sans-serif;
  font-weight: 700;
  font-size: 21px;
  text-anchor: middle;
  fill: var(--ink);
}

.bag-sub {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-anchor: middle;
  fill: var(--ink-soft);
}

.bag-note {
  font-size: 10px;
  text-anchor: middle;
  fill: var(--ink-faint);
}

.flavor-name {
  margin-top: 20px;
  font-size: 1.3rem;
}

.flavor-desc {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.flavor-note {
  margin-top: 40px;
  text-align: center;
  color: var(--ink-faint);
  font-style: italic;
}

.flavor-cta {
  margin-top: 28px;
  text-align: center;
}

/* ===================== About ===================== */
.about-paragraphs {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 720px;
}

.about-p {
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* ===================== Card grids (suppliers / segments) ===================== */
.card-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.supplier-card,
.segment-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.section--dark .segment-card,
.section--dark .supplier-card {
  background: var(--paper);
  box-shadow: var(--shadow);
  border: none;
}

.card-title {
  font-size: 1.25rem;
}

.card-desc {
  margin-top: 12px;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.section--dark .card-desc {
  color: var(--ink-soft);
}

.card-cta {
  margin-top: 20px;
  font-weight: 700;
  color: var(--sage);
}

.card-cta:hover {
  color: var(--mustard-dark);
}

.suppliers-cta {
  margin-top: 40px;
  text-align: center;
}

/* ===================== Contact ===================== */
.contact-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}

.contact-item-label {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.contact-item-value {
  margin-top: 6px;
  font-size: 1.15rem;
  font-family: "Baloo 2", Georgia, sans-serif;
}

/* ===================== Contact form page ===================== */
.container--narrow {
  max-width: 640px;
}

.contact-form {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(46, 42, 31, 0.18);
  border-radius: 12px;
  padding: 12px 16px;
  resize: vertical;
}

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

.form-privacy-note {
  font-size: 0.85rem;
  color: var(--ink-faint);
  line-height: 1.5;
}

.contact-form .btn {
  align-self: flex-start;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.contact-form .btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.form-honeypot {
  display: none;
}

.form-status {
  font-size: 0.95rem;
  font-weight: 700;
  min-height: 1.2em;
}

.form-status--success {
  color: var(--sage);
}

.form-status--error {
  color: #a3402a;
}

.social-links {
  margin-top: 40px;
  display: flex;
  gap: 20px;
}

.social-link {
  font-weight: 700;
  border-bottom: 2px solid var(--mustard);
  padding-bottom: 2px;
}

.section-divider {
  background: var(--cream);
  height: 96px;
}

/* ===================== Footer ===================== */
.site-footer {
  background: var(--ink);
  color: rgba(255, 253, 247, 0.75);
  padding: 40px 24px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Baloo 2", Georgia, sans-serif;
  font-weight: 700;
  color: var(--paper);
  font-size: 1.1rem;
}

.footer-brand img {
  height: 44px;
  width: auto;
  background: var(--paper);
  padding: 8px 14px;
  border-radius: 10px;
}

.cookie-notice {
  max-width: 640px;
  font-size: 0.85rem;
  color: rgba(255, 253, 247, 0.6);
}

.copyright {
  font-size: 0.85rem;
  width: 100%;
  text-align: center;
  margin-top: 20px;
  color: rgba(255, 253, 247, 0.45);
}

/* ===================== Floating mascot ===================== */
.mascot-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-decoration: none;
}

.mascot-bubble {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font-family: "Baloo 2", Georgia, sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.mascot-bubble::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -8px;
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: var(--paper) transparent transparent transparent;
}

.mascot-img {
  width: 88px;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
  transition: transform 0.2s ease;
}

.mascot-widget:hover .mascot-img {
  transform: scale(1.08) rotate(-4deg);
}

@media (max-width: 560px) {
  .mascot-widget {
    right: 16px;
    bottom: 16px;
  }
  .mascot-img {
    width: 68px;
  }
  .mascot-bubble {
    font-size: 0.8rem;
    padding: 8px 14px;
  }
}
