/* ==========================================================================
   MERITALIEN FRONTIER — the referral network page

   One idea for the page: a network is a picture of people who know each other,
   so the hero draws one instead of borrowing a stock photograph of a handshake.
   The constellation is generated (deterministic seed) in build.py, so it is the
   same picture on every build and the OG card cannot drift from the page.

   Accent discipline: --accent appears on the hub nodes and the primary CTA and
   nowhere else on this page. The hubs ARE the "go" of the illustration.
   ========================================================================== */

/* — hero — */
.fj-hero__grid {
  display: grid; gap: var(--s-12);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
}
@media (max-width: 60rem) {
  .fj-hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-10); }
}
.fj-hero__h1 { max-width: 15ch; }
.fj-hero__copy { display: grid; gap: var(--s-4); align-content: start; }
.fj-hero__copy .eyebrow { margin: 0; }
.fj-hero__copy .lead { margin-top: var(--s-2); }
.fj-hero__graphic { position: relative; }
.fj-net {
  position: relative;
  aspect-ratio: 560 / 520;
  border: 1px solid var(--line-invert);
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 70% 20%, rgba(0, 224, 122, .05), transparent 62%),
    var(--ink-800);
}
.net { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.net line { stroke: rgba(251, 250, 248, .13); stroke-width: 1; }
.net .node { fill: rgba(251, 250, 248, .34); }
.net .hub { fill: var(--accent); animation: net-pulse 5.2s var(--ease) infinite; }
.net .hub:nth-of-type(2n) { animation-delay: 1.4s; }
.net .hub:nth-of-type(3n) { animation-delay: 2.7s; }
@keyframes net-pulse {
  0%, 100% { opacity: .5; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .net .hub { animation: none; opacity: .85; }
}
.fj-hero__caption {
  margin: var(--s-3) 0 0;
  font-family: var(--font-mono); font-size: var(--t-mono);
  letter-spacing: var(--tr-mono); text-transform: uppercase;
  color: var(--text-invert-muted);
}

.fj-facts {
  display: flex; flex-wrap: wrap; gap: var(--s-5) var(--s-10);
  margin: var(--s-10) 0 0; padding-top: var(--s-5);
  border-top: 1px solid var(--line-invert);
}
.fj-facts dt {
  font-family: var(--font-mono); font-size: 0.6875rem;
  letter-spacing: var(--tr-mono); text-transform: uppercase;
  color: var(--text-invert-muted); margin-bottom: var(--s-1);
}
.fj-facts dd { margin: 0; font-size: var(--t-small); color: var(--text-invert); }

/* — the two offers — */
.feat {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6);
  margin-top: var(--s-12);
}
@media (max-width: 52rem) { .feat { grid-template-columns: 1fr; } }
.feat__card {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: var(--s-4);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper-100);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.feat__card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.feat__card .eyebrow { margin: 0; }
.feat__h {
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  line-height: 1.15; letter-spacing: var(--tr-heading);
  margin: 0;
}
.feat__p { margin: 0; color: var(--text-muted); font-size: var(--t-small); line-height: 1.6; max-width: 46ch; }
.feat__go {
  margin-top: auto; padding-top: var(--s-5);
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-small); font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  min-height: 24px;
}
.feat__go:hover { border-bottom-color: var(--ink-900); }
.feat__go span { transition: transform var(--dur) var(--ease); }
.feat__go:hover span { transform: translateX(3px); }

/* — ticks — */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.ticks li { position: relative; padding-left: var(--s-6); font-size: var(--t-small); line-height: 1.5; color: var(--text); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 9px; height: 1px; background: var(--ink-900);
}
.ticks--accent li::before { background: var(--accent); }

/* — the four steps — */
.flow { list-style: none; margin: var(--s-10) 0 0; padding: 0; display: grid; gap: var(--s-8); grid-template-columns: repeat(4, 1fr); }
@media (max-width: 60rem) { .flow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 40rem) { .flow { grid-template-columns: 1fr; gap: 0; } }
.flow__item { position: relative; padding-top: var(--s-5); border-top: 1px solid var(--line-invert); color: var(--text-invert); }
.flow__n {
  display: block; margin-bottom: var(--s-4);
  font-family: var(--font-mono); font-size: var(--t-mono);
  letter-spacing: var(--tr-mono); color: var(--text-invert-muted);
}
.flow__h {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(1.25rem, 1.9vw, 1.5rem); line-height: 1.15;
  margin: 0 0 var(--s-3);
}
.flow__p { margin: 0; font-size: var(--t-small); line-height: 1.6; color: var(--text-invert-muted); max-width: 34ch; }
@media (max-width: 40rem) {
  .flow__item { padding-block: var(--s-5); border-top: 1px solid var(--line-invert); }
  .flow__p { max-width: none; }
}

/* — six fields — */
.fieldgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin-top: var(--s-10); }
@media (max-width: 60rem) { .fieldgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 40rem) { .fieldgrid { grid-template-columns: 1fr; } }
.fieldcard {
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper-100);
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.fieldcard:hover { border-color: var(--line-strong); background: var(--paper-200); }
.fieldcard__h {
  font-family: var(--font-sans); font-weight: 500;
  font-size: var(--t-body); line-height: 1.25;
  margin: 0 0 var(--s-2);
}
.fieldcard__p { margin: 0; font-size: var(--t-small); line-height: 1.55; color: var(--text-muted); }
.note-line { margin-top: var(--s-8); max-width: 62ch; color: var(--text-faint); }

/* — the join block — */
.fj-join { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-12); align-items: start; }
@media (max-width: 60rem) { .fj-join { grid-template-columns: 1fr; gap: var(--s-10); } }
.fj-join__copy { display: grid; gap: var(--s-4); align-content: start; }
.fj-join__copy .eyebrow { margin: 0; }
.fj-join__copy h2 { margin: 0; }

/* the dark variant of the screening card, so the same fields work on ink */
.screen--ink {
  background: var(--ink-800);
  border-color: var(--line-invert);
  box-shadow: none;
  color: var(--text-invert);
}
.screen--ink .field__label { color: var(--text-invert-muted); }
.screen--ink .field__input,
.screen--ink .field__select select {
  background: var(--ink-900); color: var(--text-invert);
  border-color: var(--line-invert-strong);
}
.screen--ink .field__input::placeholder { color: #6f6b64; }
.screen--ink .field__input:hover,
.screen--ink .field__select select:hover { border-color: var(--text-invert); }
.screen--ink .field__input:focus,
.screen--ink .field__select select:focus {
  border-color: var(--text-invert); box-shadow: 0 0 0 3px rgba(251, 250, 248, .12);
}
.screen--ink .opt__face {
  background: var(--ink-900); color: var(--text-invert);
  border-color: var(--line-invert-strong);
}
.screen--ink .opt:hover .opt__face { border-color: var(--text-invert); }
.screen--ink .opt__face::before { border-color: var(--line-invert-strong); }
.screen--ink .opt input:checked + .opt__face {
  background: var(--accent); border-color: var(--accent); color: var(--ink-900);
}
.screen--ink .opt input:checked + .opt__face::before {
  border-color: var(--ink-900);
  box-shadow: inset 0 0 0 3px var(--accent), inset 0 0 0 9px var(--ink-900);
}
.screen--ink .consent { color: var(--text-invert-muted); }
.screen--ink .consent input { accent-color: var(--accent); }
.screen--ink .screen__legal { color: var(--text-invert-muted); }

/* — closing line — */
.fj-out { display: grid; gap: var(--s-3); padding-block: var(--s-6); }
.fj-out .eyebrow { margin: 0; }
.fj-out__line {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  line-height: 1.1; letter-spacing: var(--tr-heading);
  margin: 0;
}

/* ---- the three questions, answered on the first screen ------------------ */
.fj-hero__mech {
  font-size: var(--t-lead);
  line-height: 1.45;
  font-family: var(--font-serif);
  border-left: 2px solid var(--accent);
  padding-left: var(--s-5);
  margin-top: var(--s-2);
}
.fj-answers {
  display: grid;
  align-content: center;
  border-top: 1px solid var(--line-invert);
}
.fj-answers__cell {
  display: grid;
  gap: var(--s-2);
  padding-block: var(--s-6);
  border-bottom: 1px solid var(--line-invert);
}
.fj-answers__k {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: var(--tr-mono);
  text-transform: uppercase;
  color: var(--accent);
}
.fj-answers__v {
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text-invert);
  max-width: 34ch;
}

/* ---- network band: copy beside the graphic ------------------------------ */
.fj-netrow {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--s-10);
  align-items: center;
}
.fj-netrow__p {
  margin-top: var(--s-5);
  max-width: 58ch;
  color: var(--text-muted);
  font-size: var(--t-small);
  line-height: 1.6;
}
.fj-netrow__art { max-width: 26rem; justify-self: end; width: 100%; }
@media (max-width: 60rem) {
  .fj-netrow { grid-template-columns: minmax(0, 1fr); }
  .fj-netrow__art { display: none; }
}

/* the network lead was running seven narrow lines beside the graphic */
#network .sec-head { max-width: 60rem; }
#network .sec-head .lead { max-width: 54ch; }
