/* hq99 landing. Depends on base.css for tokens and chrome. */

/* ── Hero ──────────────────────────────────────────────────────────────────
   One screen. Headline on the left, the actual validation handshake on the
   right, because the handshake is what the product is.                      */

.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .5;
  pointer-events: none;
  z-index: 0;
}

/* Keeps the headline legible over the grain without flattening the texture */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(100deg, var(--bg) 8%, transparent 62%);
}

.hero-in {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: var(--s8);
  min-height: calc(100svh - 68px);
  padding-block: var(--s7);
}

/* No max-width here: the headline sets its own measure and must not be
   squeezed into extra lines. The paragraph below carries the measure. */
.hero-copy { min-width: 0; }

.hero-title {
  display: flex;
  flex-direction: column;
  margin-block: var(--s5) var(--s5);
  font-size: clamp(36px, 4.6vw, 66px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.042em;
}
/* Reference treatment: the stack recedes line by line into the grain. */
.hero-title span:nth-child(2) { color: #d0d0d0; }
.hero-title span:nth-child(3) { color: var(--fg-2); }

.hero-sub {
  max-width: 54ch;
  color: var(--fg-2);
  font-size: var(--t-md);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s7);
}

/* ── Handshake panel ───────────────────────────────────────────────────── */

.handshake {
  background: color-mix(in srgb, var(--bg-1) 84%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.handshake-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line);
}

.handshake-log {
  list-style: none;
  padding: var(--s2) 0;
  font-family: var(--mono);
  font-size: var(--t-sm);
}

.handshake-log li {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: var(--s4);
  align-items: baseline;
  padding: 10px var(--s4);
  border-left: 2px solid transparent;
}

.hs-t {
  color: var(--fg-3);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hs-v { color: var(--fg-2); overflow-wrap: anywhere; }

.handshake-log .is-ok {
  border-left-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 6%, transparent);
}
.handshake-log .is-ok .hs-t,
.handshake-log .is-ok .hs-v { color: var(--ok); }

/* The single orchestrated motion moment on this page: the log filling in. */
@media (prefers-reduced-motion: no-preference) {
  .handshake-log li[data-step] {
    opacity: 0;
    animation: hs-in .42s cubic-bezier(.22,.61,.36,1) forwards;
  }
  .handshake-log li:nth-child(1) { animation-delay: .35s; }
  .handshake-log li:nth-child(2) { animation-delay: .55s; }
  .handshake-log li:nth-child(3) { animation-delay: .75s; }
  .handshake-log li:nth-child(4) { animation-delay: .95s; }
  .handshake-log li:nth-child(5) { animation-delay: 1.15s; }
  .handshake-log li:nth-child(6) { animation-delay: 1.4s; }
}
@keyframes hs-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ── Section band ──────────────────────────────────────────────────────── */

.band { padding-block: var(--s10); border-bottom: 1px solid var(--line); }

.band-head { max-width: 62ch; margin-bottom: var(--s9); }

.band-title {
  margin-top: var(--s4);
  font-size: clamp(28px, 3.6vw, var(--t-2xl));
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.band-sub {
  margin-top: var(--s4);
  max-width: 56ch;
  color: var(--fg-2);
  font-size: var(--t-md);
  line-height: 1.62;
}

/* ── Features ──────────────────────────────────────────────────────────── */

.feat-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.feat-col { padding: var(--s7) 0 0; }
.feat-col + .feat-col { border-left: 1px solid var(--line); padding-left: var(--s7); }
.feat-col:first-child { padding-right: var(--s7); }

.feat-col-title {
  font-family: var(--mono);
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg);
}

.feat-list { margin-top: var(--s6); }

.feat-row { padding-block: var(--s5); border-top: 1px solid var(--line); }
.feat-row:first-child { border-top: 0; padding-top: 0; }

.feat-row dt {
  font-size: var(--t-md);
  font-weight: 500;
  letter-spacing: -.01em;
}

.feat-row dd {
  margin-top: 6px;
  max-width: 52ch;
  color: var(--fg-2);
  font-size: var(--t-base);
  line-height: 1.6;
}

/* ── Flow diagram ──────────────────────────────────────────────────────── */

.band-product { background: var(--bg-1); }

.flow-canvas {
  padding: var(--s8) var(--s6);
  border: 1px solid var(--line);
  background-color: var(--bg);
  background-image: radial-gradient(var(--line-2) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
  overflow-x: auto;
}

.flow-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  align-items: stretch;
  gap: 0;
  list-style: none;
  min-width: 940px;
}

.node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-right: 38px;
  padding: var(--s4);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
}
.node:last-child { margin-right: 0; }

/* Dashed connector between nodes, matching the canvas wiring in the brief */
.node:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 38px;
  border-top: 1px dashed var(--line-2);
}

.node-ix {
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--fg-3);
  letter-spacing: .1em;
}

.node-name { font-size: var(--t-base); font-weight: 500; }

.node-sub {
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--fg-2);
  line-height: 1.5;
}

.node-end { border-color: var(--fg); }
.node-end .node-name { color: var(--fg); }

.flow-note {
  margin-top: var(--s5);
  max-width: 62ch;
  font-family: var(--mono);
  font-size: var(--t-sm);
  line-height: 1.7;
  color: var(--fg-2);
}

/* ── Docs ──────────────────────────────────────────────────────────────── */

.docs-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: var(--s8);
  align-items: start;
}

.docs-points {
  margin: var(--s6) 0 var(--s7);
  padding: 0;
  list-style: none;
}
.docs-points li {
  position: relative;
  padding: 10px 0 10px var(--s5);
  border-top: 1px solid var(--line);
  color: var(--fg-2);
  font-size: var(--t-base);
}
.docs-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 19px;
  width: 8px;
  border-top: 1px solid var(--fg-3);
}

.code { min-width: 0; border: 1px solid var(--line); background: var(--bg-1); }

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line);
}

.code-copy {
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-2);
  padding: 4px 10px;
  border: 1px solid var(--line);
  transition: color .16s ease, border-color .16s ease;
}
.code-copy:hover { color: var(--fg); border-color: var(--line-2); }
.code-copy[data-done] { color: var(--ok); border-color: var(--ok); }

.code-body {
  margin: 0;
  padding: var(--s5) var(--s4);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: var(--t-sm);
  line-height: 1.85;
  color: var(--fg-2);
  tab-size: 4;
}
.c-k { color: var(--fg); font-weight: 500; }
.c-f { color: #d0d0d0; }
.c-s { color: var(--ok); }

/* ── Closer ────────────────────────────────────────────────────────────── */

.closer { padding-block: var(--s10); }
.closer-in { display: flex; flex-direction: column; align-items: flex-start; }

.closer-title {
  font-size: clamp(30px, 4.4vw, 58px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.05;
}
.closer-sub { margin: var(--s4) 0 var(--s6); color: var(--fg-2); font-size: var(--t-md); }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .hero-in { grid-template-columns: 1fr; gap: var(--s8); padding-block: var(--s8); }
  .hero::after { background: linear-gradient(180deg, var(--bg) 10%, transparent 75%); }
  .docs-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s7); }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }

  .band { padding-block: var(--s9); }
  .band-head { margin-bottom: var(--s7); }

  .feat-cols { grid-template-columns: minmax(0, 1fr); }
  .feat-col:first-child { padding-right: 0; }
  .feat-col + .feat-col {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
  }

  /* Stack the path vertically so it never needs a sideways drag on a phone */
  .flow-canvas { padding: var(--s6) var(--s4); overflow-x: visible; }
  .flow-track { grid-auto-flow: row; grid-auto-columns: auto; min-width: 0; gap: 34px; }
  .node { margin-right: 0; }
  .node:not(:last-child)::after {
    top: 100%;
    left: 28px;
    width: 0;
    height: 34px;
    border-top: 0;
    border-left: 1px dashed var(--line-2);
  }
}
