/* =====================================================================
   Believe Fitness IOI Mall Damansara: free trial page.
   Only the rules this page uses, taken from the club-site-2 prototype
   (brand.css plus the free-trial page styles). No inline styles anywhere,
   so a strict Content-Security-Policy works.

   Type: "Saira Semi Condensed" 800 in caps for headings, "Nunito Sans" for body.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bf-yellow: #fde800;
  --bf-black: #000;
  --bf-dark: #272727;        /* brand dark */
  --bf-surface: #111;        /* cards */
  --bf-surface-2: #1a1a1a;   /* raised cards, notes */
  --bf-white: #fff;
  --bf-text: #fff;
  --bf-muted: #d9d9d9;       /* body copy on black */
  --bf-dim: #a6a6a6;         /* small print on black (8:1) */
  --bf-line: rgba(255, 255, 255, .16);
  --bf-input-border: #8a8a8a;
  --bf-error: #ff7a52;       /* form errors only, 8:1 on black */

  --font-display: "Saira Semi Condensed", "Arial Narrow", "Roboto Condensed", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito Sans", "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  --fs-h1: clamp(2.125rem, 1.4rem + 3.2vw, 3.75rem);   /* 34 to 60px */
  --fs-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem);    /* 28 to 40px */
  --fs-h3: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);      /* 20 to 24px */
  --fs-body: 1.0625rem;                                /* 17px */
  --fs-lede: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  --fs-small: .875rem;
  --lh-tight: 1.05;
  --lh-body: 1.55;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(56px, 3rem + 5vw, 120px);
  --header-h: 64px;
  --rule: 6px;               /* yellow rule under the hero */
}
@media (min-width: 1280px) {
  :root { --header-h: 84px; }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--bf-black);
  color: var(--bf-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-x: clip;          /* clip, not hidden, so the sticky header still works */
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; }
img { display: block; height: auto; }
a { color: var(--bf-yellow); text-underline-offset: .18em; }
a:hover { color: var(--bf-white); }
p { margin: 0 0 1em; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: var(--lh-tight);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
strong, b { font-weight: 700; }
:focus-visible { outline: 3px solid var(--bf-yellow); outline-offset: 3px; }
::selection { background: var(--bf-yellow); color: #000; }

/* ---------- 3. Layout and utilities ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { position: relative; padding-block: var(--section-y); }
.br-md { display: none; }
@media (min-width: 640px) { .br-md { display: inline; } }
.small { font-size: var(--fs-small); color: var(--bf-dim); }
.nowrap { white-space: nowrap; }
.hl { color: var(--bf-yellow); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Icon sprite holder and icons. Usage: <svg class="icon"><use href="#i-check"/></svg> */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.25em; height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.2em;
}

/* Placeholder for anything the club still has to confirm. tools/preflight.mjs finds the TO CONFIRM text inside it */
.tbc {
  display: inline;
  padding: 2px 6px;
  border: 1.5px dashed var(--bf-yellow);
  color: var(--bf-yellow);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .8125rem;
  line-height: 1.6;
  letter-spacing: .02em;
  text-transform: none;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- 4. Setup bar (only while the endpoint is not set) ---------- */
.setup-bar {
  position: relative;
  z-index: 60;
  padding-block: 9px;
  background: var(--bf-yellow);
  color: #000;
  font-weight: 700;
  font-size: .9375rem;
  line-height: 1.35;
}
.setup-bar p { margin: 0; }
.setup-bar__mark {
  display: inline-block;
  width: 9px; height: 12px;
  margin-right: 8px;
  background: #000;
  transform: skewX(-18deg);
  vertical-align: -1px;
}

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: transparent;
  transition: background-color .25s ease, box-shadow .25s ease;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, .6), rgba(0, 0, 0, 0));
  pointer-events: none;
  transition: opacity .25s ease;
}
.site-header.is-solid {
  background: #000;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .1);
}
.site-header.is-solid::before { opacity: 0; }
.site-header__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  min-width: 0;
  color: #fff;
}
.brand__logo { height: 28px; width: auto; }
.brand__club {
  padding-left: 10px;
  border-left: 2px solid var(--bf-yellow);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .8125rem;
  line-height: 1.1;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
}
.brand__wordmark {     /* text fallback when the logo cannot load */
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
@media (max-width: 479.98px) {
  .site-header .brand { flex-direction: column; align-items: flex-start; gap: 3px; }
  .site-header .brand__logo { height: 22px; }
  .site-header .brand__club {
    padding: 3px 0 0;
    border-left: 0;
    border-top: 2px solid var(--bf-yellow);
    font-size: .6875rem;
  }
}
@media (min-width: 1280px) {
  .brand__logo { height: 38px; }
  .brand__club { font-size: .875rem; }
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: 14px 22px;
  border: 2px solid var(--bf-yellow);
  border-radius: 0;
  background: var(--bf-yellow);
  color: #000;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { background: #fff; border-color: #fff; color: #000; }
.btn--outline { background: transparent; color: #fff; border-color: var(--bf-yellow); }
.btn--outline:hover { background: var(--bf-yellow); border-color: var(--bf-yellow); color: #000; }
@media (min-width: 1280px) { .btn { font-size: 1.125rem; } }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px 16px; }
@media (max-width: 479.98px) {
  .btn-row > .btn { flex: 1 1 100%; }
}

/* ---------- 7. Hero band ---------- */
/* Photo, 55% black overlay, thin yellow rule at the bottom edge. Pulls up under the transparent header. */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  margin-top: calc(var(--header-h) * -1);
  background: var(--bf-surface);
  border-bottom: var(--rule) solid var(--bf-yellow);
}
.page-hero__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .35) 100%),
    rgba(0, 0, 0, .55);
}
.page-hero__title { font-size: var(--fs-h1); }
.page-hero__sub { margin: 0; font-size: var(--fs-lede); color: #fff; }

/* Compact band, so the form starts on the first phone screen */
.page-hero--band { min-height: 0; padding: calc(var(--header-h) + clamp(16px, 3vw, 44px)) 0 clamp(22px, 3vw, 40px); }
.page-hero--band .page-hero__title { margin-bottom: .22em; }
.page-hero--band .page-hero__sub { max-width: 60ch; margin-bottom: 0; text-wrap: pretty; }

/* ---------- 8. Brand motifs ---------- */
/* Yellow hexagon icon */
.hex {
  display: grid;
  place-items: center;
  flex: none;
  width: 68px; height: 60px;
  background: var(--bf-yellow);
  color: #000;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.hex .icon { width: 30px; height: 30px; }

/* Ticked list */
.ticks { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 28px; color: var(--bf-muted); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px; top: .38em;
  width: 13px; height: 7px;
  border-left: 3px solid var(--bf-yellow);
  border-bottom: 3px solid var(--bf-yellow);
  transform: rotate(-45deg);
}

/* Note callout (the no-JavaScript line) */
.note {
  padding: 16px 18px;
  background: var(--bf-surface-2);
  border-left: 4px solid var(--bf-yellow);
  color: var(--bf-muted);
}
.noscript, .form-down { margin: 0 0 24px; color: #fff; font-weight: 700; }
.form-down { border-left-color: var(--bf-error); }

/* Bahasa Malaysia line */
.bm {
  padding-left: 14px;
  border-left: 3px solid var(--bf-yellow);
  font-style: italic;
  color: var(--bf-muted);
}
.bm__en { display: block; margin-top: 4px; font-style: normal; font-size: .875rem; color: var(--bf-dim); }

/* Image fallback panel, built by trial.js when a photo cannot load */
.img-fallback {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  width: 100%; height: 100%;
  min-height: 180px;
  background: #0a0a0a;
}
.img-fallback::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 14px;
  background: repeating-linear-gradient(-55deg, var(--bf-yellow) 0 12px, #000 12px 24px);
}
.img-fallback::after {
  content: "";
  position: absolute;
  right: -6%; top: 18%;
  width: 46%;
  aspect-ratio: 3 / 4;
  background: var(--bf-yellow);
  clip-path: polygon(0 0, 34% 0, 100% 50%, 34% 100%, 0 100%, 66% 50%);
  opacity: .9;
}
/* In the hero, the panel stays behind the title like the photo it replaces */
.page-hero > .img-fallback { position: absolute; inset: 0; z-index: -2; min-height: 0; }

/* ---------- 9. Form ---------- */
.form { display: grid; gap: 22px; max-width: 680px; }
.form > .btn { justify-self: start; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label:not(.choice), .field > legend { font-weight: 700; font-size: .9375rem; color: #fff; padding: 0; }
.field > legend { margin-bottom: 8px; }
.field input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 2px solid var(--bf-input-border);
  border-radius: 0;
  background: #0b0b0b;
  color: #fff;
  font: inherit;
}
.field input::placeholder { color: #8f8f8f; }
.field input:focus { border-color: var(--bf-yellow); }
.field__hint { margin: 0; font-size: .875rem; color: var(--bf-dim); }
.choice, .field > .choice { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 400; color: #fff; }
.choice input {
  appearance: none;
  display: grid;
  place-content: center;
  flex: none;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  border: 2px solid #bdbdbd;
  background: #0b0b0b;
  cursor: pointer;
}
.choice input:checked { background: var(--bf-yellow); border-color: var(--bf-yellow); }
.choice input[type="checkbox"]:checked::after {
  content: "";
  width: 6px; height: 11px;
  border-right: 3px solid #000;
  border-bottom: 3px solid #000;
  transform: translate(0, -1px) rotate(45deg);
}
.consent {
  padding: 14px 16px;
  background: var(--bf-surface-2);
  border-left: 4px solid var(--bf-yellow);
  font-size: .9375rem;
  color: var(--bf-muted);
}
.field__error { margin: 0; font-size: .875rem; font-weight: 700; color: var(--bf-error); }
.form__note { margin: 0; font-size: .875rem; color: var(--bf-dim); }

/* ---------- 10. Footer ---------- */
.site-footer {
  padding-block: 56px 28px;
  background: #000;
  border-top: 1px solid var(--bf-line);
  color: var(--bf-muted);
  font-size: .9375rem;
}
.site-footer__grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer .brand { margin: 0 0 18px; }
.site-footer__title { margin-bottom: 12px; font-size: 1rem; letter-spacing: .06em; color: var(--bf-yellow); }
.site-footer p { margin: 0 0 .7em; }
.site-footer a:not(.btn) { color: #fff; text-decoration: none; }
.site-footer a:not(.btn):hover { color: var(--bf-yellow); text-decoration: underline; }
.site-footer__links { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 44px; }   /* 44px tap targets */

/* =====================================================================
   Page styles: the free trial form, its states and the three-step diagram
   ===================================================================== */

/* Form beside the diagram from 960px, one column below */
.trial-section { padding-block: clamp(28px, 4vw, 64px) var(--section-y); }
.trial { display: grid; gap: 56px; }
@media (min-width: 960px) {
  .trial { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(48px, 6vw, 96px); align-items: start; }
  .trial__aside { position: sticky; top: calc(var(--header-h) + 24px); }
}
.trial .form { max-width: 640px; gap: 26px; }
.form__req { margin: 0; font-size: .9375rem; color: var(--bf-dim); }

/* Fields: brand inputs plus caret, hover and autofill */
.trial input { caret-color: var(--bf-yellow); accent-color: var(--bf-yellow); }
.trial .field input:not([type="checkbox"]):not([type="radio"]) { transition: border-color .18s ease; }
.trial .field input:not([type="checkbox"]):not([type="radio"]):hover { border-color: #c4c4c4; }
.trial .field input:not([type="checkbox"]):not([type="radio"]):focus { border-color: var(--bf-yellow); }
.trial input:-webkit-autofill,
.trial input:-webkit-autofill:hover,
.trial input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #0b0b0b inset;
  caret-color: var(--bf-yellow);
  transition: background-color 9999s ease 0s;
}

/* Error state */
.field.is-invalid input:not([type="checkbox"]):not([type="radio"]) { border-color: var(--bf-error); }
.field.is-invalid .goal__box { border-color: var(--bf-error); }
.field.is-invalid .consent { border-left-color: var(--bf-error); }
.field.is-invalid .consent input { border-color: var(--bf-error); }

/* Fitness goal: six tiles, each with a brand hexagon. Real radios, so arrow keys work */
.goals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .goals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.goal { position: relative; display: block; min-width: 0; cursor: pointer; }
.goal__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.goal__box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  min-height: 60px;
  padding: 10px 28px 10px 10px;
  border: 2px solid var(--bf-input-border);
  background: #0b0b0b;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: break-word;
  hyphens: none;
  transition: border-color .18s ease, background-color .18s ease;
}
.goal__text { min-width: 0; }
.goal:hover .goal__box { border-color: #c4c4c4; }
.goal__hex {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px; height: 35px;
  background: #262626;
  color: var(--bf-yellow);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  transition: background-color .18s ease, color .18s ease;
}
.goal__hex .icon { width: 20px; height: 20px; }
.goal__tick { position: absolute; top: 7px; right: 7px; width: 15px; height: 15px; stroke-width: 3; color: var(--bf-yellow); opacity: 0; transform: scale(.6); transition: opacity .18s ease, transform .18s ease; }
.goal__input:checked + .goal__box { border-color: var(--bf-yellow); background: rgba(253, 232, 0, .08); }
.goal__input:checked + .goal__box .goal__hex { background: var(--bf-yellow); color: #000; }
.goal__input:checked + .goal__box .goal__tick { opacity: 1; transform: none; }
.goal__input:focus-visible + .goal__box { outline: 3px solid var(--bf-yellow); outline-offset: 3px; }
/* Narrow phones: a smaller hexagon and tighter padding, so each word stays whole */
@media (max-width: 399.98px) {
  .goals { gap: 8px; }
  .goal__box { gap: 8px; padding: 8px 20px 8px 8px; font-size: .9375rem; }
  .goal__hex { width: 34px; height: 30px; }
  .goal__hex .icon { width: 18px; height: 18px; }
  .goal__tick { top: 5px; right: 5px; width: 13px; height: 13px; }
}

/* PDPA consent and the folded notices (privacy, and what to bring) */
.field--consent { gap: 4px; }
.notice > summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: .9375rem;
  color: var(--bf-yellow);
  text-decoration: underline;
  text-underline-offset: .18em;
}
.notice > summary::-webkit-details-marker { display: none; }
.notice > summary::after {
  content: "";
  width: 8px; height: 8px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.notice[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
.notice > summary:hover { color: #fff; }
.notice__body { margin-top: 6px; padding: 16px 18px; border-left: 3px solid var(--bf-line); background: var(--bf-surface); font-size: .9375rem; color: var(--bf-muted); }
.notice__body > * { margin: 0 0 12px; }
.notice__body > :last-child { margin-bottom: 0; }
.notice__list { display: grid; gap: 10px; }
.notice__list div { display: grid; gap: 2px; }
.notice__list dt { font-weight: 700; color: #fff; }
.notice__list dd { margin: 0; }
.notice__ms { padding-top: 12px; border-top: 1px solid var(--bf-line); }
.notice__ms h3 { margin: 0 0 6px; font-size: 1rem; }
.notice__ms p { margin: 0; }
.notice__ms .notice__tbc { margin-bottom: 8px; }
.notice__ver { font-size: .8125rem; color: var(--bf-dim); }
.bring { margin: 12px 0 0; }
.bring h3 { margin: 0 0 6px; font-size: 1rem; }
.bring .notice__body > p + h3 { margin-top: 18px; }
.bring .ticks { gap: 6px; }

/* Send button: full width on phones. Off until trial.js runs ([disabled]); busy while sending ([aria-disabled]) */
.trial .form > .btn { width: 100%; }
@media (min-width: 640px) { .trial .form > .btn { width: auto; min-width: 320px; } }
.trial .btn[disabled], .trial .btn[disabled]:hover,
.trial .btn[aria-disabled="true"], .trial .btn[aria-disabled="true"]:hover { opacity: .7; cursor: not-allowed; background: var(--bf-yellow); border-color: var(--bf-yellow); color: #000; }
.trial .btn[aria-busy="true"] { cursor: progress; }
.form__wait { margin-top: -12px; color: var(--bf-muted); }
.form__alert {
  margin: -8px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--bf-error);
  background: var(--bf-surface-2);
  color: #fff;
  font-weight: 700;
  font-size: .9375rem;
}
.form__alert a { color: var(--bf-yellow); }
.form__alert a:hover { color: #fff; }
.form__after { display: grid; gap: 14px; margin-top: -8px; }
.form__after > * { margin: 0; }

/* Honeypot: the hidden attribute keeps it out of view, out of autofill and out of the tab order.
   This rule is a second guard in case the hidden attribute is removed. */
.hp { position: absolute; left: 0; top: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Success state: replaces the form in place */
.trial-done { display: grid; justify-items: start; gap: 16px; padding: clamp(22px, 4vw, 36px); background: var(--bf-surface); border-top: 4px solid var(--bf-yellow); }
.trial-done > * { margin: 0; }
.trial-done__title { font-size: var(--fs-h2); overflow-wrap: anywhere; }
.trial-done__title:focus:not(:focus-visible) { outline: none; }
.trial-done p { max-width: 52ch; color: var(--bf-muted); }
.trial-done strong { color: #fff; }
.trial-done .btn-row { margin-top: 4px; }
.trial-done .trial-done__test { padding: 8px 12px; border: 2px dashed var(--bf-yellow); color: var(--bf-yellow); font-weight: 700; }

/* Diagram (steps): one contiguous rail of three segments, step 02 is the focal one */
.next-title { margin: 0 0 16px; font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); }
.next { position: relative; display: grid; margin: 0; padding: 0; list-style: none; }
.next::before {          /* hairline joining the number squares (stacked layout only) */
  content: "";
  position: absolute;
  left: 40px; top: 44px; bottom: 44px;
  width: 2px;
  background: rgba(255, 255, 255, .28);
}
.next__step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 16px;
  min-height: 84px;
  padding: 16px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--bf-line);
  border-bottom: 0;
}
.next__step:nth-child(2) { background: rgba(255, 255, 255, .09); }
.next__step:last-child { border-bottom: 1px solid var(--bf-line); }
.next__num {
  position: relative;
  z-index: 1;
  grid-row: 1 / span 2;
  align-self: center;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, .45);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
  color: #fff;
}
.next__check { display: none; width: 24px; height: 24px; stroke-width: 3; color: var(--bf-yellow); }
.next__title { align-self: end; margin: 0; font-size: 1.1875rem; line-height: 1.1; }
.next__line { align-self: start; margin: 4px 0 0; font-size: 1rem; line-height: 1.35; color: var(--bf-muted); }
.next__step--focal { border-top: 2px solid var(--bf-yellow); border-bottom: 2px solid var(--bf-yellow); }
.next__step--focal + .next__step { border-top: 0; }
.next__step--focal .next__num { background: var(--bf-yellow); border-color: var(--bf-yellow); color: #000; }
.next__step--focal .next__title { color: var(--bf-yellow); }
.next__step.is-done .next__digit { display: none; }
.next__step.is-done .next__check { display: block; }
.next-foot { margin: 16px 0 0; }

/* Tablet: the same three steps as one horizontal rail */
@media (min-width: 640px) and (max-width: 959.98px) {
  .next { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .next::before { display: none; }
  .next__step {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    align-content: start;
    row-gap: 12px;
    min-height: 0;
    padding: 18px;
    border: 1px solid var(--bf-line);
    border-right: 0;
  }
  .next__step:last-child { border-right: 1px solid var(--bf-line); }
  .next__step--focal { border-top: 2px solid var(--bf-yellow); border-bottom: 2px solid var(--bf-yellow); }
  .next__step--focal + .next__step { border-top: 1px solid var(--bf-line); }
  .next__num { grid-row: auto; }
  .next__title, .next__line { align-self: start; }
  .next__line { margin: 0; }
}

/* One authored moment: the three steps rise in once. Visible by default; off under reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .next.will-in:not(.is-in) .next__step { opacity: 0; transform: translateY(8px); }
  .next.is-in .next__step { animation: next-in .45s cubic-bezier(.16, 1, .3, 1) both; }
  .next.is-in .next__step:nth-child(2) { animation-delay: .12s; }
  .next.is-in .next__step:nth-child(3) { animation-delay: .24s; }
}
@keyframes next-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
