/* Cichocki Advisory — section ambient SYSTEM (metaphor layer)
   Ported from threadsync's sov-ambient-system, with three deliberate changes.

   1) PALETTE. This site is crimson (#B23A4B / #C24D5E / #D06A76) and gold
      (#C9A15E / #D8BE86) on a slate-black ground. ThreadSync's blue+emerald
      must never appear here; the two sites share sovereignty-base.css, so a
      colour added there would change both. Everything below lives in this
      file alone.

   2) SECTIONS, NOT THE HERO. The hero already carries art (the truss). What
      was flat was everything below it: ten sections all repeating the same
      radial-gradient. So the hook is a section attribute, not a hero class.

   3) ONE PSEUDO-ELEMENT. Scrim, dimming wash, and artwork are three layers of
      a single ::before background stack rather than ::before + ::after. That
      leaves ::after free for whatever the site wants later, and it keeps the
      scrim and the artwork in one place where they cannot drift apart.

   METAPHOR CONTRACT — the point of the artwork is comprehension, not decor.
   Each image argues the section's claim to someone who has not yet decided
   they care:
     converging-joint  three different members welded into one load-bearing
                       joint            = governance + software + evidence
     single-thread     one gold thread drawn clear of a dark weave
                       = start with ONE real workflow
     strata-record     stacked layers, each edge separately readable
                       = an operating model that leaves a record you can read back
     keystone          the one stone that is holding the arch up
                       = the decision that has to bear the load
   If the copy in a section changes so the metaphor no longer argues its claim,
   change the metaphor. A picture that no longer matches its paragraph is worse
   than no picture.

   ACCESSIBILITY CONTRACT — read before changing:
   contrast is a property of THIS CSS, never of the artwork. The dimming wash
   is a background layer, not element opacity — opacity would dim the scrim too
   and make text protection depend on how bright the image happened to be. The
   scrim is the topmost background layer and is applied at full strength. */

.sov-cichocki section[data-ambient]{
  position:relative;
  isolation:isolate;

  /* DEFAULT SCRIM = copy sits in a LEFT column on every section below the
     hero, so the left half stays near-solid and the artwork is allowed to
     breathe on the right.

     This MUST be declared on the section, not on ::before. A custom property
     set in the ::before rule wins over the value inherited from the section,
     so a per-theme override (keystone's centred radial) would silently never
     apply -- it would still render, just with the wrong scrim. */
  --amb-scrim:
    linear-gradient(180deg,
      rgba(10,11,15,.93) 0%,
      rgba(10,11,15,.86) 22%,
      rgba(10,11,15,.30) 44%,
      rgba(10,11,15,0)   62%),
    linear-gradient(90deg,
      rgba(10,11,15,.96) 0%,
      rgba(10,11,15,.90) 34%,
      rgba(10,11,15,.66) 56%,
      rgba(10,11,15,.30) 78%,
      rgba(10,11,15,.10) 100%);
}

.sov-cichocki section[data-ambient]::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;

  /* topmost first: scrim, then dimming wash, then the artwork itself */
  background-image:
    var(--amb-scrim),
    linear-gradient(0deg,
      rgba(10,11,15,var(--amb-wash,.62)),
      rgba(10,11,15,var(--amb-wash,.62))),
    var(--amb-src,none);
  background-size:cover,cover,cover,cover;
  background-position:center,center,center,var(--amb-pos,72% 50%);
  background-repeat:no-repeat,no-repeat,no-repeat,no-repeat;
}

/* Content must sit above the artwork. .sov-wrap is the section's inner
   container on every section of this page. */
.sov-cichocki section[data-ambient] > .sov-wrap{
  position:relative;
  z-index:1;
}

/* Cards keep their own ground so body copy never lands directly on artwork. */
.sov-cichocki section[data-ambient] .sov-card{
  position:relative;
  z-index:1;
}

/* ── themes ─────────────────────────────────────────────────────────────
   Adding a fifth metaphor is four lines here plus two image files — not a
   new stylesheet and not a new cache entry. */

/* governance + software + evidence, welded into one joint.
   Sparse frame (58% near-black), so it needs less dimming than the others. */
.sov-cichocki section[data-ambient="converging-joint"]{
  --amb-src:url("/assets/img/amb-converging-joint-1600w.webp");
  --amb-wash:.55;
  --amb-pos:70% 44%;
}

/* one workflow, drawn clear of the weave. */
.sov-cichocki section[data-ambient="single-thread"]{
  --amb-src:url("/assets/img/amb-single-thread-1600w.webp");
  --amb-wash:.65;
  --amb-pos:62% 50%;
}

/* the record, in readable layers. Bright edge-to-edge (mean luminance 36 of
   255 against ~24 for the others), so it carries a markedly heavier wash —
   the same wash that suits the sparse frames would wash this section out. */
.sov-cichocki section[data-ambient="strata-record"]{
  --amb-src:url("/assets/img/amb-strata-record-1600w.webp");
  --amb-wash:.80;
  --amb-pos:58% 50%;
}

/* the decision that bears the load. Closing section, copy is CENTRED, so the
   left-column scrim would protect the wrong part of the frame. */
.sov-cichocki section[data-ambient="keystone"]{
  --amb-src:url("/assets/img/amb-keystone-1600w.webp");
  --amb-wash:.46;
  --amb-pos:56% 40%;
  --amb-scrim:radial-gradient(112% 92% at 50% 48%,
    rgba(10,11,15,.90) 0%,
    rgba(10,11,15,.78) 42%,
    rgba(10,11,15,.40) 74%,
    rgba(10,11,15,.08) 100%);
}

/* ── narrow viewports ───────────────────────────────────────────────────
   Stacked layout puts copy across the FULL width, so a left-to-right scrim
   protects nothing. Switch to a vertical scrim and serve the 700w files. */
@media (max-width:820px){
  .sov-cichocki section[data-ambient]{
    /* on the section for the same cascade reason as the default above */
    --amb-scrim:linear-gradient(180deg,
      rgba(10,11,15,.94) 0%,
      rgba(10,11,15,.88) 50%,
      rgba(10,11,15,.94) 100%);
  }
  .sov-cichocki section[data-ambient]::before{
    background-position:center,center,center,50% 50%;
  }
  .sov-cichocki section[data-ambient="converging-joint"]{--amb-src:url("/assets/img/amb-converging-joint-700w.webp")}
  .sov-cichocki section[data-ambient="single-thread"]   {--amb-src:url("/assets/img/amb-single-thread-700w.webp")}
  .sov-cichocki section[data-ambient="strata-record"]   {--amb-src:url("/assets/img/amb-strata-record-700w.webp")}
  .sov-cichocki section[data-ambient="keystone"]        {--amb-src:url("/assets/img/amb-keystone-700w.webp")}
}

/* ── stated preferences win over art direction ──────────────────────────
   Both of these drop the artwork entirely rather than dimming it further:
   a high-contrast or reduced-transparency reader has asked for a plain
   ground, and a very dark photograph is still a photograph. */
@media (prefers-contrast:more){
  .sov-cichocki section[data-ambient]::before{
    background-image:linear-gradient(0deg,#0A0B0F,#0A0B0F);
  }
}
@media (prefers-reduced-transparency:reduce){
  .sov-cichocki section[data-ambient]::before{
    background-image:linear-gradient(0deg,#0A0B0F,#0A0B0F);
  }
}

/* Print: artwork is ink with no informational content. */
@media print{
  .sov-cichocki section[data-ambient]::before{display:none}
}
