﻿/* affiliate.a77.ch — only what this page adds on top of a77.css.
   Tokens, type, buttons, sections and units all come from a77.css. */

/* margin, not a space: .head-mark is inline-flex, which drops the whitespace. */
.head-sub { font-weight: 600; color: var(--muted); letter-spacing: -0.01em; margin-left: .28em; }

/* ---- hero graphic: a chart instead of a77.ch's contours and rings -------
   The one visual that tells the two sites apart. Same stroke language and
   the same strength as the main site's hero; the grid sits a step quieter
   so the line reads first. Nodes are hollow (filled with the ground colour,
   so they work in both themes) except the last, which is solid. */
.hero-chart {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  color: var(--fg); opacity: .9; pointer-events: none;
}
/* The grid is its own layer with fixed 56px cells, not part of the SVG: inside
   a scaled SVG the cells stretched with the screen and were cut off at the edges. */
.hero-aff::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line-strong) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-strong) 1px, transparent 1px);
  background-size: 56px 56px;
}
/* Text stands on a clean ground: the grid and the chart live on the right and
   fade out before they reach the headline and the paragraph. */
.hero-aff::before, .hero-aff .hero-chart {
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 52%, #000 84%);
          mask-image: linear-gradient(90deg, transparent 0%, transparent 52%, #000 84%);
}
/* Phone: the desktop layout, narrower. Text on the left (~62% of the width),
   the chart on the right — the rising part of the desktop curve, in the same
   landscape proportion, centred on the first screen's height and fading out
   towards the text exactly as on desktop. */
.hero-chart-m { display: none; }
@media (max-width: 720px) {
  .hero-chart-d { display: none; }
  .hero-aff .hero-chart-m {
    display: block; inset: auto 0 auto auto; top: 50%; width: 74%; height: auto;
    aspect-ratio: 820 / 580; transform: translateY(-50%);
  }
  .hero-aff::before, .hero-aff .hero-chart-m {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 34%, #000 72%);
            mask-image: linear-gradient(90deg, transparent 0%, transparent 34%, #000 72%);
  }
  .hero-aff::before {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 52%, #000 82%);
            mask-image: linear-gradient(90deg, transparent 0%, transparent 52%, #000 82%);
  }
  /* .hero.hero-aff: must outrank `.hero .aff-h1` (max-width: 17ch) below. */
  .hero.hero-aff .idx, .hero.hero-aff .aff-h1, .hero.hero-aff .hero-note { max-width: 62%; }
  .hero.hero-aff .aff-h1 { font-size: clamp(2rem, 9.4vw, 2.6rem); }
  .hero-aff .hero-grid { border-top: 0; }
}/* The SVG is scaled to cover the hero, so without this the line would be ~1px
   on a phone and ~4px on a wide screen. Non-scaling keeps it 3.2px everywhere. */
.hero-chart path, .hero-chart circle { vector-effect: non-scaling-stroke; }
.hero-chart .hc-nodes circle { fill: var(--bg); }
.hero-chart .hc-nodes circle:last-child { fill: currentColor; }

/* .hero .aff-h1, not .aff-h1: a77.css sets `.hero h1` for the wordmark, which
   would otherwise win on specificity and blow this sentence up to 11rem. */
.hero .aff-h1, .aff-h1 {
  font-weight: 700; font-size: clamp(2.4rem, 6.2vw, 5rem); line-height: 0.94;
  letter-spacing: -0.045em; max-width: 17ch; margin-top: 6px;
}

/* ---- the two measured figures, side by side, as large as the row allows */
.figures {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}
.figure { padding: clamp(18px, 2.6vw, 30px) 0; }
.figure + .figure { border-left: 1px solid var(--line); padding-left: clamp(16px, 3vw, 40px); }
.figure b {
  display: block; font-weight: 700; font-size: clamp(3.4rem, 12vw, 9rem); line-height: 0.85;
  letter-spacing: -0.055em; font-variant-numeric: tabular-nums;
}
.figure span { display: block; margin-top: 12px; color: var(--muted); max-width: 22ch; }
@media (max-width: 560px) {
  .figures { grid-template-columns: 1fr; }
  .figure + .figure { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  /* Stacked, each figure owns the full row — same scale as .stat-figure on
     a77.ch, not the half-row size built for the two-column desktop layout. */
  .figure b { font-size: clamp(4.6rem, 21vw, 9rem); }
}

.did { margin-top: clamp(32px, 4vw, 52px); }
.did h3 {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.did-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.did-list li {
  padding-block: clamp(14px, 2vw, 20px); border-bottom: 1px solid var(--line);
  color: var(--muted); max-width: 64ch;
}
.did-list b { color: var(--fg); font-weight: 700; }
.small { font-size: 13px; margin-top: 16px; max-width: 60ch; }

/* ---- three steps ---------------------------------------------------------- */
.steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.steps li {
  display: grid; grid-template-columns: clamp(56px, 9vw, 110px) minmax(0, 1fr);
  gap: 16px; align-items: baseline;
  padding-block: clamp(16px, 2.4vw, 26px); border-bottom: 1px solid var(--line);
}
.steps b { font-weight: 700; font-size: clamp(1.8rem, 4.6vw, 3rem); letter-spacing: -0.04em; line-height: 1; }
.steps span { font-size: clamp(15px, 1.6vw, 18px); max-width: 52ch; }

/* ---- enquiry form ------------------------------------------------------------ */
.lead {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  margin-top: clamp(24px, 3vw, 36px);
  background: var(--line); border: 1px solid var(--line-strong);
}
.field { display: flex; flex-direction: column; background: var(--bg); padding: 14px 16px 12px; }
.field-wide { grid-column: 1 / -1; }
.field span {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.field em { font-style: normal; letter-spacing: 0.04em; text-transform: none; opacity: .75; }
.field input, .field textarea {
  margin-top: 6px; padding: 4px 0; border: 0; background: transparent; color: var(--fg);
  font: inherit; font-size: 17px; outline: none; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .6; }
.field:focus-within { background: var(--wash); }
.field.is-bad span { color: var(--fg); }
.field.is-bad span::after { content: " — needed"; }
.lead-foot {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--bg); padding: 16px;
}
.lead-status { color: var(--muted); font-size: 14px; }
.lead button[disabled] { opacity: .5; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-done a { border-bottom: 1px solid var(--fg); text-decoration: none; }
@media (max-width: 720px) { .lead { grid-template-columns: 1fr; } }

/* ---- the two quiet exits at the bottom ------------------------------------- */
.aside { padding-block: clamp(28px, 3.5vw, 44px); }
.aside-row { display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; color: var(--muted); }
.aside-row a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--fg); }
