/* Purrcha — landing page
   Tokens mirror the Figma variables (Purrcha / Color, Purrcha / Dimension). */

@font-face { font-family: "Anton"; src: url("/assets/fonts/anton-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* colour */
  --color-bg-primary: #FF4900;
  --color-bg-secondary: #EFE8DC;
  --color-bg-ink: #000000;
  --color-bg-white: #FFFFFF;
  --color-text-ink: #000000;
  --color-text-on-primary: #FFFFFF;
  --color-text-cream: #EFE8DC;
  --color-border-ink: #000000;

  /* spacing */
  --spacing-4: 4px; --spacing-8: 8px; --spacing-12: 12px; --spacing-16: 16px; --spacing-24: 24px;
  --spacing-32: 32px; --spacing-48: 48px; --spacing-64: 64px; --spacing-96: 96px; --spacing-128: 128px;
  --layout-page-margin: 100px;
  /* content is capped at --content-max and centred; colour bands still run full width */
  --content-max: 1200px;
  --gutter: max(var(--layout-page-margin), calc((100% - var(--content-max)) / 2));
  --section-pad-y: var(--spacing-96);

  /* shape */
  --radius-sm: 12px; --radius-md: 24px; --radius-full: 999px;
  --border-width: 2px;
  --border: var(--border-width) solid var(--color-border-ink);
  --shadow-hard: 6px 6px 0 var(--color-border-ink);
  --shadow-hard-s: 4px 4px 0 var(--color-border-ink);

  /* type (display = TT Trailers stand-in) */
  --font-display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-hero: clamp(64px, 10.5vw, 160px);
  --fs-h1: clamp(52px, 6.6vw, 96px);
  --fs-h3: 32px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--color-bg-secondary); color: var(--color-text-ink); font: 400 14px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 3px solid var(--color-bg-ink); outline-offset: 3px; }
.section--ink :focus-visible, .site-footer :focus-visible { outline-color: var(--color-bg-secondary); }

.sr-only, .sr-defs { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 16px; background: var(--color-bg-ink); color: var(--color-text-cream); border-radius: var(--radius-sm); }
.skip-link:focus { top: 16px; }

/* ---------- type ---------- */
.h1, .hero__title, .cta__title, .h3, .menu-item__name { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0; }
.h1 { font-size: var(--fs-h1); line-height: 0.95; }
.h3 { font-size: var(--fs-h3); line-height: 1.1; }
/* all body copy: Inter 14px */
.tagline, .card__desc, .menu-item__desc, .body-l { font-size: 14px; line-height: 1.6; }
.eyebrow { font: 600 14px/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; }
.text-white { color: var(--color-text-on-primary); }
.text-cream { color: var(--color-text-cream); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: var(--spacing-16) var(--spacing-32); border-radius: var(--radius-full); font: 600 18px/1 var(--font-body); text-decoration: none; border: var(--border); transition: transform .12s ease, box-shadow .12s ease; white-space: nowrap; }
.btn--sm { padding: var(--spacing-12) var(--spacing-24); font-size: 16px; }
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--color-bg-primary); color: var(--color-text-ink); box-shadow: var(--shadow-hard-s); }
.btn--primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--color-border-ink); }
.btn--primary:active { transform: translate(4px, 4px); box-shadow: none; }
.btn--dark { background: var(--color-bg-ink); color: var(--color-text-cream); }
.btn--dark:hover { background: #222; }

/* ---------- stickers ---------- */
.sticker { position: absolute; display: grid; place-items: center; width: 160px; height: 160px; font: 600 14px/1.15 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; text-align: center; z-index: 2; pointer-events: none; }
.sticker span { position: relative; max-width: 112px; }
.sticker svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* fill/stroke sit on the <svg> so they inherit into the <use> shadow tree */
.sticker--burst svg { stroke: var(--color-border-ink); stroke-width: 2; }
.sticker--circle { border-radius: 50%; border: var(--border); }
.sticker--cream { color: var(--color-text-ink); }
.sticker--cream svg { fill: var(--color-bg-secondary); }
.sticker--circle.sticker--cream { background: var(--color-bg-secondary); }
.sticker--ink { color: var(--color-text-cream); }
.sticker--ink svg { fill: var(--color-bg-ink); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-24); padding: var(--spacing-24) var(--gutter); background: var(--color-bg-primary); }
.site-header__logo img { width: auto; height: 40px; }
.site-header__nav { display: flex; gap: var(--spacing-48); }
.site-header__nav a { font: 500 14px/1 var(--font-body); text-decoration: none; }
.site-header__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- sections ---------- */
.section { position: relative; display: flex; flex-direction: column; gap: var(--spacing-48); padding: var(--section-pad-y) var(--gutter); }
.section--cream { background: var(--color-bg-secondary); }
.section--orange { background: var(--color-bg-primary); }
.section--ink { background: var(--color-bg-ink); }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--spacing-24); flex-wrap: wrap; }

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; align-items: center; gap: var(--spacing-48); padding: var(--spacing-96) var(--gutter) var(--spacing-96); background: var(--color-bg-primary); }
.hero__title { max-width: 1100px; font-size: var(--fs-hero); line-height: 1.02; text-align: center; color: var(--color-text-on-primary); }
.hero__photo { position: relative; width: 100%; max-width: 1120px; }
.hero__photo img { width: 100%; aspect-ratio: 1120 / 600; object-fit: cover; border: var(--border); border-radius: var(--radius-md); }
.hero__sticker-burst { left: -70px; bottom: -40px; width: 180px; height: 180px; rotate: 12deg; }
.hero__sticker-circle { right: -40px; top: -60px; width: 170px; height: 170px; rotate: -10deg; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; background: var(--color-bg-ink); color: var(--color-text-cream); padding: var(--spacing-24) 0; }
/* gap = one word space, so the loop joins seamlessly: "… Meow-velous · Matcha …" */
.marquee__track { display: flex; gap: .25em; width: max-content; font: 400 32px/1.1 var(--font-display); animation: marquee 52s linear infinite; }
.marquee__track span { text-transform: uppercase; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- bestsellers ---------- */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--spacing-24); }
.card { position: relative; display: flex; flex-direction: column; gap: var(--spacing-24); padding: var(--spacing-16); background: var(--color-bg-white); border: var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-hard); }
.card__photo { display: block; overflow: hidden; border: var(--border); border-radius: var(--radius-md); }
.card__photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: var(--spacing-8); flex: 1; }
.card__foot { display: block; }
.swipe-hint { display: none; font-size: 14px; }

/* ---------- menu ---------- */
.menu { align-items: center; gap: var(--spacing-64); }
.menu .section__head { align-self: stretch; }
.menu__sticker { left: calc(50% - 80px); top: 56px; rotate: 10deg; }
.menu__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-96); align-self: stretch; }
.menu__group-title { margin-bottom: var(--spacing-8); }
.menu-item { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--spacing-24); padding: var(--spacing-16) 0; border-bottom: 1px solid rgba(0, 0, 0, .25); }
.menu-item__name { font-size: var(--fs-h3); line-height: 1.1; color: var(--color-text-on-primary); }
/* every description reserves two lines so all rows line up, whether the copy wraps or not */
.menu-item__desc { margin-top: var(--spacing-4); min-height: calc(2 * 1.6em); max-width: 46ch; }

/* ---------- about / catering ---------- */
.split { flex-direction: row; align-items: center; gap: var(--spacing-64); }
.split--reverse { flex-direction: row-reverse; }
.split--flush-top { padding-top: 0; }
.split__photo { display: block; flex: 0 0 min(600px, 45%); overflow: hidden; border: var(--border); border-radius: var(--radius-md); }
.split__photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.split__text strong { font-weight: 600; }

/* filter: the transparent Instagram frame sits over the photo, as in Figma (288×511 on 600×600) */
.filter-photo { position: relative; }
.filter-photo__frame { position: absolute; left: 26%; top: 7.5%; width: 48%; }
.filter-photo .filter-photo__frame img { aspect-ratio: 9 / 16; object-fit: contain; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .25)); }
.split__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--spacing-24); flex: 1; }

/* ---------- final CTA ---------- */
.cta { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--spacing-48); padding: var(--spacing-128) var(--gutter); background: var(--color-bg-primary); text-align: center; overflow: hidden; }
.cta__title { font-size: var(--fs-hero); line-height: 1.02; color: var(--color-text-on-primary); }
/* the big headline carries extra leading below the letters; pull the description up so title→text matches text→button */
.cta__title { margin-bottom: calc(var(--spacing-24) * -1); }
.cta > .body-l { max-width: 480px; }
.cta__sticker-burst { right: max(7%, calc((100% - var(--content-max)) / 2)); top: 60px; rotate: -12deg; }
.cta__sticker-circle { left: max(7%, calc((100% - var(--content-max)) / 2)); bottom: 80px; rotate: 8deg; }

/* ---------- footer ---------- */
.site-footer { display: flex; flex-direction: column; gap: var(--spacing-48); padding: var(--spacing-64) var(--gutter); background: var(--color-bg-ink); color: var(--color-text-cream); }
.site-footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--spacing-48); flex-wrap: wrap; }
.site-footer__logo { width: 132px; }
.site-footer__links { display: flex; gap: var(--spacing-96); }
.site-footer__links div { display: flex; flex-direction: column; gap: var(--spacing-12); }
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover, .site-footer__bottom a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer hr { width: 100%; margin: 0; border: 0; border-top: 1px solid rgba(239, 232, 220, .25); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: var(--spacing-12); font-size: 14px; flex-wrap: wrap; }
.site-footer__bottom a { text-decoration: none; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  :root { --layout-page-margin: 48px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header__nav { gap: var(--spacing-24); }
}

/* ---------- mobile (Figma: Mobile 390) ---------- */
@media (max-width: 768px) {
  :root { --layout-page-margin: 16px; --section-pad-y: var(--spacing-64); --fs-h3: 28px; }
  html { scroll-padding-top: 80px; }
  .site-header { padding: var(--spacing-16); }
  .site-header__nav { display: none; }
  .btn { font-size: 16px; padding: var(--spacing-12) var(--spacing-24); }
  .section { gap: var(--spacing-32); }
  .section__head { flex-direction: column; align-items: flex-start; gap: var(--spacing-8); }
  .hero { padding: var(--spacing-32) var(--spacing-16) var(--spacing-64); gap: var(--spacing-24); }
  .hero__photo img { aspect-ratio: 358 / 440; }
  .hero__sticker-burst { width: 120px; height: 120px; left: -6px; bottom: -14px; font-size: 11px; }
  .hero__sticker-circle { width: 112px; height: 112px; right: -4px; top: -36px; font-size: 11px; }
  .sticker span { max-width: 84px; }
  .marquee { padding: var(--spacing-16) 0; }
  .marquee__track { font-size: 24px; }
  /* sideways-only swipe: no vertical wiggle inside the row, no browser back-swipe */
  .cards { display: flex; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scroll-snap-type: x mandatory; gap: var(--spacing-16); margin-right: calc(var(--spacing-16) * -1); padding: 0 var(--spacing-16) var(--spacing-12) 0; scrollbar-width: none; }
  .cards::-webkit-scrollbar { display: none; }
  /* inside the swipe row, cards just fade in (a slide would be clipped by the row) */
  .motion .cards .reveal--tilt, .motion .cards .reveal--tilt:nth-child(even) { translate: 0 0; rotate: 0deg; }
  .card { flex: 0 0 280px; scroll-snap-align: start; }
  .swipe-hint { display: block; margin-top: calc(var(--spacing-16) * -1); }
  .menu { align-items: stretch; gap: var(--spacing-32); }
  .menu__sticker { display: none; }
  .menu__cols { grid-template-columns: 1fr; gap: var(--spacing-32); }
  .menu .btn { align-self: stretch; }
  .split, .split--reverse { flex-direction: column; align-items: stretch; gap: var(--spacing-24); }
  .split__photo { flex: none; }
  .cta { padding: var(--spacing-96) var(--spacing-16); gap: var(--spacing-24); }
  .cta__title { margin-bottom: calc(var(--spacing-8) * -1); }
  .cta__sticker-burst { width: 96px; height: 96px; right: 4px; top: 8px; font-size: 10px; }
  .cta__sticker-circle { display: none; }
  .site-footer { padding: var(--spacing-48) var(--spacing-16); gap: var(--spacing-32); }
  .site-footer__logo { width: 96px; }
  .site-footer__links { gap: var(--spacing-24); width: 100%; }
  .site-footer__bottom { flex-direction: column; }
}

/* ---------- motion ----------
   Everything below is gated by .motion, which main.js adds only when the visitor
   has not asked for reduced motion — without JS the page is fully static and visible. */
@keyframes rise { from { opacity: 0; translate: 0 48px; } to { opacity: 1; translate: 0 0; } }
@keyframes pop { 0% { opacity: 0; scale: .2; } 70% { opacity: 1; scale: 1.12; } 100% { scale: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { translate: 0 -10px; } }
@keyframes wiggle { 25% { rotate: -6deg; } 75% { rotate: 6deg; } }

.motion .hero__title .word, .motion .cta__title .word { display: inline-block; animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 70ms); }
.motion .cta__title .word { animation-play-state: paused; }
.motion .cta.is-in .cta__title .word { animation-play-state: running; }
.motion .hero__photo > picture { display: block; animation: rise 1s cubic-bezier(.2, .8, .2, 1) .45s both; }
.motion .sticker { animation: pop .6s cubic-bezier(.3, 1.5, .5, 1) .9s both; }
/* star badges: the shape slowly spins while the text stays put */
.motion .sticker--burst svg { animation: spin 30s linear infinite; }
.motion .sticker--circle span { display: block; animation: bob 3.2s ease-in-out 1.6s infinite; }
.motion .menu__sticker, .motion .cta .sticker { animation-play-state: paused; }
.motion .is-in .menu__sticker, .motion .cta.is-in .sticker { animation-play-state: running; }

/* scroll reveal — each section enters its own way */
.motion .reveal { opacity: 0; transition: opacity .7s ease, translate .9s cubic-bezier(.2, .8, .2, 1), rotate .9s cubic-bezier(.2, .8, .2, 1), clip-path 1.1s cubic-bezier(.7, 0, .2, 1); }
.motion .reveal--up { translate: 0 40px; }
.motion .reveal--slide { translate: -40px 0; }
.motion .reveal--tilt { translate: 0 90px; rotate: 6deg; }
.motion .reveal--tilt:nth-child(even) { rotate: -6deg; }
/* after the variants so it always wins */
.motion .reveal.is-in, .motion .reveal--tilt.is-in:nth-child(even) { opacity: 1; translate: 0 0; rotate: 0deg; transition-delay: calc(var(--i, 0) * 90ms); }
.motion .card.reveal { transition: opacity .7s ease, translate .9s cubic-bezier(.2, .8, .2, 1), rotate .9s cubic-bezier(.3, 1.4, .5, 1), transform .25s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s ease; }
/* photos wipe open from the bottom while the image settles from a zoom */
.motion .reveal--wipe { opacity: 1; clip-path: inset(100% 0 0 0 round var(--radius-md)); }
.motion .reveal--wipe.is-in { clip-path: inset(0 0 0 0 round var(--radius-md)); }
.motion .reveal--wipe > picture:first-child img { scale: 1.25; transition: scale 1.4s cubic-bezier(.2, .8, .2, 1); }
.motion .reveal--wipe.is-in > picture:first-child img { scale: 1; }
/* section titles rise out of a mask */
.motion .section__head .h1 { clip-path: inset(0 0 100% 0); translate: 0 .4em; transition: clip-path .9s cubic-bezier(.7, 0, .2, 1), translate .9s cubic-bezier(.2, .8, .2, 1); }
.motion .section__head.is-in .h1 { clip-path: inset(-20% -5% -20% -5%); translate: 0 0; }

/* header */
.site-header { transition: padding .25s ease, box-shadow .25s ease; }
.motion .site-header.is-scrolled { padding-top: var(--spacing-12); padding-bottom: var(--spacing-12); box-shadow: 0 var(--border-width) 0 var(--color-border-ink); }

/* hover play */
.card { transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s ease; }
.card__photo img, .split__photo img { transition: scale .5s cubic-bezier(.2, .8, .2, 1); }
@media (hover: hover) {
  .card:hover { transform: translate(-4px, -4px) rotate(-1.5deg); box-shadow: 10px 10px 0 var(--color-border-ink); }
  .card:nth-child(even):hover { transform: translate(-4px, -4px) rotate(1.5deg); }
  .card:hover .card__photo img, .split__photo:hover > picture:first-child img, .motion .split__photo.is-in:hover > picture:first-child img { scale: 1.06; }
  .menu-item__name { transition: translate .2s ease; }
  .menu-item:hover .menu-item__name { translate: 8px 0; }
  .btn--dark:hover { animation: wiggle .4s ease; }
  .marquee:hover .marquee__track { animation-play-state: paused; }
}
.motion .filter-photo__frame { animation: bob 4s ease-in-out infinite; }

/* ---------- privacy page ---------- */
.legal__body { gap: var(--spacing-16); max-width: 860px; margin: 0 auto; }
.legal__body h2 { margin-top: var(--spacing-24); }
.legal__body p { font-size: 14px; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .btn, .card, .card__photo img, .split__photo img, .menu-item__name { transition: none; }
  .btn--dark:hover { animation: none; }
}
