/*
 * The Crux product page. It is drawn with the shared site.css components (the hero, the sky
 * stage, the story, the scope card, the gradient proof grid, the dark trust panel, the FAQ and
 * the CTA band); this file adds only what those do not already draw. Every selector starts
 * with .crux- so nothing here can reach another page.
 */

.crux-page [id] {
  scroll-margin-top: 56px;
}

/* ---------- Hero ---------- */

.crux-hero {
  position: relative;
  isolation: isolate;
  padding-top: 96px;
}

/* A drafting grid behind the headline, fading out from the middle. */
.crux-hero::before {
  position: absolute;
  inset: 0 0 -60px;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-position: center top;
  background-size: 56px 56px;
  mask-image: radial-gradient(60% 65% at 50% 38%, #000 0%, transparent 78%);
  content: '';
}

.crux-underline {
  position: relative;
  white-space: nowrap;
}

.crux-underline::after {
  position: absolute;
  right: 0;
  bottom: 0.02em;
  left: 0;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    #d9dce0 0 40%,
    var(--brand-hi) 70%,
    var(--brand) 85%,
    #d9dce0 100%
  );
  background-size: 250% 100%;
  animation: shimmer 3.2s linear infinite;
  content: '';
}

.crux-sky {
  overflow: hidden;
  isolation: isolate;
}

.crux-sky::before,
.crux-frame::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.55) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
  content: '';
}

/* Registration marks: the white squares the home page's scope card carries. */
.crux-corners i {
  position: absolute;
  z-index: 1;
  width: 10px;
  height: 10px;
  background: #fff;
}

.crux-corners i:nth-child(1) {
  top: 16px;
  left: 16px;
}

.crux-corners i:nth-child(2) {
  top: 16px;
  right: 16px;
}

.crux-corners i:nth-child(3) {
  bottom: 16px;
  left: 16px;
}

.crux-corners i:nth-child(4) {
  right: 16px;
  bottom: 16px;
}

.crux-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 10px;
  border: 1px solid rgb(17 17 17 / 0.08);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  box-shadow: 0 10px 30px rgb(0 30 70 / 0.12);
  color: var(--ink-2);
  font-size: 13px;
}

.crux-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.crux-chip b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--brand);
  font: 500 11px/1.6 var(--mono);
}

.crux-chip b::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  animation: crux-blink 2s ease-in-out infinite;
  content: '';
}

.crux-chip-a {
  top: 18px;
  left: 40px;
}

.crux-chip-b {
  right: 40px;
  bottom: 18px;
}

@keyframes crux-blink {
  50% {
    opacity: 0.25;
  }
}

/* A reading line that passes over the screenshot now and then. */
.crux-scan {
  position: relative;
}

.crux-scan::after {
  position: absolute;
  top: -140px;
  right: 0;
  left: 0;
  height: 140px;
  border-bottom: 1px solid rgb(61 138 224 / 0.7);
  background: linear-gradient(180deg, transparent, rgb(61 138 224 / 0.1));
  opacity: 0;
  pointer-events: none;
  animation: crux-scan 7s var(--ease) 1.2s infinite;
  content: '';
}

@keyframes crux-scan {
  0% {
    top: -140px;
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  55% {
    top: 100%;
    opacity: 1;
  }

  62%,
  100% {
    top: 100%;
    opacity: 0;
  }
}

.crux-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
  margin: 64px auto 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.crux-specs div {
  padding: 22px 24px 24px;
  border-left: 1px solid var(--line);
}

.crux-specs div:first-child {
  padding-left: 0;
  border-left: 0;
}

.crux-specs dt {
  color: var(--faint);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crux-specs dd {
  margin: 8px 0 0;
  font-size: 17px;
}

/* ---------- Section numbering ---------- */

.crux-idx {
  display: inline-block;
  margin-right: 10px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brand);
  font: 500 12px/1.7 var(--mono);
  vertical-align: 1px;
}

/* ---------- Why it matters: one answer, read the way Crux reads it ---------- */

.crux-why {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 64px;
}

.crux-why .lede + .lede {
  margin-top: 14px;
}

.crux-answer-q {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crux-answer .ui-app {
  flex: none;
}

.crux-answer-body {
  padding: 26px 28px 4px;
}

.crux-answer-body > p:first-child {
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.8;
}

.crux-hit {
  padding: 1px 4px 1px 6px;
  border-radius: 6px;
  background: var(--sheet-2);
  color: var(--ink);
}

.crux-hit::after {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  vertical-align: 0.35em;
  border-radius: 50%;
  background: var(--ink-2);
  color: #fff;
  font: 500 10px/1 var(--mono);
  content: attr(data-rank);
}

.crux-hit.is-you {
  background: var(--wash);
  box-shadow: inset 0 0 0 1px #b9d3f3;
  color: var(--brand-deep);
}

.crux-hit.is-you::after {
  background: var(--brand);
}

.crux-cites {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.crux-cites span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--body);
  font-size: 13px;
}

.crux-cites i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--sheet-2);
  color: var(--ink-2);
  font: 500 10.5px/1 var(--mono);
}

.crux-cites .is-you {
  border-color: #b9d3f3;
  background: var(--wash);
  color: var(--brand-deep);
}

.crux-readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 28px 28px;
}

.crux-readout div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.crux-readout dt {
  color: var(--muted);
  font-size: 12px;
}

.crux-readout dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 500;
}

.crux-readout .is-yes {
  color: #15803d;
}

/* ---------- Questions drifting past ---------- */

.crux-ticker {
  margin-top: 110px;
}

.crux-ticker-head {
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.crux-ticker .marquees {
  margin-top: 26px;
}

.crux-ticker .marquee .crux-q {
  width: 400px;
  padding: 20px 24px;
}

.crux-q img {
  width: 30px;
  height: 30px;
}

.crux-q b {
  margin-bottom: 6px;
  font-size: 16.5px;
  line-height: 1.35;
}

/* ---------- How it works: the story's scenes are screenshots ---------- */

.crux-fill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

/* ---------- Feature sections ---------- */

.crux-frame {
  position: relative;
  margin: 0;
  padding: clamp(16px, 3.2vw, 44px);
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(70% 70% at 100% 100%, var(--crux-tint, transparent), transparent 70%),
    radial-gradient(120% 90% at 85% 0%, rgb(61 138 224 / 0.3), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgb(0 92 177 / 0.12), transparent 60%),
    linear-gradient(180deg, #d6e6fb 0%, #e9f1fd 55%, #f4f8fd 100%);
  isolation: isolate;
}

.crux-frame .window img {
  width: 100%;
}

.crux-tint-rose {
  --crux-tint: rgb(236 105 221 / 0.2);
}

.crux-tint-green {
  --crux-tint: rgb(40 200 170 / 0.24);
}

.crux-tint-amber {
  --crux-tint: rgb(255 170 100 / 0.3);
}

.crux-tint-violet {
  --crux-tint: rgb(120 110 200 / 0.26);
}

.crux-note {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.crux-wide-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 64px;
}

.crux-wide-head .lede {
  max-width: 520px;
  margin-top: 0;
}

.crux-wide-head .ticks,
.crux-feature .ticks {
  gap: 10px;
  margin: 24px 0 0;
}

.crux-wide-head .ticks li,
.crux-feature .ticks li {
  font-size: 15px;
}

.crux-frame-wide {
  margin-top: 56px;
}

.crux-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 64px;
}

.crux-feature.is-flip {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr);
}

.crux-feature.is-flip .crux-feature-copy {
  order: 2;
}

.crux-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.crux-duo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 620px;
  padding: 40px 0 0 40px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(70% 70% at 100% 100%, var(--crux-tint, transparent), transparent 70%),
    radial-gradient(60% 60% at 0% 0%, rgb(61 138 224 / 0.12), transparent 70%),
    var(--sheet);
}

.crux-duo-card h3 {
  padding-right: 40px;
  font-size: 28px;
}

.crux-duo-card > p:not(.eyebrow) {
  max-width: 460px;
  margin-top: 12px;
  padding-right: 40px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.55;
}

.crux-bleed {
  flex: 1;
  min-height: 340px;
  margin-top: 36px;
  border-right: 0;
  border-bottom: 0;
  border-radius: 14px 0 0;
}

.crux-bleed img {
  width: 150%;
  max-width: none;
}

.crux-note-on {
  position: absolute;
  right: 16px;
  bottom: 16px;
  margin: 0;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  font-size: 12px;
}

/* ---------- Engines ---------- */

.crux-engines .scope-card {
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- Metrics, in the gradient proof grid ---------- */

.crux-metrics .proof-card b {
  font-size: clamp(34px, 3.6vw, 52px);
  font-weight: 440;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.crux-metrics .proof-card > span:last-child {
  max-width: 420px;
  margin-top: auto;
  font-size: 15px;
  line-height: 1.5;
}

.crux-metrics .proof-kicker {
  font: 500 12.5px/1.5 var(--mono);
}

.crux-proof-mark {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}

.crux-proof-line {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 430;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.crux-proof-sub {
  margin-top: 18px;
  color: #9aa6b6;
  font-size: 14px;
}

.crux-proof-first {
  background:
    radial-gradient(90% 90% at 100% 0%, rgb(111 214 232 / 0.6), transparent 60%),
    radial-gradient(80% 90% at 0% 100%, rgb(0 60 130 / 0.75), transparent 65%), #2f6fb0;
}

.crux-aside {
  max-width: 720px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- Honest numbers ---------- */

.crux-trust {
  width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
}

.crux-trust .crux-idx {
  border-color: var(--dark-line);
  color: #8fb8e8;
}

.crux-strip {
  margin: 48px 0 0;
  padding: 24px 28px 20px;
  border: 1px solid var(--dark-line);
  border-radius: 18px;
  background: rgb(255 255 255 / 0.02);
}

.crux-strip-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.crux-strip-row + .crux-strip-row {
  margin-top: 10px;
}

.crux-strip-name {
  color: #aab1bb;
  font: 13px var(--mono);
}

.crux-strip ol {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crux-strip li {
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand-hi), var(--brand));
  opacity: 0.85;
}

.crux-strip li.is-failed,
.crux-key.is-failed i {
  background: repeating-linear-gradient(
    135deg,
    rgb(248 113 113 / 0.85) 0 3px,
    transparent 3px 7px
  );
  box-shadow: inset 0 0 0 1.5px #f87171;
  opacity: 1;
}

.crux-strip li.is-failed {
  animation: crux-pulse 2.4s ease-in-out infinite;
}

@keyframes crux-pulse {
  50% {
    box-shadow:
      inset 0 0 0 1.5px #f87171,
      0 0 18px rgb(248 113 113 / 0.55);
  }
}

.crux-strip figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 18px;
  color: #aab1bb;
  font-size: 13px;
}

.crux-key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.crux-key i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--brand-hi), var(--brand));
}

.crux-key-note {
  margin-left: auto;
  color: #6f7885;
}

/* ---------- Who it is for ---------- */

.crux-who-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.crux-who-grid article {
  padding: 28px 26px 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.crux-who-grid svg {
  width: 24px;
  height: 24px;
  color: var(--brand);
}

.crux-who-grid b {
  display: block;
  margin-top: 22px;
  font-size: 19px;
  font-weight: 480;
}

.crux-who-grid p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- Early access ---------- */

.crux-cta {
  width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
  padding-top: 96px;
  padding-bottom: 88px;
}

.crux-cta h2 {
  font-size: clamp(34px, 4vw, 56px);
}

.crux-cta-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 24px;
  border-radius: 11px;
  box-shadow: 0 12px 30px rgb(0 20 50 / 0.35);
}

.cta-band .crux-cta-fine {
  margin-top: 20px;
  color: rgb(255 255 255 / 0.66);
  font: 13px var(--mono);
}

/* ---------- Narrower screens ---------- */

@media (max-width: 1100px) {
  .crux-feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 48px;
  }

  .crux-feature.is-flip {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .crux-why,
  .crux-feature,
  .crux-feature.is-flip,
  .crux-wide-head,
  .crux-duo {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .crux-feature.is-flip .crux-feature-copy {
    order: 0;
  }

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

  .crux-specs div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .crux-specs div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

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

  .crux-trust {
    width: auto;
  }
}

@media (max-width: 720px) {
  .crux-hero {
    padding-top: 56px;
  }

  .crux-chip {
    display: none;
  }

  .crux-specs {
    width: calc(100% - 2 * var(--gutter));
  }

  .crux-specs div {
    padding: 18px 14px 20px;
  }

  .crux-specs dd {
    font-size: 15px;
  }

  .crux-answer-body {
    padding: 20px 20px 4px;
  }

  .crux-answer-body > p:first-child {
    font-size: 16px;
  }

  .crux-readout {
    gap: 8px;
    margin: 18px 20px 20px;
  }

  .crux-readout div {
    padding: 10px;
  }

  .crux-ticker .marquee .crux-q {
    width: 300px;
  }

  .crux-frame {
    border-radius: 18px;
  }

  .crux-duo-card {
    min-height: 520px;
    padding: 28px 0 0 24px;
  }

  .crux-duo-card h3,
  .crux-duo-card > p:not(.eyebrow) {
    padding-right: 24px;
  }

  .crux-duo-card h3 {
    font-size: 24px;
  }

  .crux-engines .grain {
    aspect-ratio: 1.05;
  }

  .crux-strip {
    padding: 18px 16px 16px;
  }

  .crux-strip-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .crux-strip ol {
    gap: 3px;
  }

  .crux-strip li {
    height: 22px;
    border-radius: 4px;
  }

  .crux-key-note {
    margin-left: 0;
  }

  .crux-who-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .crux-cta {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

/* ---------- Films ----------
   The Crux films are composed to their own edges (captions sit near them), so they are not put
   in a .window, whose video is scaled up to crop a screen recording's border. */

.crux-film {
  overflow: hidden;
  border: 1px solid rgb(17 17 17 / 0.06);
  border-radius: 18px;
  background: #e9f1fd;
  box-shadow: 0 40px 90px -40px rgb(0 30 70 / 0.42);
}

.crux-film video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 1200;
}

.crux-film-hero {
  border-radius: 28px;
}

.crux-duo-film {
  grid-column: 1 / -1;
  margin: 0 0 40px;
}

/* Section films (03, 04, 07): composed to their own sky, so no .crux-frame around them. */
.crux-feature-film {
  margin: 0;
}

.crux-feature-film-wide {
  margin-top: 56px;
}
