/* ==========================================================================
   .blue-field: the Signals deep-blue field as a static, CSS-only panel that
   dissolves into the page (light grey or charcoal) with no edge, border,
   radius or shadow. For animated panels use js/motifs.js (palette 'panel',
   feather on by default), which draws the same field and fade in canvas.

   Usage: <div class="blue-field"> ...content... </div>
   Keep content inside the opaque core: the default padding insets it ~13%
   on each side. Tune with --blue-field-core (where the fade starts, % of the
   ellipse radius) and --blue-field-pad.
   ========================================================================== */

.blue-field {
  --blue-field-core: 60%;
  --blue-field-pad: 13% 14%;
  position: relative;
  isolation: isolate;
  padding: var(--blue-field-pad);
  color: #eaf6ff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  /* Faint stars (a few seeded-looking dots), the radial glow and the deep field. */
  background:
    radial-gradient(1px 1px at 18% 30%, rgba(216, 236, 255, .55), transparent 70%),
    radial-gradient(1px 1px at 72% 22%, rgba(159, 230, 255, .5), transparent 70%),
    radial-gradient(1.2px 1.2px at 63% 74%, rgba(216, 236, 255, .45), transparent 70%),
    radial-gradient(1px 1px at 34% 68%, rgba(255, 230, 196, .4), transparent 70%),
    radial-gradient(1px 1px at 84% 52%, rgba(216, 236, 255, .4), transparent 70%),
    radial-gradient(1px 1px at 46% 18%, rgba(159, 230, 255, .35), transparent 70%),
    radial-gradient(1px 1px at 26% 50%, rgba(216, 236, 255, .3), transparent 70%),
    radial-gradient(ellipse 60% 60% at 50% 47%, rgba(18, 59, 122, .66) 0%, rgba(18, 59, 122, .5) 50%, rgba(14, 47, 102, .85) 100%),
    #010a1b;
  /* The feather and rim: see .feather-field below (shared). */
}

/* A motif canvas inside a .blue-field already feathers itself: let it fill the panel edge to edge. */
.blue-field > .motif-fill {
  position: absolute;
  inset: 0;
}

/* --- .feather-field: the corrected feather for every blue field (owner, 2026-11-09, second pass) ------------
   Blue fields are broad bands the page sits in, not ovals: the alpha falls off mainly at the top and bottom
   (--ff-y) and only softly at the far left and right (--ff-x). And no grey ring: before the alpha drops, the
   colour itself rises from the deep field (#010A1B / #123B7A) to a light steel blue (rgb 90,128,166), so the
   rim is pale blue melting into the page grey, never dark navy at half alpha (which reads as a grey/brown
   halo). The rim tint is the ::after layer (over the field's own canvas, under the copy); the mask fades it.
   Used by .blue-field, .brand-panel fields (Signals AI hero and brain band, Software), the Speech Health
   Lab band, the Research platform block, the 404 panel and the product card visuals. */
.feather-field,
.blue-field {
  --ff-y: 22%;
  --ff-x: 7%;
  --ff-rim: 82, 130, 194;
  --ff-mid: 18, 59, 122;
  position: relative;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0, rgba(0,0,0,.35) calc(var(--ff-y) * .35), rgba(0,0,0,.8) calc(var(--ff-y) * .7), #000 var(--ff-y), #000 calc(100% - var(--ff-y)), rgba(0,0,0,.8) calc(100% - var(--ff-y) * .7), rgba(0,0,0,.35) calc(100% - var(--ff-y) * .35), transparent 100%),
    linear-gradient(to right, transparent 0, rgba(0,0,0,.6) calc(var(--ff-x) * .45), #000 var(--ff-x), #000 calc(100% - var(--ff-x)), rgba(0,0,0,.6) calc(100% - var(--ff-x) * .45), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0, rgba(0,0,0,.35) calc(var(--ff-y) * .35), rgba(0,0,0,.8) calc(var(--ff-y) * .7), #000 var(--ff-y), #000 calc(100% - var(--ff-y)), rgba(0,0,0,.8) calc(100% - var(--ff-y) * .7), rgba(0,0,0,.35) calc(100% - var(--ff-y) * .35), transparent 100%),
    linear-gradient(to right, transparent 0, rgba(0,0,0,.6) calc(var(--ff-x) * .45), #000 var(--ff-x), #000 calc(100% - var(--ff-x)), rgba(0,0,0,.6) calc(100% - var(--ff-x) * .45), transparent 100%);
  mask-composite: intersect;
}

.feather-field::after,
.blue-field::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      rgba(var(--ff-rim), 1) 0, rgba(var(--ff-rim), .75) calc(var(--ff-y) * .35), rgba(var(--ff-mid), .45) calc(var(--ff-y) * .8),
      rgba(var(--ff-mid), 0) calc(var(--ff-y) * 1.5), rgba(var(--ff-mid), 0) calc(100% - var(--ff-y) * 1.5),
      rgba(var(--ff-mid), .45) calc(100% - var(--ff-y) * .8), rgba(var(--ff-rim), .75) calc(100% - var(--ff-y) * .35), rgba(var(--ff-rim), 1) 100%),
    linear-gradient(to right,
      rgba(var(--ff-rim), .9) 0, rgba(var(--ff-mid), .35) var(--ff-x), rgba(var(--ff-mid), 0) calc(var(--ff-x) * 2.2),
      rgba(var(--ff-mid), 0) calc(100% - var(--ff-x) * 2.2), rgba(var(--ff-mid), .35) calc(100% - var(--ff-x)), rgba(var(--ff-rim), .9) 100%);
}

/* Positioned copy inside a field stays above the rim layer (canvases and pictures stay under it). */
.feather-field > :not(canvas):not(picture):not(.brand-media):not(.motif-fill),
.blue-field > :not(canvas):not(picture):not(.motif-fill) { z-index: 2; }

/* Charcoal mode: a deeper steel rim, so the field melts into the charcoal instead of glowing pale. */
:root[data-theme="dark"] .feather-field,
:root[data-theme="dark"] .blue-field { --ff-rim: 38, 66, 102; }

@media (max-width: 760px) {
  .feather-field, .blue-field { --ff-y: 16%; --ff-x: 4%; }
}
