/* involve-lending.com: "Under one roof"
 *
 * One bold device: Involve's roofline-and-sun mark. In the hero it is scaled
 * up and the sun rises behind the roof on load ("First light"). Everything
 * else is quiet: one family (Archivo) in two widths, a cool palette from the
 * brand's navy and yellow, left-aligned type, rules instead of cards.
 */

:root {
  --deep: #071d33;
  --harbor: #0b2e50;
  --harbor-2: #123c66;
  --sun: #ffdf2b;
  --mist: #e6edf3;
  --fog: #a9bed1;
  --paper: #fafbfc;
  --brick: #b3261e;

  /* The day: night sky, dawn light, lamplight. Used only by the scenes. */
  --night: #04111f;
  --gold: #ffc857;
  --pane-hi: #fff1bd;
  --pane-lo: #ffc45a;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-rise: cubic-bezier(0.22, 0.8, 0.2, 1);

  --ink: var(--harbor);
  --ink-soft: #3e5873;
  --rule: #cdd9e4;
  --focus: var(--harbor);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1240px;
  --header-h: 73px;
  --gutter: clamp(16px, 4vw, 40px);
  --band: clamp(64px, 9vw, 128px);

  /* 4:3 scale from 17px */
  --s-1: 0.875rem;
  --s0: 1.0625rem;
  --s1: 1.375rem;
  --s2: 1.875rem;
  --s3: 2.5rem;
  --s4: 3.3125rem;
  --s5: 4.4375rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
  /* The page never pans sideways. With this on <html> the viewport is the one
     that hides horizontal overflow, and body's own overflow-x: clip (below)
     then truly clips what is inside it. On body alone it is only passed up to
     the viewport, which iOS still lets a finger drag. */
  overflow-x: hidden;
}

::selection {
  background: var(--sun);
  color: var(--deep);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--s0);
  line-height: 1.55;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

p {
  margin: 0 0 1em;
}

h1,
h2,
h3 {
  margin: 0;
  font-stretch: 125%;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}

h2 {
  font-size: clamp(var(--s2), 4.2vw, var(--s4));
}

h3 {
  font-size: var(--s1);
  line-height: 1.2;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden,
.hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--sun);
  color: var(--deep);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.lede {
  font-size: var(--s1);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 34em;
  text-wrap: pretty;
}

/* A sun-coloured rule under the link; on hover a second one, in the text's
   colour, draws across it from the left. */
.text-link {
  font-weight: 600;
  text-decoration: none;
  padding-bottom: 5px;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat,
    linear-gradient(var(--sun), var(--sun)) 0 100% / 100% 2px no-repeat;
  transition: background-size 0.4s var(--ease-out);
}

.text-link:hover {
  background-size: 100% 2px, 100% 2px;
}

.more {
  margin: 40px 0 0;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 3px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.3s ease,
    transform 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px) scale(0.985);
}

.btn-lg {
  min-height: 54px;
  padding: 0 28px;
  font-size: 1.0625rem;
}

.btn-block {
  width: 100%;
}

.btn-sun {
  background: var(--sun);
  color: var(--deep);
}

/* Light crosses the sun button when you reach for it. */
.btn-sun::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 68%);
  transform: translateX(-120%);
  pointer-events: none;
}

.btn-sun:hover {
  background: #ffe64d;
  box-shadow: 0 12px 28px -12px rgba(255, 213, 43, 0.7);
}

.btn-sun:hover::after {
  transform: translateX(120%);
  transition: transform 0.75s var(--ease-out);
}

.btn-ghost {
  border-color: rgba(169, 190, 209, 0.55);
  color: #fff;
}

.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.btn-ink {
  background: var(--harbor);
  color: #fff;
}

.btn-ink:hover {
  background: var(--deep);
}

.btn-outline {
  border-color: var(--harbor);
  color: var(--harbor);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ----------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--deep);
  color: #fff;
  border-bottom: 1px solid rgba(169, 190, 209, 0.16);
  transition: background-color 0.35s ease, border-color 0.35s ease;
  --focus: var(--sun);
}

/* At the very top of the home page the header is part of the night sky. The
   class comes from the script in <head>; without it the header is solid. */
.js.at-top body:has(.hero, .page-hero) .site-header:not(:has(.menu[open])) {
  background: transparent;
  border-bottom-color: transparent;
}

/* How far down the page you are, as a line of light under the header. */
.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 223, 43, 0) 0%, rgba(255, 223, 43, 0.5) 55%, var(--sun) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

/* The brand may give way before the row overflows: its word is cut rather than
   the menu button pushed off the screen. The sizes below keep that from ever
   being needed (checked at every width from 320 to 1079). */
.brand {
  display: inline-flex;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.logo {
  min-width: 0;
}

.logo {
  display: inline-flex;
  align-items: flex-end;
  gap: 12px;
}

.logo-mark {
  width: 84px;
  height: auto;
  flex-shrink: 0;
}

.logo-mark .mark-roof,
.logo-mark .mark-windows {
  fill: currentColor;
}

.logo-mark .mark-windows {
  fill: currentColor;
}

.logo-mark .mark-glow {
  display: none;
}

.mark-sun {
  fill: var(--sun);
}

.glow-stop {
  stop-color: var(--sun);
}

.logo-word {
  font-size: 0.8125rem;
  font-weight: 450;
  font-stretch: 112%;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  line-height: 1;
  padding-bottom: 1px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.nav {
  display: none;
  gap: 26px;
  margin-left: auto;
}

.nav a,
.menu-panel a:not(.btn) {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav a {
  padding-block: 8px;
  background: linear-gradient(var(--sun), var(--sun)) 0 100% / 0 2px no-repeat;
  transition: color 0.2s ease, background-size 0.35s var(--ease-out);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: #fff;
  background-size: 100% 2px;
}

.header-actions {
  display: none;
  align-items: center;
  gap: 20px;
}

.header-phone {
  transition: color 0.2s ease;
}

.header-phone:hover {
  color: var(--sun);
}

.header-phone {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
}

.menu {
  margin-left: auto;
  position: relative;
}

.menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px;
  cursor: pointer;
  font-weight: 600;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  top: 6px;
}

.menu[open] .menu-icon {
  background: transparent;
}

.menu[open] .menu-icon::before {
  transform: translateY(6px) rotate(45deg);
}

.menu[open] .menu-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

.menu-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: 72px;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  display: grid;
  gap: 4px;
  padding: 12px var(--gutter) 28px;
  background: var(--deep);
  border-top: 1px solid rgba(169, 190, 209, 0.16);
  border-bottom: 1px solid rgba(169, 190, 209, 0.2);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.45);
}

.menu-panel a:not(.btn) {
  padding: 10px 0;
  font-size: 1.0625rem;
}

.menu-panel .btn {
  margin-top: 12px;
}

@media (min-width: 1080px) {
  .nav,
  .header-actions {
    display: flex;
  }

  .menu {
    display: none;
  }
}

/* Phones, large ones included (430 and 440 px wide): the smaller logo. The
   full-size logo and the menu button need about 480 px between them, so the
   compact logo has to reach well past that, not stop at 420. */
@media (max-width: 599px) {
  .header-row {
    gap: 12px;
  }

  .logo {
    gap: 8px;
  }

  .logo-word {
    letter-spacing: 0.16em;
    font-size: 0.6875rem;
  }

  .logo-mark {
    width: 56px;
  }
}

/* The smallest phones (320 to 359 px): one size down again, so the word is never cut. */
@media (max-width: 359px) {
  .logo-word {
    letter-spacing: 0.1em;
    font-size: 0.625rem;
  }

  .logo-mark {
    width: 48px;
  }
}

/* Just wide enough for the full navigation: it fits, with tighter gaps. */
@media (min-width: 1080px) and (max-width: 1199px) {
  .header-row {
    gap: 20px;
  }

  .nav {
    gap: 18px;
  }

  .header-actions {
    gap: 14px;
  }
}

@media (max-width: 420px) {
  /* The icon alone on narrow phones; the word stays for screen readers. */
  .menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .menu summary {
    min-width: 44px;
    justify-content: center;
  }
}

/* ------------------------------------------------------------------- hero */

.hero {
  /* The stage is the house's box. Everything in the scene is placed on it. */
  --stage-w: min(100vw - 24px, 620px);
  --sun-x: calc(50% - var(--stage-w) * 0.097);
  --ground: 132px;
  position: relative;
  /* The hero starts under the header, so the sky runs to the top of the window. */
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
  overflow: hidden;
  overflow: clip;
  background: linear-gradient(180deg, var(--night) 0%, var(--deep) 44%, #0a2947 100%);
  color: #fff;
  --focus: var(--sun);
  isolation: isolate;
}

.hero-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Dawn: warm light low over the horizon, and the sky above it lifting from night to blue. */
.sky-dawn {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 15% at var(--sun-x) calc(100% - var(--ground)), rgba(255, 176, 104, 0.34) 0%, rgba(255, 154, 77, 0) 100%),
    radial-gradient(58% 46% at var(--sun-x) calc(100% - var(--ground)), rgba(255, 190, 104, 0.5) 0%, rgba(255, 154, 77, 0.2) 30%, rgba(255, 154, 77, 0) 66%),
    radial-gradient(130% 78% at var(--sun-x) calc(100% - var(--ground)), rgba(52, 112, 170, 0.6) 0%, rgba(30, 84, 134, 0.28) 42%, rgba(18, 60, 102, 0) 74%);
  animation: fade-in 2.8s ease-out 0.5s both;
}

.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stars circle {
  fill: #fff;
}

.hero-stars {
  opacity: 0.34;
  animation: stars-dim 3s ease-in-out 0.6s both;
}

.stars-a {
  animation: twinkle 4.3s ease-in-out infinite alternate;
}

.stars-b {
  animation: twinkle 5.9s ease-in-out -2s infinite alternate;
}

.stars-c {
  animation: twinkle 7.1s ease-in-out -4s infinite alternate;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: clamp(48px, 8vw, 104px);
}

/* Short windows (small laptops): less sky above the headline, so the house fits. */
@media (min-width: 1000px) and (max-height: 780px) {
  .hero-inner {
    padding-top: 32px;
  }
}

.hero-copy {
  max-width: 52rem;
}

.hero-title {
  font-size: clamp(2.625rem, 6vw, 5.375rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 680;
}

/* Each line is a mask; its words rise through it one after another. */
.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.hero-title .w {
  display: inline-block;
  animation: unmask 0.95s var(--ease-out) both;
  animation-delay: calc(0.2s + var(--w, 0) * 80ms);
}

.hero-lede {
  margin-top: 28px;
  font-size: var(--s1);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.84);
  max-width: 30em;
  text-wrap: pretty;
  animation: settle 0.9s var(--ease-out) 0.7s both;
}

.hero .btn-row {
  animation: settle 0.9s var(--ease-out) 0.85s both;
}

.hero-art {
  position: relative;
  z-index: 1;
  width: var(--stage-w);
  margin: clamp(36px, 9vw, 64px) auto 0;
}

.hero-facts {
  position: relative;
  z-index: 2;
  list-style: none;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding-top: 18px;
  padding-bottom: 26px;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.74);
  font-variant-numeric: tabular-nums;
}

.hero-facts li {
  padding: 8px 0;
  animation: settle 0.9s var(--ease-out) both;
  animation-delay: calc(1.5s + var(--i, 0) * 90ms);
}

.hero-facts li:nth-child(2) {
  --i: 1;
}

.hero-facts li:nth-child(3) {
  --i: 2;
}

.hero-facts li:nth-child(4) {
  --i: 3;
}

.hero-facts strong {
  color: #fff;
  font-weight: 650;
  font-stretch: 112%;
}

@media (min-width: 640px) {
  .hero {
    --ground: 104px;
  }
}

/* Wide: the house stands to the right of the copy and rises beside the buttons.
   The overlap is no taller than the button row, so the sun never reaches the lede. */
@media (min-width: 1000px) {
  .hero {
    --stage-w: min(60vw, 860px);
    --sun-x: calc(100% - var(--gutter) - var(--stage-w) * 0.597);
    --ground: 78px;
  }

  .hero-art {
    margin: clamp(-118px, -7vw, -60px) var(--gutter) 0 auto;
  }

  .hero-facts {
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
  }

  .hero-facts li + li {
    padding-left: 24px;
    border-left: 1px solid rgba(169, 190, 209, 0.22);
  }
}

/* ----------------------------------------------------------------- scenes
 *
 * A scene is a stage in the mark's own units (670 wide) with layers laid over
 * it. In the hero the layers part on scroll, by depth (--sy, set by app.js).
 * Nothing follows the pointer (the owner asked for that to go, 2026-11-13).
 *
 * Every piece is styled in its finished state; the keyframes only say where it
 * comes FROM. So with animation off, the sun is up and the lights are on.
 */

.scene {
  position: relative;
  aspect-ratio: 670 / 232;
}

.scene-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  transform: translate3d(0, calc(var(--sy, 0) * var(--sp, 0px)), 0);
}

.scene-back {
  --sp: 46px;
}

.scene-mid {
  --sp: 22px;
}

.scene-front {
  --sp: -26px;
}

/* --- the sun (HTML, so its loops stay on the compositor) */

.scene-sun {
  position: absolute;
  left: calc(100% * 270 / 670);
  top: calc(100% * 86 / 232);
  width: calc(100% * 170 / 670);
  aspect-ratio: 1;
  margin: calc(-50% * 170 / 670) 0 0 calc(-50% * 170 / 670);
}

.sun-lift,
.sun-rise {
  position: absolute;
  inset: 0;
}

.scene-sun .sun-lift {
  transform: translate3d(0, calc(var(--sy, 0) * -24%), 0);
}

.hero-inner {
  pointer-events: none;
}

.hero-copy {
  pointer-events: auto;
}

/* The hero's sun can be clicked to watch it rise again (app.js). */
.js .hero .sun-disc {
  cursor: pointer;
}

.sun-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 58%, #fff8cf 0%, #ffee78 30%, var(--sun) 62%, #ffd21c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 244, 170, 0.55);
}

/* Low on the horizon the sun is amber; it yellows as it climbs. */
.sun-disc::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 62%, #ffd596 0%, #ff9a4d 78%);
  opacity: 0;
}

.sun-halo {
  position: absolute;
  inset: -200%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(255, 228, 92, 0.42) 0%,
    rgba(255, 210, 96, 0.2) 26%,
    rgba(255, 196, 87, 0.08) 54%,
    rgba(255, 196, 87, 0) 100%
  );
}

.sun-rays {
  position: absolute;
  inset: -270%;
  border-radius: 50%;
  -webkit-mask: radial-gradient(closest-side, transparent 15.6%, #000 19%, rgba(0, 0, 0, 0.45) 52%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 15.6%, #000 19%, rgba(0, 0, 0, 0.45) 52%, transparent 100%);
}

.sun-rays--a {
  background: repeating-conic-gradient(
    from 4deg,
    rgba(255, 238, 150, 0) 0deg,
    rgba(255, 238, 150, 0.17) 2.6deg,
    rgba(255, 238, 150, 0) 6.4deg,
    rgba(255, 238, 150, 0) 22.5deg
  );
  animation: turn 190s linear infinite;
}

.sun-rays--b {
  background: repeating-conic-gradient(
    from 15deg,
    rgba(255, 223, 43, 0) 0deg,
    rgba(255, 223, 43, 0.1) 4.5deg,
    rgba(255, 223, 43, 0) 11deg,
    rgba(255, 223, 43, 0) 40deg
  );
  animation: turn 260s linear infinite reverse;
}

/* --- scenery */

.ridge {
  fill: #164a78;
  opacity: 0.5;
}

.hills-far {
  fill: #103a61;
}

.hills-near {
  fill: #0a2c4c;
}

.trees {
  fill: #082441;
}

.neighbour path {
  fill: #0a2c4c;
}

.neighbour-light {
  fill: var(--pane-lo);
}

.cloud rect {
  fill: rgba(169, 190, 209, 0.12);
}

.cloud .cloud-lit {
  fill: var(--gold);
  opacity: 0.5;
}

.clouds--slow {
  animation: drift 140s ease-in-out infinite alternate;
}

.clouds--fast {
  animation: drift 90s ease-in-out -30s infinite alternate;
}

.ground-hi {
  stop-color: #082039;
}

.ground-lo {
  stop-color: #051729;
}

.line-stop {
  stop-color: var(--fog);
}

.mist-stop {
  stop-color: #dfe9f2;
}

.mist {
  animation: drift 70s ease-in-out infinite alternate;
}

.birds {
  opacity: 0;
}

.birds path {
  fill: none;
  stroke: rgba(230, 237, 243, 0.8);
  stroke-width: 1.3;
  stroke-linecap: round;
}

/* --- the house */

.house-mass {
  fill: #061a2e;
}

.house-walls {
  fill: #082643;
}

.roof-hi {
  stop-color: #174c7b;
}

.roof-lo {
  stop-color: #0b2e50;
}

.gold {
  stop-color: var(--gold);
}

.rim-hot {
  stop-color: #fff6c4;
}

.pane-hi {
  stop-color: var(--pane-hi);
}

.pane-lo {
  stop-color: var(--pane-lo);
}

.house-clapboard,
.house-brick {
  fill: none;
  stroke: rgba(169, 190, 209, 0.12);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.scale {
  fill: none;
  stroke: rgba(169, 190, 209, 0.17);
  stroke-width: 0.8;
}

.house-brick {
  stroke: rgba(7, 29, 51, 0.5);
}

.house-cap {
  fill: #123c66;
  stroke: rgba(190, 208, 224, 0.5);
  stroke-width: 0.8;
}

.house-lines {
  fill: none;
  stroke: rgba(190, 208, 224, 0.6);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.house-lines path {
  stroke-dasharray: 1;
}

.house-rim {
  fill: none;
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.pane {
  fill: #05172a;
  stroke: rgba(169, 190, 209, 0.4);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.smoke-stop {
  stop-color: #e6edf3;
}

.smoke circle {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: smoke 7.6s linear infinite;
}

/* --- first light: where each piece comes from */

[data-scene="dawn"] .sun-rise {
  animation: sun-rise 2.7s var(--ease-rise) 0.5s both;
}

[data-scene="dawn"] .sun-disc::after {
  animation: ember 2.4s ease-out 0.5s both;
}

[data-scene="dawn"] .sun-halo {
  animation: halo 3.2s ease-out 0.6s both;
}

[data-scene="dawn"] .sun-rays--a {
  animation: turn 190s linear infinite, fade-in 1.8s ease-out 1.7s both;
}

[data-scene="dawn"] .sun-rays--b {
  animation: turn 260s linear infinite reverse, fade-in 1.8s ease-out 1.9s both;
}

[data-scene="dawn"] .house-lines path {
  animation: draw 1.15s cubic-bezier(0.6, 0, 0.2, 1) both;
}

[data-scene="dawn"] .house-lines path:nth-child(2) {
  animation-delay: 0.18s;
  animation-duration: 1.35s;
}

[data-scene="dawn"] .house-lines path:nth-child(3) {
  animation-delay: 0.36s;
}

[data-scene="dawn"] .house-walls,
[data-scene="dawn"] .house-roof,
[data-scene="dawn"] .house-cap {
  animation: fade-in 1.2s ease-out 0.95s both;
}

[data-scene="dawn"] .house-clapboard,
[data-scene="dawn"] .house-shingles,
[data-scene="dawn"] .house-brick {
  animation: fade-in 1.1s ease-out 1.7s both;
}

[data-scene="dawn"] .house-spill,
[data-scene="dawn"] .house-rim {
  animation: fade-in 1.5s ease-out 1.55s both;
}

[data-scene="dawn"] .cloud-lit {
  animation: fade-to-lit 2s ease-out 1.3s both;
}

[data-scene="dawn"] .window-lit,
[data-scene="dawn"] .window-glow,
[data-scene="dawn"] .pool,
[data-scene="dawn"] .neighbour-light {
  animation: lamp 0.75s linear 2.35s both;
}

[data-scene="dawn"] .house-window--b .window-lit,
[data-scene="dawn"] .house-window--b .window-glow,
[data-scene="dawn"] .pool--b {
  animation-delay: 2.8s;
}

[data-scene="dawn"] .neighbour-light {
  animation-delay: 3.3s;
}

[data-scene="dawn"] .neighbour + .neighbour .neighbour-light {
  animation-delay: 3.7s;
}

[data-scene="dawn"] .birds {
  animation: birds 13s linear 4.2s both;
}

[data-scene="dawn"] .hills-far,
[data-scene="dawn"] .hills-near,
[data-scene="dawn"] .trees {
  animation: settle-land 1.6s var(--ease-out) 0.1s both;
}

[data-scene="dawn"] .hills-near,
[data-scene="dawn"] .trees {
  animation-delay: 0.25s;
}

/* Small screens: the fine detail turns to noise below about 0.6 px per unit. */
@media (max-width: 899px) {
  .scene .detail,
  .scene .clouds--slow {
    display: none;
  }

  .house-lines {
    stroke-width: 2;
  }

  .hero-stars circle:nth-child(2n) {
    display: none;
  }
}

/* Loops stop while their scene is off screen (app.js sets the class). */
[data-loops].is-paused *,
[data-loops].is-paused *::after {
  animation-play-state: paused !important;
}

.grain {
  display: none;
}

@media (min-width: 900px) and (hover: hover) {
  .grain {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.055;
  }

  .grain-fill {
    position: absolute;
    inset: 0;
    will-change: transform;
  }
}

@keyframes sun-rise {
  from {
    transform: translate3d(-7%, 84%, 0);
  }
}

@keyframes ember {
  from {
    opacity: 0.95;
  }
}

@keyframes halo {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
}

@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-to-lit {
  from {
    opacity: 0;
  }
}

@keyframes stars-dim {
  from {
    opacity: 1;
  }
}

@keyframes twinkle {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 1;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
}

/* A lamp does not fade on: it catches, dips, then holds. */
@keyframes lamp {
  0% {
    opacity: 0;
  }
  22% {
    opacity: 0.85;
  }
  38% {
    opacity: 0.3;
  }
  100% {
    opacity: 1;
  }
}

@keyframes smoke {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.5);
  }
  12% {
    opacity: 0.55;
  }
  100% {
    opacity: 0;
    transform: translate(52px, -82px) scale(3.1);
  }
}

@keyframes drift {
  to {
    transform: translateX(64px);
  }
}

@keyframes birds {
  0% {
    opacity: 0;
    transform: translate(780px, -6px);
  }
  6%,
  92% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translate(-260px, -64px);
  }
}

@keyframes settle-land {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes unmask {
  from {
    transform: translateY(112%);
  }
}

/* ------------------------------------------------------------------ bands */

.band {
  padding-block: var(--band);
}

.band-paper {
  background: var(--paper);
}

.band-mist {
  background: var(--mist);
}

.band-deep {
  background: var(--deep);
  color: #fff;
  --focus: var(--sun);
}

.band-deep .lede {
  color: rgba(255, 255, 255, 0.78);
}

/* The two deep bands begin with a shallow roof pitch instead of a straight
   cut: they slide up under the band before, and their top edge is a gable. */
.founder,
.cta {
  --pitch: clamp(16px, 2.8vw, 44px);
  margin-top: calc(-1 * var(--pitch));
  padding-top: calc(var(--band) + var(--pitch));
  clip-path: polygon(0 var(--pitch), 50% 0, 100% var(--pitch), 100% 100%, 0 100%);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head .lede {
  margin-top: 20px;
}

/* ----------------------------------------------------------- how we lend
 *
 * One roof over five stages. .roof-track is a size container, so the roof's
 * height, the sun's path along it and the post that drops to each stage are
 * all worked out from the track's width (100cqw) here in CSS. app.js sets only
 * --t (how far the sun has crossed, 0 to 1) and --ty (the roof's height under
 * it: 0 at the eaves, 1 at the ridge). Without the script --t is 1, so the
 * whole roof is lit and every stage is on.
 */

.roof-track {
  container-type: inline-size;
}

.roof-frame {
  --roof-h: 0px;
  position: relative;
}

.gable {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--roof-h);
  overflow: visible;
}

.gable polyline {
  fill: none;
  stroke: var(--rule);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* The lit roofline is the same line again, uncovered from the left as far as the sun has gone. */
.gable--lit {
  clip-path: inset(-12px calc((1 - var(--t, 1)) * 100%) -12px -12px);
}

.gable--lit polyline {
  stroke: var(--harbor);
  stroke-width: 2.5;
}

.track-sun {
  display: none;
}

.stages {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 32px;
}

/* Stacked (small screens): the roof becomes a beam down the left, and the sun travels down it. */
.stages::before,
.stages::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--rule);
}

.stages::after {
  background: var(--harbor);
  transform: scaleY(var(--t, 1));
  transform-origin: 50% 0;
}

/* The beam ends at the last number: this covers what would run on below it. */
.stage--last::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 19px;
  top: 38px;
  bottom: -12px;
  width: 6px;
  background: var(--paper);
}

.stage {
  position: relative;
  padding-left: 64px;
}

.stage-n {
  position: absolute;
  z-index: 1;
  left: 0;
  top: -6px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--harbor);
  border-radius: 50%;
  font-weight: 650;
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
  background: var(--paper);
  transition: background-color 0.45s ease, border-color 0.45s ease, color 0.45s ease, transform 0.55s var(--ease-out);
}

.stage--last .stage-n {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--deep);
}

/* The ring that goes out from "Fund" when the sun arrives. */
.stage--last .stage-n::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border: 1.5px solid var(--sun);
  border-radius: 50%;
  opacity: 0;
}

.is-done .stage--last .stage-n::after {
  animation: ring-out 1.3s var(--ease-out);
}

.stage h3 {
  margin-bottom: 10px;
}

.stage p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 1rem;
}

/* A stage the sun has not reached yet: its number waits, unlit. Only the number
   and its post change. The stage's words are never dimmed: they are the claims
   a reader (and a carrier reviewer) came for. */
.is-tracking .stage:not(.is-lit) .stage-n {
  background: var(--paper);
  border-color: var(--rule);
  color: #6f859b;
  transform: scale(0.88);
}

.is-tracking .track-sun {
  display: block;
  position: absolute;
  z-index: 2;
  left: 22px;
  top: 12px;
  width: 0;
  height: calc(100% - 24px);
  transform: translate3d(0, calc(var(--t, 1) * 100%), 0);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.track-sun::before {
  content: "";
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 58%, #fff8cf 0%, var(--sun) 62%, #ffd21c 100%);
  box-shadow: 0 0 0 5px rgba(255, 223, 43, 0.22), 0 6px 18px -2px rgba(255, 196, 87, 0.7);
}

.is-done .track-sun {
  opacity: 0;
}

/* The truss is worked out in container units. A browser without them keeps the stacked beam at every width. */
@supports (width: 1cqw) {
  @media (min-width: 900px) {
    .roof-frame {
      --roof-h: calc(100cqw / 13);
      --roof-gap: 30px;
      padding-top: calc(var(--roof-h) + var(--roof-gap));
    }

    .gable {
      display: block;
    }

    .stages {
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 28px;
    }

    .stages::before,
    .stages::after,
    .stage--last::after {
      content: none;
    }

    .stage {
      padding-left: 0;
      padding-top: 64px;
      /* --x: the centre of this stage's number, measured from the track's left edge.
         The roof rises 0.96 of its height over half the track, so the roofline is
         1.92 / 13 = 0.1477 of --x above the eaves on the left half, and the same
         of (width - x) on the right. --drop is the post from the roof to the number. */
      --x: calc(var(--i) * (100cqw + 28px) / 5 + 22px);
      --drop: calc(var(--roof-gap) + 0.1477 * var(--x));
    }

    .stage:nth-child(n + 4) {
      --drop: calc(var(--roof-gap) + 0.1477 * (100cqw - var(--x)));
    }

    .stage::before {
      content: "";
      position: absolute;
      left: 21px;
      bottom: 100%;
      width: 2px;
      height: var(--drop);
      background: var(--harbor);
      transform-origin: 50% 0;
      transition: transform 0.55s var(--ease-out);
    }

    .is-tracking .stage:not(.is-lit)::before {
      transform: scaleY(0);
    }

    .stage-n {
      top: 0;
    }

    .is-tracking .track-sun {
      left: 0;
      top: 0;
      height: 0;
      transform: translate3d(calc(var(--t, 1) * 100cqw), calc((1 - 0.96 * var(--ty, 0)) * var(--roof-h)), 0);
    }

    .track-sun::before {
      left: -12px;
      top: -12px;
      width: 24px;
      height: 24px;
    }
  }
}

@keyframes ring-out {
  from {
    opacity: 0.9;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(2.2);
  }
}

/* ------------------------------------------------------------ loans index */

.index-cols {
  display: grid;
  gap: 48px;
}

@media (min-width: 900px) {
  .index-cols {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.index-h {
  font-size: var(--s0);
  font-stretch: 100%;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--ink-soft);
  padding-bottom: 14px;
  border-bottom: 2px solid var(--harbor);
}

.index dl {
  margin: 0;
}

.index-row {
  display: grid;
  gap: 4px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.index-row dt {
  font-size: var(--s1);
  font-weight: 620;
  font-stretch: 118%;
  letter-spacing: -0.01em;
}

.index-row dd {
  margin: 0;
  color: var(--ink-soft);
}

@media (min-width: 640px) {
  .index-row {
    grid-template-columns: 13rem 1fr;
    gap: 24px;
    align-items: baseline;
  }
}

/* ---------------------------------------------------------------- founder */

.founder-grid {
  display: grid;
  gap: 48px;
  align-items: start;
}

/* The portrait sits in a thin sun-coloured frame, set off down and to the right.
   --drift (app.js) slides the frame a few pixels as the section scrolls past. */
.founder-frame {
  position: relative;
  width: min(300px, 70vw);
}

.founder-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--sun);
  border-radius: 2px;
  transform: translate3d(14px, calc(14px + var(--drift, 0px)), 0);
}

.founder-photo {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
}

.founder h2 {
  margin-bottom: 20px;
}

/* The timeline is a rail: a marker for each step, the last one lit. */
.timeline {
  position: relative;
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 24px;
  bottom: 24px;
  width: 1px;
  background: rgba(169, 190, 209, 0.32);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 16px;
  padding: 14px 0 14px 30px;
  border-bottom: 1px solid rgba(169, 190, 209, 0.2);
  color: rgba(255, 255, 255, 0.86);
}

.timeline li:last-child {
  border-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--sun);
  border-radius: 50%;
  background: var(--deep);
}

.timeline li:last-child::before {
  background: var(--sun);
}

.timeline-when {
  font-weight: 650;
  font-stretch: 112%;
  color: var(--sun);
  font-variant-numeric: tabular-nums;
}

.founder .text-link {
  color: #fff;
}

@media (min-width: 900px) {
  .founder-grid {
    grid-template-columns: 340px 1fr;
    gap: 80px;
  }
}

/* ---------------------------------------------------------------- reviews */

.reviews-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(82%, 380px);
  gap: 28px;
  /* Run to the viewport's right edge so the row reads as scrollable, not cut off. */
  margin-right: calc(-1 * (var(--gutter) + max(0px, (100vw - var(--wrap)) / 2)));
  /* Wider than the fade below, so the last review can be scrolled clear of it. */
  padding-right: max(var(--gutter), 80px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--fog) transparent;
  /* The row fades out at the right edge rather than being cut by it. */
  -webkit-mask: linear-gradient(90deg, #000 0, #000 calc(100% - 72px), transparent 100%);
  mask: linear-gradient(90deg, #000 0, #000 calc(100% - 72px), transparent 100%);
}

/* The mask clips at the row's own edge, so the focus ring is drawn inside it. */
.reviews-track:focus-visible {
  outline-offset: -3px;
}

/* With the script there are buttons and a rail, so the scrollbar can go.
   Without it, the scrollbar is how a mouse moves the row. */
.js .reviews-track {
  scrollbar-width: none;
}

.js .reviews-track::-webkit-scrollbar {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .js .reviews-track {
    cursor: grab;
  }
}

.reviews-track.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
  user-select: none;
}

.review {
  scroll-snap-align: start;
  margin: 0;
  display: flex;
  flex-direction: column;
  padding: 26px 0 0;
  border-top: 3px solid var(--harbor);
}

.review-mark {
  width: 30px;
  height: auto;
  margin-bottom: 18px;
  fill: var(--sun);
}

.review blockquote {
  margin: 0;
  flex: 1;
}

.review-title {
  font-size: var(--s1);
  font-weight: 650;
  font-stretch: 118%;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.review-text {
  color: var(--ink-soft);
  font-size: 1rem;
}

.review figcaption {
  display: grid;
  gap: 2px;
  margin-top: 16px;
  font-size: 0.875rem;
  font-weight: 600;
}

.review figcaption span + span {
  font-weight: 400;
  color: var(--ink-soft);
}

.reviews-nav {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.js .reviews-nav {
  display: flex;
}

.round-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--harbor);
  border-radius: 50%;
  background: transparent;
  color: var(--harbor);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
}

.round-btn svg {
  width: 20px;
  height: 20px;
}

.round-btn:hover {
  background: var(--harbor);
  color: #fff;
}

.round-btn:active {
  transform: scale(0.94);
}

.round-btn[aria-disabled="true"] {
  opacity: 0.35;
  cursor: default;
  background: transparent;
  color: var(--harbor);
}

/* Where you are in the row. */
.reviews-rail {
  flex: 1;
  max-width: 220px;
  height: 2px;
  margin-left: 14px;
  background: var(--rule);
  overflow: hidden;
}

.reviews-rail span {
  display: block;
  width: 30%;
  height: 100%;
  background: var(--harbor);
  transition: transform 0.2s ease-out;
}

/* ------------------------------------------------------------------- team */

.team {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 36px 20px;
}

@media (min-width: 1100px) {
  .team {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

body {
  overflow-x: clip;
}

/* The photos were taken against different backgrounds. At rest each is pulled
   a little toward the brand's blue so the grid reads as one set, and the one
   under the pointer comes up in full colour. Touch screens show full colour. */
.person-photo {
  position: relative;
  display: block;
  max-width: 240px;
  aspect-ratio: 4 / 5;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 2px;
  background: #cfd9e3;
}

.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.9s var(--ease-out), filter 0.5s ease;
}

.person-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--harbor);
  mix-blend-mode: color;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .person-photo img {
    filter: saturate(0.72) contrast(1.03);
  }

  .person-photo::after {
    opacity: 0.2;
  }

  .person:hover .person-photo img {
    filter: none;
    transform: scale(1.045);
  }

  .person:hover .person-photo::after {
    opacity: 0;
  }
}

.person p {
  margin: 0;
}

.person-name {
  font-weight: 650;
  font-stretch: 110%;
}

.person-title {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.person-nmls {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- tile map */

.states-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 1000px) {
  .states-grid {
    grid-template-columns: 1fr 1.25fr;
    gap: 72px;
  }
}

.tilemap {
  position: relative;
}

.tilemap-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 4px;
}

.tile {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 2px;
  /* No transform on a tile, ever: its readout (.tile-tip) is positioned against
     the whole map, and a transformed tile would become the readout's anchor. */
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  font-size: clamp(0.5625rem, 1.3vw, 0.75rem);
  font-weight: 500;
  color: #6f859b;
  letter-spacing: 0.02em;
}

.tile--on {
  background: var(--harbor);
  border-color: var(--harbor);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}

.tile--on abbr {
  text-decoration: none;
}

.tile--on:hover,
.tile--on:focus-visible {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--deep);
}

/* Colour alone is not a focus indicator (and the dawn animation can hold a tile's colour for a moment). */
.tile--on:focus-visible {
  outline: 2px solid var(--harbor);
  outline-offset: 2px;
}

/* Dawn crosses the map: when it scrolls into view, sunlight passes over the
   licensed states east to west (--c is the tile's column). The tiles are lit
   before and after; the light only passes over them, so a capture that never
   scrolls still shows which states are licensed. */
.js [data-reveal="map"].is-in .tile--on {
  animation: tile-on 0.7s ease-out backwards;
  animation-delay: calc((10 - var(--c, 0)) * 60ms);
}

@keyframes tile-on {
  45% {
    background: var(--sun);
    border-color: var(--sun);
    color: var(--deep);
  }
}

/* The readout sits in the empty top rows of the grid (rows 1–2, columns 2–8). */
.tile-tip,
.tilemap-hint {
  position: absolute;
  left: calc(100% / 11);
  top: 0;
  width: calc(100% * 7 / 11);
  padding: 2px 0 0 10px;
  font-size: clamp(0.75rem, 1.6vw, 0.9375rem);
  line-height: 1.3;
  pointer-events: none;
}

.tile-tip {
  visibility: hidden;
  opacity: 0;
  transform: translateY(4px);
  color: var(--ink);
  transition: opacity 0.2s ease, transform 0.3s var(--ease-out), visibility 0s linear 0.2s;
}

.tile-tip-state {
  display: block;
  font-weight: 650;
  font-stretch: 112%;
  font-size: 1.15em;
}

.tile-tip-number {
  display: block;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.tilemap-hint {
  margin: 0;
  color: var(--ink-soft);
}

/* The readout follows the same states that light a tile: the pointer, or
   keyboard focus. */
.tile--on:hover .tile-tip,
.tile--on:focus-visible .tile-tip {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

/* One readout at a time: while the pointer is on a tile, a focused tile elsewhere gives way. */
.tilemap:has(.tile--on:hover) .tile--on:focus-visible:not(:hover) .tile-tip {
  visibility: hidden;
  opacity: 0;
}

.tilemap:has(.tile--on:hover, .tile--on:focus-visible) .tilemap-hint {
  visibility: hidden;
}

/* ---------------------------------------------------------------- closing
 *
 * "Lights on": the day ends here. The house stands in silhouette, the sun is
 * going down behind the roof and the windows are lit. That is the finished
 * state; under .js the band waits in late afternoon (sun still up, windows
 * dark, no stars) until it scrolls into view, then moves to dusk.
 */

.cta {
  --dusk-w: min(88vw, 420px);
  position: relative;
  overflow: hidden;
  text-align: left;
  /* Room under the copy for the house on small screens. */
  padding-bottom: calc(var(--dusk-w) * 0.346 + 72px);
  isolation: isolate;
}

.dusk {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.dusk-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 16% at var(--dusk-x, 50%) 100%, rgba(255, 150, 96, 0.36) 0%, rgba(255, 150, 96, 0) 100%),
    radial-gradient(56% 62% at var(--dusk-x, 50%) 100%, rgba(255, 158, 92, 0.34) 0%, rgba(214, 110, 110, 0.12) 36%, rgba(120, 90, 150, 0) 70%),
    linear-gradient(180deg, var(--night) 0%, var(--deep) 52%, #102f55 100%);
  transition: opacity 2.6s ease;
}

.dusk-stars {
  opacity: 0.85;
  transition: opacity 2.8s ease 0.9s;
}

.dusk-stage {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--dusk-w);
  margin-left: calc(var(--dusk-w) / -2);
}

[data-scene="dusk"] .sun-rise {
  transform: translate3d(4%, 36%, 0);
  transition: transform 3s var(--ease-out);
}

[data-scene="dusk"] .sun-disc::after {
  opacity: 0.82;
  transition: opacity 3s ease;
}

[data-scene="dusk"] .sun-halo {
  background: radial-gradient(
    closest-side,
    rgba(255, 176, 96, 0.5) 0%,
    rgba(255, 150, 96, 0.2) 28%,
    rgba(255, 130, 96, 0.07) 56%,
    rgba(255, 130, 96, 0) 100%
  );
}

[data-scene="dusk"] .sun-rays {
  opacity: 0.55;
}

[data-scene="dusk"] .ridge {
  fill: #1c4674;
}

[data-scene="dusk"] .hills-far {
  fill: #0e3257;
}

[data-scene="dusk"] .hills-near,
[data-scene="dusk"] .trees {
  fill: #082340;
}

[data-scene="dusk"] .ground-hi,
[data-scene="dusk"] .ground-lo {
  stop-color: var(--deep);
}

[data-scene="dusk"] .window-lit,
[data-scene="dusk"] .window-glow,
[data-scene="dusk"] .pool {
  transition: opacity 0.5s ease 1.5s;
}

[data-scene="dusk"] .house-window--b .window-lit,
[data-scene="dusk"] .house-window--b .window-glow,
[data-scene="dusk"] .pool--b {
  transition-delay: 2s;
}

.js [data-reveal="dusk"]:not(.is-in) .sun-rise {
  transform: translate3d(0, 0, 0);
}

.js [data-reveal="dusk"]:not(.is-in) .sun-disc::after {
  opacity: 0.15;
}

.js [data-reveal="dusk"]:not(.is-in) .dusk-sky {
  opacity: 0.55;
}

.js [data-reveal="dusk"]:not(.is-in) .dusk-stars,
.js [data-reveal="dusk"]:not(.is-in) .window-lit,
.js [data-reveal="dusk"]:not(.is-in) .window-glow,
.js [data-reveal="dusk"]:not(.is-in) .pool {
  opacity: 0;
}

.cta-inner {
  position: relative;
  z-index: 1;
}

.cta h2 {
  max-width: 14em;
  font-size: clamp(var(--s3), 6vw, var(--s5));
}

.cta .lede {
  margin-top: 20px;
}

@media (min-width: 900px) {
  .cta {
    --dusk-w: min(44vw, 560px);
    --dusk-right: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
    --dusk-x: calc(100% - var(--dusk-right) - var(--dusk-w) * 0.597);
    padding-bottom: var(--band);
  }

  .dusk-stage {
    left: auto;
    right: var(--dusk-right);
    margin-left: 0;
  }
}

/* -------------------------------------------------------------- page hero
 *
 * Each inner page has the sun at its own hour: morning on Loans, noon on About,
 * afternoon on Licensing. --dx is where it stands across the band and --up is
 * how high above the bottom edge. Moving between those pages the sun is one
 * shared element (view-transition-name), so it glides along its arc.
 */

.page-hero {
  position: relative;
  overflow: hidden;
  overflow: clip;
  margin-top: calc(-1 * var(--header-h));
  /* Below 1100px the sun has a strip of its own under the text. */
  padding-block: calc(var(--header-h) + clamp(56px, 8vw, 104px)) calc(clamp(56px, 9vw, 84px) * 2.3 + 24px);
  background: linear-gradient(180deg, var(--night) 0%, var(--deep) 52%, #0b2c4d 100%);
  color: #fff;
  --focus: var(--sun);
  isolation: isolate;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  letter-spacing: -0.03em;
  max-width: 13em;
}

.page-hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.page-hero h1 .line > span {
  display: block;
  animation: unmask 0.95s var(--ease-out) 0.1s both;
}

.page-hero-lede {
  margin: 24px 0 0;
  font-size: var(--s1);
  line-height: 1.45;
  max-width: 34em;
  color: rgba(255, 255, 255, 0.82);
  text-wrap: pretty;
  animation: settle 0.9s var(--ease-out) 0.45s both;
}

.page-hero .wrap {
  position: relative;
  z-index: 1;
}

.day {
  --dd: clamp(56px, 9vw, 84px);
  --dx: 78%;
  --up: calc(var(--dd) * 1.4);
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.day--noon {
  --dx: 52%;
  --up: calc(var(--dd) * 1.8);
}

.day--afternoon {
  --dx: 26%;
  --up: calc(var(--dd) * 1.5);
}

.day-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--dx) calc(100% - var(--up)), rgba(255, 214, 110, 0.3) 0, rgba(255, 190, 100, 0.1) 16%, rgba(255, 190, 100, 0) 40%),
    radial-gradient(120% 90% at var(--dx) 100%, rgba(52, 112, 170, 0.52) 0%, rgba(30, 84, 134, 0.2) 44%, rgba(18, 60, 102, 0) 72%);
}

.day-sun {
  position: absolute;
  left: var(--dx);
  top: calc(100% - var(--up));
  width: var(--dd);
  height: var(--dd);
  margin: calc(var(--dd) / -2) 0 0 calc(var(--dd) / -2);
  view-transition-name: sun;
}

.day-land {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: clamp(52px, 8vw, 108px);
}

.day-house {
  fill: #061a2e;
}

.day-house rect {
  fill: var(--pane-lo);
}

/* Wide: the sun stands in the right of the band, at the page's hour, and the
   text keeps to the left 60% so the two can never meet. */
@media (min-width: 1100px) {
  .page-hero {
    padding-bottom: clamp(88px, 10vw, 136px);
  }

  .page-hero h1,
  .page-hero-lede {
    max-width: min(34em, 60%);
  }

  .page-hero h1 {
    max-width: min(13em, 60%);
  }

  .day {
    --dd: clamp(72px, 8.5vw, 116px);
    --dx: 88%;
    --up: clamp(128px, 13vw, 176px);
  }

  .day--noon {
    --dx: 85%;
    --up: clamp(200px, 22vw, 300px);
  }

  .day--afternoon {
    --dx: 66%;
    --up: clamp(140px, 15vw, 206px);
  }
}

/* ---------------------------------------------------------------- content */

.promises {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 32px;
}

@media (min-width: 760px) {
  .promises {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.promises li {
  padding-top: 20px;
  border-top: 2px solid var(--harbor);
}

.promises h3 {
  margin-bottom: 10px;
}

.promises p {
  margin: 0;
  color: var(--ink-soft);
}

.program-section {
  display: grid;
  gap: 24px;
}

@media (min-width: 1000px) {
  .program-section {
    grid-template-columns: 1fr 1.6fr;
    gap: 72px;
    align-items: start;
  }

  .program-section .section-head {
    position: sticky;
    top: 112px;
  }
}

.programs {
  margin: 0;
}

.program {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

.program:first-child {
  border-top: 2px solid var(--harbor);
}

.program dt {
  font-size: var(--s1);
  font-weight: 650;
  font-stretch: 118%;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.program dd {
  margin: 0;
  color: var(--ink-soft);
  max-width: 38em;
}

.prose-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 1000px) {
  .prose-grid {
    grid-template-columns: 1fr 1.6fr;
    gap: 72px;
  }
}

.prose {
  max-width: 40em;
}

.prose p {
  font-size: 1.125rem;
  line-height: 1.65;
}

.prose-dark p {
  color: rgba(255, 255, 255, 0.86);
}

.prose-dark h2 {
  margin-bottom: 28px;
}

.founder-ids {
  font-size: 0.9375rem !important;
  color: var(--fog) !important;
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------- licensing */

.licensing-grid {
  display: grid;
  gap: 56px;
}

@media (min-width: 1000px) {
  .licensing-grid {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
  }
}

.licensing-grid h2 {
  margin-bottom: 16px;
}

.license-table {
  width: 100%;
  margin-top: 28px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.license-table th,
.license-table td {
  text-align: left;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}

.license-table thead th {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--harbor);
}

.license-table tbody th {
  font-weight: 600;
}

.licensing-side {
  display: grid;
  gap: 40px;
  align-content: start;
}

.ids {
  margin: 0;
}

.ids div {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.ids dt {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.ids dd {
  margin: 2px 0 0;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.notice-figure {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.notice {
  font-size: 0.9375rem !important;
  line-height: 1.6 !important;
  letter-spacing: 0.01em;
}

.eho-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.eho {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.eho--ink {
  color: var(--harbor);
}

/* ------------------------------------------------------------ get started */

.get-started {
  background: var(--mist);
  padding-bottom: var(--band);
}

.gs-grid {
  display: grid;
}

.gs-intro {
  color: #fff;
  --focus: var(--sun);
  background: var(--deep);
  margin-inline: calc(-1 * var(--gutter));
  padding: clamp(48px, 7vw, 96px) var(--gutter) 88px;
}

.gs-intro h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.03em;
}

.gs-intro .lede {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.82);
}

.gs-h {
  font-size: var(--s0);
  font-stretch: 100%;
  letter-spacing: 0;
  font-weight: 650;
  margin: 40px 0 16px;
}

.next-steps {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.next-steps li {
  display: flex;
  gap: 14px;
  align-items: center;
}

.step-n {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-weight: 650;
  font-size: 0.875rem;
}

.gs-contact {
  margin: 0;
}

.gs-contact a {
  font-weight: 650;
}

/* The mark's sun, coming up over a horizon line, closes the intro. A still image:
   nothing on the opt-in page moves or waits. */
.gs-intro::after {
  content: "";
  display: block;
  height: 46px;
  margin-top: 40px;
  background:
    radial-gradient(circle at 46px 100%, var(--sun) 0 30px, rgba(255, 223, 43, 0.2) 31px, rgba(255, 223, 43, 0) 72px) no-repeat,
    linear-gradient(rgba(169, 190, 209, 0.4), rgba(169, 190, 209, 0.4)) 0 100% / 100% 1px no-repeat;
}

.form-card {
  margin-top: -48px;
}

@media (min-width: 1000px) {
  .get-started {
    background: linear-gradient(90deg, var(--deep) 0 42%, var(--mist) 42% 100%);
    padding-top: clamp(48px, 7vw, 96px);
  }

  .gs-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(48px, 7vw, 112px);
    align-items: start;
  }

  .gs-intro {
    position: sticky;
    top: 120px;
    margin: 0;
    padding: 12px 0 0;
    background: none;
  }

  .form-card {
    margin-top: 0;
  }
}

@media (min-width: 1240px) {
  /* Past the wrap's max width the intro column stops growing: split in the
     middle of the column gap, not at a fixed share of the viewport (which left
     the white intro text on the light side on very wide screens). */
  .get-started {
    background: linear-gradient(90deg, var(--deep) 0 calc(50% - 105px), var(--mist) calc(50% - 105px) 100%);
  }
}

.recording-notice {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.recording-notice a {
  color: var(--harbor);
  font-weight: 600;
}

.form-card {
  background: #fff;
  border-radius: 4px;
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 1px 0 rgba(7, 29, 51, 0.06), 0 24px 48px -24px rgba(7, 29, 51, 0.28);
  scroll-margin-top: 96px;
}

.form-errors {
  display: none;
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid #e3a5a0;
  border-radius: 3px;
  background: #fbeceb;
  color: #7a1913;
  font-weight: 600;
}

.form-errors.is-visible {
  display: block;
}

.form-error {
  margin: 0;
}

.quote-form {
  display: grid;
  gap: 22px;
}

.field-row {
  display: grid;
  gap: 22px;
}

@media (min-width: 640px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field label,
.chips legend,
.consent legend {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.req {
  color: var(--brick);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid #6f859b;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  caret-color: var(--harbor);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease, outline-color 0.15s ease, box-shadow 0.2s ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--harbor);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--harbor) 50%),
    linear-gradient(135deg, var(--harbor) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--harbor);
  outline: 3px solid rgba(11, 46, 80, 0.18);
  outline-offset: 0;
}

.hint {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
}

.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid #6f859b;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.chip input:active + span {
  transform: scale(0.96);
}

.chip input:hover + span {
  border-color: var(--harbor);
}

.chip input:checked + span {
  background: var(--harbor);
  border-color: var(--harbor);
  color: #fff;
}

.chip input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.consent {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  display: grid;
  gap: 14px;
}

.consent legend {
  float: left;
  width: 100%;
  margin-bottom: 4px;
}

.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-soft);
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--harbor);
  cursor: pointer;
}

.check--required {
  color: var(--ink);
  font-size: 0.9375rem;
}

.check a {
  font-weight: 600;
  color: var(--harbor);
}

/* --------------------------------------------------------- thanks and 404 */

.thanks {
  padding-block: clamp(72px, 10vw, 140px);
}

.thanks-inner {
  max-width: 44rem;
}

.thanks-mark {
  width: 140px;
  height: auto;
  margin-bottom: 32px;
}

.thanks-mark .mark-roof,
.thanks-mark .mark-windows {
  fill: var(--harbor);
}

.thanks-mark .mark-glow {
  display: none;
}

/* "We've got it": the sun comes up and the lights go on, one pane after another. */
.thanks-mark--lit .mark-sun {
  transform-box: fill-box;
  animation: mark-rise 1.9s var(--ease-rise) 0.25s both;
}

.thanks-mark--lit .mark-windows rect {
  fill: #f0b429;
  animation: mark-light 0.5s ease-out both;
  animation-delay: calc(1.5s + var(--p, 0) * 90ms);
}

.thanks-mark--lit .mark-windows rect:nth-child(2) { --p: 1; }
.thanks-mark--lit .mark-windows rect:nth-child(3) { --p: 2; }
.thanks-mark--lit .mark-windows rect:nth-child(4) { --p: 3; }
.thanks-mark--lit .mark-windows rect:nth-child(5) { --p: 4; }
.thanks-mark--lit .mark-windows rect:nth-child(6) { --p: 5; }
.thanks-mark--lit .mark-windows rect:nth-child(7) { --p: 6; }
.thanks-mark--lit .mark-windows rect:nth-child(8) { --p: 7; }

/* Page not found: the same house at night. Nobody home. */
.thanks-mark--night .mark-sun {
  display: none;
}

.thanks-mark--night .mark-roof {
  fill: none;
  stroke: var(--harbor);
  stroke-width: 5;
  stroke-linejoin: round;
}

.thanks-mark--night .mark-windows {
  fill: none;
  stroke: var(--harbor);
  stroke-width: 4;
}

.thanks h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.thanks .next-steps {
  margin: 28px 0;
}

@keyframes mark-rise {
  from {
    transform: translateY(46%);
  }
}

@keyframes mark-light {
  from {
    fill: var(--harbor);
  }
}

/* ------------------------------------------------------------------ legal */

.legal {
  display: grid;
  gap: 40px;
  padding-block: clamp(48px, 7vw, 96px);
}

@media (min-width: 1000px) {
  .legal {
    grid-template-columns: 260px 1fr;
    gap: 72px;
  }

  .legal__toc {
    position: sticky;
    top: 112px;
    align-self: start;
  }
}

.legal__toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 0.875rem;
}

.legal__toc a {
  color: var(--ink-soft);
  text-decoration: none;
}

.legal__toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.legal__doc {
  max-width: 44em;
}

.legal__doc h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.legal__doc h2 {
  font-size: var(--s1);
  margin: 40px 0 14px;
  scroll-margin-top: 96px;
}

.legal__meta,
.muted {
  color: var(--ink-soft);
}

.legal__doc li {
  margin-bottom: 6px;
}

.legal__doc hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 48px 0 20px;
}

/* ----------------------------------------------------------------- footer */

.site-footer {
  background: var(--deep);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9375rem;
  --focus: var(--sun);
  border-top: 1px solid rgba(169, 190, 209, 0.16);
}

.footer-grid {
  display: grid;
  gap: 40px;
  padding-block: 64px 40px;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1000px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.site-footer .logo {
  color: #fff;
}

.footer-tag {
  margin-top: 18px;
  color: #fff;
  font-stretch: 112%;
  font-weight: 600;
}

.footer-h {
  font-size: 0.875rem;
  font-stretch: 100%;
  letter-spacing: 0;
  font-weight: 650;
  color: #fff;
  margin-bottom: 14px;
}

.site-footer address {
  font-style: normal;
  line-height: 1.7;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-compliance .eho {
  color: #fff;
  margin-bottom: 14px;
}

.footer-compliance p {
  font-variant-numeric: tabular-nums;
}

.footer-legal {
  padding-block: 24px 40px;
  border-top: 1px solid rgba(169, 190, 209, 0.16);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-legal p {
  max-width: 72em;
}

.footer-legal a {
  text-decoration: underline;
}

/* ---------------------------------------------------------------- reveals
 *
 * [data-reveal] marks something that arrives as it scrolls into view. The
 * waiting state exists ONLY under .js (set in <head>, removed there again if
 * the site script never runs), so without script everything is simply there.
 * app.js adds .is-in. The opt-in form, the legal pages and the license table
 * carry no data-reveal and never wait on anything (involve-motion.test).
 */

/* What waits is only POSITION: a heading and what follows it sit a little low
   and rise into place. Nothing that carries words is ever transparent or
   clipped, so a full-page capture that never scrolls (a reviewer's tool, a
   crawler, "save as PDF") still records every word. */
[data-reveal="head"] h2 {
  transition: transform 1s var(--ease-out);
}

[data-reveal="head"] > :not(h2):not([data-reveal]) {
  transition: transform 0.8s var(--ease-out) 0.14s;
}

.js [data-reveal="head"]:not(.is-in) h2 {
  transform: translateY(30px);
}

.js [data-reveal="head"]:not(.is-in) > :not(h2):not([data-reveal]) {
  transform: translateY(16px);
}

/* A list arrives as a list: one row after another, the delay capped. */
[data-reveal="list"] > * {
  transition: transform 0.7s var(--ease-out);
  transition-delay: calc(min(var(--n, 0), 8) * 55ms);
}

.js [data-reveal="list"]:not(.is-in) > * {
  transform: translateY(18px);
}

[data-reveal="list"] > :nth-child(2) { --n: 1; }
[data-reveal="list"] > :nth-child(3) { --n: 2; }
[data-reveal="list"] > :nth-child(4) { --n: 3; }
[data-reveal="list"] > :nth-child(5) { --n: 4; }
[data-reveal="list"] > :nth-child(6) { --n: 5; }
[data-reveal="list"] > :nth-child(7) { --n: 6; }
[data-reveal="list"] > :nth-child(8) { --n: 7; }
[data-reveal="list"] > :nth-child(n + 9) { --n: 8; }

/* ------------------------------------------------------- page transitions
 *
 * Moving between pages: the header holds still, the old page lifts away, the
 * new one settles in, and the sun (inner pages) glides to its new hour. Pure
 * CSS; browsers without cross-document view transitions just navigate.
 */

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

.site-header {
  view-transition-name: site-header;
}

::view-transition-old(root) {
  animation: page-leave 0.22s ease-in both;
}

::view-transition-new(root) {
  animation: page-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

::view-transition-group(sun) {
  animation-duration: 0.75s;
  animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
}

@keyframes page-leave {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ------------------------------------------------------------------ motion */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Reduced motion: nothing moves. Every scene is drawn finished, so this leaves
   a risen sun and lit windows; hover and focus still change colour at once. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Paper never waits for a scroll. */
@media print {
  [data-reveal],
  [data-reveal] * {
    opacity: 1 !important;
    transform: none !important;
  }
}
