/* HIGH FIVE taproom — design spec: cobalt canvas, sun-yellow punctuation, polaroid photos */
:root {
  --yellow: #FFD426;
  --chartreuse: #D9CE2F;
  --blue: #2E5FA8;
  --blue-deep: #244C8C;
  --navy: #0A2E62;
  --ink: #10182B;
  --chalk: #F2EDE2;
  --board: #1F1D1A;
  --paper: #FFFFFF;
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Rubik", "Segoe UI", Roboto, system-ui, sans-serif;
  --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: calc(var(--nav-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
::selection { background: var(--yellow); color: var(--navy); }
:focus-visible { outline: 3px solid var(--focus, var(--navy)); outline-offset: 3px; }

h1, h2 { font-family: var(--font-display); text-wrap: balance; }
h2 { font-size: clamp(1.625rem, 1.2rem + 2.2vw, 2.5rem); font-weight: 700; line-height: 1.15; margin-bottom: 0.7em; }
.container { max-width: 1120px; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
section { padding-block: clamp(2.5rem, 3.5vw + 1.25rem, 4.5rem); }

/* ---------- nav ---------- */
#nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--nav-h); padding-inline: clamp(1rem, 4vw, 2rem);
  background: var(--blue); color: var(--chalk);
  --focus: var(--yellow);
  transition: box-shadow 0.2s, background-color 0.2s;
}
#nav.stuck { box-shadow: 0 4px 18px rgba(10, 46, 98, 0.45); background: var(--navy); }
.brand {
  font-family: var(--font-display); font-weight: 900; font-size: 1.15rem;
  color: var(--chalk); text-decoration: none; letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-hand { display: inline-block; }
.nav-links { display: flex; align-items: center; gap: clamp(0.7rem, 2.5vw, 1.6rem); }
.nav-links a:not(.pill):not(.lang) {
  color: var(--chalk); text-decoration: none; font-weight: 600; font-size: 0.9rem;
  padding: 12px 4px;
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-size: 0% 2px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size 0.2s;
}
.nav-links a:not(.pill):not(.lang):hover, .nav-links a:not(.pill):not(.lang):focus-visible { background-size: 100% 2px; }
.lang {
  color: var(--navy); background: var(--chalk); text-decoration: none;
  font-weight: 800; font-size: 0.78rem; letter-spacing: 0.04em;
  border: 2px solid var(--navy); border-radius: 999px; padding: 0.4em 0.75em;
  box-shadow: 3px 3px 0 var(--navy);
  white-space: nowrap; position: relative; flex-shrink: 0;
  display: inline-block; text-align: center; box-sizing: border-box; min-width: 42px;
  margin-left: clamp(10px, 2vw, 22px);
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}
.lang::before {
  content: ""; position: absolute; left: calc(-1 * clamp(6px, 1.2vw, 12px) - 2px);
  top: 50%; translate: 0 -50%;
  width: 2px; height: 20px; background: rgba(242, 237, 226, 0.35); border-radius: 2px;
}
.lang:hover, .lang:focus-visible { background: var(--paper); transform: rotate(-2deg) translateY(-1px); }
.pill {
  background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 0.82rem;
  white-space: nowrap; box-sizing: border-box; text-align: center; min-width: 150px;
  padding: 0.5em 1em; border-radius: 999px; text-decoration: none;
  border: 2px solid var(--navy); box-shadow: 3px 3px 0 var(--navy);
  transition: transform 0.15s, box-shadow 0.15s; flex-shrink: 0;
}
.pill:hover { transform: rotate(-2deg) translateY(-1px); box-shadow: 4px 5px 0 var(--navy); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--blue); color: var(--chalk);
  min-height: min(80svh, 680px);
  display: grid; align-items: center;
  --focus: var(--yellow);
  padding-block: clamp(2rem, 4.5vw, 3.5rem);
}
.hero-bg {
  position: absolute; right: -6%; bottom: -14%;
  font-size: clamp(16rem, 34vw, 30rem); line-height: 1;
  opacity: 0.10; transform: rotate(-14deg); user-select: none; pointer-events: none;
  filter: grayscale(1) brightness(3);
}
.hero-inner {
  position: relative; max-width: 1120px; margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center; width: 100%;
}
.kicker {
  display: inline-block; background: var(--yellow); color: var(--navy);
  font-weight: 800; font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  padding: 0.3em 0.7em; transform: rotate(-1.5deg); margin-bottom: 1.1rem;
}
h1 {
  font-size: clamp(2.6rem, 1.1rem + 6.4vw, 5.4rem); font-weight: 900;
  line-height: 1.02; letter-spacing: -0.01em; color: var(--paper);
}
h1 .yell { color: var(--yellow); }
.stat-line { font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 600; margin-top: 0.9rem; color: var(--chalk); }
.nowrap { white-space: nowrap; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 800; font-size: 0.95rem;
  padding: 0.85em 1.5em; border-radius: 999px; border: 2px solid var(--navy);
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--yellow); color: var(--navy); box-shadow: 4px 4px 0 var(--navy); }
.btn-primary:hover { transform: rotate(-1.5deg) translateY(-2px); box-shadow: 6px 7px 0 var(--navy); }
.btn-primary:active { transform: translate(1px, 2px); box-shadow: 2px 2px 0 var(--navy); }
.btn-ghost { background: transparent; color: var(--chalk); border-color: var(--chalk); }
.btn-ghost:hover { background: rgba(242, 237, 226, 0.12); }
.btn-ghost-blue { background: transparent; color: var(--navy); border-color: var(--navy); }
.hours-hint { margin-top: 1rem; font-size: 0.9rem; color: var(--chalk); opacity: 0.85; }

.polaroid {
  position: relative; background: var(--paper); padding: 12px 12px 40px;
  transform: rotate(-3deg); box-shadow: 0 18px 45px rgba(6, 20, 46, 0.5);
  max-width: 420px; justify-self: center;
}
.polaroid img { width: 100%; height: auto; }
.tape {
  position: absolute; width: 92px; height: 30px; background: var(--yellow);
  opacity: 0.82; top: -14px;
}
.tape-l { left: 8%; transform: rotate(-8deg); }
.tape-r { right: 8%; transform: rotate(6deg); }

/* ---------- ticker ---------- */
.ticker { background: var(--yellow); color: var(--navy); overflow: hidden; border-block: 3px solid var(--navy); }
.ticker-track { display: flex; white-space: nowrap; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; padding-block: 0.55rem; }
.ticker-track span { padding-right: 1rem; flex-shrink: 0; }
.ticker .h { font-style: normal; filter: grayscale(1) brightness(0.25); }
@media (prefers-reduced-motion: no-preference) {
  .ticker-track { animation: tick 28s linear infinite; }
  @keyframes tick { to { transform: translateX(-50%); } }
}

/* ---------- chalkboard ---------- */
.board-section {
  background:
    radial-gradient(rgba(242, 237, 226, 0.07) 2px, transparent 2px) 0 0 / 26px 26px,
    var(--blue);
}
.board {
  background:
    radial-gradient(ellipse at 20% 15%, rgba(242, 237, 226, 0.06), transparent 45%),
    radial-gradient(ellipse at 80% 85%, rgba(242, 237, 226, 0.05), transparent 40%),
    var(--board);
  color: var(--chalk);
  border: 10px solid var(--chartreuse); border-radius: 6px;
  padding: clamp(1.75rem, 4vw, 2.75rem); text-align: center;
  --focus: var(--yellow);
}
.chalk-h {
  color: var(--yellow); margin-bottom: 0.6em;
  text-decoration: underline wavy var(--yellow) 3px; text-underline-offset: 10px;
}
.chalk-p { max-width: 58ch; margin: 0 auto 1.6rem; color: var(--chalk); letter-spacing: 0.015em; }

/* ---------- cards ---------- */
.why {
  background: repeating-linear-gradient(45deg, #2E5FA8 0 30px, #2A579B 30px 60px);
  border-top: 3px solid var(--yellow);
}
.why h2 { color: var(--paper); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.card {
  background: var(--paper); border: 3px solid var(--navy); border-radius: 14px;
  padding: 1.5rem 1.3rem; box-shadow: 6px 6px 0 var(--navy);
  rotate: var(--tilt, 0deg); height: 100%;
}
@media (hover: hover) {
  .card { transition: translate 0.15s ease-out, box-shadow 0.15s ease-out, rotate 0.15s ease-out; }
  .card:hover { translate: 0 -4px; box-shadow: 8px 10px 0 var(--navy); rotate: 0deg; }
}
.card-num {
  font-family: var(--font-body); font-weight: 800; font-size: clamp(2.5rem, 2rem + 3vw, 4rem);
  line-height: 1; color: var(--blue); margin-bottom: 0.4rem;
}
.card h3 { font-size: clamp(1.125rem, 1.05rem + 0.5vw, 1.375rem); font-weight: 600; margin-bottom: 0.4rem; }
.card p { font-size: 0.95rem; }

/* ---------- gallery ---------- */
.gallery-section { background: var(--blue); color: var(--chalk); --focus: var(--yellow); border-top: 3px solid var(--navy); }
.gallery-section h2 { color: var(--paper); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile {
  display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px;
  background: var(--navy);
}
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.tile.featured { grid-column: span 2; grid-row: span 2; }
.gallery .tile:last-child { grid-column: span 2; aspect-ratio: 2.05 / 1; }
@media (hover: hover) {
  .tile img { transition: scale 0.3s; }
  .tile:hover img { scale: 1.04; }
  .tile:hover { box-shadow: inset 0 0 0 3px var(--yellow); }
}

/* lightbox */
#lightbox { border: none; background: transparent; padding: 0; max-width: 100vw; max-height: 100vh; }
#lightbox::backdrop { background: rgba(6, 14, 32, 0.88); }
#lightbox[open] { display: grid; place-items: center; position: fixed; inset: 0; width: 100vw; height: 100vh; }
#lb-img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
#lightbox button {
  position: fixed; z-index: 2; background: var(--yellow); color: var(--navy);
  border: 2px solid var(--navy); border-radius: 999px; width: 48px; height: 48px;
  font-size: 1.4rem; font-weight: 800; cursor: pointer;
}
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; translate: 0 -50%; }
.lb-next { right: 14px; top: 50%; translate: 0 -50%; }

/* ---------- find us ---------- */
.findus { background: var(--yellow); color: var(--navy); --focus: var(--navy); border-top: 10px solid var(--navy); }
.findus h2 { color: var(--navy); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.addr-line { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; margin-bottom: 1.2rem; }
.addr-line a { color: var(--navy); }
.hours { border-collapse: collapse; width: 100%; max-width: 420px; font-size: 0.95rem; }
.hours th, .hours td { text-align: left; padding: 0.45em 0.6em; border-bottom: 2px solid rgba(10, 46, 98, 0.18); }
.hours th { font-weight: 600; }
.hours tr.today { background: var(--navy); color: var(--yellow); font-weight: 800; }
.tg-line { margin-top: 1.2rem; font-weight: 600; }
.tg-line a { color: var(--navy); }
.map-block { display: grid; gap: 0.9rem; justify-items: center; align-content: center; height: 100%; }
.map-cta {
  display: grid; place-items: center; gap: 0.5rem; text-align: center; text-decoration: none;
  background: var(--blue); color: var(--paper); font-family: var(--font-display); font-weight: 700;
  width: min(320px, 88%); border-radius: 18px;
  border: 3px solid var(--navy); box-shadow: 8px 8px 0 var(--navy);
  transition: transform 0.15s, box-shadow 0.15s; padding: 2rem 1.5rem;
}
.map-addr { font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; opacity: 0.85; }
.map-cta:hover { transform: rotate(-1.5deg) translateY(-3px); box-shadow: 10px 12px 0 var(--navy); }
.map-text { font-size: 1.05rem; line-height: 1.3; }
.pin-svg { vertical-align: -3px; margin-right: 2px; }
.map-note { font-weight: 600; font-size: 0.9rem; }

/* ---------- footer ---------- */
footer { background: var(--navy); color: var(--chalk); padding-block: 3.5rem 0; --focus: var(--yellow); }
footer::after {
  content: ""; display: block; height: 14px; margin-top: 2.8rem;
  background: repeating-linear-gradient(45deg, #22407e 0 7px, var(--navy) 7px 14px);
}
.say-hi { color: var(--yellow); }
.socials { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-bottom: 2rem; }
.socials a {
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 48px;
  color: var(--chalk); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.socials a:hover { color: var(--yellow); }
.foot-line { font-size: 0.875rem; opacity: 0.8; }

/* ---------- high five counter ---------- */
#hifive {
  position: fixed; right: 12px; bottom: 14px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--yellow); border: 3px solid var(--navy);
  box-shadow: 4px 4px 0 var(--navy); cursor: pointer;
  font-size: 1.7rem; display: grid; place-items: center;
}
#hifive .count {
  position: absolute; top: -8px; right: -6px; background: var(--navy); color: var(--yellow);
  font-family: var(--font-body); font-weight: 800; font-size: 0.72rem;
  border-radius: 999px; padding: 0.15em 0.55em; min-width: 1.6em;
}
#hifive .tip {
  position: absolute; right: 72px; bottom: 8px; width: max-content; max-width: 240px;
  background: var(--navy); color: var(--chalk); font-size: 0.8rem; font-weight: 600;
  padding: 0.5em 0.8em; border-radius: 10px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
#hifive .tip.show { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  #hifive.slap .hand { animation: slap 0.45s ease-in-out; display: inline-block; }
  @keyframes slap { 30% { transform: rotate(-16deg) scale(1.25); } 60% { transform: rotate(10deg); } }
  .brand-hand { animation: hi 0.9s ease-in-out 0.4s 1; transform-origin: bottom center; }
  @keyframes hi { 30% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } }
}
.confetti {
  position: fixed; width: 9px; height: 9px; z-index: 59; pointer-events: none;
  animation: burst 0.8s ease-out forwards;
}
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) rotate(540deg); opacity: 0; } }

/* ---------- mobile bar / reveal ---------- */
.mobile-bar { display: none; }

.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; translate: 0 16px; transition: opacity 0.5s, translate 0.5s; transition-delay: calc(var(--i, 0) * 60ms); }
  .reveal.in { opacity: 1; translate: 0 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .polaroid { max-width: 340px; margin-top: 1rem; }
  .two-col { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tile.featured { grid-column: span 2; grid-row: span 1; aspect-ratio: 16/10; }
}
@media (max-width: 640px) {
  .hero { min-height: 70svh; }
  .cta-row .btn { width: 100%; max-width: 320px; text-align: center; }
  .cards { grid-template-columns: 1fr 1fr; gap: 14px; }
  .card { padding: 1.1rem 0.9rem; }
  footer { padding-bottom: 0; }
  .socials a span { display: none; }
  .socials { gap: 0.8rem; }
  .socials a { width: 48px; justify-content: center; background: rgba(242, 237, 226, 0.08); border-radius: 12px; }
  .mobile-bar {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    background: var(--paper); border-top: 3px solid var(--navy);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .mobile-bar .btn { flex: 1; text-align: center; font-size: 0.85rem; padding: 0.7em 0.5em; }
  footer { padding-bottom: 9rem; }
  /* keep the high-five button on mobile, compact and clear of the sticky bar */
  #hifive { width: 48px; height: 48px; right: 10px; bottom: calc(64px + env(safe-area-inset-bottom)); font-size: 1.4rem; }
  #hifive .count { top: -6px; right: -5px; font-size: 0.66rem; }
  #hifive .tip { right: 56px; bottom: 4px; max-width: 200px; font-size: 0.75rem; }
  .brand { font-size: 1rem; }
  .nav-links { gap: 0.55rem; }
  .nav-links a:not(.pill) { font-size: 0.8rem; padding: 12px 2px; }
}
@media (max-width: 560px) {
  /* nav links duplicate the sticky bottom bar + hero CTAs on mobile — drop them, keep lang + tap list */
  .nav-links a:not(.pill):not(.lang) { display: none; }
  .lang { margin-left: 0; }
  .lang::before { display: none; }
}
@media (max-width: 640px) {
  /* lift the Hoppy sprite above the sticky bar so the word isn't hidden */
  #hoppy-egg { bottom: calc(70px + env(safe-area-inset-bottom)); }
  #hoppy-egg img { width: min(210px, 46vw); }
  #hoppy-egg .word { font-size: clamp(1.6rem, 8vw, 2.4rem); margin-bottom: 30px; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .card { padding: 1.2rem 1.1rem; }
}

/* ---------- "Hoppy!" easter egg (MK Toasty-style) ---------- */
#hoppy-egg {
  position: fixed; left: 0; bottom: 20px; z-index: 200;
  display: flex; align-items: flex-end; gap: 6px;
  transform: translateX(-120%); pointer-events: none; will-change: transform;
}
#hoppy-egg img { width: min(300px, 44vw); height: auto; filter: drop-shadow(0 10px 24px rgba(0,0,0,0.55)); }
#hoppy-egg .word {
  font-family: var(--font-display); font-weight: 900; line-height: 0.9;
  font-size: clamp(2rem, 5vw, 3.75rem); color: var(--yellow);
  -webkit-text-stroke: 3px var(--navy); text-stroke: 3px var(--navy);
  text-shadow: 4px 4px 0 var(--navy); transform: rotate(-8deg);
  margin-bottom: 48px; white-space: nowrap;
}
#hoppy-egg.show { animation: hoppyIn 2.5s cubic-bezier(0.18,0.9,0.2,1) forwards; }
@keyframes hoppyIn {
  0%   { transform: translateX(-120%); }
  13%  { transform: translateX(4%); }
  19%  { transform: translateX(-2%); }
  25%  { transform: translateX(0); }
  82%  { transform: translateX(0); }
  100% { transform: translateX(-120%); }
}
@media (prefers-reduced-motion: reduce) {
  #hoppy-egg { transition: opacity 0.3s; opacity: 0; transform: translateX(0); }
  #hoppy-egg.show { animation: none; opacity: 1; }
}
