/**
 * How it works — same brand tokens, type and rail as the homepage.
 */

html:has(.hw-page) {
  overflow-x: clip !important;
  overflow-y: scroll !important;
}

body:has(.hw-page) {
  overflow: visible !important;
}

body:has(.hw-page) .fp-foot {
  position: relative;
  z-index: 3;
}

body:has(.hw-page) .site-header,
body:has(.hw-page) .site-header:has(.sticky) {
  position: sticky !important;
  top: 0;
  left: auto;
  width: 100%;
}

.hw-page {
  overflow: visible;
  --fp-ink: #0b0d12;
  --fp-red: var(--qt-bg-bg-7, #9b0000);
  --fp-red-dark: var(--qt-bg-bg-3, #6e0101);
  --fp-muted: #565e6b;
  --fp-dim: #646c79;
  --fp-hint: #7c8492;
  --fp-line: #e4e7ec;
  --fp-line-soft: #ebeef2;
  --fp-wash: #fafbfc;
  --fp-purple: #b49bff;
  --fp-cyan: #25f4ee;
  --fp-coral: #ff5c4a;
  --fp-rail: 1400px;
  --fp-display: "Inter Tight", var(--f-ff-font-1), sans-serif;
  --fp-sans: "Inter", var(--f-ff-font-1), sans-serif;
  --fp-label: "Inter", var(--f-ff-font-1), sans-serif;
  --fp-eyebrow-size: 15px;
  --fp-title-size: clamp(36px, 5vw, 60px);
  --fp-lead-size: 19px;
  color: var(--fp-ink);
  background: #fff;
}

.hw-rail {
  max-width: var(--fp-rail);
  margin: 0 auto;
  padding: 96px 28px 104px;
}

.hw-rail--split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 72px;
}

.hw-kicker {
  display: block;
  font-family: var(--fp-label);
  font-size: var(--fp-eyebrow-size);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--fp-red);
}

.hw-title {
  margin: 22px 0 0;
  max-width: 16ch;
  font-family: var(--fp-display);
  font-size: var(--fp-title-size);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-wrap: balance;
  color: inherit;
}

.hw-title--section {
  font-size: clamp(32px, 4.2vw, 48px);
}

.hw-lead {
  margin: 24px 0 0;
  max-width: 46ch;
  font-family: var(--fp-sans);
  font-size: var(--fp-lead-size);
  font-weight: 400;
  line-height: 1.62;
  color: var(--fp-muted);
  text-wrap: pretty;
}

.hw-note {
  display: block;
  margin-top: 28px;
  font-family: var(--fp-label);
  font-size: 12px;
  line-height: 1.6;
  color: var(--fp-dim);
}

.hw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fp-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  padding: 14px 26px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease,
    background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.hw-btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #b40606 0%, #8e0000 100%);
  border: 1px solid #8e0000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px rgba(142, 0, 0, 0.26);
}

.hw-btn--primary:hover,
.hw-btn--primary:focus {
  color: #fff;
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 24px rgba(142, 0, 0, 0.32);
}

.hw-btn--ghost {
  color: var(--fp-ink);
  background: transparent;
  border: 1px solid #d5dae1;
}

.hw-btn--ghost:hover,
.hw-btn--ghost:focus {
  color: #fff;
  background: #0b0d12;
  border-color: #0b0d12;
}

.hw-btn--outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
}

.hw-btn--outline:hover,
.hw-btn--outline:focus {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* Hero */

.hw-hero {
  position: sticky !important;
  top: var(--hw-sticky-top, 0px);
  z-index: 1;
  overflow: visible;
  background: #fff;
  color: var(--fp-ink);
}

.hw-hero__pin {
  position: relative;
  z-index: 1;
  background: #fff;
}

.hw-hero__rail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 48px;
  padding-top: 88px;
  padding-bottom: 88px;
}

.hw-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.hw-hero__art {
  display: flex;
  justify-content: center;
}

.hw-hero__art .fp-how__stage {
  width: min(100%, 380px);
  max-width: none;
  padding: 22px 24px 16px;
}

.hw-hero .fp-how__art * {
  animation-play-state: running;
}

/* Homepage how-it-works block sits over the pinned hero */

.hw-page .fp-how {
  position: relative;
  z-index: 3;
}

/* Proof — ink feature band */

.hw-proof {
  position: relative;
  z-index: 3;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 12% 0%, rgba(190, 22, 22, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(155, 0, 0, 0.16) 0%, transparent 55%),
    #0b0d12;
  color: #fff;
}

.hw-proof::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(122deg, transparent 0, transparent 11px, rgb(190 22 22 / 5%) 11px, rgb(190 22 22 / 8%) 12.2px);
  -webkit-mask-image: radial-gradient(ellipse 100% 90% at 50% 40%, #000 0%, #000 35%, transparent 92%);
  mask-image: radial-gradient(ellipse 100% 90% at 50% 40%, #000 0%, #000 35%, transparent 92%);
}

.hw-proof .hw-rail {
  position: relative;
  z-index: 1;
}

.hw-proof .hw-kicker {
  color: #ffb4a8;
}

.hw-proof .hw-lead {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0;
}

.hw-proof__list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.hw-proof__list li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--fp-sans);
  font-size: 16.5px;
  line-height: 1.55;
  color: #fff;
}

.hw-proof__list li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hw-proof__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fp-coral);
}

/* Tools */

.hw-tools {
  position: relative;
  z-index: 3;
  background: var(--fp-wash);
  border-bottom: 1px solid var(--fp-line);
}

.hw-tools__intro {
  max-width: 52ch;
  margin-bottom: 48px;
}

.hw-tools__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.hw-tool {
  padding: 28px 26px 30px;
  border: 1px solid var(--fp-line);
  border-radius: 20px;
  background: #fff;
}

.hw-tool__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--fp-red) 10%, #fff);
  color: var(--fp-red);
  font-size: 16px;
}

.hw-tool h3 {
  margin: 18px 0 0;
  font-family: var(--fp-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--fp-ink);
}

.hw-tool p {
  margin: 12px 0 0;
  font-family: var(--fp-sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--fp-muted);
}

/* Platforms */

.hw-platforms {
  position: relative;
  z-index: 3;
  background: #fff;
  border-bottom: 1px solid var(--fp-line);
}

.hw-platforms__intro {
  max-width: 52ch;
  margin-bottom: 48px;
}

.hw-platforms__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hw-plat {
  display: flex;
  flex-direction: column;
  padding: 28px 26px 26px;
  border: 1px solid var(--fp-line);
  border-radius: 20px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.hw-plat:hover,
.hw-plat:focus {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--hw-plat, var(--fp-red)) 35%, var(--fp-line));
  box-shadow: 0 18px 36px -28px rgba(11, 13, 18, 0.45);
}

.hw-plat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--hw-plat, var(--fp-ink));
  color: #fff;
  font-size: 18px;
}

.hw-plat h3 {
  margin: 18px 0 0;
  font-family: var(--fp-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fp-ink);
}

.hw-plat p {
  margin: 10px 0 0;
  font-family: var(--fp-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fp-muted);
}

.hw-plat__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-family: var(--fp-label);
  font-size: 13px;
  font-weight: 600;
  color: var(--fp-red);
}

.hw-plat__link i {
  font-size: 12px;
}

/* CTA */

.hw-cta {
  position: relative;
  z-index: 3;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 12% 0%, rgba(190, 22, 22, 0.28) 0%, transparent 58%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(155, 0, 0, 0.22) 0%, transparent 55%),
    #0b0d12;
  color: #fff;
}

.hw-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(122deg, transparent 0, transparent 11px, rgb(190 22 22 / 5%) 11px, rgb(190 22 22 / 8%) 12.2px);
  -webkit-mask-image: radial-gradient(ellipse 100% 90% at 50% 40%, #000 0%, #000 35%, transparent 92%);
  mask-image: radial-gradient(ellipse 100% 90% at 50% 40%, #000 0%, #000 35%, transparent 92%);
}

.hw-cta__rail {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 104px 28px 112px;
  text-align: center;
}

.hw-cta .hw-kicker {
  color: #ffb4a8;
}

.hw-cta .hw-title {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.hw-cta__lead {
  margin: 24px auto 0;
  max-width: 42ch;
  font-family: var(--fp-sans);
  font-size: 18px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.hw-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.hw-cta .hw-btn--primary {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 14px 34px rgba(180, 6, 6, 0.42);
}

.hw-cta__note {
  display: block;
  margin-top: 24px;
  font-family: var(--fp-label);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}

@media (min-width: 768px) {
  .hw-hero__pin .hw-hero__rail {
    padding-top: 100px;
    padding-bottom: 150px;
  }
}

@media (max-width: 991px) {
  .hw-rail--split,
  .hw-hero__rail {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hw-hero .hw-title,
  .hw-title {
    max-width: 22ch;
  }

  .hw-tools__grid,
  .hw-platforms__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .hw-hero,
  .hw-hero__pin {
    min-height: calc(100dvh - var(--hw-sticky-top, 0px));
  }

  .hw-hero__pin {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hw-rail,
  .hw-cta__rail {
    padding: 68px 20px 76px;
  }

  .hw-hero__pin .hw-hero__rail,
  .hw-hero__rail {
    padding: 16px 20px 20px;
    gap: 18px;
  }

  .hw-hero__actions {
    flex-wrap: nowrap;
    margin-top: 18px;
  }

  .hw-hero__actions .hw-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 10px;
    font-size: 13px;
    text-align: center;
    text-wrap: balance;
  }

  .hw-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hw-page {
    --fp-eyebrow-size: 14px;
    --fp-lead-size: 16.5px;
  }
}
