/*
 * Factory Brewing
 *
 * Haze, stout and aluminium: the colour of a hazy DIPA in the glass, the colour
 * of an imperial stout, and the can they both come in.
 */

:root {
  --haze: #F0B63E;
  --haze-deep: #DDA02A;
  --stout: #2A1A12;
  --stout-soft: #4A3426;
  --foam: #FFF4DA;
  --foam-dim: rgba(255, 244, 218, 0.74);
  --foam-line: rgba(255, 244, 218, 0.2);
  --alu: #DADDE0;
  --steel: #4D545A;
  --stout-line: rgba(42, 26, 18, 0.2);
  --stout-on-haze: #A1782C; /* stout at 40% over haze, opaque */

  --display: "Anybody", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --section-pad: clamp(64px, 10vw, 136px);

  /* the hero block */
  --frame: clamp(8px, 1.1vw, 16px);
  --radius: clamp(20px, 2.2vw, 32px);
  --block-max: 1680px;
  --can-overhang: clamp(150px, 24vh, 240px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--alu);
  color: var(--stout);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
address {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

address {
  font-style: normal;
}

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 3px;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

::selection {
  background: var(--stout);
  color: var(--haze);
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--stout);
  color: var(--foam);
  font-family: var(--display);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* -------------------------------------------------------------- type */

h1,
h2 {
  font-family: var(--display);
  font-weight: 850;
  font-stretch: 62%;
  letter-spacing: -0.005em;
  line-height: 0.88;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 5.2vw, 5.5rem);
}

h2 {
  font-size: clamp(2.75rem, 6.4vw, 5.75rem);
}

h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px clamp(24px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head p {
  max-width: 44ch;
  font-size: 1.2rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid var(--stout);
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-solid {
  background: var(--stout);
  color: var(--haze);
}

.btn-solid:hover {
  background: transparent;
  color: var(--stout);
}

.btn-line:hover {
  background: var(--stout);
  color: var(--haze);
}

.btn-foam {
  border-color: var(--foam);
  background: var(--foam);
  color: var(--stout);
}

.btn-foam:hover {
  background: transparent;
  color: var(--foam);
}

/* ------------------------------------------------------------ header */

/* The header and the hero together make one rounded haze block, inset from the page edges. */
.site-header,
.hero {
  width: calc(100% - 2 * var(--frame));
  max-width: var(--block-max);
  margin-inline: auto;
  background: var(--haze);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: var(--frame);
  padding: 20px var(--gutter) 4px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-family: var(--display);
  text-decoration: none;
  line-height: 1;
}

.wordmark-factory {
  font-weight: 900;
  font-stretch: 150%;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.wordmark-brewing {
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 36px);
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 108%;
  font-size: 1rem;
}

.site-nav a {
  text-decoration: none;
}

/* The underline draws in from the left on hover, and carries on out to the right. */
.site-nav a:not(.nav-shop) {
  position: relative;
}

.site-nav a:not(.nav-shop)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.3em;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.6, 0, 0.2, 1);
}

.site-nav a:not(.nav-shop):hover::after,
.site-nav a:not(.nav-shop):focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (prefers-reduced-motion: reduce) {
  .site-nav a:not(.nav-shop)::after {
    transition: none;
  }
}

.nav-shop {
  padding: 8px 18px;
  border: 2px solid var(--stout);
  border-radius: 999px;
}

.site-nav .nav-shop:hover {
  background: var(--stout);
  color: var(--haze);
  text-decoration: none;
}

/* -------------------------------------------------------------- hero */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  /* text and caption sit together, centred in the block */
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(24px, 4vw, 64px);
  min-height: clamp(540px, calc(100svh - 190px), 880px);
  padding: clamp(24px, 4vh, 48px) var(--gutter) clamp(28px, 4.5vh, 48px);
}

.hero-copy {
  grid-column: 1;
  grid-row: 2;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 7rem);
}

.hero-intro {
  max-width: 40ch;
  margin-top: clamp(20px, 3vh, 32px);
  font-size: 1.25rem;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* Rising bubbles (js/bubbles.js). The layer spans the header and hero, so their
   contents sit above it. */
.bubbles {
  position: absolute;
  left: 0;
  width: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bubbles canvas {
  display: block;
}

.site-header > *,
.hero-copy,
.hero-now {
  position: relative;
  z-index: 1;
}

/* only used on narrow screens, where the block stops short of the caption */
.hero-bg {
  display: none;
}

/* what's on the can right now */
.hero-now {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  gap: 18px;
  max-width: 560px;
  margin-top: clamp(36px, 5vh, 52px);
  padding-top: 24px;
  border-top: 2px solid var(--stout-line);
}

.can-caption {
  --can-base: #3D2A78;
  --can-band: #2A1C57;
  --can-ink: #F6B547;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  transition: opacity 0.4s ease;
}

.can-caption .mini-can {
  width: 34px;
  height: 80px; /* about the height of the three lines of text beside it */
}

.has-intro .can-caption:not(.is-shown) {
  opacity: 0;
}

.cap-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  line-height: 1.05;
  white-space: nowrap;
}

.cap-style {
  margin-top: 4px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--stout-soft);
}

.cap-with {
  margin-top: 2px;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--stout-soft);
}

.can-caption.is-new .mini-can,
.can-caption.is-new .cap-text > * {
  animation: caption-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.can-caption.is-new .cap-style {
  animation-delay: 0.04s;
}

.can-caption.is-new .cap-with {
  animation-delay: 0.08s;
}

@keyframes caption-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.cap-arrows {
  display: flex;
  gap: 10px;
}

.cap-arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid var(--stout);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.cap-arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cap-arrow:hover {
  background: var(--stout);
  color: var(--haze);
}

.cap-arrow:active svg {
  transform: scale(0.88);
}

/* Pause for the automatic beer changes. Its ring fills up to the next change. */
.cap-auto {
  border-color: transparent;
}

.cap-auto[hidden] {
  display: none;
}

.cap-auto svg {
  width: 100%;
  height: 100%;
  stroke-width: 2;
}

.cap-auto-track {
  stroke: var(--stout-line);
}

.cap-auto-ring {
  stroke: currentColor;
  stroke-dasharray: 1 1;
  stroke-dashoffset: calc(1 - var(--auto, 0));
  transform: rotate(-90deg);
  transform-origin: center;
}

.cap-auto-pause {
  stroke-width: 2.6;
}

.cap-auto-play {
  display: none;
  fill: currentColor;
  stroke-width: 0;
}

.cap-auto.is-paused .cap-auto-pause {
  display: none;
}

.cap-auto.is-paused .cap-auto-play {
  display: inline;
}

.cap-auto.is-paused .cap-auto-track {
  stroke: currentColor;
}

.cap-auto:hover {
  background: transparent;
  color: var(--stout);
}

.cap-auto:hover .cap-auto-track {
  stroke: currentColor;
}

/* The can's canvas covers the right half and runs past the block's bottom edge.
   It ignores the pointer; the handle over the can takes the drags. */
.can-stage {
  position: absolute;
  top: 0;
  right: 0;
  bottom: calc(-1 * var(--can-overhang));
  width: 52%;
  z-index: 1;
  pointer-events: none;
}

.can-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.is-ready .can-canvas {
  opacity: 1;
}

.can-handle {
  position: absolute;
  border-radius: 48px;
  pointer-events: auto;
  touch-action: pan-y;
  cursor: grab;
}

.can-handle.is-grabbing {
  cursor: grabbing;
}

/* No WebGL: the label front, flat. It keeps out of the entrance, which has no can. */
.can-stage.is-flat {
  display: grid;
  place-items: center;
  transition: opacity 0.5s ease;
}

.is-intro .can-stage.is-flat {
  opacity: 0;
}

.flat-can {
  width: min(200px, 36%);
  aspect-ratio: 66 / 168;
  border-radius: 14px / 10px;
  background-color: var(--alu);
  background-repeat: no-repeat;
  background-size: 250% 81%;
  background-position: 50% 50%;
  box-shadow: inset -14px 0 18px rgba(0, 0, 0, 0.28), inset 10px 0 14px rgba(255, 255, 255, 0.2);
  transform: rotate(9deg);
}

/* Replays the entrance; bottom right of the yellow block. */
.intro-replay {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(18px, 3vh, 28px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px 0 10px;
  border: 2px solid var(--stout);
  border-radius: 999px;
  background: transparent;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.intro-replay[hidden] {
  display: none;
}

.intro-replay svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.intro-replay:hover {
  background: var(--stout);
  color: var(--haze);
}

/* ---------------------------------------------------------- entrance */

/* js/intro.js. A screen of beer covers the page from the first paint; the bubbles
   and the can's canvas take the whole screen above it, and all of it draws in to
   the yellow block. */
.intro-cover {
  display: none;
}

.intro-pending .intro-cover,
.is-intro .intro-cover {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 4;
  background: var(--haze);
  pointer-events: none;
}

.bubbles.is-full {
  position: fixed;
  inset: 0;
  z-index: 5;
}

.can-canvas.is-full {
  position: fixed;
}

.is-intro .site-header > *,
.is-intro .hero-copy,
.is-intro .hero-now,
.is-intro .intro-replay {
  z-index: 6;
}

.is-intro .can-stage {
  z-index: 7;
}

.is-intro .can-handle,
.is-intro .intro-replay {
  pointer-events: none;
}

/* The opening shot: the name, with the can for its O. The letters sit under the can
   (above the bubbles, below .can-stage), and js/intro.js puts the can's lid where
   the O goes. Wide screens set it on one line, centred 48% of the way down; tall
   ones step it down the screen: FACT, the can, RY. */
.intro-mark {
  display: none;
}

.intro-pending .intro-mark,
.is-intro .intro-mark {
  --can: min(42vh, 30vw);
  position: fixed;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.16em;
  padding: 0 var(--gutter) 4vh;
  color: var(--stout);
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 150%;
  /* FACT and RY take 6.05em between them */
  font-size: min(calc((100vw - 2 * var(--gutter) - var(--can)) / 6.4), calc(var(--can) / 2.2));
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* each word rises into view from behind its own baseline as the can comes up */
.intro-mark-fact,
.intro-mark-word,
.intro-mark-brewing {
  display: block;
  overflow: clip;
  padding: 0.04em 0;
}

.intro-mark-fact > span,
.intro-mark-o > span,
.intro-mark-word > span,
.intro-mark-brewing > span {
  display: block;
  transform: translateY(1.4em);
}

/* the caps, not the line boxes, centred on the lid */
.intro-mark-fact,
.intro-mark-ry {
  position: relative;
  top: 0.066em;
}

/* hangs under RY at the same width, so RY stays on the lid's centre line */
.intro-mark-brewing {
  position: absolute;
  top: 100%;
  right: 0;
  padding-bottom: 0.3em;
  font-weight: 600;
  font-stretch: 100%;
  font-size: 0.49em;
  letter-spacing: 0;
  text-transform: none;
}

.intro-mark-o {
  flex: none;
  width: var(--can);
  height: var(--can);
}

.intro-mark-o > span {
  visibility: hidden;
}

.intro-shot .intro-mark-fact > span {
  animation: mark-rise 0.9s 0.05s cubic-bezier(0.2, 0.75, 0.15, 1) both;
}

.intro-shot .intro-mark-o > span {
  animation: mark-rise 0.9s 0.12s cubic-bezier(0.2, 0.75, 0.15, 1) both;
}

.intro-shot .intro-mark-word > span {
  animation: mark-rise 0.9s 0.18s cubic-bezier(0.2, 0.75, 0.15, 1) both;
}

.intro-shot .intro-mark-brewing > span {
  animation: mark-rise 0.8s 0.36s cubic-bezier(0.2, 0.75, 0.15, 1) both;
}

/* opened: the letters sink back down as the can swings out of the word */
.intro-opening .intro-mark-fact > span,
.intro-opening .intro-mark-o > span,
.intro-opening .intro-mark-word > span,
.intro-opening .intro-mark-brewing > span {
  animation: mark-sink 0.45s 0.1s cubic-bezier(0.55, 0, 0.8, 0.25) both;
}

.intro-opening .intro-mark-brewing > span {
  animation-delay: 0.02s;
}

.intro-opening .intro-mark-word > span {
  animation-delay: 0.16s;
}

@keyframes mark-rise {
  to {
    transform: none;
  }
}

@keyframes mark-sink {
  from {
    transform: none;
  }

  to {
    transform: translateY(1.4em);
  }
}

/* No can (no WebGL, or it hasn't arrived yet): a plain O, and the name on one line. */
.intro-no-can .intro-mark {
  gap: 0;
  font-size: min(calc((100vw - 2 * var(--gutter)) / 7.4), 20vh);
}

.intro-no-can .intro-mark-o {
  position: relative;
  top: 0.066em;
  width: auto;
  height: auto;
  overflow: clip;
  padding: 0.04em 0;
}

.intro-no-can .intro-mark-o > span {
  visibility: visible;
}

@media (max-aspect-ratio: 5/4) {
  .intro-pending .intro-mark,
  .is-intro .intro-mark {
    --can: min(62vw, 40vh);
    flex-direction: column;
    gap: 0.08em;
    padding-bottom: 6vh;
    /* FACT across the screen, unless the stack (about 3em and the can) gets taller than 76vh */
    font-size: min(calc((100vw - 2 * var(--gutter)) / 4), calc((76vh - var(--can)) / 3));
  }

  .intro-mark-fact {
    align-self: flex-start;
  }

  .intro-mark-ry {
    align-self: flex-end;
    /* room for Brewing, so the stack stays centred */
    margin-bottom: 0.66em;
  }

  .intro-no-can .intro-mark {
    flex-direction: row;
    gap: 0;
    font-size: calc((100vw - 2 * var(--gutter)) / 7.4);
  }

  .intro-no-can .intro-mark-fact,
  .intro-no-can .intro-mark-ry {
    align-self: auto;
    margin-bottom: 0;
  }
}

/* The whole screen is the button. */
.intro-gate {
  display: none;
}

.intro-pending .intro-gate,
.is-intro .intro-gate {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 8;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--stout);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.intro-opening .intro-gate {
  cursor: default;
}

.intro-gate:focus-visible {
  outline: none;
}

/* "Pull the tab", once the can is in place: a dot on the tab's ring and a leader
   line out past the rim. js/can.js keeps it on the ring as the can sways, and
   js/intro.js sets --lid-size, the can's width on screen. */
.intro-pull {
  --s: var(--lid-size, 300px);
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.intro-held .intro-pull {
  opacity: 1;
}

.intro-pull::before,
.intro-pull::after {
  content: "";
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.intro-pull::before {
  background: var(--stout);
}

/* a ring that keeps going out from the dot */
.intro-pull::after {
  border: 2px solid var(--stout);
  opacity: 0;
}

.intro-held .intro-pull::after {
  animation: intro-ping 2s 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) infinite;
}

/* down and out to the left at 45°, then a short level run to the words */
.intro-pull-lead,
.intro-pull-shoulder {
  position: absolute;
  height: 2px;
  background: var(--stout);
  transition: transform 0.4s cubic-bezier(0.6, 0, 0.2, 1);
}

.intro-pull-lead {
  left: 0;
  top: -1px;
  width: calc(var(--s) * 0.5);
  transform-origin: 0 50%;
  transform: rotate(135deg) scaleX(0);
}

.intro-pull-shoulder {
  /* the lead ends 0.3536 of the lid across and down from the ring */
  right: calc(var(--s) * 0.3536);
  top: calc(var(--s) * 0.3536 - 1px);
  width: calc(var(--s) * 0.12);
  transform-origin: 100% 50%;
  transform: scaleX(0);
  transition-duration: 0.2s;
}

.intro-pull-label {
  position: absolute;
  right: calc(var(--s) * 0.4736 + 12px);
  top: calc(var(--s) * 0.3536);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1rem, 1.25vw, 1.5rem);
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translate(6px, -50%);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.intro-held .intro-pull-lead {
  transform: rotate(135deg) scaleX(1);
  transition-delay: 0.1s;
}

.intro-held .intro-pull-shoulder {
  transform: none;
  transition-delay: 0.45s;
}

.intro-held .intro-pull-label {
  opacity: 1;
  transform: translate(0, -50%);
  transition-delay: 0.55s;
}

.intro-gate:focus-visible .intro-pull-label {
  outline: 3px solid var(--stout);
  outline-offset: 5px;
}

.intro-pull-in {
  display: none;
}

/* tall screens: no room to the left, so the words go under the end of the lead */
@media (max-aspect-ratio: 5/4) {
  .intro-pull-shoulder {
    display: none;
  }

  .intro-pull-label {
    right: auto;
    left: calc(var(--s) * -0.3536);
    top: calc(var(--s) * 0.3536 + 12px);
    transform: translate(-50%, 6px);
  }

  .intro-held .intro-pull-label {
    transform: translate(-50%, 0);
  }
}

/* no can, so no tab: just the words, under the name */
.intro-no-can .intro-pull {
  left: 50%;
  top: 64%;
}

.intro-no-can .intro-pull::before,
.intro-no-can .intro-pull::after,
.intro-no-can .intro-pull-lead,
.intro-no-can .intro-pull-shoulder,
.intro-no-can .intro-pull-tab {
  display: none;
}

.intro-no-can .intro-pull-in {
  display: inline;
}

.intro-no-can .intro-pull-label {
  left: 0;
  right: auto;
  top: 0;
  transform: translate(-50%, 6px);
}

.intro-no-can.intro-held .intro-pull-label {
  transform: translate(-50%, 0);
}

/* opened: out of the way of the can */
.intro-opening .intro-pull {
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* waiting for their entrance */
.intro-pending .site-header > *,
.intro-pending .hero-copy,
.intro-pending .hero-now,
.intro-pending .intro-replay {
  opacity: 0;
}

/* replaying: they fade while the beer fills the screen again */
.intro-rewind .site-header > *,
.intro-rewind .hero-copy,
.intro-rewind .hero-now,
.intro-rewind .intro-replay {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* the headline's words, each rising into view from behind its own edge */
.hero h1 .w {
  display: inline-block;
  overflow: clip;
  /* room for the letters' tops and the comma's tail */
  margin: -0.08em 0 -0.14em;
  padding: 0.08em 0 0.14em;
}

.hero h1 .w > span {
  display: inline-block;
}

.intro-text .wordmark {
  animation: intro-drop 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.intro-text .site-nav {
  animation: intro-drop 0.7s 0.08s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.intro-text .hero h1 .w > span {
  animation: intro-rise 0.8s calc(0.06s + var(--i) * 0.06s) cubic-bezier(0.2, 0.75, 0.15, 1) both;
}

.intro-text .hero-intro {
  animation: intro-up 0.7s 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.intro-text .hero-actions > * {
  animation: intro-up 0.7s 0.52s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.intro-text .hero-actions > :nth-child(2) {
  animation-delay: 0.6s;
}

.intro-text .hero-now {
  animation: intro-up 0.75s 0.66s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.intro-text .intro-replay {
  animation: intro-fade 0.5s 0.95s ease both;
}

@keyframes intro-drop {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@keyframes intro-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes intro-rise {
  from {
    transform: translateY(110%);
  }
}

@keyframes intro-fade {
  from {
    opacity: 0;
  }
}

@keyframes intro-ping {
  from {
    opacity: 0.55;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(1.14, 1.5);
  }
}

/* ----------------------------------------------------- page sections */

/* Below the hero the page keeps the hero's system: square blocks inset from the
   aluminium page by --frame, alternating with open sections on the bare page.
   Open sections line their content up with the blocks' content. */
.block {
  width: calc(100% - 2 * var(--frame));
  max-width: var(--block-max);
  margin: var(--frame) auto 0;
  padding: var(--section-pad) var(--gutter);
}

.block-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.block-stout {
  background: var(--stout);
  color: var(--foam);
}

.block-stout ::selection {
  background: var(--foam);
  color: var(--stout);
}

.block-stout .section-head p {
  color: var(--foam-dim);
}

.block-haze {
  background: var(--haze);
}

.btn-haze {
  border-color: var(--haze);
  background: var(--haze);
  color: var(--stout);
}

.btn-haze:hover {
  background: transparent;
  color: var(--haze);
}

/* ------------------------------------------------------------- about */

/* Sits on the page beside the bottom of the big can. */
.about {
  width: min(var(--max), 100% - 2 * (var(--frame) + var(--gutter)));
  margin: 0 auto;
  padding: clamp(56px, 7vw, 104px) 0 clamp(56px, 7vw, 96px);
}

.about-lede {
  max-width: 30ch;
  font-size: clamp(1.5rem, 2.7vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

.about-proof {
  margin-top: 20px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--stout-soft);
}

/* ---------------------------------------------------- mini can (shared) */

/* A drawn stand-in until can.js has rendered the real can, then the render. */
.mini-can {
  width: 28px;
  height: 64px;
  border-radius: 6px / 4px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.32), rgba(255, 255, 255, 0.16) 30%, rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, 0.38)),
    linear-gradient(180deg, #CFD3D8 0 8%, var(--can-ink) 8% 13%, var(--can-base) 13% 56%, var(--can-band) 56% 92%, #CFD3D8 92%);
}

.mini-can img {
  display: none;
}

.mini-can.has-thumb {
  background: none;
}

.mini-can.has-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

/* Every beer standing in a row on a thin line; the one you point at lifts and its
   details show below. */
.shelf-wrap {
  --can-w: clamp(72px, 7.2vw, 108px);
  margin: clamp(40px, 5vw, 64px) calc(-1 * var(--gutter)) 0;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.shelf-wrap::-webkit-scrollbar {
  display: none;
}

.shelf {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: max-content; /* wider than the screen on small ones, and then it scrolls */
  min-width: 100%;
  padding-top: 28px; /* room for a picked can to lift */
}

/* the line the cans stand on, just behind the front edge of their bases */
.shelf::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(28px + var(--can-w) * 2.4 * 0.982);
  height: 1px;
  background: rgba(255, 244, 218, 0.4);
}

.shelf-item {
  flex: 0 0 auto;
  width: calc(var(--can-w) + 24px);
  scroll-snap-align: start;
}

.shelf-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 4px 6px;
  border: 0;
  background: none;
  color: var(--foam-dim);
  text-align: center;
  cursor: pointer;
}

.shelf-pick:focus-visible {
  outline: 3px solid var(--foam);
  outline-offset: 4px;
}

.shelf-can.mini-can {
  width: var(--can-w);
  height: calc(var(--can-w) * 2.4);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.is-picked .shelf-can {
  transform: translateY(-20px);
}

.shelf-name {
  margin-top: 30px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-wrap: balance;
  transition: color 0.2s ease;
}

.shelf-abv {
  margin-top: 4px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.8rem;
  line-height: 1.3;
}

.is-picked .shelf-name {
  color: var(--haze);
}

.beer-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr) auto;
  gap: 20px clamp(24px, 4vw, 56px);
  align-items: center;
  margin-top: clamp(28px, 4vw, 44px);
  padding: 28px 0;
  border-top: 1px solid var(--foam-line);
  border-bottom: 1px solid var(--foam-line);
}

.detail-name {
  font-family: var(--display);
  font-weight: 850;
  font-stretch: 62%;
  font-size: clamp(2.1rem, 3.6vw, 3.25rem);
  line-height: 0.92;
}

.detail-style {
  margin-top: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--foam-dim);
}

.detail-with {
  font-size: 1.1rem;
  line-height: 1.4;
}

.detail-with-items {
  font-style: italic;
}

.detail-note {
  margin-top: 6px;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--foam-dim);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

/* a quick change-over as the details switch to another can */
.beer-detail > * {
  animation: detail-in 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.beer-detail > .detail-body {
  animation-delay: 0.03s;
}

@keyframes detail-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .beer-detail > * {
    animation: none;
  }
}

/* ----------------------------------------------------------- collabs */

.collabs {
  margin-top: var(--section-pad);
}

.collabs h2 {
  font-size: clamp(2.25rem, 4.4vw, 4rem);
}

.collab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 56px);
}

.collab-grid li {
  padding: 22px 0 26px;
  border-top: 1px solid var(--foam-line);
}

.collab-brewery {
  display: block;
  font-family: var(--display);
  font-weight: 850;
  font-stretch: 62%;
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  line-height: 0.95;
}

.collab-beers {
  display: block;
  margin-top: 8px;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--foam-dim);
}

/* --------------------------------------------------------- instagram */

.insta {
  width: min(var(--max), 100% - 2 * (var(--frame) + var(--gutter)));
  margin: 0 auto;
  padding: var(--section-pad) 0;
}

.insta h2 {
  font-stretch: 62%;
}

.insta-intro {
  display: grid;
  justify-items: start;
  gap: 18px;
}

.insta-intro p {
  max-width: 40ch;
  font-size: 1.2rem;
}

.insta-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--frame);
}

.insta-tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--stout);
}

.insta-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* placeholders fade in once their shot has been drawn */
.is-placeholder .insta-tile img {
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.is-placeholder .insta-tile.is-ready img {
  opacity: 1;
}

.insta-tile:hover img {
  transform: scale(1.04);
}

.insta-glyph {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  opacity: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
  transition: opacity 0.2s ease;
}

.insta-glyph .dot {
  fill: #fff;
  stroke: none;
}

.insta-tile:hover .insta-glyph,
.insta-tile:focus-visible .insta-glyph {
  opacity: 1;
}

/* ------------------------------------------------------------- visit */

.visit-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px clamp(32px, 6vw, 96px);
  align-items: start;
}

.visit-intro {
  max-width: 34ch;
  margin-top: clamp(20px, 2.4vw, 32px);
  font-size: 1.2rem;
}

.visit-intro a {
  text-underline-offset: 0.15em;
}

.visit-where address {
  margin-top: clamp(28px, 3.4vw, 48px);
  padding-top: 20px;
  border-top: 2px solid var(--stout);
  font-style: normal;
  font-size: clamp(1.3rem, 1.9vw, 1.6rem);
  line-height: 1.35;
}

.visit-where .btn {
  margin-top: 28px;
}

/* The hours, on the dark board like the one behind the bar. */
.hours-board {
  --board-pad: clamp(24px, 3vw, 40px);
  padding: var(--board-pad);
  background: var(--stout);
  color: var(--foam);
}

.hours-board ::selection {
  background: var(--foam);
  color: var(--stout);
}

.hours-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  margin-bottom: 20px;
}

.hours-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--foam-dim);
}

.hours-status[hidden] {
  display: none;
}

.hours-status::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border: 2px solid var(--foam-dim);
  border-radius: 50%;
}

.hours-status.is-open {
  color: var(--haze);
}

.hours-status.is-open::before {
  border-color: var(--haze);
  background: var(--haze);
}

.hours {
  border-top: 1px solid var(--foam-line);
}

.hours div {
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--foam-line);
}

.hours dt {
  color: var(--foam-dim);
}

.hours dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4em;
  align-items: center;
  gap: 16px;
  font-family: var(--display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.hours div:not([data-open]) dd {
  color: var(--foam-dim);
  font-weight: 500;
}

/* each day's opening on one shared time axis, drawn by js/taproom.js */
.hours-bar {
  position: relative;
  height: 6px;
  background: var(--foam-line);
}

.hours-bar::after {
  content: "";
  position: absolute;
  inset: -2px calc((1 - var(--to, 0)) * 100%) -2px calc(var(--from, 0) * 100%);
  background: var(--haze);
}

.hours div:not([data-open]) .hours-bar::after {
  display: none;
}

.hours .is-today {
  margin: 0 calc(-1 * var(--board-pad));
  padding-left: var(--board-pad);
  padding-right: var(--board-pad);
  background: rgba(255, 244, 218, 0.08);
}

.hours .is-today dt {
  color: var(--foam);
  font-weight: 600;
}

.hours .is-today .hours-bar::after {
  background: var(--foam);
}

.hours-note {
  margin-top: 18px;
  font-size: 1rem;
  color: var(--foam-dim);
}

.visit-route {
  margin-top: clamp(64px, 8vw, 112px);
}

.visit-route > p {
  max-width: 46ch;
  margin-top: 10px;
  font-size: 1.2rem;
  line-height: 1.45;
}

/* The K train, Helsinki to Kerava: every stop, evenly spaced like the strip map
   above the train doors, with the brewery's stop marked and the rest of the line
   faded. Stop names lean along the line. */
.route {
  --line-y: 112px;
  --angle: -45deg;
  --start: 12px;
  --end: 56px;
  --dot: 16px;
  --dot-major: 24px;
  --dot-here: clamp(36px, 3.6vw, 48px);
  /* Savio is stop 14 of 15 */
  --here: calc(13 / 14 * 100%);
  position: relative;
  display: flex;
  justify-content: space-between;
  height: 210px;
  margin-top: 28px;
  padding: 0 var(--end) 0 var(--start);
  font-family: var(--display);
  line-height: 1;
}

.route::before {
  content: "";
  position: absolute;
  top: calc(var(--line-y) - 3px);
  left: var(--start);
  right: var(--end);
  height: 6px;
  background: linear-gradient(to right, var(--stout) var(--here), var(--stout-on-haze) var(--here));
}

.route li {
  --d: var(--dot);
  position: relative;
  width: 0;
}

.route .is-major {
  --d: var(--dot-major);
}

.route .is-here {
  --d: var(--dot-here);
}

.route li::before {
  content: "";
  position: absolute;
  top: calc(var(--line-y) - var(--d) / 2);
  left: calc(var(--d) / -2);
  width: var(--d);
  height: var(--d);
  border: 4px solid var(--stout);
  border-radius: 50%;
  background: var(--haze);
}

.route .is-major::before {
  border-width: 6px;
}

.route .is-here::before {
  border-width: 7px;
  background: var(--foam);
  box-shadow: 0 0 0 6px var(--haze), 0 0 0 9px var(--stout);
}

/* past Savio: faded, in opaque colours so the line doesn't show through */
.route .is-after::before {
  border-color: var(--stout-on-haze);
}

.route .is-after .route-name {
  color: var(--stout-on-haze);
}

.route-name {
  position: absolute;
  left: -0.15em;
  bottom: calc(100% - var(--line-y) + 22px);
  transform-origin: 0 100%;
  transform: rotate(var(--angle));
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--stout-soft);
}

.is-major .route-name {
  bottom: calc(100% - var(--line-y) + 24px);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--stout);
}

.route-callout {
  position: absolute;
  top: calc(var(--line-y) + var(--dot-here) / 2 + 22px);
  left: 0;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}

.is-here .route-name {
  position: static;
  display: block;
  transform: none;
  font-weight: 900;
  font-stretch: 125%;
  font-size: 1.6rem;
  color: var(--stout);
}

.route-note {
  display: block;
  margin-top: 6px;
  font-family: var(--text);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--stout-soft);
}

/* ------------------------------------------------------------ footer */

.site-footer {
  margin-bottom: var(--frame);
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: 32px;
  overflow: hidden;
}

.footer-mark {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 150%;
  /* the word is about 7.07 times as wide as its font size; fill the column */
  font-size: calc(min(100vw - 2 * (var(--frame) + var(--gutter)), var(--max)) / 7.2);
  line-height: 0.8;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--haze);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 32px;
  border-top: 1px solid var(--foam-line);
}

.footer-title {
  margin-bottom: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 100%;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.footer-grid p,
.footer-links {
  font-size: 1.05rem;
  color: var(--foam-dim);
}

.footer-links li + li {
  margin-top: 4px;
}

.footer-legal {
  margin-top: 48px;
  font-family: var(--display);
  font-size: 0.85rem;
  color: var(--foam-dim);
}

/* ----------------------------------------------------- label preview */

/* Only on index.html?preview, for trying label artwork on the can. */
.label-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  width: calc(100% - 2 * var(--frame));
  max-width: var(--block-max);
  margin: var(--frame) auto 0;
  padding: 16px var(--gutter);
  border-radius: var(--radius);
  background: var(--stout);
  color: var(--foam);
  font-size: 0.95rem;
  line-height: 1.4;
}

.lp-intro {
  flex: 1 1 420px;
}

.lp-title {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 100%;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.lp-help {
  max-width: 72ch;
  margin-top: 4px;
  color: var(--foam-dim);
}

.lp-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--haze);
  color: var(--stout);
  font-family: var(--display);
  font-weight: 700;
  cursor: pointer;
}

.lp-file:focus-within {
  outline: 3px solid var(--foam);
  outline-offset: 3px;
}

.lp-finish {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  border: 0;
}

.lp-finish legend {
  float: left;
  margin-right: 4px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
}

.lp-finish label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.lp-finish input {
  accent-color: var(--haze);
}

.lp-status {
  flex: 1 1 100%;
  color: var(--haze);
}

.lp-status:empty {
  display: none;
}

.is-dropping-label .can-stage {
  outline: 3px dashed var(--stout);
  outline-offset: -12px;
  border-radius: var(--radius);
}

/* ------------------------------------------------------------ narrow */

/* the smallest phones: only Shop fits beside the logo */
@media (max-width: 360px) {
  .site-nav a[href="#visit"] {
    display: none;
  }
}

/* tablet widths: the full nav needs the room the small "Brewing" takes up */
@media (max-width: 900px) {
  .wordmark-brewing {
    display: none;
  }
}

@media (max-width: 960px) {
  .beer-detail {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }

  .detail-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .collab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .visit-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 719px) {
  .site-nav a:not(.nav-shop):not([href="#visit"]) {
    display: none;
  }

  .wordmark-brewing {
    display: none;
  }

  .wordmark-factory {
    font-size: 1.25rem;
  }

  .site-nav {
    gap: 14px;
    font-size: 0.95rem;
  }

  .nav-shop {
    padding: 6px 14px;
  }

  /* Text, then the can hanging over the block's bottom edge, then the caption below it. */
  .hero {
    --can-overhang: 30vw;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: 0;
    padding: 24px var(--gutter) 0;
    background: none;
  }

  .hero-bg {
    display: block;
    grid-row: 1 / 3;
    grid-column: 1;
    margin: -24px calc(-1 * var(--gutter)) var(--can-overhang);
    background: var(--haze);
  }

  .hero-copy {
    grid-row: 1;
    position: relative;
  }

  .hero-intro {
    font-size: 1.1rem;
  }

  .can-stage {
    grid-row: 2;
    grid-column: 1;
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: auto;
    height: calc(100vw + var(--can-overhang));
    margin: -8px calc(-1 * var(--gutter)) 0;
  }

  /* at the end of the row of caption buttons, under the can, lined up with them */
  .intro-replay {
    right: calc(var(--gutter) - var(--frame));
    bottom: 7px;
  }

  /* out on the page now, so line up with the sections below rather than the block */
  .hero-now {
    grid-row: 3;
    margin: 0 calc(-1 * var(--frame));
    padding-top: 0;
    border-top: 0;
  }

  .cap-name {
    white-space: normal;
  }

  /* buttons get their own row under the beer, so the name has room */
  .can-caption {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 16px;
  }

  .cap-arrows {
    grid-column: 1 / -1;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .about {
    padding-top: 48px;
  }

  .shelf-wrap {
    --can-w: 64px;
  }

  .shelf-item {
    width: 104px;
  }

  .beer-detail {
    grid-template-columns: 1fr;
  }

  .collab-grid {
    column-gap: 16px;
  }

  .collab-grid li {
    padding: 16px 0 18px;
  }

  .collab-brewery {
    font-size: 1.55rem;
  }

  .collab-beers {
    font-size: 0.95rem;
  }

  .insta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* phones: the line runs down the page, one stop per row */
  .route {
    --row: 30px;
    --row-here: 64px;
    --x: 18px;
    --dot: 14px;
    --dot-major: 20px;
    --dot-here: 36px;
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
    padding: 0 0 0 52px;
  }

  .route::before {
    top: calc(var(--row) / 2);
    bottom: calc(var(--row) + var(--row-here) / 2);
    left: calc(var(--x) - 3px);
    right: auto;
    width: 6px;
    height: auto;
    background: var(--stout);
  }

  .route li {
    display: flex;
    align-items: center;
    width: auto;
    height: var(--row);
  }

  .route .is-here {
    height: var(--row-here);
  }

  .route li::before {
    top: calc(50% - var(--d) / 2);
    left: calc(var(--x) - 52px - var(--d) / 2);
  }

  .route .is-here::before {
    box-shadow: 0 0 0 5px var(--haze), 0 0 0 8px var(--stout);
  }

  /* the faded last stretch, from Savio on to Kerava */
  .route .is-after::after {
    content: "";
    position: absolute;
    bottom: calc(50% + var(--d) / 2);
    left: calc(var(--x) - 52px - 3px);
    width: 6px;
    height: calc(var(--row) / 2 + var(--row-here) / 2 - var(--d) / 2 - var(--dot-here) / 2);
    background: var(--stout-on-haze);
  }

  .route-name,
  .is-major .route-name {
    position: static;
    transform: none;
  }

  .route-name {
    font-size: 1rem;
  }

  .is-major .route-name {
    font-size: 1.1rem;
  }

  .route-callout {
    position: static;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 12px;
    transform: none;
    text-align: left;
  }

  .is-here .route-name {
    font-size: 1.5rem;
  }

  .route-note {
    margin-top: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
