/* Nember homepage: sections that flow into each other instead of stacking as boxes.
   - The tinted bands (heat calculator, principles) fade in and out instead of
     ending on a hard line, and their warm glow reaches into the neighbours.
   - Heat "rises": the glow under "From watts to warmth" climbs into the next
     section while you scroll (motion.js sets --rise; without it the glow stays put).
   - The heat calculator reaches over the edge of its band into the next section.
   - The network strip is a raised panel instead of a ruled band. */

/* ---- soft bands ---------------------------------------------------------- */
.heat-sec, .principles-sec { background: none; position: relative; isolation: isolate; }
.heat-sec::before, .principles-sec::before {
  content: ""; position: absolute; inset: -90px 0; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 150px, #000 calc(100% - 150px), transparent);
  mask-image: linear-gradient(180deg, transparent, #000 150px, #000 calc(100% - 150px), transparent);
}
.heat-sec::before {
  background:
    radial-gradient(640px 420px at 20% 80%, rgba(255, 106, 43, calc(.05 + var(--heatk, .1) * .22)), transparent 70%),
    radial-gradient(520px 300px at 85% 30%, rgba(245, 165, 36, .06), transparent 70%),
    var(--slate-2);
}
.principles-sec::before {
  background: var(--slate-2);
}

/* ---- rising heat between "From watts to warmth" and the cards ------------- */
.flow-sec { background: none; position: relative; isolation: isolate; }
.flow-sec::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -220px; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(760px 300px at 50% 60%, rgba(255, 106, 43, .10), rgba(245, 165, 36, .03) 55%, transparent 75%);
  transform: translateY(calc(var(--rise, 0) * -90px));
  opacity: calc(.55 + var(--rise, 0) * .45);
}
#gpus { position: relative; z-index: 0; }

/* ---- the calculator crosses the bottom edge of its band ------------------- */
@media (min-width: 901px) {
  .heat-sec .calc { position: relative; z-index: 2; margin-bottom: -110px; box-shadow: 0 34px 70px -28px rgba(0, 0, 0, .75), 0 0 0 1px rgba(245, 165, 36, .12); }
  .heat-sec + .start-sec { padding-top: calc(var(--gap) + 70px); }
}

/* ---- the network strip becomes a raised panel ------------------------------ */
.stats { border-top: 0; background: none; padding: 8px 0 var(--gap); }
.stats > .wrap {
  padding-top: 26px; padding-bottom: 28px; border-radius: 14px; border: 1px solid var(--slate);
  background: linear-gradient(180deg, rgba(42, 46, 53, .55), rgba(28, 31, 36, .35));
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .8);
}
@media (max-width: 1128px) { .stats > .wrap { margin-left: 16px; margin-right: 16px; } }

/* ---- grids that drift (motion.js sets --dy per item on wide screens) ------- */
.gs .drift { translate: 0 var(--dy, 0px); }

/* ---- phones: controls large enough to tap, chart text large enough to read ---- */
@media (max-width: 760px) {
  .seg button { min-height: 40px; padding: 4px 14px; font-size: .85rem; }
  .copy { min-height: 36px; padding: 6px 14px; font-size: .8rem; }
  .mf-os button { min-height: 44px; }
  /* the range keeps its thin track; the padding only widens the area a finger can hit */
  .slider input[type=range] { height: 36px; padding: 14px 0; background-clip: content-box; margin: 0; }
  .footer-col a { padding: 6px 0; }
  .footer-col { gap: 2px; }
  /* the chart is drawn at 640 units and shrinks to ~280 px: lift the text so it stays readable */
  .chart text { font-size: 20px; }
  .chart .label.strong { font-size: 20px; }
  .chart .label:not(.strong), .chart .axis-title { display: none; }
  .draw-read { font-size: 20px; }
}

/* ---- phones: the pool-operator and name details stay on wider screens and in the docs ---- */
@media (max-width: 760px) {
  #integrate .codewin { display: none; }      /* example RPC output: the docs page has the same */
  #integrate .int p { display: none; }        /* headings say enough on a phone */
  #integrate .int { padding: 14px 16px; }
  .name-sec .name-mark { display: none; }     /* the logo is already in the header */
}
