/* ==========================================================
   PETFOODZ — style.css
   Brand: cream paper, bark brown + moss green box stripes,
   logo pink & sunny yellow, chunky rounded type, handwritten
   marker accents. The website version of the box.
   ========================================================== */

:root {
  --cream: #f6efe1;
  --cream-2: #ede2cb;
  --bark: #6f4e46;
  --bark-dark: #4a332e;
  --moss: #94a970;
  --moss-dark: #6d8150;
  --sunny: #f2c230;
  --rosy: #e8728f;
  --amber: #c97b4a;
  --ink: #261d18;

  --display: "Fredoka", sans-serif;
  --hand: "Gochi Hand", cursive;
  --body: "Nunito", sans-serif;

  --radius: 22px;
  --shadow: 0 10px 30px rgba(38, 29, 24, .14);
  --maxw: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream) url("../assets/img/paper-texture.jpg");
  background-size: 900px;
  background-blend-mode: multiply;
}

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

[hidden] { display: none !important; }

a { color: inherit; }

h1, h2, h3 { font-family: var(--display); line-height: 1.08; }

h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 700; letter-spacing: -.5px; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }

section { padding: 66px 24px; }

.eyebrow {
  font-family: var(--hand);
  font-size: 1.35rem;
  color: var(--bark);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: rotate(-1.4deg);
}

.section-head { max-width: var(--maxw); margin: 0 auto 40px; text-align: center; }
.section-head .eyebrow { margin-bottom: 6px; }
.section-sub { margin-top: 12px; color: rgba(38,29,24,.72); font-size: 1.06rem; }
.section-head-light h2 { color: var(--cream); }
.section-head-light .eyebrow { color: var(--sunny); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  border: 3px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn-moss { background: var(--moss); color: var(--ink); }
.btn-sunny { background: var(--sunny); color: var(--ink); }
.btn-line { background: transparent; color: var(--ink); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 22px;
  background: rgba(246, 239, 225, .97);
  border-bottom: 3px solid var(--ink);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo { width: 46px; height: 46px; }
.nav-word { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: .5px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) {
  text-decoration: none;
  font-weight: 700;
  font-size: .98rem;
  position: relative;
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 3px;
  background: var(--rosy);
  border-radius: 2px;
  transition: right .2s ease;
}
.nav-links a:not(.btn):hover::after { right: 0; }
.nav-cta { padding: 9px 20px; font-size: .95rem; }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-burger span {
  display: block;
  width: 26px; height: 3.5px;
  background: var(--ink);
  border-radius: 3px;
  margin: 5px 0;
}

/* ---------- hero ---------- */
.hero { position: relative; padding: 60px 24px 0; overflow: hidden; }
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 30px;
  padding-bottom: 70px;
}
.hero-copy .eyebrow { font-size: 1.5rem; margin-bottom: 14px; }
.wi-mini { width: 34px; height: 36px; color: var(--bark); }
.hero-sub { margin: 20px 0 28px; font-size: 1.13rem; max-width: 34rem; color: rgba(38,29,24,.8); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin-top: 30px; }
.hero-chips li {
  font-family: var(--hand);
  font-size: 1.05rem;
  padding: 4px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--cream-2);
  transform: rotate(-1deg);
}
.hero-chips li:nth-child(2n) { transform: rotate(1.2deg); background: #f5d9e1; }

/* squiggle underline under "perfect chew" */
.squiggle { position: relative; white-space: nowrap; }
.squiggle::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 14px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 20" preserveAspectRatio="none"><path d="M3 14 C 30 4, 60 18, 95 10 C 130 3, 165 16, 197 8" fill="none" stroke="%23f2c230" stroke-width="7" stroke-linecap="round"/></svg>') no-repeat center / 100% 100%;
}

.hero-art { position: relative; padding: 10px 6px 0; }
.hero-img { width: 100%; height: auto; filter: drop-shadow(0 18px 24px rgba(38,29,24,.25)); }
.hero-badge {
  position: absolute;
  width: 120px;
  top: 2%;
  left: -4%;
  animation: wobble 7s ease-in-out infinite;
  filter: drop-shadow(0 6px 10px rgba(38,29,24,.25));
}
.hero-note {
  position: absolute;
  bottom: 4%;
  left: -2%;
  font-family: var(--hand);
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--bark);
  max-width: 190px;
  transform: rotate(-4deg);
}
.hero-note svg { width: 64px; margin: 4px 0 0 60px; color: var(--bark); }

/* hero entrance */
.drop-1, .drop-2, .drop-3 { animation: stickerDrop .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.drop-2 { animation-delay: .25s; }
.drop-3 { animation-delay: .5s; }
@keyframes stickerDrop {
  from { opacity: 0; transform: scale(1.25) rotate(4deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
.hero-note.drop-3 { animation-name: stickerDropNote; }
@keyframes stickerDropNote {
  from { opacity: 0; transform: scale(1.25) rotate(2deg); }
  to   { opacity: 1; transform: scale(1) rotate(-4deg); }
}
@keyframes wobble {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(7deg); }
}

.stripe-band { height: 92px; }
.stripe-band svg { width: 100%; height: 100%; }

/* ---------- ticker ---------- */
.ticker {
  background: var(--bark-dark);
  overflow: hidden;
  padding: 12px 0;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: tick 26s linear infinite;
}
.ticker-track span {
  font-family: var(--hand);
  font-size: 1.3rem;
  color: var(--cream);
  white-space: nowrap;
  letter-spacing: 1px;
}
@keyframes tick {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- the antler story (scroll-driven) ---------- */
.story { padding-bottom: 60px; }
.story .section-head { margin-bottom: 10px; }

.story-scroll { height: 520vh; position: relative; }

.story-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 66px;
}

#storySvg {
  width: min(96vw, 1150px);
  max-height: calc(100vh - 140px);
}

.story-hand { font-family: var(--hand); font-size: 24px; fill: var(--bark); }

/* caption cards */
.story-card {
  position: absolute;
  left: max(18px, 3vw);
  top: 50%;
  width: min(330px, 86vw);
  background: #fffdf6;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(calc(-50% + 18px)) rotate(-1deg);
  transition: opacity .35s ease, transform .35s ease, visibility .35s;
}
.story-card.is-on {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) rotate(-1deg);
}
.story-kicker {
  font-family: var(--hand);
  font-size: 1.15rem;
  color: var(--rosy);
  transform: rotate(-1deg);
}
.story-card h3 { font-size: 1.4rem; margin: 4px 0 10px; }
.story-card p { font-size: .95rem; color: rgba(38,29,24,.85); }
.story-cta { margin-top: 14px; padding: 10px 22px; font-size: .95rem; }

/* scene dots */
.story-dots {
  position: absolute;
  right: max(14px, 2vw);
  top: 50%;
  transform: translateY(-50%);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.story-dots li {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--cream-2);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.story-dots li.on { background: var(--sunny); transform: scale(1.3); }

/* static storyboard fallback (reduced motion / no JS) */
.story.static .story-scroll { height: auto; }
.story.static .story-stage {
  position: static;
  height: auto;
  display: block;
  overflow: visible;
  padding-top: 10px;
}
.story.static .story-cards {
  display: grid;
  gap: 16px;
  max-width: 620px;
  margin: 20px auto 0;
}
.story.static .story-card {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  width: auto;
}
.story.static .story-dots { display: none; }

.chew-smart {
  max-width: var(--maxw);
  margin: 44px auto 0;
  background: var(--cream-2);
  border: 3px dashed var(--bark);
  border-radius: var(--radius);
  padding: 18px 24px;
  font-size: .98rem;
}

/* ---------- footage ---------- */
.footage { background: var(--bark-dark); }
.footage .section-head h2 { color: var(--cream); }
.footage .section-head .eyebrow { color: var(--sunny); }
.footage .section-sub { color: rgba(246,239,225,.7); }

.footage-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 300px;
  gap: 22px;
  align-items: stretch;
}
.clip {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
  grid-column: span 2;
}
.clip-big { grid-column: span 4; grid-row: span 1; }
.clip video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.clip-big video { aspect-ratio: 16 / 8.4; }
.clip figcaption {
  position: absolute;
  left: 14px; bottom: 12px;
  font-family: var(--hand);
  font-size: 1.15rem;
  color: var(--cream);
  background: rgba(38, 29, 24, .78);
  padding: 3px 14px;
  border-radius: 999px;
  transform: rotate(-1.5deg);
}

.polaroid {
  grid-column: span 2;
  background: #fffdf6;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 14px 14px 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.polaroid img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  flex: 1;
  min-height: 0;
}
.polaroid-box { object-fit: contain !important; background: var(--cream); padding: 12px; }
.polaroid figcaption {
  font-family: var(--hand);
  font-size: 1.15rem;
  text-align: center;
  padding-top: 8px;
  color: var(--ink);
}
.tilt-l { transform: rotate(-1.6deg); }
.tilt-r { transform: rotate(1.8deg); }

/* ---------- process ---------- */
.process { position: relative; padding: 100px 24px; overflow: hidden; }
.process-bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .97; }
.process-inner { position: relative; max-width: var(--maxw); margin: 0 auto; }

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.step {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--ink);
  padding: 26px 22px 24px;
  position: relative;
}
.step:nth-child(odd) { transform: rotate(-.7deg); }
.step:nth-child(even) { transform: rotate(.7deg); }
.step-num {
  position: absolute;
  top: -18px; left: -12px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--sunny);
  border: 3px solid var(--ink);
  font-family: var(--hand);
  font-size: 1.5rem;
  display: grid;
  place-items: center;
  transform: rotate(-6deg);
}
.step-icon { width: 46px; height: 46px; color: var(--bark); margin-bottom: 12px; }
.step h3 { margin-bottom: 8px; }
.step p { font-size: .95rem; color: rgba(38,29,24,.82); }

.planet-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 44px;
}
.planet-chips li {
  font-family: var(--hand);
  font-size: 1.1rem;
  color: var(--cream);
  border: 2.5px dashed var(--cream);
  border-radius: 999px;
  padding: 6px 20px;
  background: rgba(38, 29, 24, .25);
}
.planet-chips strong { color: var(--sunny); font-weight: 400; }

/* ---------- stores ---------- */
.stores-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 22px;
  align-items: stretch;
}
.store-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 520px;
  overflow-y: auto;
  padding: 4px 6px 4px 2px;
}
.store-card {
  text-align: left;
  font-family: var(--body);
  font-size: 1rem;
  background: #fffdf6;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 16px 18px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 3px 0 var(--ink);
}
.store-card:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.store-card.active { background: #f5eeda; box-shadow: 0 5px 0 var(--moss-dark); border-color: var(--moss-dark); }
.store-card h4 { font-family: var(--display); font-weight: 600; font-size: 1.08rem; margin-bottom: 2px; }
.store-card p { font-size: .92rem; color: rgba(38,29,24,.75); }
.store-card .store-note { font-family: var(--hand); color: var(--bark); margin-top: 4px; }

.store-map-wrap {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 420px;
}
#storeMap { width: 100%; height: 100%; min-height: 520px; background: var(--cream-2); }
#storeMap .map-fallback { padding: 40px; text-align: center; font-size: 1.05rem; }

.map-pin {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 3px 8px rgba(38,29,24,.35);
}
.map-pin img { width: 100%; height: 100%; }
.leaflet-popup-content-wrapper {
  font-family: var(--body);
  border: 3px solid var(--ink);
  border-radius: 16px;
}
.leaflet-popup-content h4 { font-family: var(--display); font-size: 1.05rem; margin-bottom: 2px; }
.leaflet-popup-content p { margin: 2px 0; }

.wholesale {
  max-width: var(--maxw);
  margin: 40px auto 0;
  background: var(--moss);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--ink);
  padding: 30px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.wholesale h3 { font-size: 1.5rem; margin-bottom: 4px; }
.wholesale p { max-width: 46rem; }

/* ---------- about ---------- */
.about { background: var(--cream-2); border-top: 3px solid var(--ink); }
.about-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 46px;
  align-items: center;
}
/* .polaroid defaults to grid-column: span 2 (for the 6-col footage grid);
   in these 2-col grids the photo must occupy a single column, not both. */
.about-photo, .award-photo { grid-column: auto; }
.about-photo { max-width: 380px; }
.about-copy h2 { margin: 6px 0 18px; }
.about-copy p { margin-bottom: 16px; color: rgba(38,29,24,.85); }
.about-copy .btn { margin-top: 6px; }

/* ---------- awards / backed by ---------- */
.awards { background: var(--cream-2); border-top: 3px solid var(--ink); }
.awards-grid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 44px;
  align-items: center;
}
.award-photo { max-width: 400px; width: 100%; margin: 0; }
.award-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.awards-copy { max-width: 40rem; }
.awards-copy p { margin-bottom: 14px; color: rgba(38,29,24,.85); font-size: 1.04rem; }
.supported-by {
  font-family: var(--hand);
  font-size: 1.35rem;
  color: var(--bark);
  transform: rotate(-1deg);
  margin: 28px 0 16px !important;
}
.award-logos { display: flex; align-items: stretch; gap: 18px; flex-wrap: wrap; }
.award-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fffdf6;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--ink);
  padding: 12px 22px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.award-logo:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.award-logo:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.award-logo img { width: auto; display: block; }
.award-logo-deca img { height: 34px; }
.award-logo-lion img { height: 52px; }

/* ---------- footer ---------- */
.footer {
  background: var(--bark-dark);
  color: var(--cream);
  padding: 60px 24px 30px;
  border-top: 3px solid var(--ink);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-brand img { width: 86px; }
.footer-word { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin-top: 10px; }
.footer-tag { font-family: var(--hand); color: rgba(246,239,225,.75); }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: var(--cream); text-decoration: none; font-weight: 700; }
.footer-nav a:hover { color: var(--sunny); }
.footer-fine {
  max-width: var(--maxw);
  margin: 40px auto 0;
  font-size: .82rem;
  color: rgba(246,239,225,.55);
  border-top: 1px solid rgba(246,239,225,.15);
  padding-top: 18px;
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.tilt-l.reveal.in { transform: rotate(-1.6deg); }
.tilt-r.reveal.in { transform: rotate(1.8deg); }
.step.reveal.in:nth-child(odd) { transform: rotate(-.7deg); }
.step.reveal.in:nth-child(even) { transform: rotate(.7deg); }

/* ---------- focus ---------- */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--rosy);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 560px; margin: 0 auto; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .stores-grid { grid-template-columns: 1fr; }
  .store-list { max-height: 300px; order: 2; }
  .store-map-wrap { order: 1; }
  #storeMap { min-height: 380px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { margin: 0 auto; }
  .awards-grid { grid-template-columns: 1fr; gap: 36px; }
  .award-photo { margin: 0 auto; }
}

@media (max-width: 800px) {
  .story-stage { padding-top: 60px; }
  #storySvg { max-height: calc(100vh - 240px); }
  .story-card {
    left: 50%;
    top: auto;
    bottom: 16px;
    width: min(92vw, 460px);
    padding: 16px 18px;
    transform: translate(-50%, 14px);
  }
  .story-card.is-on { transform: translate(-50%, 0); }
  .story-card h3 { font-size: 1.2rem; }
  .story-card p { font-size: .9rem; }
  .story-dots { right: 6px; gap: 9px; }
  .story-dots li { width: 11px; height: 11px; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--cream);
    border-bottom: 3px solid var(--ink);
    flex-direction: column;
    padding: 22px;
    gap: 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
  .footage-grid { grid-template-columns: 1fr 1fr; }
  .clip, .clip-big, .polaroid { grid-column: span 2; }
}

@media (max-width: 560px) {
  section { padding: 64px 18px; }
  .hero { padding-top: 36px; }
  .hero-badge { width: 88px; }
  .hero-note { position: static; margin-top: 10px; transform: rotate(-2deg); max-width: none; }
  .hero-note svg { display: none; }
  .steps { grid-template-columns: 1fr; }
  .wholesale { padding: 24px; }
  .ticker-track span { font-size: 1.05rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drop-1, .drop-2, .drop-3,
  .hero-badge,
  .ticker-track { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tilt-l, .tilt-l.reveal.in { transform: rotate(-1.6deg); }
  .tilt-r, .tilt-r.reveal.in { transform: rotate(1.8deg); }
}
