/* polish-b.css — final review polish, loaded last */

/* ---------- Displays (#displays) ---------- */

/* Balanced wraps: no single-word orphans in tile titles or the CTA heading */
#displays .dtile__title,
#displays .dshow__cta-title { text-wrap: balance; }
#displays .dtile__copy,
#displays .dshow__cta-text p { text-wrap: pretty; }

/* ---------- Sunlight (#bright) ---------- */

/* Feature list: no orphaned last word ("… ceiling / mount") */
#bright .sunfeat li > span { text-wrap: pretty; }

/* Sky labels give way to the sun: dragged to either end, the sun used to sit
   on top of "Overcast" / "Direct sun". They now fade out as it arrives. */
#bright .sunsky__end--low { opacity: clamp(0, calc((var(--sun, .5) - .07) * 20), 1); }
#bright .sunsky__end--high { opacity: clamp(0, calc((.995 - var(--sun, .5)) * 16), 1); }

/* Phone sun track: the 36px knob (with its ring) overhung both end labels by 6px
   at Overcast / Direct sun. A wider gap keeps it clear of "Direct sun" / "Overcast". */
#bright .suntrack { column-gap: 22px; }

/* Hotspot tips: no orphaned last word ("… suits your / window.") */
#bright .sunspot__tip { text-wrap: pretty; }

/* Round 2 */

/* ---------- Displays (#displays) ---------- */

/* The rule under the heading picks up the coral of the eyebrow before fading out */
#displays .dshow__rule::after {
  background: linear-gradient(90deg, rgba(255, 107, 61, .55), rgba(244, 240, 230, .2) 14%, rgba(244, 240, 230, .04));
}

/* Glass edge: every tile gets a hairline that is lit from above and fades down the sides.
   Drawn from the caption so it sits over the photo; 100cq* units cover the whole tile. */
#displays .dtile__cap::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100cqw;
  height: 100cqh;
  padding: 1px;
  border-radius: 22px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 248, 236, .22), rgba(255, 248, 236, .06) 26%, rgba(255, 248, 236, .02) 64%, rgba(255, 248, 236, .08));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* Caption: a touch more air between title and copy, and a soft lift off the photo */
#displays .dtile__title { text-shadow: 0 1px 14px rgba(2, 5, 4, .55); }
#displays .dtile__copy { margin-top: 8px; }

/* "Best for" chips: faint glass fill instead of a bare outline */
#displays .dtile__best li {
  background: rgba(244, 240, 230, .05);
  box-shadow: inset 0 0 0 1px rgba(244, 240, 230, .16), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* "Get a quote": a warm glow when it opens, and a clear coral ring for the keyboard */
#displays .dtile__go { transition: gap .45s var(--ease-out), padding .45s var(--ease-out), background-color .3s ease, box-shadow .4s ease; }
#displays .dtile__go:hover,
#displays .dtile__go:focus-visible { box-shadow: 0 0 0 4px rgba(255, 107, 61, .18), 0 12px 26px -10px rgba(255, 107, 61, .55); }
#displays .dtile__go:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
#displays .dtile__link:focus-visible { outline-offset: 4px; border-radius: 4px; }

/* CTA band: a lit top edge and a warm pool of light under it */
#displays .dshow__cta {
  box-shadow:
    inset 0 0 0 1px rgba(255, 107, 61, .34),
    inset 0 1px 0 rgba(255, 214, 196, .16),
    0 34px 70px -44px rgba(255, 107, 61, .42);
}
#displays .dshow__cta-title { letter-spacing: -.015em; text-wrap: balance; }
/* the little arrow between the two cards glows like the preview it points to */
#displays .demo-arrow {
  background: radial-gradient(closest-side, rgba(255, 107, 61, .16), transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 61, .38), 0 0 22px -6px rgba(255, 107, 61, .55);
}

/* ---------- Sunlight (#bright) ---------- */

/* Stats: the column rules fade out towards the bottom instead of stopping dead */
@media (min-width: 1100px) {
  #bright .sunstat + .sunstat { border-left-color: transparent; }
  #bright .sunstat + .sunstat::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 1px;
    pointer-events: none;
    background: linear-gradient(180deg, var(--line-light) 0 55%, transparent);
  }
}
/* a patch of sunlight warms the stat under the pointer */
#bright .sunstat { position: relative; isolation: isolate; }
#bright .sunstat::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  top: 6px;
  width: min(100%, 420px);
  height: 200px;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 210, 130, .5), rgba(255, 224, 170, .16) 55%, transparent);
  opacity: 0;
  transform: translateY(8px) scale(.92);
  transition: opacity .6s ease, transform .8s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  #bright .sunstat:hover::after { opacity: 1; transform: none; }
}
/* the times sign sat on the baseline like a full stop; it now sits on the x-height, a little larger */
#bright .sunstat:nth-child(2) .sunstat__num small { position: relative; top: -.16em; font-size: .38em; font-weight: 500; }
/* unit and label tracking */
#bright .sunstat__num small { letter-spacing: -.01em; }
#bright .sunstat__label { letter-spacing: .01em; }

/* Bars: a soft inner shade on the empty tracks so they read as channels, not grey lines */
#bright :is(.sunbar__track, .suntherm__line) { box-shadow: inset 0 1px 1px rgba(18, 53, 43, .1); }
#bright .sunpips__row i { box-shadow: inset 0 1px 1px rgba(18, 53, 43, .08); }
#bright .sunpips--ultra .sunpips__row i { box-shadow: 0 0 8px -1px rgba(255, 143, 102, .45); }
#bright .suntherm__line::before { box-shadow: 0 0 0 3px var(--cream), 0 0 12px rgba(233, 102, 58, .5); }

/* Features: each icon sits on a small sunlit disc; on hover the row warms and the words step in */
#bright .sunfeat .icon {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 216, 150, .5), rgba(255, 216, 150, .16) 62%, transparent 72%);
  box-shadow: 0 0 0 7px rgba(255, 216, 150, .14);
  transition: box-shadow .5s ease;
}
#bright .sunfeat li { position: relative; isolation: isolate; }
#bright .sunfeat li::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(70% 140% at 0% 50%, rgba(255, 214, 140, .26), transparent 70%);
  opacity: 0;
  transition: opacity .5s ease;
}
#bright .sunfeat li > span { transition: translate .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  #bright .sunfeat li:hover::before { opacity: 1; }
  #bright .sunfeat li:hover .icon { box-shadow: 0 0 0 7px rgba(255, 216, 150, .3), 0 0 18px 6px rgba(255, 196, 110, .28); }
  #bright .sunfeat li:hover > span { translate: 3px 0; }
}

@media (prefers-reduced-motion: reduce) {
  #displays .dtile__go,
  #bright .sunstat::after,
  #bright .sunfeat li::before,
  #bright .sunfeat .icon,
  #bright .sunfeat li > span { transition: none !important; }
  #bright .sunstat::after { transform: none; }
  #bright .sunfeat li:hover > span { translate: none; }
}

/* Round 3 */

/* ---------- Displays (#displays) ---------- */

/* Pharmacy totem: the floor reflection read as a ghost panel with a hard top edge.
   It is now a faint sheen that fades in from the floor. */
@media (hover: hover) and (pointer: fine) {
  #displays .dtotem .screen__frame { -webkit-box-reflect: below 26px linear-gradient(to bottom, transparent 84%, rgba(255, 255, 255, .13)); }
  /* photo captions: a little more shade under the words where they cross busy menu boards */
  #displays .dtile:has(.dshot) .dtile__cap::before {
    background: linear-gradient(180deg, rgba(3, 7, 6, 0), rgba(3, 7, 6, .56) 40px, rgba(3, 7, 6, .74));
  }
}
/* Video wall: the same softer floor reflection, so the two neighbouring tiles match */
#displays .dvwall__wall { -webkit-box-reflect: below 10px linear-gradient(to bottom, transparent 72%, rgba(255, 255, 255, .15)); }

/* CTA band: the two demo cards sat 16px from the band edge against 40px of side padding.
   More air above and below gives them the same breathing room as the words. */
@media (min-width: 1100px) {
  #displays .dshow__cta { padding-block: 30px; }
}

/* ---------- Sunlight (#bright) ---------- */

/* Intro: a line no longer starts with a dash ("— up to ten times …") */
#bright .sun__body { text-wrap: pretty; }

/* Bars: the value column was sized per row, so the Ultra-bright track (3,500) was shorter
   than the Standard one (450). A shared, right-aligned value column keeps both tracks equal. */
#bright .sunbar__val { min-width: 3.4em; text-align: right; }

/* "10×": the times sign stood further off than "cd/m²" and "°C" */
#bright .sunstat:nth-child(2) .sunstat__num small { margin-left: -.1em; }

/* Thermometer: "0°C" now lines up with the number and label above it (the bulb's left edge),
   and "110°C" ends where the coloured fill ends */
#bright .suntherm__ticks { margin-left: 0; width: calc(9px + (100% - 9px) * .92); }
@media (min-width: 1100px) {
  /* the line sits on the centre of the first bar row in the neighbouring columns */
  #bright .suntherm { margin-top: 3.75px; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  /* tablets stack each bar's name above its track; the thermometer drops to the first track */
  #bright .suntherm { margin-top: 18.5px; }
}
