/* ==========================================================================
   Redix Digital: the free tools (tools.html, tools/build-tools.js)
   In the design of the home page: v2.css draws the bar, the menu, the footer,
   the section titles and the direct ways; page.css puts the home page's sky
   behind it all. The opening and the end stand on the sky, the tools between
   them on a band of deeper night, so no two sections that meet look the same.
   Every tool is a ruled row, not a card: its name and what it does on one
   side, what it gives and the way in on the other.
   ========================================================================== */

.tl > section {
  position: relative;
  padding: clamp(72px, 12vh, 140px) var(--pad);
}

.tl > section > * {
  position: relative;
  z-index: 3;
}

/* --- The opening ---------------------------------------------------------------------------- */

.tl > .tl-top {
  padding: calc(76px + clamp(40px, 10vh, 112px) - 50px) var(--pad) clamp(64px, 12vh, 132px);
}

.tl-head { max-width: 46rem; }

@media (min-width: 768px) and (max-height: 800px) {
  .tl-head::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -60px calc(-1 * var(--pad));
    background: radial-gradient(closest-side, rgba(7, 11, 26, 0.66) 60%, rgba(7, 11, 26, 0) 100%);
    pointer-events: none;
  }
}

/* The opening line of the home page, in its grammar: the light line first, then the bold one */
.tl-title {
  margin: 0;
  font-size: clamp(2.75rem, 5.6vw, 6rem);
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.tl-title span { display: block; }
.tl-title span:first-child { font-weight: 200; color: var(--title-thin); }
.tl-title span:last-child { font-weight: 800; color: var(--text); }

.tl-lead {
  max-width: 30em;
  margin: clamp(20px, 4vh, 36px) 0 0;
  padding-top: clamp(16px, 3vh, 26px);
  border-top: 1px solid var(--line);
  font-size: clamp(1.0625rem, 1.3vw, 1.3125rem);
  font-weight: 300;
  color: var(--text-mid);
  text-wrap: pretty;
}

/* --- The tools: one ruled row each, on the band ---------------------------------------------- */

.tl-list { background: var(--veil); }

.tl-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(28px, 5vw, 90px);
  align-items: start;
  max-width: 1180px;
  padding: clamp(32px, 6vh, 64px) 0;
  border-top: 2px solid rgba(125, 240, 244, 0.55);
}

.tl-tool + .tl-tool { margin-top: clamp(16px, 3vh, 32px); }

.tl-name {
  margin: 0;
  font-size: clamp(1.875rem, 3.2vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.tl-name a {
  color: inherit;
  text-decoration: none;
}

.tl-name a:hover { color: var(--cyan-hi); }

.tl-who {
  margin: clamp(10px, 1.8vh, 16px) 0 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--cyan-hi);
}

.tl-text {
  max-width: 30em;
  margin: clamp(12px, 2.2vh, 20px) 0 0;
  font-size: clamp(1.0625rem, 1.25vw, 1.25rem);
  font-weight: 300;
  color: var(--text-mid);
  text-wrap: pretty;
}

.tl-points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tl-points li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(14px, 2.4vh, 20px) 0;
  border-top: 1px solid var(--line);
  font-size: clamp(1.0625rem, 1.2vw, 1.1875rem);
}

.tl-points li:last-child { border-bottom: 1px solid var(--line); }

.tl-points svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 0.2em;
  color: var(--cyan-hi);
}

.tl-tool__body .btn { margin-top: clamp(22px, 4vh, 34px); }

/* --- The end ------------------------------------------------------------------------------- */

.tl > .tl-end { padding-bottom: clamp(96px, 16vh, 180px); }
.tl-end .reach { margin-top: clamp(20px, 4vh, 36px); }

.tl-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 4.4vh, 40px);
}

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

@media (max-width: 899px) {
  /* Down here the words stand on the bright line of the horizon, so they get a deeper night of
     their own, behind them only, soft at its edges (as the opening of the consult page does) */
  .tl-head::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -64px calc(-1 * var(--pad)) -70px;
    background: linear-gradient(180deg, rgba(7, 11, 26, 0) 0, rgba(7, 11, 26, 0.6) 64px, rgba(7, 11, 26, 0.6) calc(100% - 70px), rgba(7, 11, 26, 0) 100%);
    pointer-events: none;
  }

  .tl-tool { grid-template-columns: minmax(0, 1fr); }
  .tl-tool__body { margin-top: clamp(22px, 4vh, 32px); }
}

@media (max-width: 767px) {
  .tl > .tl-top { padding-top: calc(64px + clamp(32px, 7vh, 64px) - 34px); }
}

@media (max-width: 560px) {
  .tl-tool__body .btn,
  .tl-cta .btn { width: 100%; }
}

/* --- The colour modes of the accessibility menu, and the system's forced colours ---------------
   The band of night goes, and the dark pool behind the opening with it */

html:is(.a11y-contrast, .a11y-negative, .a11y-light) .tl-list { background: none; }
html:is(.a11y-contrast, .a11y-negative, .a11y-light) .tl-head::before { display: none; }
html:is(.a11y-contrast, .a11y-negative, .a11y-light) .tl-tool { border-top-color: currentColor; }

@media (forced-colors: active) {
  .tl-head::before { display: none; }
  .tl-tool { border-top-color: CanvasText; }
}
