/* PUCK team bags: landing page.
   One loud thing: the opening, where the hall lights come on over the two bags and the headline
   turns out to be a field you type your club's name into. Everything after it is a quiet grid.

   The rules between sections are lengths of the bags' webbing, woven in the colours of a
   rink's lines in the order you cross them skating its length (blue line, centre line, blue
   line), each coming off its roll as the page scrolls down to it. The last section is the
   crease, which is where the page's goal is too. */

:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --stage-light: radial-gradient(90% 62% at 64% 66%, #fcfdfd 0%, var(--ice) 58%, #e6ebed 100%);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--head-h);
}

body {
  margin: 0;
  font: 400 17px/1.5 var(--font);
  color: var(--ink);
  background: var(--ice);
  overflow-x: clip;
}

img { max-width: 100%; }

main :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* the dot of the PUCK name: a round full stop set at cap height */
.puck-dot {
  display: inline-block;
  width: 0.2em;
  height: 0.2em;
  margin-left: 0.05em;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 0.5em;
}

/* ------------------------------------------------------------------ opening curtain */

.curtain { display: none; }
.js .curtain {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #000;
}
.curtain-puck { width: 92px; height: 92px; overflow: visible; }
.curtain-track { fill: none; stroke: #2a3034; stroke-width: 2; }
.curtain-ring {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p, 0) * 100);
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  transition: stroke-dashoffset 0.35s ease-out;
}
.curtain-dot { fill: #fff; transform-origin: 60px 60px; }

/* nothing of the page shows until the lights are on */
.js:not(.is-lit) .site-head,
.js:not(.is-lit) .hero > * { visibility: hidden; }

/* ------------------------------------------------------------------ the show */

.show {
  position: relative;
  isolation: isolate;
}
.show-bg,
.show-3d,
.show-scrim {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
}
.show-bg {
  z-index: 0;
  overflow: hidden;
  background: var(--ice);
}
.show-3d {
  z-index: 2;
  margin-top: -100vh;
  margin-top: -100svh;
  pointer-events: none;
}

/* Frost between the bags and the words of the four stops. In a close-up the bag runs behind
   the text column, and a navy or black bag leaves black type nothing to stand on. So whatever
   is behind the column is blurred and whitened.

   The frost has no edge, straight or otherwise. The bags keep a clear round window (--clear
   is its radius, centred a little above the middle of the screen) and the frost grows outwards
   from about half that radius: first a slight softening, then a haze, and only at the rim, where
   the text column begins, the full blur. Seen on screen it is tight against the column at
   mid-height, opens out towards the top and sweeps under the bags along the bottom.

   Three layers do it, because one blur with a fading mask shows as a line where it stops:
   a light blur that starts early, a heavy one that starts late, and the white tint.
   --scrim (0 to 1) comes from the scroll position: none in the hero, all of it from the
   first stop on. */
.show-scrim {
  --col: calc(var(--edge) + 26.5rem);
  --clear: max(40vw, 64vh);
  --cx: calc(var(--col) + var(--clear));
  /* nothing of it past the middle of the window, and no seam where it stops */
  --side: linear-gradient(90deg, #000 0, #000 60%, transparent 100%);
  z-index: 3;
  margin-top: -100vh;
  margin-top: -100svh;
  pointer-events: none;
}
.show-scrim i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--cx);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.frost-near {
  -webkit-backdrop-filter: blur(calc(var(--scrim, 0) * 6px));
  backdrop-filter: blur(calc(var(--scrim, 0) * 6px));
  -webkit-mask-image: radial-gradient(circle var(--clear) at 100% 37%, transparent 46%, rgb(0 0 0 / 0.2) 56%, rgb(0 0 0 / 0.62) 68%, #000 82%), var(--side);
  mask-image: radial-gradient(circle var(--clear) at 100% 37%, transparent 46%, rgb(0 0 0 / 0.2) 56%, rgb(0 0 0 / 0.62) 68%, #000 82%), var(--side);
}
.frost-far {
  -webkit-backdrop-filter: blur(calc(var(--scrim, 0) * 26px));
  backdrop-filter: blur(calc(var(--scrim, 0) * 26px));
  -webkit-mask-image: radial-gradient(circle var(--clear) at 100% 37%, transparent 66%, rgb(0 0 0 / 0.16) 75%, rgb(0 0 0 / 0.55) 86%, rgb(0 0 0 / 0.88) 95%, #000 102%), var(--side);
  mask-image: radial-gradient(circle var(--clear) at 100% 37%, transparent 66%, rgb(0 0 0 / 0.16) 75%, rgb(0 0 0 / 0.55) 86%, rgb(0 0 0 / 0.88) 95%, #000 102%), var(--side);
}
.frost-tint {
  background: radial-gradient(circle var(--clear) at 100% 37%,
    rgb(241 244 245 / 0) 48%, rgb(241 244 245 / 0.06) 57%, rgb(241 244 245 / 0.2) 67%,
    rgb(241 244 245 / 0.44) 78%, rgb(241 244 245 / 0.7) 89%, rgb(241 244 245 / 0.86) 100%);
  -webkit-mask-image: var(--side);
  mask-image: var(--side);
  opacity: var(--scrim, 0);
}

/* the hall before the lights: black rafters, a blue glow off the ice */
.arena {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 78% at 50% 112%, #1d5bd8 0%, var(--blue) 24%, #00113e 56%, #000 88%);
}
.arena::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grain);
  mix-blend-mode: soft-light;
  opacity: 0.55;
}
/* four banks of lamps, switched on one after the other */
.banks i {
  position: absolute;
  inset: 0;
  background: var(--stage-light);
  opacity: 0;
}
.banks i:nth-child(1) { clip-path: inset(0 74.9% 0 0); }
.banks i:nth-child(2) { clip-path: inset(0 49.9% 0 25%); }
.banks i:nth-child(3) { clip-path: inset(0 24.9% 0 50%); }
.banks i:nth-child(4) { clip-path: inset(0 0 0 75%); }
html:not(.js) .arena { display: none; }
html:not(.js) .banks i { opacity: 1; }

/* no WebGL, or no JavaScript: a rendered still stands in for the live bags */
html:not(.js) .show-3d,
.no-3d .show-3d {
  background: url(../assets/img/render/team-duffel-0.webp) 86% 56% / min(58vw, 880px) auto no-repeat;
}

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

.hero {
  position: relative;
  margin-top: -100vh;
  margin-top: -100svh;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: calc(var(--head-h) + clamp(2px, 1.2vh, 16px)) var(--edge) clamp(20px, 3.6vh, 40px);
}

/* The billboard. Line one is the club's name and it is live: type anywhere on the hero and it
   changes, click it and it empties for a new name. Underneath it is a real text field, but it
   never looks like one: no ring, no underline, no selection. What shows that it can be typed
   into is a text cursor of its own, blinking at the end of the name while it is being edited.
   Whatever the line says is sized and widened to run edge to edge (src/store/landing.js). */
.bb {
  position: relative;
  z-index: 1;
  min-width: 0;
}
/* the label is a tab on the line, so it reads as something to fill in */
.bb-label {
  display: inline-block;
  padding: 7px 10px 6px;
  font: 600 14px/1 var(--font);
  color: #fff;
  background: var(--ink);
  border-radius: var(--r);
  cursor: text;
}
.bb-line {
  position: relative;
  font: 900 var(--bb-size, min(15.6vw, 27svh)) / 1.2 var(--font);
  font-stretch: var(--bb-wdth, 100%);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.bb-fit .bb-line { transition: font-size 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), font-stretch 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bb-input {
  display: block;
  width: 100%;
  height: 1.2em;
  margin: -0.19em 0 -0.17em;
  padding: 0;
  font: inherit;
  font-stretch: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ink);
  caret-color: transparent;   /* the line has a cursor of its own, see .bb-caret */
  /* pulled left by the first letter's side bearing, so its ink starts on the page edge */
  text-indent: calc(var(--bb-lsb, 0) * -1em);
  background: none;
  border: 0;
  border-radius: 0;
  outline: none;
}
.bb-input:focus-visible { outline: none; }
.bb-input::selection { background: transparent; }
.bb-input::placeholder { color: var(--ink); opacity: 1; }
/* clicked to enter a name: the line is empty until the first letter */
.bb.is-editing .bb-input::placeholder { color: transparent; }
/* The text cursor: a bar the height of the capitals, standing just after the last letter
   (--bb-end is where the ink ends). It blinks while the name is being edited and stands
   still while the opening demo types. It is also what shows keyboard users where they are. */
.bb-caret {
  position: absolute;
  left: var(--bb-end, 0);
  /* from the top of the capitals to the baseline: the line box is 1.2 em and the capitals
     stand 0.248 em below its top */
  top: 0.248em;
  display: none;
  width: max(3px, 0.03em);
  height: 0.686em;
  margin-left: 0.045em;
  background: var(--ink);
}
.bb.is-editing .bb-caret,
.bb.is-typing .bb-caret { display: block; }
.bb.is-editing .bb-caret { animation: caret 1.06s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
/* measures the typed name; fixed and off to the left so it can never widen the page */
.bb-probe {
  position: fixed;
  left: -200vw;
  top: 0;
  visibility: hidden;
  white-space: pre;
  font-size: 100px;
  letter-spacing: -0.04em;   /* restated: an inherited value would be the line's, in pixels */
  pointer-events: none;
}
.bb-rest {
  margin: 0.05em 0 0;
  font: 900 var(--bb2, min(7.4vw, 12.6svh)) / 0.92 var(--font);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
/* each line has its own window, so it can rise into place from below it */
.bb-rest > span { display: block; overflow: clip; overflow-clip-margin: 0.1em; }
.bb-rest > span > span { display: inline-block; margin-left: calc(var(--lsb, 0) * -1em); }

.hero-copy {
  grid-row: 3;
  align-self: end;
  justify-self: start;
  position: relative;
  z-index: 4;
}
.lead {
  margin: 0;
  max-width: 30rem;
  font: 500 clamp(17px, 1.42vw, 21px) / 1.36 var(--font);
  text-wrap: pretty;
}
.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px clamp(24px, 3vw, 48px);
  margin-top: 20px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-note {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* colourways: fabric samples, the chosen one stitched round like in the configurator */
.ways-head {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0 0 12px;
  font: 500 15px/1.2 var(--font);
}
.ways-name { color: var(--ink-soft); }
.ways-row { display: flex; gap: 10px; padding: 0 5px; }
.way {
  position: relative;
  width: 44px;
  height: 36px;
  padding: 0;
  background: linear-gradient(90deg, var(--a) 0 58%, var(--b) 58% 80%, var(--a) 80%);
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 2px;
  cursor: pointer;
}
.way[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px dashed var(--ink);
  border-radius: 4px;
}
.hero-ways { padding-bottom: 5px; }
.hero-ways .ways-head { margin-bottom: 10px; }

/* ------------------------------------------------------------------ the hero's cursor */
/* Over the hero the pointer is an arrow in the chosen colourway with a pill hanging off it that
   says what a click does here: it puts you in the name field. Arrow and pill are the bag in
   small: tarpaulin colour with the webbing colour round it. Over a link, a button or a swatch
   the ordinary pointer comes back, because there a click does something else. Only for a mouse
   or trackpad (src/store/landing.js). */
.hero-arrow,
.hero-pill {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 45;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}
/* the tip of the arrow is the pointer's hot spot */
.hero-arrow {
  width: 28px;
  height: 28px;
  margin: -4px 0 0 -4px;
  transform-origin: 14% 14%;
  filter: drop-shadow(0 3px 5px rgb(0 0 0 / 0.28));
}
.hero-arrow svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hero-arrow path {
  fill: var(--cur-a, #0b0b0c);
  stroke: var(--cur-b, #efb22a);
  stroke-width: 1.8;
  stroke-linejoin: round;
  transition: fill 0.4s, stroke 0.4s;
}
.hero-pill {
  margin-top: 22px;
  padding: 10px 15px 9px;
  font: 600 14px/1 var(--font);
  white-space: nowrap;
  color: var(--cur-ink, #fff);
  background: var(--cur-a, #0b0b0c);
  border: 1.8px solid var(--cur-b, #efb22a);
  border-radius: 999px;
  box-shadow: 0 12px 26px -10px rgb(0 20 60 / 0.5);
  transform-origin: 0 0;
  transition: background-color 0.4s, border-color 0.4s, color 0.4s;
}
.hero.has-cursor,
.hero.has-cursor .bb-input,
.hero.has-cursor .bb-label { cursor: none; }

/* ------------------------------------------------------------------ the four stops */

.stop {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: var(--head-h) var(--edge) 0;
  pointer-events: none;
}
.stop-panel {
  position: relative;
  z-index: 4;
  max-width: 26rem;
  pointer-events: auto;
}
.stop h2 {
  margin: 0;
  font: 800 clamp(32px, 3.5vw, 54px) / 0.96 var(--font);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-wrap: balance;
}
.stop-panel > p {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.45;
  text-wrap: pretty;
}
.stop-panel > .stop-note {
  font-size: 15px;
  color: var(--ink-soft);
}
.stop-panel > .cta { margin-top: 24px; }
.stop-panel > .ways { margin-top: 26px; }

.try {
  display: block;
  margin-top: 26px;
}
.try span {
  display: block;
  margin-bottom: 8px;
  font: 500 15px/1.2 var(--font);
}
.try input {
  width: 100%;
  max-width: 19rem;
  padding: 12px 14px;
  font: 700 22px/1.2 var(--font);
  font-stretch: 78%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: var(--r);
}

/* ------------------------------------------------------------------ section heads */

.range, .proof, .how, .ask { position: relative; }

.sec-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: end;
  padding: clamp(56px, 8vw, 124px) var(--edge) clamp(30px, 4vw, 56px);
}
.sec-head h2,
.proof-text h2 {
  margin: 0;
  font: 800 clamp(40px, 6.1vw, 100px) / 0.9 var(--font);
  letter-spacing: -0.038em;
  text-transform: uppercase;
  text-wrap: balance;
}
.sec-head h2 { grid-column: 1 / span 8; }
.sec-head p {
  grid-column: 9 / -1;
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  text-wrap: pretty;
}

/* ------------------------------------------------------------------ the two bags */

.range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 64px) var(--gutter);
  padding: 0 var(--edge) clamp(72px, 10vw, 150px);
}
.prod-stage {
  position: relative;
  display: block;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: radial-gradient(120% 70% at 50% 62%, #eceeee 0%, var(--hall) 62%, #c4c9cb 100%);
}
/* the face-off circle the bag stands in, seen from the camera's height */
.prod-stage::before {
  content: "";
  position: absolute;
  left: 50%; top: 69%;
  width: 84%;
  aspect-ratio: 1 / 0.27;
  border: 2px solid var(--red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.prod-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.prod-stage:hover .prod-img { transform: scale(1.03); }
.prod-body { padding-top: 24px; }
.prod h3 {
  margin: 0;
  font: 800 clamp(30px, 3.5vw, 54px) / 0.96 var(--font);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.specs {
  margin: 22px 0 0;
  border-top: 1.5px solid var(--ink);
}
.specs > div {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  column-gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.specs dt { font-weight: 500; color: var(--ink-soft); }
.specs dd { margin: 0; font-variant-numeric: tabular-nums; }
.prod-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
}
.prod-ways { display: flex; gap: 10px; padding: 5px; }

/* ------------------------------------------------------------------ made for HC Moutier */

.proof {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: end;
  padding: 0 var(--edge) clamp(72px, 10vw, 150px);
}
.proof-text { grid-column: 1 / span 4; }
.proof-text h2 { font-size: clamp(34px, 4.2vw, 68px); }
.proof-text p {
  margin: 18px 0 0;
  max-width: 24em;
  font-size: 18px;
  line-height: 1.45;
}
.proof-fig {
  grid-column: 5 / -1;
  margin: 0;
}
.proof-fig img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 50% 32%;
}
.proof-fig figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.proof-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
  margin: 0;
  padding: 0;
  list-style: none;
}
.proof-strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}
.proof-strip-text { align-self: end; }
.proof-strip-text p { margin: 0 0 10px; max-width: 18em; }
.proof-strip-text a {
  font-weight: 600;
  color: var(--ink);
  text-underline-offset: 4px;
}
.proof-strip-text a:hover { text-decoration-thickness: 2px; }

/* ------------------------------------------------------------------ how it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
  margin: 0;
  padding: 0 var(--edge) clamp(72px, 10vw, 150px);
  list-style: none;
  counter-reset: step;
}
.steps li {
  padding-top: 16px;
  border-top: 1.5px solid var(--ink);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: block;
  font: 800 clamp(72px, 9vw, 148px) / 0.82 var(--font);
  font-stretch: 70%;
  letter-spacing: -0.04em;
}
.steps h3 {
  margin: 22px 0 0;
  font: 700 clamp(21px, 1.8vw, 26px) / 1.15 var(--font);
  letter-spacing: -0.01em;
}
.steps p { margin: 8px 0 0; max-width: 30ch; }

/* ------------------------------------------------------------------ the crease */

.ask { overflow: hidden; }
.ask-crease {
  position: relative;
  isolation: isolate;
  width: min(100% - 2 * var(--edge), 1500px);
  aspect-ratio: 2 / 1;
  margin: clamp(48px, 7vw, 100px) auto 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 9% 14% 4%;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: radial-gradient(84% 120% at 50% 104%, #1d5bd8 0%, var(--blue) 46%, #001a5e 100%);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
/* the moving blue and its dotted grid (src/store/ask-fluid.js); the gradient above shows until
   it has drawn, and stays if WebGL is not there */
.ask-fluid {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
  width: 100%;
  height: 100%;
}
.ask-crease::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--grain);
  mix-blend-mode: soft-light;
  opacity: 0.6;
}
.ask h2 {
  margin: 0;
  font: 900 clamp(38px, 7vw, 118px) / 0.88 var(--font);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.ask p {
  margin: clamp(12px, 1.6vw, 24px) 0 0;
  max-width: 30em;
  font-size: clamp(16px, 1.3vw, 19px);
}
.ask-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(18px, 2.2vw, 32px);
}
.ask :focus-visible { outline-color: #fff; }

/* ------------------------------------------------------------------ the demo card */
/* A small black monitor in the corner, on while the four stops are. Black because it is the
   one thing on the page that floats: everything else is printed on the ice. */

.demo {
  position: fixed;
  right: var(--gutter);
  bottom: clamp(16px, 2.8vh, 30px);
  z-index: 40;
  width: clamp(264px, 23vw, 356px);
  padding: 6px 6px 0;
  color: #fff;
  background: #000;
  border-radius: 10px;
  box-shadow: 0 30px 70px -22px rgb(0 20 60 / 0.6), 0 3px 10px rgb(0 0 0 / 0.24);
  transform-origin: 100% 100%;
  visibility: hidden;
  opacity: 0;
}
.demo-screen {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: hidden;
  background: var(--hall);
  border: 0;
  border-radius: 5px;
  cursor: zoom-in;
}
.demo-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* where the loop is, drawn as a centre line along the bottom of the screen */
.demo-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(var(--t, 0));
  transform-origin: left;
}
.demo-expand {
  position: absolute;
  top: 8px; right: 8px;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  color: #fff;
  background: rgb(0 0 0 / 0.74);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}
.demo-screen:hover .demo-expand,
.demo-screen:focus-visible .demo-expand { opacity: 1; }
.demo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 5px 10px 8px;
}
.demo-title {
  margin: 0;
  font: 500 14px/1.25 var(--font);
}
.demo-try {
  flex: none;
  padding: 9px 13px 8px;
  font: 600 13px/1 var(--font);
  color: #000;
  background: #fff;
  border-radius: var(--r);
  text-decoration: none;
  transition: background-color 0.18s, color 0.18s;
}
.demo-try:hover { color: #fff; background: var(--blue); }
.demo-close {
  position: absolute;
  top: -11px; left: -11px;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  padding: 0;
  color: #000;
  background: #fff;
  border: 1.5px solid #000;
  border-radius: 50%;
  cursor: pointer;
}
.demo-close:hover { color: #fff; background: #000; border-color: #fff; }
.demo :focus-visible,
.demo-dialog :focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.demo-close:focus-visible { outline-color: var(--blue); }

.demo-dialog {
  width: min(1080px, 94vw);
  max-height: 94vh;
  padding: 8px 8px 0;
  color: #fff;
  background: #000;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 40px 120px -30px rgb(0 20 60 / 0.7);
}
.demo-dialog::backdrop {
  background: rgb(0 12 40 / 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.demo-dialog video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--hall);
  border-radius: 6px;
}
.demo-dialog-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 6px 12px 10px;
}
.demo-dialog-bar p {
  margin: 0 auto 0 0;
  font: 500 16px/1.3 var(--font);
}
.demo-dialog-bar .cta { min-height: 44px; }

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

@media (max-width: 860px) {
  /* the hero on a phone: everything a size down, so headline, bags and copy each get their own
     band of the screen instead of running into one another */
  .hero { padding-bottom: max(16px, 2.6svh); }
  .bb-label { padding: 6px 9px 5px; font-size: 13px; }
  .bb-rest { --bb2: min(8.6vw, 6.4svh); }
  .hero-copy { justify-self: stretch; }
  .lead { font-size: 15.5px; line-height: 1.38; }
  .hero-row { flex-direction: column-reverse; align-items: stretch; gap: 12px; margin-top: 12px; }
  .hero-ways .ways-head { font-size: 14px; }
  .hero-ways .way { width: 40px; height: 32px; }
  .hero-actions .cta { flex: 1 1 auto; min-height: 46px; padding: 0 14px; font-size: 15px; }
  .hero-note { margin-top: 8px; font-size: 13px; }

  /* The bag keeps the top of the screen, the words take the bottom. No card behind them:
     the backdrop itself fades to ice towards the bottom edge, and each stop's words rise in
     from below and leave upwards as they pass the middle of the screen (landing.js, stopWords). */
  .show-scrim .frost-far, .show-scrim .frost-near { display: none; }
  .show-scrim .frost-tint {
    inset: auto 0 0 0;
    width: auto;
    height: 62%;
    background: linear-gradient(to top, var(--ice) 0%, rgb(241 244 245 / 0.92) 38%, rgb(241 244 245 / 0.55) 68%, rgb(241 244 245 / 0) 100%);
    -webkit-mask-image: none;
    mask-image: none;
  }
  .stop { align-items: end; padding-bottom: max(28px, 5svh); }
  .stop-panel { max-width: none; }
  .stop h2 { font-size: clamp(28px, 8.4vw, 38px); }
  .stop-panel > p { margin-top: 12px; font-size: 16px; }
  .stop-panel > .stop-note { font-size: 14px; }
  .stop-panel > .ways, .try, .stop-panel > .cta { margin-top: 18px; }

  .sec-head h2, .sec-head p { grid-column: 1 / -1; }
  .sec-head p { margin-top: 18px; }
  .range-grid { grid-template-columns: minmax(0, 1fr); }
  .proof-text, .proof-fig { grid-column: 1 / -1; }
  .proof-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .proof-strip-text { grid-column: 1 / -1; margin-top: 8px; }
  .steps { grid-template-columns: minmax(0, 1fr); row-gap: 36px; }
  .steps li { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); column-gap: 8px; }
  .steps li::before { grid-row: 1 / span 2; font-size: 84px; }
  .steps h3 { margin-top: 2px; }

  .ask-crease {
    width: 100%;
    aspect-ratio: auto;
    padding: clamp(84px, 24vw, 130px) var(--gutter) 44px;
    border-radius: 50% 50% 0 0 / 110px 110px 0 0;
  }
  .ask-actions { flex-direction: column; align-self: stretch; width: 100%; }

  html:not(.js) .show-3d,
  .no-3d .show-3d { background-position: 50% 44%; background-size: 96vw auto; }

  /* the words have the bottom of the screen here, so the demo shrinks to a thumbnail up top */
  .demo {
    top: calc(var(--head-h) + 10px);
    right: 12px;
    bottom: auto;
    width: 128px;
    padding: 4px;
    border-radius: 8px;
    transform-origin: 100% 0;
  }
  .demo-bar { display: none; }
  .demo-expand { top: 5px; right: 5px; width: 24px; height: 24px; opacity: 1; }
  .demo-close { top: auto; bottom: -11px; }
}

@media (max-width: 420px) {
  .specs > div { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
}

/* short, wide windows: the hero has to give somewhere, so the supporting copy shrinks first */
@media (min-width: 861px) and (max-height: 760px) {
  .hero-note { display: none; }
  .lead { font-size: 16px; }
  .hero-row { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .bb-fit .bb-line, .prod-img, .curtain-ring, .demo-expand { transition: none; }
  .bb.is-editing .bb-caret { animation: none; }
}
