/* WIFIGATE Host and WIFIGATE Manager heroes: the white line animation in the
   shared full-width hero. Same layers and copy as every use-case hero (media,
   overlay, top bar, text at the bottom start); only these two pages carry
   .niche-hero--line, and the light theme below is scoped to it. The text sits
   over the media layer, as it does over the video, on a white scrim that is
   limited to the text block, so the blue art stays at full strength elsewhere.
   A toggle in the pager collapses the text and its scrim. */
.niche-page .niche-hero.niche-hero--line { color: var(--home-ink); background: #fff; }
.niche-hero--line .niche-hero__media { container-type: size; background: #fff; }

/* The 16:9 art stage fills the media layer the way the video did: as wide as
   the hero allows and never cropped. From 769 px the hero is at least 16:9
   tall, so there the art spans the hero edge to edge. Where the hero is much
   taller than the art (phones, portrait tablets) the art rises to just below
   the top bar row instead of floating in the middle. This is pure CSS, so the
   first paint, the live animation and pages without JavaScript share one box. */
.niche-hero--line .line-hero__stage {
  --line-hero-w: min(100cqw, 100cqh * 16 / 9);
  --line-hero-h: calc(var(--line-hero-w) * 9 / 16);
  --line-hero-band: calc(clamp(1.5rem,4vh,2.75rem) + 44px + .75rem);
  position: absolute; z-index: 0;
  left: calc((100cqw - var(--line-hero-w)) / 2);
  top: min(calc((100cqh - var(--line-hero-h)) / 2), var(--line-hero-band));
  width: var(--line-hero-w);
  aspect-ratio: 16 / 9; margin: 0; overflow: hidden; background: #fff;
  /* Lines that run to the frame edge fade out instead of ending in a cut. */
  -webkit-mask-image: linear-gradient(90deg,transparent,#000 3%,#000 97%,transparent), linear-gradient(180deg,transparent,#000 4%,#000 96%,transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg,transparent,#000 3%,#000 97%,transparent), linear-gradient(180deg,transparent,#000 4%,#000 96%,transparent);
  mask-composite: intersect;
}
.niche-hero--line .line-hero__stage picture { display: contents; }
.niche-hero--line .line-hero__frame,
.niche-hero--line .line-hero__art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.niche-hero--line .line-hero__art { z-index: 1; background: #fff; }

/* The shared overlay layer stays but paints nothing: no wash over the art.
   The white scrim belongs to the text block itself (as wide as its text), so
   it starts just above the eyebrow and ends just past the longest line, and
   fades out at those two edges; the art around it keeps its full blue. */
.niche-page .niche-hero--line .niche-hero__overlay,
html[dir="rtl"] .niche-page .niche-hero--line .niche-hero__overlay { --niche-overlay-paint: none; background: none; }
.niche-hero--line .niche-hero__text { position: relative; width: fit-content; max-width: 100%; }
.niche-hero--line .niche-hero__text::before {
  --line-hero-scrim-fade: linear-gradient(270deg,transparent 0,rgba(0,0,0,.12) 2rem,rgba(0,0,0,.45) 4rem,rgba(0,0,0,.82) 6rem,#000 8rem);
  position: absolute; z-index: -1; content: ""; pointer-events: none;
  inset-block: -4rem -100vh; inset-inline: -100vw -7rem;
  background: rgba(255,255,255,.9);
  -webkit-mask-image: linear-gradient(180deg,transparent 0,rgba(0,0,0,.15) 1rem,rgba(0,0,0,.55) 2rem,rgba(0,0,0,.88) 3rem,#000 4rem), var(--line-hero-scrim-fade);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg,transparent 0,rgba(0,0,0,.15) 1rem,rgba(0,0,0,.55) 2rem,rgba(0,0,0,.88) 3rem,#000 4rem), var(--line-hero-scrim-fade);
  mask-composite: intersect;
}
html[dir="rtl"] .niche-hero--line .niche-hero__text::before { --line-hero-scrim-fade: linear-gradient(90deg,transparent 0,rgba(0,0,0,.12) 2rem,rgba(0,0,0,.45) 4rem,rgba(0,0,0,.82) 6rem,#000 8rem); }
/* The breadcrumb row keeps a small soft white backing of its own. */
.niche-hero--line .niche-breadcrumb { position: relative; }
.niche-hero--line .niche-breadcrumb::before {
  position: absolute; inset: -.6rem -1.25rem; z-index: -1; content: ""; pointer-events: none;
  border-radius: 999px; background: rgba(255,255,255,.88); filter: blur(6px);
}

/* Collapsed text: the eyebrow, title, lead and replay action and their scrim
   fade out but keep their place (no layout change, so the hero and the art do
   not move); hidden, they leave the tab order and the accessibility tree,
   except the h1: it stays in the document and, invisible under the faded
   block, in the accessibility tree, so the page keeps its heading. */
.niche-hero--line .niche-hero__text { transition: opacity .2s ease, visibility 0s linear 0s; }
.niche-hero--line[data-line-hero-text="collapsed"] .niche-hero__text {
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s;
}
.niche-hero--line[data-line-hero-text="collapsed"] .niche-hero__title { visibility: visible; }
.niche-hero--line.line-hero--instant .niche-hero__text { transition: none; }
@media (prefers-reduced-motion: reduce) { .niche-hero--line .niche-hero__text, .niche-hero--line[data-line-hero-text="collapsed"] .niche-hero__text { transition: none; } }
html.a11y-reduced-motion .niche-hero--line .niche-hero__text,
html.a11y-reduced-motion .niche-hero--line[data-line-hero-text="collapsed"] .niche-hero__text { transition: none; }
/* A white halo around the dark glyphs keeps every letter clear of the thin
   lines it may cross; on white it is invisible. */
.niche-hero--line :is(.niche-breadcrumb__list,.niche-hero__eyebrow,.niche-hero__title,.niche-hero__lead) {
  text-shadow: 0 0 1px #fff, 0 0 4px #fff, 0 0 10px #fff, 0 0 18px #fff;
}
/* White meets the next white section: the header's own hairline marks the edge. */
.niche-hero--line::after {
  position: absolute; inset: auto 0 0; z-index: 4; height: 1px; content: "";
  background: rgba(10,10,10,.1); pointer-events: none;
}

/* Dark ink on white; the grey labels keep 5:1 over the art under the scrim. */
.niche-hero--line .niche-breadcrumb__list { color: #4a4a4a; }
.niche-hero--line .niche-breadcrumb__item+.niche-breadcrumb__item::before { color: rgba(10,10,10,.45); }
.niche-hero--line .niche-breadcrumb__link { color: var(--home-ink); }
.niche-hero--line .niche-breadcrumb__link:is(:hover,:focus-visible) { color: var(--home-black); }
.niche-hero--line .niche-hero__text { color: var(--home-ink); }
.niche-hero--line .niche-hero__title { color: var(--home-black); }
.niche-hero--line .niche-hero__lead { color: #2b2b2b; }
/* Owner request (2026-11-15): a lead of one or two sentences stays on one line on wide screens. */
.niche-hero--line .niche-hero__lead { max-width: 58rem; }
.niche-hero--line .niche-hero__eyebrow { color: #4a4a4a; }
.niche-hero--line .niche-hero__nav-button { color: var(--home-black); border-color: rgba(10,10,10,.55); background: rgba(255,255,255,.9); }
.niche-hero--line .niche-hero__nav-button:is(:hover,:focus-visible) { border-color: var(--home-black); background: #f1f4f9; }

/* The single primary action (replay) becomes the dark button. */
.niche-page .niche-hero.niche-hero--line .btn--primary { color: #fff; border: 1px solid var(--home-black); background: var(--home-black); }
.niche-page .niche-hero.niche-hero--line .btn--primary:is(:hover,:focus-visible) { color: #fff; border-color: #2b2b2b; background: #2b2b2b; transform: none; }
.niche-page .niche-hero.niche-hero--line .btn--ghost { color: var(--home-black); border: 1px solid rgba(10,10,10,.55); background: rgba(255,255,255,.7); }
.niche-page .niche-hero.niche-hero--line .btn--ghost:is(:hover,:focus-visible) { color: var(--home-black); border-color: var(--home-black); background: #f1f4f9; transform: none; }
.niche-hero--line .niche-hero__actions [data-scene-replay] { min-height: 44px; cursor: pointer; font: inherit; }
/* Replay is the dark icon button in the top bar, beside pause and the text toggle. */
.niche-hero--line .scene-video-controls [data-scene-replay] {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; padding: 0; border-radius: 4px; cursor: pointer;
  color: #fff; border: 1px solid var(--home-black); background: var(--home-black);
}
.niche-hero--line .scene-video-controls [data-scene-replay]:is(:hover,:focus-visible) { border-color: #2b2b2b; background: #2b2b2b; }
.niche-hero--line .scene-replay-icon {
  display: block; width: 21px; height: 21px; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.niche-hero--line :is(.btn,[data-scene-pause],[data-scene-replay],[data-hero-text-toggle],.niche-breadcrumb__link):focus-visible { outline: 3px solid var(--home-blue); outline-offset: 3px; }

/* Pause/resume sits in the top bar's pager, as on the video heroes, with the
   text toggle beside it in the same 44 px light button style. */
.niche-hero--line .scene-video-controls { display: flex; gap: .5rem; }
.niche-hero--line :is([data-scene-pause],[data-hero-text-toggle]) {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; padding: 0; border-radius: 4px; font-size: 0; cursor: pointer;
  color: var(--home-black); border: 1px solid rgba(10,10,10,.55); background: rgba(255,255,255,.92);
}
.niche-hero--line :is([data-scene-pause],[data-hero-text-toggle]):hover { border-color: var(--home-black); background: #f1f4f9; }
.niche-hero--line :is([data-scene-pause],[data-hero-text-toggle])[hidden] { display: none; }
.niche-hero--line .line-hero__toggle-icon {
  width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.niche-hero--line [data-hero-text-toggle][aria-expanded="true"] .line-hero__toggle-show,
.niche-hero--line [data-hero-text-toggle][aria-expanded="false"] .line-hero__toggle-hide { display: none; }
.niche-hero--line [data-scene-pause][aria-pressed="true"]::before {
  content: ""; width: 0; height: 0; margin-inline-start: 2px;
  border-style: solid; border-width: 7px 0 7px 10px; border-color: transparent transparent transparent currentColor;
}
.niche-hero--line [data-scene-pause]:not([aria-pressed="true"])::before {
  content: ""; width: 10px; height: 14px; box-sizing: border-box;
  border-inline: 3px solid currentColor;
}

@media (max-width:768px) {
  /* Phones: the art sits in the upper band and the text block spans the
     width, so its scrim runs edge to edge below a soft top edge and leaves
     the art above it at full strength. */
  .niche-hero--line .niche-hero__text { width: 100%; }
  /* Short phone screens (2026-11-16, reported on a Galaxy S24 Ultra): the text
     never rises over the art. The art (full width, 16:9) sits just below the
     top bar; the text starts below it and its scrim's soft top edge, and the
     hero grows instead of letting the two overlap. On taller screens the text
     still sits at the bottom of the hero, as before. */
  .niche-page .niche-hero.niche-hero--line { height: auto; max-height: none; }
  .niche-hero--line .niche-hero__content { height: auto; min-height: max(560px, min(780px, calc(100svh - 6.5rem))); }
  .niche-hero--line .niche-hero__content > .niche-hero__text { margin-top: calc(100vw * 9 / 16 + 3.25rem); }
  .niche-hero--line .niche-hero__text::before,
  html[dir="rtl"] .niche-hero--line .niche-hero__text::before {
    inset: -2.5rem -100vw -100vh; -webkit-mask-image: none; mask-image: none;
    background: linear-gradient(180deg,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 2.5rem,rgba(255,255,255,.94) 100%);
  }
}

@media (min-width:769px) {
  /* Desktop and tablets stack like phones: the top bar row, then the art,
     then the text on white below it, so the text never covers the animation.
     The art band takes what the screen leaves after the text (never less
     than 340 px, never more than 16:9 of the width) and the hero grows to
     fit, instead of the art filling one screen under the text. */
  .niche-page .niche-hero.niche-hero--line {
    --line-hero-art-h: clamp(340px, calc(100svh - var(--nav-height) - 22rem), 56.25vw);
    height: auto; min-height: 0; max-height: none;
  }
  .niche-hero--line .niche-hero__content { height: auto; justify-content: flex-start; }
  .niche-hero--line .niche-hero__topbar { margin-block-end: calc(.75rem + var(--line-hero-art-h) + clamp(1.25rem,3vh,2rem)); }
  .niche-hero--line .line-hero__stage {
    --line-hero-w: min(100cqw, var(--line-hero-art-h) * 16 / 9);
    top: var(--line-hero-band); left: calc((100cqw - var(--line-hero-w)) / 2);
  }
  /* The text sits on white, so it needs no scrim over the art. */
  .niche-hero--line .niche-hero__text::before { content: none; }
}

@media print {
  .niche-hero--line .line-hero__art { display: none; }
}
