/* =========================================================
   THE PLUG BEVERAGES
   ========================================================= */

@font-face {
  font-family: "Consort";
  src: url("../assets/fonts/consort-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Consort";
  src: url("../assets/fonts/consort-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
/* TeX Gyre Heros — free Helvetica clone (GUST Font License, see assets/fonts/heros-LICENSE.txt) */
@font-face {
  font-family: "Heros";
  src: url("../assets/fonts/heros-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Heros";
  src: url("../assets/fonts/heros-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --red: #e3241b;
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.18);

  --font-display: "Consort", "Arial Narrow", Impact, sans-serif;
  --font-body: "Heros", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --nav-h: 72px;

  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--black);
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; }

:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
::selection { background: var(--red); color: var(--white); }

/* Keep the `hidden` attribute working even on elements we give a display value */
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Pistol cursor — desktop mice only. Hotspot is the tip of the barrel. */
@media (hover: hover) and (pointer: fine) {
  html, body, * { cursor: url("../assets/cursor/pistol-cursor.png") 1 3, auto; }
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}

.tagline {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.05;
}

.section { padding-block: clamp(80px, 12vw, 160px); }
[id] { scroll-margin-top: var(--nav-h); }
.section__head { margin-bottom: clamp(40px, 6vw, 72px); }

.section__title,
.brewery__name,
.step__title,
.stockists__statement,
.age-gate__title,
.footer__heading {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: 0.005em;
}

.section__title { font-size: clamp(2.75rem, 7.5vw, 6.25rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85em 1.6em;
  border: 2px solid var(--white);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 0.25s, color 0.25s;
}
.btn--solid { background: var(--white); color: var(--black); }
.btn--solid:hover { background: transparent; color: var(--white); }
.btn--ghost { background: transparent; color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--black); }
.btn--lg { font-size: 1rem; padding: 1.1em 2.4em; }

/* =========================================================
   AGE GATE
   ========================================================= */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.75), #000 75%),
    conic-gradient(#111 25%, #000 0 50%, #111 0 75%, #000 0) 0 0 / 64px 64px;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.age-ok .age-gate { display: none; }
.age-gate.is-leaving { opacity: 0; visibility: hidden; }
.gate-open, .gate-open body { overflow: hidden; }

.age-gate__box {
  max-width: 640px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 36px;
}
.age-gate__logo { width: clamp(120px, 22vw, 180px); }
.age-gate__title { font-size: clamp(2.125rem, 6vw, 3.75rem); margin-bottom: 32px; }
.age-gate__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.age-gate__denied {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 0.95;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0));
  transition: transform 0.4s var(--ease), background-color 0.3s;
}
.nav.is-scrolled { background: var(--black); border-bottom: 1px solid var(--line); }
.nav.is-hidden { transform: translateY(-100%); }

.nav__logo img { height: 46px; width: auto; }

.nav__links { display: flex; gap: clamp(20px, 3vw, 40px); }
.nav__links a {
  position: relative;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-block: 6px;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--black);
  display: flex;
  align-items: center;
  padding: var(--nav-h) var(--gutter) var(--gutter);
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-menu.is-open { opacity: 1; }
.mobile-menu nav { display: grid; gap: 4px; }
.mobile-menu a {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.5rem, 12vw, 4.25rem);
  line-height: 1;
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__logo img { height: 40px; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease);
  -webkit-user-drag: none;
}
.hero__slide.is-current { transform: translateX(0); }

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.hero__brand {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(100% - 2 * var(--gutter), 640px);
  display: grid;
  justify-items: center;
  gap: clamp(20px, 3vw, 32px);
  text-align: center;
  pointer-events: none;
}
.hero__logo { width: clamp(200px, 32vw, 420px); }
.hero__logo img { width: 100%; height: auto; }
.hero__tagline { font-size: clamp(1.375rem, 2.6vw, 2rem); }

.hero__bars {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(24px, 4vw, 48px);
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin-inline: auto;
}
.hero__bar {
  flex: 1;
  height: 24px;            /* generous tap target; visible bar is the inner 4px */
  display: flex;
  align-items: center;
}
.hero__bar::before { content: none; }
.hero__bar span {
  position: relative;
  display: block;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.hero__bar span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
}
.hero__bar.is-done span::after { transform: scaleX(1); }
.hero__bar.is-running span::after { animation: bar-fill 4000ms linear forwards; }
.hero__bar.is-running.is-delayed span::after { animation-delay: 500ms; }
.hero.is-paused .hero__bar span::after { animation-play-state: paused; }

@keyframes bar-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* =========================================================
   BREWERIES
   ========================================================= */
.brewery-list { border-top: 1px solid var(--line); }

.brewery { border-bottom: 1px solid var(--line); }

.brewery__head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto;
  gap: clamp(20px, 3.5vw, 48px);
  align-items: center;
  padding-block: clamp(20px, 2.5vw, 32px);
}

.brewery__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111;
}
.brewery__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.45);
  transition: transform 0.8s var(--ease-out), filter 0.5s;
}
.brewery__logo {
  position: absolute;
  top: 50%; left: 50%;
  width: 48%;
  height: 52%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}
.brewery:hover .brewery__img,
.brewery.is-open .brewery__img { transform: scale(1.04); filter: brightness(0.35); }

.brewery__name { font-size: clamp(2.125rem, 4.6vw, 4rem); margin-bottom: 14px; }

/* Whole card header is the click target, via the button's stretched ::after */
.brewery__trigger {
  text-align: left;
  text-transform: inherit;
  line-height: inherit;
}
.brewery__trigger::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.brewery__trigger:focus-visible { outline: none; }
.brewery__trigger:focus-visible::after { outline: 2px solid var(--white); outline-offset: 4px; }

.brewery__loc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  margin-bottom: 16px;
}
.pin { width: 16px; height: 16px; fill: var(--white); flex: none; }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.pills li {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6em 1em 0.55em;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
}

.brewery__formats { font-size: 0.9375rem; color: var(--muted); }

/* plus → minus */
.brewery__icon {
  position: relative;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  align-self: start;
  margin-top: 6px;
  transition: background-color 0.3s, border-color 0.3s;
}
.brewery__icon::before,
.brewery__icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 2px;
  margin: -1px 0 0 -7px;
  background: var(--white);
  transition: transform 0.45s var(--ease), background-color 0.3s;
}
.brewery__icon::after { transform: rotate(90deg); }
.brewery:hover .brewery__icon { border-color: var(--white); }
.brewery.is-open .brewery__icon { background: var(--red); border-color: var(--red); }
.brewery.is-open .brewery__icon::before,
.brewery.is-open .brewery__icon::after { transform: rotate(180deg); }

/* Smooth height animation without measuring: 0fr → 1fr */
.brewery__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s var(--ease);
}
.brewery.is-open .brewery__panel { grid-template-rows: 1fr; }
/* Same columns as the header, so the bio lines up under the brewery name */
.brewery__panel-inner {
  overflow: hidden;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 36px;
  column-gap: clamp(20px, 3.5vw, 48px);
}

.brewery__bio {
  grid-column: 2;
  display: grid;
  gap: 1em;
  max-width: 68ch;
  padding-bottom: clamp(28px, 4vw, 48px);
  color: rgba(255, 255, 255, 0.85);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s, transform 0.5s var(--ease-out);
}
.brewery.is-open .brewery__bio {
  opacity: 1;
  transform: none;
  transition-delay: 0.15s;
}

@media (max-width: 760px) {
  .brewery__head {
    grid-template-columns: 1fr auto;
    gap: 18px 16px;
  }
  .brewery__media { grid-column: 1 / -1; }
  .brewery__icon { margin-top: 2px; }
  .brewery__panel-inner { grid-template-columns: 1fr; }
  .brewery__bio { grid-column: 1; }
}

/* =========================================================
   STOCKISTS
   ========================================================= */
.stockists { border-top: 1px solid var(--line); }

.stockists__statement {
  font-size: clamp(2.125rem, 5.5vw, 5.5rem);
  text-wrap: balance;
  margin-bottom: clamp(56px, 8vw, 96px);
}

/* Edge fades are overlays rather than mask-image: iOS Safari can stop repainting
   animated content inside a masked element */
.marquee {
  position: relative;
  overflow: hidden;
}
.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  z-index: 1;
  width: 10%;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--black), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--black), transparent); }

.marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: marquee 60s linear infinite;
}
/* Only pause for real mouse hovers — on phones a tap leaves :hover stuck on, freezing it */
@media (hover: hover) and (pointer: fine) {
  .marquee:hover .marquee__track { animation-play-state: paused; }
}
.marquee__group { display: flex; align-items: center; }
.marquee__group li { padding-inline: clamp(20px, 4vw, 56px); }
.marquee__group img {
  height: clamp(40px, 7vw, 88px);
  width: auto;
  max-width: clamp(150px, 20vw, 260px);
}
/* Square/portrait logos read small at the same height as wide ones — give them a bump */
.marquee__group img.is-tall {
  height: clamp(54px, 9.5vw, 118px);
  object-fit: contain;
}

@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* =========================================================
   PROCESS
   ========================================================= */
.process { border-top: 1px solid var(--line); }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: step;
}
.step {
  position: relative;
  padding: 28px clamp(16px, 2vw, 28px) 8px 0;
  border-top: 2px solid var(--white);
}
.step + .step { padding-left: clamp(16px, 2vw, 28px); border-left: 1px solid var(--line); }
.step__num {
  display: block;
  overflow: hidden;           /* mask for the number sliding up */
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 6.75vw, 6rem);
  line-height: 0.95;
  margin-bottom: 20px;
  color: var(--red);
}
.step__num span { display: block; }
.step__title { font-size: clamp(1.75rem, 2.6vw, 2.375rem); margin-bottom: 12px; }
.step p { color: var(--muted); font-size: 1rem; }

/* Reveal: numbers slide up out of their mask one after another, copy fades in behind */
.js .step__num span { transform: translateY(105%); transition: transform 0.9s var(--ease-out); }
.js .step__title,
.js .step p { opacity: 0; transform: translateY(12px); transition: opacity 0.6s, transform 0.8s var(--ease-out); }
.js .steps.is-visible .step__num span,
.js .steps.is-visible .step__title,
.js .steps.is-visible .step p { opacity: 1; transform: none; }
.step:nth-child(2) { --d: 0.18s; }
.step:nth-child(3) { --d: 0.36s; }
.step:nth-child(4) { --d: 0.54s; }
.js .step__num span { transition-delay: var(--d, 0s); }
.js .step__title { transition-delay: calc(var(--d, 0s) + 0.25s); }
.js .step p { transition-delay: calc(var(--d, 0s) + 0.35s); }

.process__cta { margin-top: clamp(48px, 7vw, 80px); }

@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; row-gap: 40px; }
  .step + .step { padding-left: 0; border-left: 0; }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about { border-top: 1px solid var(--line); }
.about__grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.about__media img { width: 100%; height: auto; max-width: 520px; margin-inline: auto; }
.about__copy .section__title { margin-bottom: 32px; }
.about__copy p:not(.eyebrow) { max-width: 52ch; margin-bottom: 1em; color: rgba(255, 255, 255, 0.85); }

@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__media img { max-width: 360px; }
}

/* =========================================================
   CHECKERBOARD + FOOTER
   ========================================================= */
.checker {
  --sq: clamp(18px, 2.4vw, 28px);
  height: calc(var(--sq) * 2);
  background:
    conic-gradient(var(--white) 25%, var(--black) 0 50%, var(--white) 0 75%, var(--black) 0)
    0 0 / calc(var(--sq) * 2) calc(var(--sq) * 2);
  animation: checker-run 1.6s linear infinite;
}
@keyframes checker-run {
  to { background-position: calc(var(--sq) * 2) 0; }
}

.footer { padding-block: clamp(64px, 9vw, 112px) 32px; }

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: clamp(40px, 5vw, 72px);
  padding-bottom: clamp(56px, 8vw, 96px);
}
.footer__logo { width: clamp(140px, 16vw, 200px); }
.footer__tagline { margin-top: 24px; font-size: 1.375rem; max-width: 24ch; }
.footer__heading { font-size: 2rem; margin-bottom: 18px; }
.footer__list { display: grid; gap: 6px; margin-bottom: 24px; }
.footer__list a { border-bottom: 1px solid var(--line); transition: border-color 0.2s; }
.footer__list a:hover { border-color: var(--white); }
.footer__note { color: var(--muted); margin-bottom: 18px; }

.socials { display: flex; gap: 10px; }
.socials a {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background-color 0.25s, border-color 0.25s;
}
.socials svg { width: 20px; height: 20px; fill: none; stroke: var(--white); stroke-width: 1.8; }
.socials svg .fill { fill: var(--white); stroke: none; }
.socials a:hover { background: var(--white); border-color: var(--white); }
.socials a:hover svg { stroke: var(--black); }
.socials a:hover svg .fill { fill: var(--black); }

.signup { display: flex; gap: 8px; }
.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  background: transparent;
  border: 2px solid var(--white);
  border-radius: 0;
  font-size: 1rem;
}
.signup input::placeholder { color: rgba(255, 255, 255, 0.45); }
.signup__bot { position: absolute; left: -5000px; }
.signup.is-busy { opacity: 0.5; pointer-events: none; }
.signup__msg { margin-top: 12px; font-size: 0.9375rem; min-height: 1.5em; }
.signup__msg.is-error { color: var(--red); }
.signup__msg.is-success {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.75rem;
  line-height: 1;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .signup { flex-direction: column; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__slide { transition: none; }
  .marquee__track { animation-duration: 120s; }
  .brewery__panel, .brewery__bio, .nav { transition-duration: 0.01s; }
  .checker { animation: none; }
  .js .step__num span, .js .step__title, .js .step p { transition: none; }
}
