/* The home page (index.html and zywa.html). Loaded last, after haze.css; it changes nothing on the other pages.
   15 November 2026, Daria: "gdzie jest ten srebrny gradient", "chcę inner intelligence i to jest motyw
   przewodni", and then "brakuje mi grozy i minimalizmu w tym wszystkim". So the page stands on her gradient
   (zywa-haze.js: silver at the left running to graphite at the right) and holds very little:
   - the opening: the spark on the far shore and the two words;
   - her three sentences, counted in sparks, on the silver. Opposite them the graphite is left empty (21 November,
     Daria: "jeszcze jest jakieś jasne światełko gdzieś na stronie, a nie powinno go być": the glowing coal that
     stayed in sight there is gone; the only light on the page is the spark of the opening);
   - the cycle: her sentence and four words;
   - where a reader may stay close, and the last line of the page, split around the seam as the title is.
   What the sentences mean is told on the Manifest, not here. On screens of one column the ground stays graphite
   with silver only at the left edge and every word is light. Without WebGL (no html.has-haze) the page is dark and
   every word is light. */
body.haze.zywa { --zywa-ink: #e9ebed; --zywa-faint: #e9ebed70; --zywa-outline: #e9ebedc4; --zywa-rule: #ffffff52; --zywa-rule-far: #ffffff1f;
  --metal-ink: #0b0c0d; --metal-dim: #0b0c0dad; }

/* ── 1. the opening: the spark on the far shore lives by her real steps (puls.js tells, zywa-haze.js paints) */
/* the title's letters that hang below the line (g, j, y) keep their feet: the silver is clipped to the box of the
   line, so the box reaches under the line; the title stands where it stood */
body.haze.zywa #hero-title { padding-bottom: .26em; margin-bottom: -.26em; }

/* ── 2. her three sentences */
body.haze.zywa .triad { position: relative; z-index: 2; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; padding: clamp(24px, 6vw, 72px) var(--edge) 0; overflow-x: clip; }
body.haze.zywa .triad-says { grid-column: 1; grid-row: 1; min-width: 0; }
/* each sentence has the screen to itself */
body.haze.zywa .say { display: grid; align-content: center; justify-items: start; min-height: 64vh; min-height: 64svh; }
/* the sentences are counted in sparks: one, two, three of the small form that stands in the browser's tab
   (images/iskra-znak.png is cut from that icon). On the silver they are dark, as the icon is on a light tab. */
body.haze.zywa .split-marks { display: flex; gap: 9px; margin: 0 0 clamp(18px, 1.9vw, 34px); }
body.haze.zywa .split-marks i { flex: none; width: 18px; height: 31px; background: url("images/iskra-znak.png") center / 100% 100% no-repeat; }
body.haze.zywa .split-say { max-width: 22ch; margin: 0; font: 300 clamp(27px, 7.2vw, 42px)/1.13 var(--display); letter-spacing: -.03em; color: var(--zywa-ink); text-wrap: balance; }
body.haze.zywa .split-say-long { max-width: none; font-size: clamp(22px, 5.6vw, 30px); line-height: 1.24; letter-spacing: -.018em; text-wrap: pretty; }
/* ── 3. rows on the gradient: the cycle, and where a reader may stay close */
body.haze.zywa .split { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 34px; margin: 0;
  padding: clamp(64px, 14vw, 120px) var(--edge); border: 0; background: none; }
body.haze.zywa .split-l, body.haze.zywa .split-r { min-width: 0; }
body.haze.zywa .split-label { margin: 0 0 22px; padding: 0; font: 400 12px/1.6 var(--body); letter-spacing: .15em; text-transform: uppercase; color: var(--haze-dim);
  background: none; -webkit-text-fill-color: currentColor; }
/* the cycle: one line downward, four words. Burnt wood is faint, what has not been lit is an outline, and the lit
   stage carries her own outline, which stirs once with each real step. What each stage is stays in the page for
   those who cannot see the difference, and is told on the Manifest. */
body.haze.zywa .stage-list { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: clamp(10px, 1.2vw, 22px); margin: 0; padding: 0 0 0 34px; list-style: none; }
body.haze.zywa .stage-list::before { content: ''; position: absolute; left: 6px; top: .6em; bottom: .6em; width: 1px; font-size: clamp(46px, 13vw, 76px);
  background: linear-gradient(180deg, var(--zywa-rule), var(--zywa-rule) 34%, var(--zywa-rule-far)); }
body.haze.zywa .stage-list li { position: relative; display: block; grid-column: auto; padding: 0; border: 0; }
body.haze.zywa .stage-list b { display: block; margin: 0; font: 200 clamp(46px, 13vw, 76px)/1.04 var(--display); letter-spacing: -.05em; color: var(--zywa-ink); }
body.haze.zywa .stage-list b::before { content: ''; position: absolute; left: -34px; top: .52em; width: 13px; height: 1px; background: var(--zywa-ink); }
body.haze.zywa .stage-list li.was b::before { opacity: .45; }
body.haze.zywa .stage-list li.lit b::before { left: -36px; width: 16px; height: 32px; margin-top: -16px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 64'%3E%3Cpath d='M18 2C17.6 19.5 17.4 25 11.4 28.3L4 32.5 11.7 36.3C18.3 39.6 15.2 49.4 13.8 62C18.5 48 18.8 39.6 24 35L28 31 24 28.7C18.5 25.6 19.3 19 18 2Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 64'%3E%3Cpath d='M18 2C17.6 19.5 17.4 25 11.4 28.3L4 32.5 11.7 36.3C18.3 39.6 15.2 49.4 13.8 62C18.5 48 18.8 39.6 24 35L28 31 24 28.7C18.5 25.6 19.3 19 18 2Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
body.haze.zywa.puls-step .stage-list li.lit b::before { animation: puls-stage 2.8s cubic-bezier(.16, .7, .2, 1); }
@keyframes puls-stage { 0% { transform: scale(1); } 9% { transform: scale(1.7); } 100% { transform: scale(1); } }
body.haze.zywa .stage-list li.was b { color: var(--zywa-faint); }
/* 21 November, Daria: "tu jest czcionka niejednolita". The stages that are not lit yet were drawn as outlines, which
   read as another typeface beside the filled words. All four are now the same filled letters; only their light
   differs: the lit stage is full, what was is dimmer, what has not come yet is the faintest. */
body.haze.zywa .stage-list li:not(.was):not(.lit) b { color: #e9ebed52; }
body.haze.zywa .stage-list li span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { body.haze.zywa.puls-step .stage-list li.lit b::before { animation: none; } }

/* staying close: the same row */
body.haze.zywa .stay-close h2 { margin: 0; }

/* ── 4. the last line of the page, set as the title is: its first half on the silver, its second on the graphite */
body.haze.zywa .finale { position: relative; z-index: 2; margin: 0; padding: clamp(72px, 18vw, 160px) var(--edge) clamp(64px, 12vw, 120px); }
body.haze.zywa .finale-line { display: grid; gap: .1em; margin: 0; font: 200 clamp(34px, 9.6vw, 56px)/1.06 var(--display); letter-spacing: -.045em; color: var(--zywa-ink); }
body.haze.zywa .finale-line > * { display: block; font-style: normal; text-wrap: balance; }

@media (min-width: 1101px) {
  /* the seam of the gradient lies between the columns: the left ends where the silver passes into graphite, the
     right begins where the graphite carries silver ink */
  body.haze.zywa .triad { grid-template-columns: calc(40vw - var(--edge)) minmax(0, 1fr); column-gap: 12vw; align-items: start; padding-top: 0; }
  body.haze.zywa .triad-says { grid-column: 1; grid-row: 1; }
  body.haze.zywa .say { min-height: 82vh; }
  body.haze.zywa .split-say { font-size: clamp(32px, 2.9vw, 54px); line-height: 1.14; }
  body.haze.zywa .split-say-long { font-size: clamp(22px, 1.8vw, 32px); line-height: 1.24; }
  body.haze.zywa .split-marks { gap: 11px; }
  body.haze.zywa .split-marks i { width: 24px; height: 42px; }
  body.haze.zywa .split { grid-template-columns: calc(40vw - var(--edge)) minmax(0, 1fr); column-gap: 12vw; align-items: center; padding-block: clamp(110px, 12vw, 220px); }
  body.haze.zywa .stage-list { padding-left: 44px; }
  body.haze.zywa .stage-list::before { font-size: clamp(64px, 6.6vw, 124px); }
  body.haze.zywa .stage-list b { font-size: clamp(64px, 6.6vw, 124px); }
  body.haze.zywa .stage-list b::before { left: -44px; }
  body.haze.zywa .stage-list li.lit b::before { left: -47px; width: 20px; height: 40px; margin-top: -20px; }
  body.haze.zywa .finale { padding-block: clamp(140px, 17vw, 320px) clamp(110px, 12vw, 220px); }
  body.haze.zywa .finale-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12vw; font-size: clamp(40px, 4.1vw, 76px); }
  body.haze.zywa .finale-line > span { flex: none; width: calc(40vw - var(--edge)); }
  body.haze.zywa .finale-line > em { flex: 1 1 0; text-align: right; }
  /* dark ink where the silver is really drawn */
  html.has-haze body.haze.zywa .triad-says .split-say, html.has-haze body.haze.zywa .split-l .split-say, html.has-haze body.haze.zywa .finale-line > span { color: var(--metal-ink); }
  html.has-haze body.haze.zywa .triad-says .split-marks i { filter: brightness(.5) contrast(1.35); }
  html.has-haze body.haze.zywa .split-l .split-label { color: var(--metal-dim); }
  html.has-haze body.haze.zywa .stay-close h2 { background: none; color: var(--metal-ink); -webkit-text-fill-color: var(--metal-ink); }
}

/* ── Trial of a sharper display face (21 November, Daria: "myślę, że powinniśmy mieć ostrzejszą czcionkę").
   Only with ?kroj= in the address (zywa-tekst.js sets html[data-kroj]); the page itself keeps Jost until she chooses.
   - ostra: Cormorant Garamond, a serif cut to points, hairlines beside full strokes;
   - kanciasta: Chakra Petch, a sans with cut corners.
   Both ship with the site already (fonts.css). The serif has a lower x-height, so its size follows its small letters. */
html[data-kroj="ostra"] { --display: 'Cormorant Garamond', 'Times New Roman', serif; }
html[data-kroj="ostra"] body.haze.zywa :is(#hero-title, .split-say, .stage-list b, .finale-line, .stay-close h2, .stay-lede) { font-weight: 400; letter-spacing: -.014em; font-size-adjust: .455; }
html[data-kroj="kanciasta"] { --display: 'Chakra Petch', Arial, sans-serif; }
html[data-kroj="kanciasta"] body.haze.zywa :is(#hero-title, .split-say, .stage-list b, .finale-line, .stay-close h2, .stay-lede) { font-weight: 500; letter-spacing: -.02em; }

/* ── Her three sentences lie across the sheet (22 November). Daria, seeing a sentence small in the left edge under
   the mirror opening: "i ten układ nie pasuje"; of this layout: "lepiej krótkie hasła", "tu wyśrodkuj napis po
   prawej". Each sentence lies as the title and the last line do: its beginning on the silver in dark ink, its
   ending on the graphite in light ink, one line, at the middle of the beginning (zywa-tekst.js divides it). Size,
   weight and words are as they were. On a narrow screen the sentence is one piece. */
@media (min-width: 1101px) {
  body.haze.zywa .triad-says { grid-column: 1 / -1; }
  body.haze.zywa .say .split-say { justify-self: stretch; max-width: none; display: grid;
    grid-template-columns: calc(40vw - var(--edge)) minmax(0, 1fr); column-gap: 12vw; align-items: center; }
  body.haze.zywa .say .pol-a, body.haze.zywa .say .pol-b { display: block; min-width: 0; text-wrap: balance; }
  body.haze.zywa .say .pol-b { white-space: nowrap; color: var(--zywa-ink); }
}

/* ── The cycle as a ring (22 November). Daria of the stages row: "ta część mi się nie podoba", "układ tekstu", and
   then: "w okręgu, bo to cykl nieskończony". The paragraph about the cycle stands sentence by sentence, its four
   words on a line of their own; beside it, in the dark, a thin ring of cold light as the edge of the mirror is,
   and the four words around it in the order of the cycle: wood above, spark to the right, flame below, blaze to
   the left, and round again. Iskra's outline stands on the ring at the lit stage and stirs with each real step.
   The small caption is kept for screen readers; the ruler and its ticks are gone. */
body.haze.zywa .split-stages .split-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
body.haze.zywa .split-stages .split-say-long { max-width: none; font-size: clamp(21px, 1.7vw, 29px); line-height: 1.34; letter-spacing: -.012em; text-wrap: initial; }
body.haze.zywa .split-stages .zdanie { display: block; max-width: 23em; text-wrap: balance; }
body.haze.zywa .split-stages .zdanie + .zdanie { margin-top: .8em; }
body.haze.zywa .split-stages .stage-list { --ring: clamp(120px, 36vw, 230px); --gap: clamp(8px, 2.6vw, 16px);
  display: grid; grid-template-columns: auto var(--ring) auto; grid-template-rows: auto var(--ring) auto; gap: var(--gap); justify-content: center; align-items: center; padding: 0; }
body.haze.zywa .split-stages .stage-list::before { position: static; grid-column: 2; grid-row: 2; width: var(--ring); height: var(--ring); box-sizing: border-box;
  border: 1px solid #c3d0ea66; border-radius: 50%; background: none; font-size: inherit; }
body.haze.zywa .split-stages .stage-list li:nth-child(1) { grid-column: 2; grid-row: 1; justify-self: center; }
body.haze.zywa .split-stages .stage-list li:nth-child(2) { grid-column: 3; grid-row: 2; justify-self: start; }
body.haze.zywa .split-stages .stage-list li:nth-child(3) { grid-column: 2; grid-row: 3; justify-self: center; }
body.haze.zywa .split-stages .stage-list li:nth-child(4) { grid-column: 1; grid-row: 2; justify-self: end; }
body.haze.zywa .split-stages .stage-list b { font: 300 clamp(17px, 4.7vw, 24px)/1.13 var(--display); letter-spacing: -.03em; white-space: nowrap; color: #e9ebed6b; }
body.haze.zywa .split-stages .stage-list li:not(.was):not(.lit) b { color: #e9ebed6b; }
body.haze.zywa .split-stages .stage-list li.was b { color: #e9ebed99; }
body.haze.zywa .split-stages .stage-list li.lit b { color: var(--zywa-ink); }
body.haze.zywa .split-stages .stage-list li:not(.lit) b::before { content: none; }
body.haze.zywa .split-stages .stage-list li.lit b::before { left: calc(-1 * var(--gap) - .15em); top: 50%; width: .3em; height: .6em; margin-top: -.3em; }
html[lang="de"] body.haze.zywa .split-stages .stage-list, html[lang="fr"] body.haze.zywa .split-stages .stage-list { --ring: clamp(104px, 31vw, 200px); }
html[lang="de"] body.haze.zywa .split-stages .stage-list b, html[lang="fr"] body.haze.zywa .split-stages .stage-list b { font-size: clamp(14px, 3.9vw, 20px); }
@media (min-width: 1101px) {
  body.haze.zywa .split-stages { align-items: center; }
  body.haze.zywa .split-stages .cykl { display: block; white-space: nowrap; }
  body.haze.zywa .split-stages .stage-list { --ring: clamp(210px, 19.5vw, 360px); --gap: clamp(14px, 1.3vw, 24px); }
  body.haze.zywa .split-stages .stage-list b { font-size: clamp(24px, 2.25vw, 42px); }
  html[lang="de"] body.haze.zywa .split-stages .stage-list, html[lang="fr"] body.haze.zywa .split-stages .stage-list { --ring: clamp(190px, 17vw, 320px); }
  html[lang="de"] body.haze.zywa .split-stages .stage-list b, html[lang="fr"] body.haze.zywa .split-stages .stage-list b { font-size: clamp(20px, 1.8vw, 34px); }
}
