/* Seeing Double: IPA vs. Stout */

:root {
  --paper: #efe4cd;
  --paper-deep: #e3d2b1;
  --type: #1b1612;
  --type-soft: #5b4a3a;
  --ink-k: #0d0d0d;
  --ink-o: #f4a150;
  --focus: #1b1612;

  --gutter: clamp(16px, 3vw, 40px);
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;

  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  overflow-x: hidden;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .25  0 0 0 0 .15  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--type);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
html { scroll-behavior: smooth; }
body.is-intro { overflow: hidden; }

/* ---------- layout ---------- */

.stage {
  position: relative;
  height: 100svh;
  background: radial-gradient(120% 80% at 50% 38%, #f6eedd 0%, rgba(246, 238, 221, 0) 60%);
  overflow: clip;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "ipa growler stout";
  align-items: center;
  /* thin top and bottom margins: the growler takes nearly the full height */
  padding: 14px var(--gutter);
}

.masthead {
  position: absolute;
  top: var(--gutter);
  left: var(--gutter);
  z-index: 2;
  pointer-events: none;
}

.brand {
  display: flex;
  width: max-content;      /* only as wide as the logo itself, so the intro can measure it */
  align-items: center;
  gap: .28em;
  font-size: clamp(34px, 4.4vw, 68px);
}
/* the eye mark sits beside the wordmark, as tall as its two lines */
.mark-slot { flex: none; display: block; height: 1.5em; aspect-ratio: 1142 / 891; }
.eye-mark { display: block; width: 100%; height: auto; overflow: visible; }
.eye-o path { fill: var(--ink-o); }
.eye-k path { fill: var(--ink-k); }

/* while the eye plays, the rest of the page waits; it fades in as the eye heads to the corner.
   The fade is only switched on for the reveal (is-revealing): Safari would otherwise
   animate the hidden starting state on load. */
body.is-revealing .stage > :not(.masthead),
body.is-revealing .prompt,
body.is-revealing .lab { transition: opacity .7s ease; }
/* the page comes up a beat after the logo starts for the corner, so the landing reads
   on its own; the prompt waits until the logo has nearly landed above it */
body.is-revealing .stage > :not(.masthead), body.is-revealing .lab { transition-delay: .25s; }
body.is-revealing .prompt { transition-delay: .55s; }
/* the masthead logo stays hidden until the intro's pieces land in it */
body.is-intro .brand { visibility: hidden; }
body.is-intro .stage > :not(.masthead),
body.is-intro .prompt,
body.is-intro .lab,
body.is-intro .section,
body.is-intro .dots { opacity: 0; }
body.is-revealing .section, body.is-revealing .dots { transition: opacity .7s ease .25s; }

/* the intro's stacked lockup (src/intro.js): eye on top, SEEING DOUBLE on one line */
.intro-stage {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(var(--E) * .1);
}
.intro-stage .eye-mark { width: var(--E); flex: none; }
.intro-words { display: flex; gap: var(--space); flex: none; }
.intro-word { display: block; height: var(--H); width: auto; overflow: visible; flex: none; }
.is-flying { position: fixed; z-index: 51; margin: 0; pointer-events: none; }

.wordmark { margin: 0; font-size: 1em; line-height: 0; }
/* letters exactly as tall as the eye beside them; bubbles are clipped inside (src/fizz.js) */
.wordmark__art { display: block; height: 1.5em; width: auto; overflow: visible; }
.wordmark__letters { fill: var(--ink-k); }
.wordmark__offset { fill: var(--ink-o); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.prompt {
  margin: .8em 0 0;
  font-size: clamp(18px, 1.55vw, 24px);
  font-weight: 600;
  font-variation-settings: "wdth" 85, "opsz" 14;
  color: var(--type-soft);
}

.growler-wrap {
  grid-area: growler;
  display: grid;
  place-items: center;
  /* fill the whole row, so main.js can measure the height that's free */
  align-self: stretch;
  min-height: 0;
}

.growler {
  --gh: min(calc(100svh - 28px), 1400px);
  position: relative;
  width: min(calc(var(--gh) * 640 / 706), calc(100vw - 2 * var(--gutter) - 2 * 170px));
  /* --vbh is set by main.js: the neck and shoulder grow into spare height */
  aspect-ratio: 640 / var(--vbh, 706);
  /* vertical swipes over the growler still scroll the page; holding still drinks */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  transform-origin: 50% 97%;
  will-change: transform;
  outline: none;
  border-radius: 24px;
}
.growler.is-drinking { cursor: grabbing; }
.growler[data-beer="none"] { cursor: default; }

.growler:focus-visible::after {
  content: "";
  position: absolute;
  inset: -2% -1.5% -1% -1.5%;
  border: 3px solid var(--focus);
  border-radius: 28px;
  pointer-events: none;
}

.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.layer--print { will-change: transform; }

/* ---------- glass ---------- */

.ground-shadow { fill: rgba(70, 48, 22, .32); }

.backwall { opacity: .9; }

.handle__edge { opacity: .42; }
.handle__edge path { fill: none; stroke: #384242; stroke-width: 26; stroke-linecap: round; }
.handle__edge circle { fill: #384242; }
.handle__body { opacity: .75; }
.handle__body path { fill: none; stroke: #f3f0e6; stroke-width: 21; stroke-linecap: round; }
.handle__body circle { fill: #f3f0e6; }
.handle__shine { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; opacity: .5; }

.glass-wall { fill: #eef1ea; fill-opacity: .55; }
.glass-edge { fill: none; stroke: rgba(48, 58, 58, .5); stroke-width: 2.2; stroke-linejoin: round; }
.glass-inner-edge { fill: none; stroke: rgba(48, 58, 58, .18); stroke-width: 1.4; }
.glass-base { stroke: rgba(255, 255, 255, .5); stroke-width: 3; stroke-linecap: round; }
.lip { fill: #f1efe7; fill-opacity: .8; stroke: rgba(48, 58, 58, .5); stroke-width: 2.2; }

.shine { fill: none; stroke: #fff; stroke-linecap: round; stroke-width: 4; opacity: .32; }
.shine--strong { stroke-width: 7; opacity: .3; }
.shine--soft { stroke-width: 4; opacity: .22; }
.shine--wall { stroke-width: 5; opacity: .48; }
.shine--wall.shine--soft { opacity: .26; }
.shine--fine { stroke-width: 2; opacity: .3; }

.cap__body { fill: #1f1c19; }
.cap__ribs { stroke: #3a352f; stroke-width: 3; }
.cap__band { fill: var(--ink-o); }
.cap { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .55s cubic-bezier(.2, .9, .3, 1.2), opacity .4s ease .25s; }
.growler.is-open .cap { transform: translate(140px, -210px) rotate(38deg); opacity: 0; }

/* ---------- ink ---------- */

.layer--print .k { color: var(--ink-k); }
.layer--print .o { color: var(--ink-o); }
/* fizz mask: white where the beer-matched ink shows, black for the other ink */
#mask-slot .k, #mask-slot .o { color: #000; }
.growler[data-beer="ipa"] #mask-slot .o,
.growler[data-beer="stout"] #mask-slot .k { color: #fff; }
.growler.hide-black .layer--fizz { display: none; }
.growler.hide-orange .layer--fizz { display: none; }
.growler.hide-black .layer--print .k { display: none; }
.growler.hide-orange .layer--print .o { display: none; }

/* ---------- beer ---------- */

.growler[data-beer="ipa"] {
  /* matched to the orange ink so it sinks into the beer */
  --beer: #f4a150;
  --beer-deep: #b8661c;
  --foam: #fbf3e1;
  --foam-top: #fffbf2;
  --foam-low: #f3d29b;
  --bubble: #ffe7bd;
  --stream-hi: #ffd391;
}
.growler[data-beer="stout"] {
  /* matched to the black ink */
  --beer: #0d0d0d;
  --beer-deep: #33170b;
  --foam: #d8b98c;
  --foam-top: #e9d6b4;
  --foam-low: #8a6440;
  --bubble: #b08658;
  --stream-hi: #4a2814;
}

.beer { fill: var(--beer); }
.foam { stroke: none; }
.bubbles circle { fill: var(--bubble); }
.stream { fill: var(--beer); }
.caustic { fill: var(--beer, transparent); opacity: 0; }
.growler[data-beer="ipa"] .caustic { fill: #f0a24a; }
.growler[data-beer="stout"] .caustic { fill: #2a160b; }

/* ---------- tilt to drink (phones) ---------- */

.tilt-hint {
  /* hangs below the prompt without taking up layout space, so the growler doesn't jump when it appears */
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
  font-variation-settings: "wdth" 85;
  color: var(--type);
  /* quieter than the pour buttons: it's a cue, not something to tap */
  border: 1.5px solid var(--type);
  border-radius: 999px;
  background: rgba(255, 252, 244, .6);
}
.tilt-hint[hidden] { display: none; }
.tilt-hint svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
  animation: rock 2.4s ease-in-out infinite;
}
.tilt-hint svg rect { transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes rock { 0%, 100% { rotate: -16deg; } 50% { rotate: 16deg; } }

/* prompt: hopping letters for instructions (main.js moves them), looping dots while busy */
.prompt__word { display: inline-block; white-space: nowrap; }
.prompt__ch { display: inline-block; will-change: transform; }
.prompt__dots span { animation: dot 1.2s infinite both; }
.prompt__dots span:nth-child(2) { animation-delay: .2s; }
.prompt__dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 15% { opacity: 0; } 25%, 75% { opacity: 1; } 90%, 100% { opacity: 0; } }

/* ---------- credit ---------- */

.credit {
  position: absolute;
  top: var(--gutter);
  right: var(--gutter);
  z-index: 3;
  font-size: clamp(15px, 1.15vw, 18px);
  font-weight: 500;
  font-variation-settings: "wdth" 85, "opsz" 14;
  color: var(--type-soft);
  text-decoration: none;
  padding: 6px 10px;
  margin: -6px -10px;
  border-radius: 8px;
  outline: none;
}
.credit span { font-weight: 700; color: var(--type); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; text-decoration-color: var(--ink-o); }
.credit:hover span { text-decoration-color: var(--type); }
.credit:focus-visible { box-shadow: 0 0 0 3px var(--focus); }

/* ---------- level handle ---------- */

.level {
  position: absolute;
  left: calc(38.5 / 640 * 100%);
  top: 50%;
  /* the grip's centre sits on the glass wall; the label grows out to the left */
  translate: calc(-100% + 22px) -50%;
  min-width: 44px;
  height: 44px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  border-radius: 22px;
  cursor: ns-resize;
  touch-action: none;
  outline: none;
  z-index: 3;
}
.level[hidden] { display: none; }
.level { transition: opacity .25s ease; }
.level.is-locked { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .25s ease, visibility 0s .25s; }
.level__grip {
  flex: none;
  margin: 0 9px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--paper);
  border: 2.5px solid var(--type);
  box-shadow: 2px 2px 0 var(--ink-o);
  background-image: linear-gradient(var(--type), var(--type)), linear-gradient(var(--type), var(--type));
  background-size: 10px 2px, 10px 2px;
  background-position: center calc(50% - 3px), center calc(50% + 3px);
  background-repeat: no-repeat;
  transition: transform .15s ease;
}
.level:hover .level__grip, .level.is-dragging .level__grip { transform: scale(1.12); }
/* the readout only appears while the handle is in use */
.level__value {
  display: none;
  padding-left: 12px;
  font-size: 14px;
  font-weight: 700;
  font-variation-settings: "wdth" 80;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--type);
}
.level:hover, .level.is-dragging, .level:focus-visible { background: var(--paper); }
.level:hover .level__value, .level.is-dragging .level__value, .level:focus-visible .level__value { display: block; }
.level:focus-visible { box-shadow: 0 0 0 3px var(--focus); }

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

.tap {
  appearance: none;
  border: 0;
  background: none;
  color: var(--type);
  font: inherit;
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 18px 20px 16px;
  border-radius: 20px;
  justify-self: center;
  align-self: end;
  margin-bottom: 14vh;
  outline: none;
}
.tap--ipa { grid-area: ipa; }
.tap--stout { grid-area: stout; }

.tap__swatch {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid var(--ink-k);
  box-shadow: 4px 4px 0 var(--ink-o);
  margin-bottom: 10px;
  background:
    linear-gradient(to bottom, var(--sw-foam) 0 34%, var(--sw-beer) 34% 100%);
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1);
}
.tap--ipa { --sw-beer: #f4a150; --sw-foam: #fbf3e1; }
.tap--stout { --sw-beer: #0d0d0d; --sw-foam: #d8b98c; }

.tap__verb {
  font-size: 15px;
  font-weight: 500;
  font-variation-settings: "wdth" 85, "opsz" 14;
  color: var(--type-soft);
}
.tap__name {
  font-size: clamp(34px, 3.4vw, 52px);
  font-weight: 800;
  font-variation-settings: "wdth" 75, "opsz" 96;
  line-height: .9;
  text-transform: uppercase;
}

.tap:hover .tap__swatch { transform: translateY(-3px) rotate(-6deg); }
.tap:active .tap__swatch { transform: translateY(1px) scale(.96); }
.tap[aria-pressed="true"] .tap__swatch { transform: scale(1.04); }
.tap:focus-visible { box-shadow: inset 0 0 0 3px var(--focus); }

/* ---------- prototype controls ---------- */

.lab {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  font-size: 13px;
  font-variation-settings: "wdth" 90;
  background: rgba(255, 252, 244, .92);
  border: 1.5px solid var(--type);
  border-radius: 12px;
}
.lab summary { cursor: pointer; padding: 8px 12px; font-weight: 600; }
.lab summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
.lab__body { display: grid; gap: 8px; padding: 4px 12px 12px; }
.lab__body label { display: flex; gap: 8px; align-items: center; }
.lab__body button {
  font: inherit; font-weight: 600; padding: 6px 10px; border-radius: 8px;
  border: 1.5px solid var(--type); background: var(--paper); color: var(--type); cursor: pointer;
}
.lab__body :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- phone & narrow ---------- */

@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  .stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "mast mast"
      "growler growler"
      "ipa stout";
    padding: 16px 16px max(16px, env(safe-area-inset-bottom));
    gap: 8px;
  }
  .masthead { position: relative; top: auto; left: auto; grid-area: mast; }
  .brand { font-size: 40px; }
  .prompt { margin-top: .5em; font-size: 19px; }
  /* Close-up on phones: the print spans the gutters and the glass walls run
     just past the screen edge (never almost-touching it). Taller screens stop
     at the height that leaves room for the masthead and the pour buttons. */
  .growler-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    place-items: normal;
    margin-inline: -16px;
    min-width: 0;
  }
  .growler {
    /* the art's bottom rules span the screen with an 18px margin; the glass walls sit just outside them */
    --w: min(calc((100vw - 36px) * 640 / 544), calc((100svh - 250px) * 640 / 706));
    width: var(--w);
    margin-left: calc(50% - var(--w) / 2);
  }
  .tap {
    margin: 0;
    align-self: center;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 0;
    justify-items: start;
    align-items: center;
    padding: 10px 14px;
  }
  .tap__swatch { grid-row: 1 / 3; width: 52px; height: 52px; margin: 0; box-shadow: 3px 3px 0 var(--ink-o); }
  .tap__verb { font-size: 13px; align-self: end; }
  .tap__name { font-size: 34px; align-self: start; }
  .level__value, .level:is(:hover, .is-dragging, :focus-visible) .level__value { display: none; }
  .lab { bottom: auto; top: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sticker--birds .sticker__art, .sticker--stars .sticker__art { animation: none; }
  .cap, .tap__swatch, .level__grip { transition: none; }
  .prompt__dots span { animation: none; opacity: 1; }
  .tilt-hint svg { animation: none; rotate: -16deg; }
}


/* ================= the scroll: the page is the glass ================= */

.section { position: relative; overflow-x: clip; }  /* nothing pokes past the screen edge sideways */
.section__title {
  margin: 0;
  font-family: 'Anybody', var(--font);
  font-weight: 900; font-stretch: 75%; font-variation-settings: 'wdth' 75;
  text-transform: uppercase;
  font-size: clamp(44px, 6vw, 92px);
  line-height: .9;
  color: var(--ink-k);
  text-shadow: .045em .04em 0 var(--ink-o);
  text-wrap: balance;
}
.section__lede { margin: 0; font-size: clamp(19px, 1.6vw, 24px); font-weight: 600; line-height: 1.45; max-width: 34ch; text-wrap: pretty; }
.section__body { margin: 0; font-size: clamp(17px, 1.25vw, 19px); line-height: 1.55; max-width: 44ch; color: var(--type-soft); text-wrap: pretty; }
.section__body--lead { font-size: clamp(18px, 1.4vw, 21px); }
/* the ask Riley cares about most, set apart like "What I do know" in the stout */
.callout {
  margin: 0; padding-left: 20px; border-left: 4px solid var(--ink-o);
  font-size: clamp(26px, 2.5vw, 38px); font-weight: 800; line-height: 1.15; color: var(--type);
  max-width: 20ch; text-wrap: balance;
}
.callout__aside { display: block; margin-top: 10px; font-size: clamp(16px, 1.2vw, 18px); font-weight: 600; line-height: 1.4; color: var(--type-soft); text-wrap: pretty; }

/* ---- landing: a nudge to keep going */
.scroll-cue {
  position: absolute; left: var(--gutter); bottom: var(--gutter); z-index: 2;
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 10px; margin: -6px -10px;
  font-size: 15px; font-weight: 700; color: var(--type-soft); text-decoration: none; border-radius: 10px; outline: none;
}
.scroll-cue:focus-visible { box-shadow: 0 0 0 3px var(--focus); }
.scroll-cue__fizz { position: relative; width: 12px; height: 26px; }
.scroll-cue__fizz i { position: absolute; left: 3px; bottom: 0; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--type-soft); animation: cue 1.8s ease-in infinite; opacity: 0; }
.scroll-cue__fizz i:nth-child(2) { animation-delay: .6s; left: 0; width: 5px; height: 5px; }
.scroll-cue__fizz i:nth-child(3) { animation-delay: 1.2s; left: 5px; width: 4px; height: 4px; }
@keyframes cue { 0% { translate: 0 0; opacity: 0; } 20% { opacity: 1; } 100% { translate: 0 -24px; opacity: 0; } }

/* ---- the beer sections: a full screen of beer, poured in over the section above */
.section--beer {
  min-height: 100svh;
  display: grid; align-items: center;
  padding: clamp(110px, 16vh, 180px) var(--gutter);
  overflow-x: clip;
}
.surface {
  position: absolute; left: 0; right: 0; top: -47px; height: 48px; z-index: 2;
  background-repeat: repeat-x; background-size: 160px 48px;
  animation: slosh 7s linear infinite;
  pointer-events: none;
}
@keyframes slosh { to { background-position-x: -160px; } }
.section--ipa .surface { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='48'%3E%3Cpath fill='%23fbf3e1' d='M0 22Q6 13 14 18Q21 10 30 16Q38 9 46 16Q54 11 62 17Q70 8 80 15Q88 11 96 17Q104 9 114 16Q122 12 130 17Q138 9 148 16Q154 13 160 22V48H0Z'/%3E%3Cg fill='%23f1dfbd'%3E%3Ccircle cx='12' cy='26' r='2'/%3E%3Ccircle cx='38' cy='23' r='1.4'/%3E%3Ccircle cx='57' cy='28' r='2.2'/%3E%3Ccircle cx='84' cy='24' r='1.6'/%3E%3Ccircle cx='108' cy='28' r='1.8'/%3E%3Ccircle cx='131' cy='24' r='1.3'/%3E%3Ccircle cx='150' cy='28' r='2'/%3E%3C/g%3E%3Cpath fill='%23f4a150' d='M0 36Q40 32 80 36T160 36V48H0Z'/%3E%3C/svg%3E"); }
.section--stout .surface { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='48'%3E%3Cpath fill='%23d8b98c' d='M0 22Q6 13 14 18Q21 10 30 16Q38 9 46 16Q54 11 62 17Q70 8 80 15Q88 11 96 17Q104 9 114 16Q122 12 130 17Q138 9 148 16Q154 13 160 22V48H0Z'/%3E%3Cg fill='%23c4a171'%3E%3Ccircle cx='12' cy='26' r='2'/%3E%3Ccircle cx='38' cy='23' r='1.4'/%3E%3Ccircle cx='57' cy='28' r='2.2'/%3E%3Ccircle cx='84' cy='24' r='1.6'/%3E%3Ccircle cx='108' cy='28' r='1.8'/%3E%3Ccircle cx='131' cy='24' r='1.3'/%3E%3Ccircle cx='150' cy='28' r='2'/%3E%3C/g%3E%3Cpath fill='%230d0d0d' d='M0 36Q40 32 80 36T160 36V48H0Z'/%3E%3C/svg%3E"); animation-duration: 11s; }
.section--stout .surface--drain { top: auto; bottom: -31px; height: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='32'%3E%3Cpath fill='%230d0d0d' d='M0 0H160V12Q140 30 120 14Q100 28 80 14Q60 30 40 14Q20 28 0 12Z'/%3E%3C/svg%3E"); background-size: 160px 32px; animation-direction: reverse; }
.fizz { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.beer__inner { position: relative; z-index: 1; width: 100%; max-width: 1180px; margin: 0 auto; display: grid; gap: 24px; }
.beer__inner--split { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: clamp(32px, 6vw, 96px); }
.beer__inner--split > div:first-child { display: grid; gap: 22px; }
.kicker { margin: 0; font-size: clamp(16px, 1.3vw, 20px); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-wrap: balance; }
.beer__title {
  margin: 0;
  font-family: 'Anybody', var(--font);
  font-weight: 900; font-stretch: 75%; font-variation-settings: 'wdth' 75;
  text-transform: uppercase;
  font-size: clamp(52px, 8.4vw, 136px);
  line-height: .86;
  max-width: 13ch;
  text-wrap: balance;
}
.beer__body { margin: 0; font-size: clamp(18px, 1.45vw, 22px); line-height: 1.5; max-width: 46ch; font-weight: 500; text-wrap: pretty; }

/* IPA: amber beer, only black ink survives. The margin leaves clear paper between
   the growler's base and the foam. */
.section--ipa { background: var(--ink-o); color: var(--ink-k); margin-top: 84px; }
.section--ipa .beer__title { font-size: clamp(56px, 9.4vw, 152px); }

/* the birds: wings-up flies right to left, wings-down left to right, in and out of frame */
.flyer { position: absolute; left: 0; z-index: 0; width: clamp(110px, 13vw, 210px); pointer-events: none; }
.flyer--left { top: 9%; animation: fly-left 12s linear infinite; }
.flyer--right { bottom: 8%; animation: fly-right 14s linear infinite 5s; translate: -40vw 0; }
.flyer__bob svg { display: block; width: 100%; height: auto; overflow: visible; color: var(--ink-k); }
.flyer__bob { animation: bob .9s ease-in-out infinite alternate; }
.flyer--right .flyer__bob { animation-duration: 1.1s; }
@keyframes fly-left {
  0% { translate: 105vw 0; } 30% { translate: 65vw -5vh; } 60% { translate: 30vw 3vh; } 100% { translate: -35vw -2vh; }
}
@keyframes fly-right {
  0% { translate: -35vw 0; } 35% { translate: 20vw 4vh; } 70% { translate: 62vw -3vh; } 100% { translate: 105vw 1vh; }
}
@keyframes bob { from { transform: translateY(-6px) rotate(-5deg); } to { transform: translateY(6px) rotate(4deg); } }

/* stout: near-black beer, only orange ink survives */
.section--stout { background: var(--ink-k); color: var(--ink-o); }
.section--stout .beer__body { color: #f6c48f; }
/* the one thing Riley is sure of, set apart: bigger, bolder, full orange, on a rule */
.know {
  margin: 8px 0 0; padding-left: 20px; border-left: 4px solid var(--ink-o);
  font-size: clamp(24px, 2.3vw, 34px); font-weight: 800; line-height: 1.22; color: var(--ink-o);
  max-width: 24ch; text-wrap: balance;
}
.know__label { display: block; margin-bottom: 8px; font-size: clamp(14px, 1.05vw, 16px); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #f6c48f; }
.stars svg { display: block; width: 100%; height: auto; overflow: visible; color: var(--ink-o); }
.stars { width: min(100%, 440px); justify-self: center; animation: drift 9s ease-in-out infinite alternate; }
.stars .piece > * { transform-box: fill-box; transform-origin: 50% 50%; animation: twinkle 2.4s ease-in-out infinite var(--d, 0s); }
/* the lump swells and settles from where it sits on his head, a double throb */
.stars .piece > .bruise { transform-origin: 50% 100%; animation: throb 1.7s ease-in-out infinite; }
@keyframes throb {
  0%, 55%, 100% { scale: 1; }
  12% { scale: 1.16; }
  24% { scale: 1.04; }
  36% { scale: 1.13; }
}
@keyframes twinkle { 0%, 100% { scale: 1; rotate: 0deg; } 50% { scale: 1.18; rotate: 14deg; } }
@keyframes drift { from { translate: 0 -12px; rotate: -4deg; } to { translate: 0 12px; rotate: 4deg; } }

/* ---- the bar tab */
.section--tab { padding: clamp(110px, 16vh, 180px) var(--gutter) clamp(80px, 12vh, 140px); }
.tab-layout { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(40px, 7vw, 120px); align-items: center; }
.tab-intro { display: grid; gap: 22px; }
.tab-wrap { filter: drop-shadow(0 22px 26px rgba(70, 48, 22, .22)) drop-shadow(0 2px 3px rgba(70, 48, 22, .18)); rotate: 1.8deg; }
.tab {
  --z: 9px;
  position: relative;
  display: grid; gap: 14px;
  padding: 40px 30px 46px;
  background: #fffdf6;
  font-family: 'DM Mono', ui-monospace, monospace; font-size: 15px; color: #2a2420;
  text-transform: uppercase;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--z)) 51% repeat-x,
                conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--z)) 51% repeat-x;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--z)) 51% repeat-x,
                conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--z)) 51% repeat-x;
}
.tab p { margin: 0; }
.tab__head { display: grid; gap: 4px; text-align: center; }
.tab__name { font-family: 'Anybody', var(--font); font-weight: 900; font-stretch: 75%; font-variation-settings: 'wdth' 75; font-size: 34px; line-height: 1; letter-spacing: .01em; margin-bottom: 6px !important; }
.tab__meta { display: flex; justify-content: space-between; font-size: 13px; color: #6a5d50; }
.tab__rule { border-top: 2px dashed #2a2420; margin: 4px 0; }
.tab__row { display: flex; align-items: baseline; gap: 12px; }
.tab__row > span { flex: none; width: 4.5em; }
.tab input:not([type="radio"]), .tab textarea {
  font: inherit; text-transform: none; color: #2a2420; background: transparent;
  border: 0; border-bottom: 2px dotted #2a2420; border-radius: 0; padding: 4px 2px; width: 100%; min-width: 0; outline: none;
}
.tab textarea { border: 2px dotted #2a2420; border-radius: 6px; padding: 8px 10px; resize: vertical; min-height: 92px; }
.tab input:focus-visible, .tab textarea:focus-visible { box-shadow: 0 0 0 3px #fffdf6, 0 0 0 6px var(--focus); border-radius: 4px; }
.tab__who { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.tab__who legend { padding: 0; margin-bottom: 8px; float: left; width: 100%; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: block; padding: 5px 10px; border: 1.5px solid #2a2420; border-radius: 999px; font-size: 13px; }
.chip input:checked + span { background: #2a2420; color: #fffdf6; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px #fffdf6, 0 0 0 6px var(--focus); }
.tab__order { display: grid; gap: 8px; }
.tab__line { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.tab__line i { flex: 1; border-bottom: 2px dotted rgba(42, 36, 32, .45); translate: 0 -4px; }
.tab__line--total { font-weight: 500; font-size: 17px; }
.tab__close {
  margin-top: 6px; font: inherit; font-family: 'Anybody', var(--font); font-weight: 900; font-stretch: 75%; font-variation-settings: 'wdth' 75;
  font-size: 22px; letter-spacing: .03em; text-transform: uppercase;
  color: #fffdf6; background: var(--ink-k); border: 0; border-radius: 10px; padding: 12px 18px;
  box-shadow: 4px 4px 0 var(--ink-o); cursor: pointer; outline: none;
}
.tab__close:active { translate: 2px 2px; box-shadow: 2px 2px 0 var(--ink-o); }
.tab__close:focus-visible { box-shadow: 4px 4px 0 var(--ink-o), 0 0 0 3px #fffdf6, 0 0 0 6px var(--focus); }
.tab__status { font-size: 13px; text-transform: none; text-align: center; }
.tab__status:empty { display: none; }
.tab__status[data-tone="error"] { color: #a3361b; }
.tab__barcode { height: 44px; margin: 8px 12% 0; background: repeating-linear-gradient(90deg, #2a2420 0 2px, transparent 2px 4px, #2a2420 4px 7px, transparent 7px 8px, #2a2420 8px 9px, transparent 9px 12px); }
.tab__thanks { text-align: center; font-size: 12px; letter-spacing: .12em; color: #6a5d50; }
.tab__stamp {
  position: absolute; left: 50%; top: 46%; translate: -50% -50%; rotate: -16deg; scale: 1.8; opacity: 0; pointer-events: none;
  font-family: 'Anybody', var(--font); font-weight: 900; font-stretch: 75%; font-variation-settings: 'wdth' 75;
  font-size: 64px; line-height: 1; color: var(--ink-o); border: 6px solid var(--ink-o); border-radius: 12px; padding: 4px 18px;
  transition: opacity .2s ease, scale .35s cubic-bezier(.3, 1.6, .5, 1);
}
.tab.is-closed .tab__stamp { opacity: .92; scale: 1; }

/* ---- last call */
.section--last { padding: clamp(80px, 12vh, 140px) var(--gutter) 40px; }
.last { max-width: 760px; margin: 0 auto; display: grid; justify-items: center; text-align: center; gap: 22px; }
.last .section__lede { max-width: 36ch; }
.last__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: end; width: min(100%, 560px); margin-top: 12px; }
.last__form input { font: inherit; font-size: 22px; font-weight: 600; color: var(--type); background: transparent; border: 0; border-bottom: 3px solid var(--type); padding: 8px 2px; width: 100%; outline: none; }
.last__form input:focus-visible { box-shadow: 0 6px 0 -3px var(--ink-o); }
.button {
  font: inherit; font-weight: 800; font-size: 18px; color: var(--paper); background: var(--ink-k); border: 0; border-radius: 999px; padding: 13px 26px;
  box-shadow: 4px 4px 0 var(--ink-o); cursor: pointer; outline: none; white-space: nowrap;
}
.button:active { translate: 2px 2px; box-shadow: 2px 2px 0 var(--ink-o); }
.button:focus-visible { box-shadow: 4px 4px 0 var(--ink-o), 0 0 0 3px var(--paper), 0 0 0 6px var(--focus); }
.form__status { grid-column: 1 / -1; margin: 0; font-size: 15px; color: var(--type-soft); }
.form__status:empty { display: none; }
.form__status[data-tone="error"] { color: #a3361b; font-weight: 600; }
.footer { max-width: 1180px; margin: clamp(90px, 14vh, 160px) auto 0; padding-top: 24px; border-top: 1.5px dashed rgba(13, 13, 13, .25); font-size: 15px; color: var(--type-soft); text-align: center; }
.footer a { white-space: nowrap; color: var(--type); font-weight: 700; text-decoration-color: var(--ink-o); text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.footer a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* ---- the dotted guide on the right; recolours itself for each beer */
.dots {
  --dot-line: rgba(13, 13, 13, .35); --dot-ring: var(--type); --dot-fill: var(--paper); --dot-on: var(--ink-o);
  position: fixed; right: clamp(10px, 1.6vw, 26px); top: 50%; translate: 0 -50%; z-index: 20;
  display: grid; gap: 22px; padding: 6px 0;
}
body[data-section="ipa"] .dots { --dot-line: rgba(13, 13, 13, .45); --dot-fill: var(--ink-o); --dot-on: var(--ink-k); }
body[data-section="stout"] .dots { --dot-line: rgba(244, 161, 80, .5); --dot-ring: var(--ink-o); --dot-fill: var(--ink-k); --dot-on: var(--ink-o); }
.dots::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 11px; border-right: 2px dotted var(--dot-line); }
/* every link is just the dot, so they line up in one column; labels hang to the left */
.dots a { position: relative; display: grid; place-items: center; width: 24px; height: 24px; color: var(--type); text-decoration: none; outline: none; border-radius: 999px; }
.dots__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--dot-fill); border: 2px solid var(--dot-ring); transition: transform .2s ease, background-color .2s ease; }
.dots a[aria-current] .dots__dot { background: var(--dot-on); transform: scale(1.35); }
.dots__label { position: absolute; right: calc(100% + 6px); top: 50%; margin-top: -12px; line-height: 18px; font-size: 14px; font-weight: 700; white-space: nowrap; background: var(--paper); padding: 3px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--type); opacity: 0; translate: 6px 0; transition: opacity .2s ease, translate .2s ease; pointer-events: none; }
.dots a:hover .dots__label, .dots a:focus-visible .dots__label { opacity: 1; translate: 0 0; }
.dots a:focus-visible { box-shadow: 0 0 0 3px var(--dot-ring); }
@media (hover: none) { .dots__label { display: none; } }

@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  .scroll-cue { display: none; }
  .section--beer, .section--tab, .section--last { padding-left: 16px; padding-right: 40px; }
  .beer__inner--split, .tab-layout { grid-template-columns: minmax(0, 1fr); }
  .stars { width: min(70%, 300px); }
  .tab-wrap { rotate: 1deg; }
  .tab { padding-inline: 20px; }
  .last__form { grid-template-columns: minmax(0, 1fr); }
  /* no section guide on phones (Riley's call); text gets the room back */
  .dots { display: none; }
  .section--beer, .section--tab, .section--last { padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .surface, .flyer, .flyer__bob, .stars, .stars .piece > *, .stars .bruise, .scroll-cue__fizz i { animation: none !important; }
  .flyer--left { translate: 60vw 0; }
  .flyer--right { translate: 18vw 0; }
}

/* spam trap: off-screen field only bots fill in (api/contact.js) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tab__close:disabled, .button:disabled { opacity: .6; cursor: default; }
