/* PettiBites homepage v1. Palette and type from branding/brand-guidelines.md. No framework, no build step. */

@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/Fraunces.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/Nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ink: #2A1B1F;
  --orange: #FF7A1A;
  --yellow: #F8CF68;
  --grey: #F2F2F2;
  --cream: #FFF4E0;
  --white: #FFFFFF;
  --mint: #9FE0D0;
  --lilac: #C7B8FF;
  --sky: #9CC9FF;
  --blush: #FFC2D1;
  --sunshine: #FFC43D;
  --radius: 28px;
  --radius-pill: 999px;
  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --shadow: 0 8px 24px rgba(42, 27, 31, 0.06);
}

/* ---------- base ---------- */

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

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--grey);
  color: var(--ink);
  font: 400 1.0625rem/1.55 Nunito, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

[hidden] { display: none !important; }

a { color: inherit; }

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-family: Fraunces, Georgia, serif;
  font-weight: 800;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.5rem; font-weight: 700; }

p { margin: 0 0 1em; }

.eyebrow {
  display: block;
  margin: 0 0 1rem;
  font: 900 0.75rem/1 Nunito, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.25em;
}

.sticker {
  display: inline-block;
  padding: 0.45em 0.9em;
  border-radius: var(--radius-pill);
  font: 600 0.85rem/1 Fredoka, Nunito, sans-serif;
}

.lead { font-size: 1.25rem; max-width: 34ch; }

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

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.95em 1.8em;
  border: 0;
  border-radius: var(--radius-pill);
  font: 800 1rem Nunito, system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-ghost { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }

.btn:focus-visible, a:focus-visible, summary:focus-visible, [role="tab"]:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--grey);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
  padding: 0 var(--gutter);
}
.logo img { width: 140px; }
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-weight: 700; text-decoration: none; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-toggle { display: none; }

@media (max-width: 799px) {
  .site-header .wrap { gap: 12px; }
  .nav { gap: 12px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; position: relative; }
  .nav-toggle summary {
    list-style: none;
    cursor: pointer;
    font-weight: 800;
    padding: 0.6em 0.9em;
    border-radius: var(--radius-pill);
    box-shadow: inset 0 0 0 2px var(--ink);
  }
  .nav-toggle summary::-webkit-details-marker { display: none; }
  .nav-toggle[open] .nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    padding: 12px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
  }
  .nav-toggle[open] .nav-links a { display: block; padding: 8px 12px; }
}

/* ---------- sections ---------- */

.section { padding: clamp(56px, 8vw, 104px) var(--gutter); }
.section-cream { background: var(--cream); }
.section-ink { background: var(--ink); color: var(--white); }
.section-yellow { background: var(--yellow); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 32px;
  min-height: 78vh;
  padding: clamp(32px, 5vw, 72px) var(--gutter);
  overflow: hidden;
}
.hero-copy { max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.hero-art { position: relative; aspect-ratio: 1; }
.hero-pack {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(#000 76%, transparent 94%);
  mask-image: linear-gradient(#000 76%, transparent 94%);
  animation: bob 5s ease-in-out infinite;
}
.hero-cat {
  position: absolute;
  inset: 4%;
  width: 92%;
  height: 92%;
  object-fit: contain;
  animation: bob 4s ease-in-out infinite;
}
.hero-tube {
  position: absolute;
  width: 15%;
  filter: drop-shadow(0 10px 16px rgba(42, 27, 31, 0.15));
  animation: bob 5s ease-in-out infinite;
}
.hero-tube-1 { left: 2%; top: 8%; transform: rotate(-24deg); animation-delay: -1.5s; }
.hero-tube-2 { right: 0; bottom: 6%; transform: rotate(28deg); animation-delay: -3s; }
.hero-sticker {
  position: absolute;
  right: 4%;
  top: 10%;
  transform: rotate(8deg);
  animation: wiggle 6s ease-in-out infinite;
}
.wobble {
  display: inline-block;
  color: var(--ink);
  text-decoration: underline wavy var(--orange);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(8deg); }
  50% { transform: rotate(-4deg); }
}

/* ---------- marquee ---------- */

.marquee {
  display: flex;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  padding: 14px 0;
  transform: rotate(-1.2deg) scale(1.02);
  margin: 8px 0 24px;
}
.marquee-track {
  display: flex;
  flex: none;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font: 900 1rem/1 Nunito, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}
.marquee-track i {
  width: 18px;
  height: 18px;
  background: url("assets/img/paw.svg") no-repeat center / contain;
}
@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* ---------- stickers ---------- */

.sticker-ink {
  background: var(--ink);
  color: var(--white);
  font-size: 1rem;
  padding: 0.6em 1.1em;
  box-shadow: 0 6px 16px rgba(42, 27, 31, 0.2);
}

/* ---------- section art blobs ---------- */

.art-blob {
  position: relative;
  padding: 6%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 110%;
}
.art-blob-mint { background-image: url("assets/img/blob-mint.svg"); }
.art-blob-lilac { background-image: url("assets/img/blob-lilac.svg"); }
.art-blob img { transition: transform 0.3s ease; }
.art-blob:hover img { transform: rotate(-3deg) scale(1.04); }

@media (max-width: 899px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { max-width: 480px; margin: 0 auto; width: 100%; }
}

/* ---------- trust bar ---------- */

.trust {
  padding: 0 var(--gutter) clamp(32px, 4vw, 56px);
}
.trust ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.trust li {
  position: relative;
  padding-left: 34px;
  font-weight: 700;
}
.trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 22px;
  height: 22px;
  background: url("assets/img/paw.svg") no-repeat center / contain;
}

/* ---------- how it works ---------- */

.how .wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: center;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--yellow);
  font: 900 1.5rem Fraunces, Georgia, serif;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.steps h3 { font-size: 1.3rem; }
.how-art img { width: 320px; margin: 0 auto; }
.how-art .photo { width: 100%; max-width: 380px; border-radius: var(--radius); box-shadow: var(--shadow); }

@media (max-width: 899px) {
  .how .wrap { grid-template-columns: 1fr; }
  .how-art img { width: 240px; }
}

/* ---------- flavours ---------- */

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  margin: 0 0 32px;
  background: var(--white);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
}
.tabs button {
  padding: 0.7em 1.6em;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font: 800 1rem Nunito, system-ui, sans-serif;
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--white); }

.product {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.product img {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 8px;
}
.product h3 { margin: 0; }
.product p { margin: 0; font-size: 0.95rem; }
.species {
  display: inline-block;
  padding: 0.35em 0.9em;
  border-radius: var(--radius-pill);
  font: 900 0.7rem/1 Nunito, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.species { background: var(--mint); }
.species-taster { background: var(--sunshine); }
.price { background: var(--sunshine); }
.product .btn { margin-top: 10px; }
.product.card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product.card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 18px 36px rgba(42, 27, 31, 0.12);
}
.product img { transition: transform 0.3s ease; }
.product.card:hover img { transform: rotate(-2deg) scale(1.04); }
.tint-orange { background: #FFE3CF !important; }
.tint-mint { background: var(--mint) !important; }
.tint-lilac { background: var(--lilac) !important; }
.tint-sky { background: var(--sky) !important; }
.tint-blush { background: var(--blush) !important; }
.tint-sunshine { background: #FFE9B3 !important; }
.price { transform: rotate(-3deg); }
.flavours .wrap { position: relative; }
.products { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.product-taster { outline: 3px solid var(--sunshine); outline-offset: -3px; }
.range-shot {
  width: 100%;
  margin: 8px 0 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.flavours-lab {
  position: absolute;
  right: 0;
  top: -30px;
  width: 260px;
  transform: scaleX(-1);
}
@media (max-width: 899px) {
  .flavours-lab { display: none; }
  .faq-cat { width: 120px; right: -10px; top: -80px; }
}

/* ---------- why ---------- */

.why .wrap {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 48px;
  align-items: center;
}
.why-art img { width: 380px; margin: 0 auto; }
.why .grid-3 { grid-template-columns: 1fr; }

@media (max-width: 899px) {
  .why .wrap { grid-template-columns: 1fr; }
  .why-art img { width: 280px; }
}

/* ---------- faq ---------- */

.faq .wrap { max-width: 760px; position: relative; }
.faq-cat {
  position: absolute;
  right: -40px;
  top: -110px;
  width: 190px;
  transform: rotate(6deg);
}
.faq details {
  background: var(--white);
  border-radius: 20px;
  padding: 18px 24px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  cursor: pointer;
  font: 800 1.1rem/1.3 Nunito, system-ui, sans-serif;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font: 700 1.5rem/1 Nunito, system-ui, sans-serif;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; }

/* ---------- closing cta ---------- */

.cta .wrap {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  align-items: center;
}
.cta h2 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.cta-sticker { display: inline-block; margin-bottom: 1.2rem; transform: rotate(-4deg); }
.cta-art img { width: 360px; margin: 0 auto; animation: bob 5s ease-in-out infinite; }

@media (max-width: 899px) {
  .cta .wrap { grid-template-columns: 1fr; }
  .cta-art img { width: 260px; }
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: clamp(48px, 6vw, 80px) var(--gutter) 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.footer-top img { width: 160px; }
.site-footer h4 { margin: 0 0 12px; font: 900 0.75rem/1 Nunito, system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.25em; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.legal {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font: 400 0.85rem/1.5 Nunito, system-ui, sans-serif;
  opacity: 0.7;
}
.legal p { margin: 0 0 6px; }

@media (max-width: 799px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* ---------- mobile ---------- */

@media (max-width: 799px) {
  body { font-size: 1rem; -webkit-tap-highlight-color: transparent; }
  .site-header .wrap { height: 64px; }
  .logo img { width: 120px; }
  .site-header .btn { padding: 0.8em 1.2em; font-size: 0.95rem; }
  h1 { font-size: clamp(2.4rem, 11vw, 3rem); }
  h2 { font-size: clamp(1.9rem, 8.5vw, 2.4rem); }
  .lead { font-size: 1.1rem; }
  .hero { gap: 16px; padding-top: 24px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero-art { max-width: 340px; }
  .hero-sticker { font-size: 0.85rem; top: 4%; }
  .trust ul { gap: 12px; }
  .marquee { padding: 10px 0; margin: 4px 0 8px; }
  .marquee-track { font-size: 0.8rem; }
  .steps { gap: 20px; }
  .steps li { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; }
  .steps li::before { width: 48px; height: 48px; margin: 0; grid-row: 1 / 3; }
  .steps h3 { font-size: 1.15rem; margin: 0.4em 0 0.2em; }
  .steps p { grid-column: 2; }
  .how-art { max-width: 300px; margin: 0 auto; }
  .range-shot { margin-bottom: 24px; }
  .tabs { display: flex; width: 100%; }
  .tabs button { flex: 1; }
  .flavours .grid-3 {
    display: flex;
    gap: 14px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 6px var(--gutter) 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .flavours .grid-3::-webkit-scrollbar { display: none; }
  .product.card { flex: 0 0 76%; scroll-snap-align: start; padding: 20px; }
  .product.card:hover { transform: none; }
  .product h3 { font-size: 1.3rem; }
  .swipe-hint { display: block; margin: 0 0 12px; font: 700 0.85rem Nunito, system-ui, sans-serif; opacity: 0.7; }
  .why-art { max-width: 300px; margin: 0 auto; }
  .why .grid-3 { gap: 14px; }
  .card { padding: 22px; }
  .faq details { padding: 14px 18px; }
  .faq summary { font-size: 1rem; }
  .cta h2 { font-size: clamp(2.2rem, 10vw, 2.8rem); }
  .cta .btn { width: 100%; justify-content: center; }
  .cta-art { max-width: 240px; margin: 0 auto; }
  .footer-top { gap: 24px; }
  .footer-top > div:first-child { grid-column: 1 / -1; }
}

@media (min-width: 800px) { .swipe-hint { display: none; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
