/* Home page motion. Loaded only on the home page. home.js adds the classes used here, so
   without JavaScript or with reduced motion nothing is hidden or moved. Transform and opacity only. */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }

  /* Hero photo drifts slightly slower than the page; the scale hides the edges. */
  .hero__media { transform: translate3d(0, calc(var(--hero-shift, 0) * 1px), 0) scale(1.08); will-change: transform; }

  /* Warm-to-cool reading line that fills as the page scrolls. */
  .scroll-glow {
    position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; pointer-events: none;
    background: linear-gradient(90deg, #f0b75e 0%, #fbf5ea 50%, #a9c6e8 100%);
    transform: scaleX(var(--p, 0)); transform-origin: left center;
  }

  /* A thin light line drawn along the top of the control steps. */
  .home-line { position: relative; }
  .home-line::after {
    content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, #f0b75e, #fbf5ea 60%, #c3d7ef);
    transform: scaleX(var(--p, 0)); transform-origin: left center;
  }

  /* Marker that travels the 2700K to 6500K scale as the section passes. */
  .cct-scale { position: relative; }
  .cct-scale__marker {
    position: absolute; top: -3px; left: 0; width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 4px 12px -2px rgba(0, 0, 0, 0.3);
    transform: translate3d(calc(var(--p, 0) * var(--travel, 0) * 1px), 0, 0);
    pointer-events: none;
  }
}

/* Controls band (scripts/lib/ready2go.mjs ready2goHomeBand): "One room, or the whole building?",
   ReadyToGo and wireless DALI-2 as two photo panels on Tunable's warm-on-dark. The ReadyToGo green stays
   on its mark, "To" and a thin rule over its panel. */
.ctl-home { padding-block: clamp(56px, 8vw, 112px); background: #0b0b0c; color: rgba(255, 255, 255, 0.72); }
.ctl-home__title { margin: 0 0 0.4em; font-size: clamp(1.9rem, 1.1rem + 2.6vw, 3.1rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1.08; color: #fff; text-wrap: balance; }
.ctl-home__lede { max-width: 36rem; margin: 0 0 clamp(28px, 4vw, 44px); }
.ctl-home__panels { display: grid; gap: clamp(20px, 3vw, 32px); margin: 0; padding: 0; list-style: none; }
.ctl-home__panel { border-top: 2px solid rgba(255, 255, 255, 0.16); }
.ctl-home__panel--r2g { border-top-color: var(--r2g-on-dark); }
.ctl-home__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; background: #141416; }
.ctl-home__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.ctl-home__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 80% 45%; transition: transform 0.6s ease; }
.ctl-home__body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: clamp(22px, 3vw, 32px); }
.ctl-home__brand { min-height: 48px; color: #fff; }
.ctl-home__eyebrow { display: flex; align-items: center; min-height: 48px; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #f2bf6c; }
.ctl-home__name { font-size: clamp(1.3rem, 1rem + 0.9vw, 1.7rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.18; color: #fff; text-wrap: balance; }
.ctl-home__line { max-width: 32rem; }
.ctl-home__more { margin-top: auto; padding-top: 8px; font-weight: 500; color: #fff; }
.ctl-home__more::after { content: " \2192"; transition: margin 0.2s ease; }
.ctl-home__link:hover .ctl-home__image { transform: scale(1.03); }
.ctl-home__link:hover .ctl-home__more::after { margin-left: 4px; }
.ctl-home__note { margin: clamp(24px, 3vw, 36px) 0 0; }
.ctl-home__note a { color: #fff; text-underline-offset: 3px; }
.ctl-home .r2g-by { color: rgba(255, 255, 255, 0.7); }
.ctl-home :focus-visible { outline: 2px solid #f2bf6c; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .ctl-home__image, .ctl-home__more::after { transition: none; } }
@media (min-width: 800px) {
  .ctl-home__panels { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

