/* ---------- Sloppy Joe's ---------- */
:root {
  --cream: #FFF3DF;
  --paper: #FFE9C7;
  --ink: #2B1608;
  --sauce: #A63B12;
  --joe: #F49B33;
  --ketchup: #E8401C;
  --mustard: #FFC42E;
  --sky: #35A7FF;
  --border: 5px solid var(--ink);
  --shadow: 10px 10px 0 var(--ink);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  overflow-x: hidden;
}

h1, h2, h3, .btn, .brand-name, .ticker { font-family: "Titan One", "Space Grotesk", sans-serif; font-weight: 400; }

::selection { background: var(--mustard); color: var(--ink); }

/* custom cursor: hide native only on fine pointers */
@media (pointer: fine) {
  body.has-joe-cursor, body.has-joe-cursor a, body.has-joe-cursor button, body.has-joe-cursor video { cursor: none; }
}
.joe-cursor {
  position: fixed; top: 0; left: 0; z-index: 9999;
  pointer-events: none;
  filter: drop-shadow(2px 3px 0 rgba(43, 22, 8, .35));
  display: none;
  will-change: transform;
}
body.has-joe-cursor .joe-cursor { display: block; }

/* sauce splats on click */
.splat {
  position: fixed; z-index: 9998; pointer-events: none;
  animation: splat-pop .7s cubic-bezier(.2, 1.6, .4, 1) forwards;
}
@keyframes splat-pop {
  0% { transform: scale(0) rotate(var(--rot)); opacity: 1; }
  60% { transform: scale(1.05) rotate(var(--rot)); opacity: 1; }
  100% { transform: scale(1.15) rotate(var(--rot)); opacity: 0; }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px;
  background: var(--cream);
  border-bottom: var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-joe { transition: transform .25s; }
.brand:hover .brand-joe { transform: rotate(-14deg) scale(1.15); }
.brand-name { font-size: 26px; letter-spacing: .5px; }
.brand-tag { font-size: 14px; opacity: .75; transform: rotate(-2deg); background: var(--mustard); padding: 2px 8px; border: 2px solid var(--ink); border-radius: 3px; }
.topbar .btn-small { margin-left: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--ketchup); color: var(--cream);
  text-decoration: none;
  font-size: 22px;
  padding: 12px 26px;
  border: 4px solid var(--ink);
  border-radius: 14px;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 9px 9px 0 var(--ink); background: var(--sauce); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn-ghost { background: var(--cream); color: var(--ink); }
.btn-ghost:hover { background: var(--mustard); }
.btn-small { font-size: 16px; padding: 8px 16px; box-shadow: 4px 4px 0 var(--ink); }
.btn-big { font-size: clamp(24px, 4vw, 40px); padding: 18px 44px; border-radius: 20px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 8vh 5vw 14vh;
  background: var(--joe);
  border-bottom: var(--border);
  overflow: hidden;
}
.hero-title {
  font-size: clamp(64px, 14.5vw, 220px);
  line-height: .88;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  position: relative; z-index: 2;
  max-width: 12ch;
}
.hero-title .line { display: block; }
.hero-title .char { display: inline-block; transition: transform .15s; }
.hero-title .char:hover { transform: translateY(-.08em) rotate(-6deg) scale(1.08); color: var(--cream); -webkit-text-stroke: 3px var(--ink); }
.full-stop { color: var(--ketchup); -webkit-text-stroke: 3px var(--ink); }
.hero-joe {
  position: absolute;
  right: clamp(8px, 7vw, 120px);
  top: clamp(60px, 12vh, 140px);
  width: clamp(140px, 22vw, 330px); height: auto;
  z-index: 1;
  animation: joe-bob 5s ease-in-out infinite;
  filter: drop-shadow(10px 12px 0 rgba(43, 22, 8, .3));
}
@keyframes joe-bob {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-18px); }
}
.hero-sub { position: relative; z-index: 2; margin-top: 30px; font-size: clamp(17px, 2vw, 23px); font-weight: 500; max-width: 46ch; }
.hero-ctas { position: relative; z-index: 2; margin-top: 28px; display: flex; gap: 16px; flex-wrap: wrap; }
.drip { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 60px; fill: var(--cream); transform: rotate(180deg); z-index: 3; }

/* ---------- ticker ---------- */
.ticker {
  background: var(--ink); color: var(--mustard);
  border-bottom: var(--border);
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
  font-size: 22px;
  letter-spacing: 1px;
}
.ticker-alt { background: var(--ketchup); color: var(--cream); border-top: var(--border); }
.ticker-track { display: inline-block; animation: ticker-scroll 28s linear infinite; }
.ticker-track span { margin: 0 18px; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- menu / grid ---------- */
.menu { padding: 70px 5vw 90px; }
.menu-head { display: flex; align-items: flex-end; gap: 40px; flex-wrap: wrap; margin-bottom: 44px; }
.section-title {
  font-size: clamp(48px, 8vw, 110px);
  line-height: .9;
  text-transform: uppercase;
}
.menu-sub { font-size: 20px; max-width: 44ch; font-weight: 500; padding-bottom: 8px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 34px;
  grid-auto-flow: dense;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: var(--border);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px) rotate(var(--tilt, 0deg));
  transition: opacity .5s, transform .5s cubic-bezier(.2, 1.4, .4, 1);
}
.card.in { opacity: 1; transform: translateY(0) rotate(0deg); }
.card:hover { transform: translateY(-6px) rotate(var(--hover-tilt, -1deg)); box-shadow: 14px 14px 0 var(--ink); }
.card.wide { grid-column: span 2; }
.card-media {
  position: relative; display: block; width: 100%;
  border: 0; padding: 0; background: var(--ink); cursor: none;
  aspect-ratio: var(--ar, 16 / 9);
  flex: 1 0 auto;
  overflow: hidden;
}
.card-media img, .card-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.card-media video { opacity: 0; transition: opacity .25s; }
.card-media video.playing { opacity: 1; }
.card-play {
  position: absolute; right: 12px; bottom: 12px;
  background: var(--mustard); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 999px;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 14px;
  padding: 5px 12px;
  pointer-events: none;
}
.card-info { padding: 14px 16px 16px; border-top: 4px solid var(--ink); display: flex; flex-direction: column; gap: 4px; }
.card-title-row { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
.card-title { font-family: "Titan One", sans-serif; font-size: 21px; line-height: 1.1; text-transform: uppercase; }
.card-dots { flex: 1; border-bottom: 3px dotted var(--ink); opacity: .4; transform: translateY(-4px); min-width: 20px; }
.card-dur { font-weight: 700; font-size: 15px; white-space: nowrap; background: var(--mustard); border: 2px solid var(--ink); border-radius: 4px; padding: 0 6px; transform: rotate(2deg); }
.card-line { font-size: 15.5px; opacity: .85; }
.card-tag {
  position: absolute; top: 12px; left: -8px;
  background: var(--sky); color: var(--ink);
  font-weight: 700; font-size: 13px;
  border: 3px solid var(--ink); border-radius: 4px;
  padding: 3px 10px;
  transform: rotate(-4deg);
  z-index: 3;
}

/* ---------- how we cook ---------- */
.cook { background: var(--sky); border-top: var(--border); padding: 80px 5vw 90px; }
.cook .section-title { margin-bottom: 40px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; }
.step {
  background: var(--cream);
  border: var(--border); border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 26px 24px 24px;
  position: relative;
  transition: transform .15s;
}
.step:hover { transform: rotate(-1.2deg) translateY(-4px); }
.step:nth-child(2):hover { transform: rotate(1.2deg) translateY(-4px); }
.step-num {
  position: absolute; top: -22px; left: 18px;
  font-family: "Titan One", sans-serif; font-size: 26px;
  background: var(--ketchup); color: var(--cream);
  border: 4px solid var(--ink); border-radius: 999px;
  width: 48px; height: 48px; display: grid; place-items: center;
}
.step h3 { font-size: 26px; text-transform: uppercase; margin: 8px 0 8px; }
.cook-note { margin-top: 38px; font-size: clamp(18px, 2.4vw, 26px); font-weight: 700; max-width: 60ch; }

/* ---------- brief / contact ---------- */
.brief {
  background: var(--ink); color: var(--cream);
  border-top: var(--border);
  padding: 100px 5vw 110px;
  text-align: center;
}
.brief-title {
  font-size: clamp(70px, 13vw, 190px);
  line-height: .9; text-transform: uppercase;
  color: var(--mustard);
  text-shadow: 6px 6px 0 var(--ketchup);
}
.brief-sub { margin: 26px auto 36px; font-size: clamp(17px, 2vw, 22px); max-width: 50ch; }

/* ---------- footer ---------- */
.footer {
  background: var(--ink); color: var(--cream);
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 20px; font-size: 15px;
  border-top: 3px solid rgba(255, 243, 223, .2);
  flex-wrap: wrap; text-align: center;
}
.noggles { color: var(--ketchup); font-weight: 700; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 4vmin; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(43, 22, 8, .88); }
.lightbox-body {
  position: relative; z-index: 1;
  max-width: min(1100px, 94vw);
  background: var(--cream);
  border: var(--border); border-radius: 18px;
  box-shadow: 16px 16px 0 var(--ketchup);
  padding: 14px;
  animation: lightbox-in .35s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes lightbox-in { from { transform: scale(.8) rotate(-2deg); opacity: 0; } to { transform: none; opacity: 1; } }
.lightbox-body video {
  display: block;
  max-width: calc(94vw - 60px);
  max-height: 74vh;
  width: auto; height: auto;
  border: 4px solid var(--ink); border-radius: 10px;
  background: #000;
}
.lightbox-body figcaption { display: flex; align-items: baseline; gap: 14px; padding: 12px 6px 4px; flex-wrap: wrap; }
.lightbox-title { font-family: "Titan One", sans-serif; font-size: 24px; text-transform: uppercase; }
.lightbox-line { font-size: 16px; opacity: .8; }
.lightbox-close {
  position: absolute; top: -20px; right: -20px; z-index: 2;
  width: 52px; height: 52px;
  background: var(--ketchup); color: var(--cream);
  border: 4px solid var(--ink); border-radius: 999px;
  font-size: 22px; font-weight: 700;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s;
}
.lightbox-close:hover { transform: rotate(90deg) scale(1.1); }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .brand-tag { display: none; }
  .brand-name { font-size: 19px; white-space: nowrap; }
  .btn-small { white-space: nowrap; font-size: 14px; padding: 7px 12px; }
  .topbar { gap: 8px; padding: 10px 14px; }
  .hero { padding-top: 6vh; }
  .hero-joe { position: relative; right: auto; top: auto; margin-top: 20px; }
  .card.wide { grid-column: span 1; }
  .grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .card-line { display: none; }
  .card-title { font-size: 16px; }
  .card-info { padding: 10px 12px 12px; }
  .menu { padding: 50px 5vw 60px; }
}
@media (max-width: 460px) {
  .grid { grid-template-columns: 1fr; }
  .card-line { display: block; }
  .card-title { font-size: 20px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-joe { animation: none; }
  .ticker-track { animation: none; }
  .card { opacity: 1; transform: none; transition: none; }
  .joe-cursor { display: none !important; }
  body.has-joe-cursor, body.has-joe-cursor a, body.has-joe-cursor button { cursor: auto; }
}
