/* Solar set piece: "A day on your roof" */
.day { position: relative; }
.day__pin { padding-block: clamp(48px, 5vw, 72px); }
.day__grid { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; }
.day__copy { display: grid; gap: 16px; align-content: center; }
.day__clock { display: flex; align-items: baseline; gap: 14px; font-family: var(--display); }
.day__clock span { font-weight: 800; font-size: clamp(44px, 4.6vw, 76px); line-height: 1; letter-spacing: -.03em; color: var(--sun); font-variant-numeric: tabular-nums; }
.day__clock small { font-weight: 700; font-size: 20px; color: rgba(255,255,255,.75); }
.day__phases { display: grid; gap: 6px; position: relative; padding-left: 20px; border-left: 2px solid rgba(255,255,255,.14); }
.day__phases li { position: relative; padding: 10px 0 10px 4px; }
.day__phases li::before { content: ''; position: absolute; left: -27px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 2px solid rgba(255,255,255,.35); transition: background .4s, border-color .4s, transform .4s var(--ease); }
.day__phases li.is-on::before { background: var(--sun); border-color: var(--sun); transform: scale(1.25); }
.day__phases h3 { font-size: clamp(20px, 1.5vw, 24px); color: rgba(255,255,255,.6); transition: color .4s; }
.day__phases li.is-on h3 { color: #fff; }
.day__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.day__more > div { overflow: hidden; }
.day__more p { padding-top: 6px; color: rgba(255,255,255,.8); }
.day__phases li.is-on .day__more { grid-template-rows: 1fr; }
.no-js .day__more { grid-template-rows: 1fr; }

.day__stage { display: grid; gap: 12px; width: min(100%, calc((100svh - 250px) * 1.22)); margin-inline: auto; }
.day__sky { width: 100%; height: auto; border-radius: var(--radius) var(--radius) 0 0; background: #bfe0f5; }
.day__chart { width: 100%; height: auto; margin-top: -12px; padding: 4px 0 0; background: rgba(255,255,255,.04); border-radius: 0 0 var(--radius) var(--radius); border: 1px solid rgba(255,255,255,.1); border-top: 0; }
.day__arc { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 2; stroke-dasharray: 3 9; stroke-linecap: round; }
.day__sun { fill: #ffd76a; }
.day__glow { animation: day-pulse 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes day-pulse { 50% { transform: scale(1.12); opacity: .8; } }
.day__cloud { fill: rgba(255,255,255,.75); }
.day__cloud--a { animation: day-cloud 22s ease-in-out infinite; }
.day__cloud--b { animation: day-cloud 28s ease-in-out infinite reverse; }
.day__cloud--c { animation: day-cloud 25s ease-in-out infinite; opacity: .7; }
@keyframes day-cloud { 0% { transform: translateX(-60px); } 50% { transform: translateX(60px); } 100% { transform: translateX(-60px); } }
.day__hills { fill: #2f5f2b; }
.day__hills--near { fill: #24491f; }
.day__wall { fill: #b9785a; }
.day__win { fill: #3a4a52; transition: fill .4s; }
.day__win.is-lit { fill: #ffd27a; }
.day__roof { fill: #4a5058; }
.day__ridge { fill: #3a3f45; }
.day__panel { fill: #141d2b; stroke: #8f9aa6; stroke-width: 1.2; }
.day__cells { stroke: rgba(160,180,205,.35); stroke-width: .8; fill: none; }
.day__shine { opacity: .5; }
.day__dusk { fill: #0b1530; opacity: 0; pointer-events: none; }
.day__grid-line { stroke: rgba(255,255,255,.08); }
.day__base { stroke: rgba(255,255,255,.35); }
.day__tick { fill: rgba(255,255,255,.72); font-family: var(--body); font-size: 16px; font-weight: 600; }
.day__area--self { fill: rgba(122,188,99,.75); }
.day__area--spare { fill: rgba(243,192,76,.8); }
.day__area--need { fill: rgba(200,96,91,.55); }
.day__line { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.day__line--gen { stroke: #ffe08a; }
.day__line--use { stroke: #fff; stroke-dasharray: 5 6; stroke-width: 2; }
.day__head { stroke: #fff; stroke-width: 2; }
.day__legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--small); color: rgba(255,255,255,.85); }
.day__legend li { display: inline-flex; align-items: center; gap: 8px; }
.day__legend i { width: 14px; height: 14px; border-radius: 4px; }
.k-self { background: rgba(122,188,99,.85); }
.k-spare { background: rgba(243,192,76,.9); }
.k-need { background: rgba(200,96,91,.7); }
.day__note { font-size: var(--small); color: rgba(255,255,255,.62); }

@media (min-width: 1000px) {
  .day__pin { min-height: 100svh; display: flex; align-items: center; padding-top: calc(var(--header-h) + 16px); padding-bottom: 24px; }
  .day__pin > .wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); }
  .day__grid { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); }
}
@media (max-width: 999px) {
  /* phones: the scene sits straight under the intro, with the clock and phases just below it */
  .day__copy { display: contents; }
  .day__copy > h2 { order: 1; } .day__copy > .lede { order: 2; } .day__stage { order: 3; } .day__clock { order: 4; } .day__phases { order: 5; }
}
@media (prefers-reduced-motion: reduce) {
  .day__glow, .day__cloud { animation: none; }
}
