/* Our vision, a short manifesto in seven beats: the landing page's world (site.css) run the other way round the
   clock, from a late night at the kitchen table to sunrise on the hill. Only what this page adds is here. */

/* ---------- every beat: a heading, two or three sentences, then its picture or its type ---------- */
.vision-page .sec { padding-top: clamp(80px, 13vh, 140px); }
.beat { container-type: inline-size; }
.beat-head { max-width: none; }
.beat-head h2 { max-width: 13em; }
.beat-head h2 { margin-bottom: .36em; font-size: clamp(42px, 5.6vw, 96px); }
.beat-head .copy + .copy { margin-top: .8em; }
.beat-head a { text-decoration-thickness: 1.5px; text-underline-offset: .16em; }
.valley, .night { --fade: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, .45) 7%, #000 18%, #000 88%, transparent 100%), linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); -webkit-mask-image: var(--fade); -webkit-mask-composite: source-in; mask-image: var(--fade); mask-composite: intersect; }

/* ---------- 1. technology was supposed to make life easier: the kitchen table, late ---------- */
.cover { position: relative; display: flex; flex-direction: column; min-height: max(100vh, 620px); min-height: max(100svh, 620px); container-type: inline-size; overflow: hidden; color: var(--white); }
.cover .top { position: relative; z-index: 4; flex: none; width: min(var(--hero-max), 100% - 2 * var(--pad)); }
.cover-copy { position: relative; z-index: 3; flex: none; display: flex; flex-direction: column; align-items: center; margin: auto 0 -4cqw; padding: clamp(10px, 3vh, 40px) var(--pad) 0; text-align: center; }
.cover h1 { max-width: 12em; font: 400 clamp(46px, min(5.8vw, 9.4vh), 104px)/.98 var(--display); letter-spacing: -.016em; margin-bottom: .32em; text-wrap: balance; }
.cover .lede { max-width: 30em; }
.table { position: relative; z-index: 1; flex: none; width: min(100cqw, 1500px); margin: 0 auto; --fade: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, .5) 8%, #000 20%, #000 86%, transparent 100%), linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%); -webkit-mask-image: var(--fade); -webkit-mask-composite: source-in; mask-image: var(--fade); mask-composite: intersect; }
.table-img { display: block; width: 100%; height: auto; }

/* ---------- 2 and 3. the city glows; then the lights come on in the family's house ---------- */
.valley { position: relative; width: min(100cqw, 1640px); margin: clamp(10px, 2vh, 24px) auto 0; overflow: hidden; }
.valley { aspect-ratio: 2.2 / 1; }
/* the picture's empty upper sky and plain ground are cropped: the city and the house sit in the band that shows */
.valley-plate { position: absolute; left: 0; bottom: -11.7%; width: 100%; aspect-ratio: 3 / 2; }
.valley-plate img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.valley-lit { opacity: 0; will-change: opacity; }
.beat-after { margin-top: clamp(16px, 3vh, 36px); }

/* ---------- 4. your family's life stays in your home: the house asleep, the little computer awake ---------- */
.night { position: relative; width: min(100cqw, 1640px); margin: clamp(10px, 2vh, 24px) auto 0; aspect-ratio: 2 / 1; overflow: hidden; }
.night-plate { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 2 / 1; }
.night-img { display: block; width: 100%; height: 100%; }
/* the threads: faint warm light from the little computer to the phone, the frame and the laptop, with a bead of
   light that runs along each now and then */
.threads { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.threads path { fill: none; stroke: #FFD766; stroke-width: 2.6; stroke-linecap: round; opacity: .55; }
.threads path:not(.bead) { filter: drop-shadow(0 0 4px rgba(255, 215, 102, .8)); }
.threads path.bead { stroke-width: 5.5; opacity: 0; stroke-dasharray: .05 1.2; stroke-dashoffset: .05; animation: bead 7.5s cubic-bezier(.45, 0, .55, 1) infinite; }
.threads path.bead:nth-of-type(5) { animation-delay: -2.5s; }
.threads path.bead:nth-of-type(6) { animation-delay: -5s; }
@keyframes bead { 0% { stroke-dashoffset: .05; opacity: 0; } 4% { opacity: .95; } 32% { opacity: .95; } 36%, 100% { stroke-dashoffset: -1.05; opacity: 0; } }
.hum { position: absolute; left: 74.7%; top: 64.6%; width: 11%; aspect-ratio: 1.3; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 215, 102, .62), rgba(255, 215, 102, .2) 50%, rgba(255, 215, 102, 0)); mix-blend-mode: screen; animation: hum 4.6s ease-in-out infinite; }
@keyframes hum { 0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.92); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } }
.nf-phone { left: 46.4%; top: 21.7%; width: 4%; height: 7.4%; animation-duration: 6.2s; }
.nf-frame { left: 60.8%; top: 57.2%; width: 5%; height: 9%; animation-duration: 5.3s; animation-delay: -2.4s; }
.night .st-smoke { left: 66.2%; top: 6.5%; width: 3%; --smoke: 160, 158, 210; }

/* ---------- 5. one bet: the chart alone, large ---------- */
/* never taller than the window under the top bar, so the lines and their key are seen together. Every word on the
   chart is in the SVG, so it scales with the lines and never drifts onto them; the lines are named in the key */
.chart { position: relative; max-width: min(1080px, (100vh - 220px) * 1.62); margin: clamp(24px, 4vh, 48px) auto 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--text); fill: var(--white); }
.c-axis { fill: none; stroke: rgba(255, 246, 229, .55); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.c-ax { font: 600 20px var(--text); fill: rgba(255, 246, 229, .85) !important; }
.c-line { fill: none; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.c-big { stroke: #B9B4F0; }
.c-need { stroke: var(--white); stroke-width: 7; opacity: .9; }
.c-small { stroke: var(--sun); filter: drop-shadow(0 0 8px rgba(255, 215, 102, .55)); }
.c-dot { fill: var(--sun); stroke: #10173A; stroke-width: 4; }
.c-dot1 { fill: #FFF6E5; }
.c-halo { transform-box: fill-box; transform-origin: 50% 50%; }
/* the two marked points on the rising line, each named once in clear space */
.c-mk { font: 500 22px var(--text); }
.c-mk2 { fill: var(--sun) !important; }
.c-lead { fill: none; stroke: rgba(255, 246, 229, .6); stroke-width: 2; stroke-linecap: round; }
/* the key under the chart: a swatch of each line and its name */
.c-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 40px; margin-top: clamp(16px, 2.4vh, 28px); font: 500 clamp(18px, 1.5vw, 22px)/1.3 var(--text); color: var(--white); }
.c-key li { display: flex; align-items: center; gap: 12px; }
.c-key i { flex: none; width: 34px; height: 7px; border-radius: 4px; }
.k-big { background: #B9B4F0; } .k-need { background: var(--white); height: 5px !important; } .k-small { background: var(--sun); box-shadow: 0 0 8px rgba(255, 215, 102, .6); }
.c-key .k-mark { display: none; }
/* drawn as the chart arrives: the lines draw themselves, then the marked points, then the crossing lights */
.chart.wait .c-line { stroke-dashoffset: 1; }
.chart.wait .c-dot, .chart.wait .c-halo, .chart.wait .c-mk, .chart.wait .c-lead, .chart.wait .c-key li { opacity: 0; }
.chart .c-line, .chart .c-dot, .chart .c-halo, .chart .c-mk, .chart .c-lead, .chart .c-key li { transition: stroke-dashoffset 1.8s cubic-bezier(.5, 0, .3, 1), opacity .7s ease; }
.chart .c-need, .chart .c-key li:nth-child(2) { transition-delay: .3s; }
.chart .c-big, .chart .c-key li:nth-child(1) { transition-delay: .9s; }
.chart .c-small { transition-duration: 2.8s; transition-delay: 1.6s; }
.chart .c-key li:nth-child(3) { transition-delay: 1.6s; }
.chart .c-dot1, .chart .c-mk1, .chart .c-key li:nth-child(4) { transition-delay: 2.8s; }
.chart .c-dot2, .chart .c-mk2, .chart .c-key li:nth-child(5) { transition-delay: 3.9s; }
.chart .c-halo { transition-delay: 3.9s; animation: halo 3.2s ease-in-out 4.6s infinite; }
.chart.wait .c-halo { animation: none; }
@keyframes halo { 0%, 100% { transform: scale(.8); opacity: .7; } 50% { transform: scale(1.15); opacity: 1; } }

/* ---------- 6. how we get there: three building blocks, set in type ---------- */
.plan-in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.blocks li { display: grid; gap: 4px; padding: clamp(16px, 2.4vh, 24px) 0; border-top: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); }
.blocks li:last-child { border-bottom: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); }
.blocks b { font: 400 clamp(38px, 4.4vw, 72px)/1 var(--display); letter-spacing: -.012em; }
.blocks li:first-child b { color: var(--sun); }
.blocks span { font: 400 clamp(17px, 1.35vw, 20px)/1.4 var(--text); }

/* ---------- 7. help for every family: sunrise on the hill ---------- */
.close { --iw: min(100cqw, 2400px); padding-bottom: 0; text-align: center; container-type: inline-size; }
.close-head { position: relative; z-index: 2; }
.close h2 { margin-bottom: .32em; font-size: clamp(48px, 6.4vw, 112px); }
.close .big { max-width: 21em; margin: 0 auto; font-size: clamp(25px, 2.5vw, 40px); line-height: 1.2; }
.sunrise { position: relative; margin-top: calc(var(--iw) * -.05); }
.sunrise-plate { width: var(--iw); aspect-ratio: 2 / 1; margin: 0 auto; }
.sunrise-img { display: block; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, .3) 8%, #000 26%); mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, .3) 8%, #000 26%); }
.sr-sun { left: 86%; top: 55%; width: 22%; height: 40%; animation-duration: 7s; }
.sunrise .st-window { left: 62%; top: 42%; width: 30%; height: 44%; }
.sunrise .st-smoke { left: 79.4%; top: 22.6%; --smoke: 255, 236, 214; }
.sunrise .st-birds { top: 16%; }
.sunrise .st-birds svg { stroke: #6A3A52; }
/* the painting's last 30% (its own foot ends in a flat band of night at 85%) melts into the night over a soft fade
   so it never ends in a hard line, and the footer follows on from the night */
.close-foot { --melt: calc(var(--iw) * .15); --dark: calc(var(--iw) * .078); position: relative; margin-top: calc(var(--melt) * -1); padding: var(--dark) 0 0; background: linear-gradient(180deg, rgba(35, 31, 70, 0) 0, rgba(35, 31, 70, .45) calc(var(--dark) * .5), rgba(35, 31, 70, .85) calc(var(--dark) * .8), #231F46 var(--dark)); color: var(--white); }
.vision-page .foot { margin-top: 0; padding-top: clamp(40px, 6vh, 64px); background: #231F46; }
.vision-page .foot .hill { display: none; }
.vision-page .foot .foot-line { border-top-color: rgba(255, 246, 229, .14); }
.vision-page .sitemap a[aria-current] { text-decoration: underline; text-underline-offset: .2em; }

/* ---------- nothing moves off screen ---------- */
.off, .off * { animation-play-state: paused !important; }

/* ---------- shorter desktop screens ---------- */
@media (min-width: 901px) and (max-height: 800px) {
  .cover .top { padding-top: 10px; }
  .cover h1 { font-size: clamp(44px, min(5.4vw, 8.6vh), 96px); }
}

/* ---------- phone: one column, each beat about one screen ---------- */
@media (max-width: 900px) {
  .vision-page .sec { padding-top: clamp(64px, 9svh, 88px); }
  .beat-head h2 { font-size: clamp(38px, 10.6vw, 60px); }
  .cover { min-height: 0; }
  .cover-copy { margin: 0 0 -6cqw; padding-top: clamp(26px, 5svh, 48px); }
  .cover h1 { font-size: clamp(42px, 11.6vw, 68px); }
  .cover .lede { text-wrap: pretty; }
  /* the pictures larger than the screen, cropped in on what matters */
  .table { width: 100%; height: 92cqw; overflow: hidden; }
  .table-img { width: 180%; max-width: none; margin-left: -40%; }
  /* the whole picture, as large as the screen allows with the skyline and the house both in view (about 40% of
     the screen's height); the lights come on as it goes up the screen */
  .valley { width: 100%; height: 84cqw; aspect-ratio: auto; --fade: linear-gradient(180deg, transparent 0, #000 12%, #000 90%, transparent 100%), linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%); }
  .valley-plate { top: 0; bottom: auto; left: -17cqw; width: 126cqw; }
  .night { width: 100%; height: 78cqw; aspect-ratio: auto; }
  .night-plate { left: -36cqw; width: 164cqw; top: -2cqw; }
  /* the threads at twice the stroke, so they read at a phone's size */
  .threads path { stroke-width: 6; opacity: .6; }
  .threads path.bead { stroke-width: 11; }
  .hum { width: 18%; }
  .chart { margin-top: 18px; }
  /* the axes' words at a phone's size, and the lines thicker; the two marked points are named in the key */
  .c-ax { font-size: 30px; }
  .c-line { stroke-width: 14; }
  .c-need { stroke-width: 10; }
  .c-mk, .c-lead { display: none; }
  .c-key { display: grid; justify-content: start; gap: 10px; margin-top: 26px; font: 500 17px/1.3 var(--text); }
  .c-key i { width: 30px; height: 6px; }
  .c-key .k-mark { display: flex; text-wrap: balance; }
  .c-key .k-mark i { width: 16px; height: 16px; margin: 0 7px; border-radius: 50%; box-shadow: 0 0 0 3px #10173A; }
  .k-dot1 { background: #FFF6E5; } .k-dot2 { background: var(--sun); }
  .c-key .k-mark:nth-child(5) { color: var(--sun); }
  .plan-in { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .close h2 { font-size: clamp(44px, 12.4vw, 76px); }
  .sunrise { margin-top: -4svh; overflow: hidden; }
  .sunrise-plate { width: 180%; margin-left: -76%; }
  .close-foot { --melt: 27cqw; --dark: 14cqw; margin-top: calc(var(--melt) * -1); }
}

@media (prefers-reduced-motion: reduce) {
  .hum, .threads path.bead, .chart .c-halo { animation: none !important; }
  .threads path.bead { opacity: 0; }
}

/* the closing words: while the dawn breaks behind them they are warm white on a soft dusk halo, as the landing page
   does at dusk, so they read at every moment of the change */
.close-head [data-sky] { position: relative; isolation: isolate; }
.close-head [data-sky]::before { content: ""; position: absolute; z-index: -1; inset: -34% -10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(24, 24, 62, .8), rgba(24, 24, 62, .6) 50%, rgba(24, 24, 62, 0)); opacity: 0; transition: opacity .5s; pointer-events: none; }
.close-head .on-dark::before { opacity: 1; }
