/* ClearView Window Cleaning: opening.css. Beyond site.css: the page opening, the reach drawing, the email list, the hand-off.
   Key: clehg the first stage (tight top on a phone), cleho opening row, clehx its text, clehn the note under the h1, clehp a photograph beside text;
        clerc reach host, clerw reach row, clerg reach words, clepn the plan, clesh one sash position, clefc a face I can reach,
        cledt dashed stroke, clelb plan label, clenl the line of working notes;
        clelv the things to say in the email; clehf hand-off block, clehw its row of sentence and actions, clehb its actions.
   The selector, its notes and the drawing run on site.js (data-corner, data-junction, .picked); this page needs no script. */

/* ---------- opening ---------- */
.cleho { align-items: center; gap: var(--s6); }
.cleho > .clehx { flex: 1 1 22rem; }
.cleho > .clefl { flex: 1 1 22rem; }
.cleho > .clehp { flex: 1.25 1 24rem; }
.clehx h1 { font-size: clamp(1.8125rem, 1rem + 2.8vw, 3.5rem); }
.clehn { font-size: var(--t3); line-height: 1.35; }
.clehp > img { block-size: clamp(15rem, 52vh, 29rem); }

/* ---------- reach drawing ---------- */
.clerc { display: flex; flex-direction: column; gap: var(--s6); }
.clerw { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s6); }
.clerw > * { flex: 1 1 18rem; min-inline-size: 0; }
.clerg .clesw { flex-wrap: wrap; overflow: visible; gap: var(--s4); padding: var(--s3) var(--s2); }
.clepn { padding: var(--s3) var(--s2); }
.clepn svg { inline-size: 100%; block-size: auto; }
/* the plan is drawn heavy: its strokes are in the drawing's own units, so they grow with it.
   The jambs, the two glass faces and the sash bar are laid out across the whole field, so a
   position is read as a place on the window, not as a mark adrift in a corner of it. */
.clepn .cleln { stroke-width: 6; vector-effect: none; }
.clepn .cleth { stroke-width: 3; vector-effect: none; }
.clesh { opacity: 0; visibility: hidden; transition: opacity var(--d2), visibility var(--d2); }
.clesh.picked { opacity: 1; visibility: visible; }
.clefc {
  fill: none; stroke: var(--c4); stroke-width: 10;
  filter: drop-shadow(0 -.125rem 0 var(--c3)) drop-shadow(0 .125rem 0 var(--c3));
}
.clepn .cledt { stroke-dasharray: 14 9; }
.clelb { font: 400 1.75rem var(--f2); fill: var(--c2); }
.clepn .clenb { font-size: 1.75rem; font-weight: 600; }

/* the three working notes: each one hangs from a short leader that rises out of the drawing row,
   and the chosen note carries only a compact white backing behind its heading */
.clenl { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s5) var(--s6); }
.clenl > .clent {
  flex: 1 1 14rem; min-inline-size: 0;
  padding: var(--s4) 0 0 var(--s5);
  transition: none;
}
.clenl > .clent:nth-child(2) { flex-grow: 1.4; }
.clenl > .clent.picked { background: none; }
/* the leader: a stroke up from the note's head, ending in a junction square */
.clenl > .clent::before {
  content: ""; position: absolute;
  inset-block-start: calc(var(--s4) * -1 - var(--s4)); inset-inline-start: 0;
  inline-size: .125rem; block-size: var(--s4);
  background: var(--c2); transform-origin: 50% 100%;
}
.clenl > .clent::after {
  content: ""; position: absolute;
  inset-block-start: calc((var(--s4) * -1 - var(--s4)) - .3125rem); inset-inline-start: -.25rem;
  inline-size: .625rem; block-size: .625rem;
  background: var(--c2); outline: .125rem solid var(--c3);
}
.clenl h3 { font-size: var(--t2); align-self: flex-start; padding: var(--s1) var(--s3); }
.clenl > .clent.picked h3 { background: var(--c3); }
.clenl > .clent h3 { transition: background-color var(--d1); }

/* ---------- the email list ---------- */
.clelv { padding-block-end: var(--s5); }
.clelv h3 { font-size: var(--t2); }

/* ---------- hand-off: one compact block, the head, then the sentence with its actions beside it ---------- */
.clehf { display: flex; flex-direction: column; gap: var(--s5); }
.clehf h2 { text-wrap: balance; }
.clehw { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s6); }
.clehw > p { flex: 0 1 38rem; min-inline-size: 0; }
.clehb { flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s5); padding: var(--s3); }

@media (max-width: 47.99rem) {
  /* phone: the h1 starts right under the path, so the latch photograph shows beneath the intro */
  .clehg { padding-block-start: var(--s2); }
  .clehg .cleho { gap: var(--s5); }
  .clenl > .clent { flex-basis: 100%; flex-grow: 0; }
}

@media (min-width: 48rem) {
  .clerw > .clepn { flex: 1.5 1 26rem; order: -1; }
}

@media (min-width: 64rem) {
  /* the five lines hang level from one drawn leader */
  .clelv.clesp { flex-direction: row; align-items: flex-start; gap: var(--s5); border-inline-start: 0; border-block-start: .1875rem solid var(--c2); padding-block-end: 0; }
  .clelv.clesp > .clent,
  .clelv.clesp > .clent:nth-child(even) { flex: 1 1 0; min-inline-size: 0; padding-inline-start: 0; padding-block-start: var(--s5); }
  .clelv.clesp > .clent::before,
  .clelv.clesp > .clent:nth-child(even)::before { inset-block-start: 0; inset-inline-start: .25rem; inline-size: .125rem; block-size: var(--s4); }
  .clelv.clesp > .clent::after { inset-block-start: -.40625rem; inset-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .clesh, .clenl > .clent, .clenl > .clent h3 { transition: none; }
}
