/* ==========================================================================
   Homepage layout, section by section, in page order.
   Shared pieces (buttons, cards, tabs, form fields) are in components.css.
   ========================================================================== */

/* Carousels run past the edge of the page on one or both sides */
.reviews,
.installs,
.packages {
  overflow-x: clip;
}

.reviews .swiper,
.installs .swiper,
.packages .swiper {
  overflow: visible;
}

/* Section headings: a sun-coloured highlighter stroke behind the green
   phrase. Home page only (`is-home` on <body>), as this file loads on every
   page. */
.is-home h2 .accent {
  background: linear-gradient(transparent 68%, rgba(248, 168, 40, 0.32) 68%, rgba(248, 168, 40, 0.32) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* 1. Banner
   --------------------------------------------------------------------------
   A rounded frame holding the photo, a green shade that keeps the text
   readable, the copy and an offer card. The key figures card
   overlaps the bottom edge of the frame.
   ========================================================================== */

.hero {
  --stats-lift: clamp(2.5rem, 5vw, 4.25rem);
}

.hero__frame {
  position: relative;
  isolation: isolate;
  margin-inline: var(--frame);
  border-radius: var(--r-xl);
  background: var(--pine);
  overflow: hidden;
}

/* Phones: the photo fills the top of the frame and fades into solid green
   behind the text. */
.hero__media {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: -2;
  display: block;
  height: 23rem;
}

/* Taller than its frame so it can drift as the page scrolls */
.hero__media img {
  position: absolute;
  top: -9%;
  left: 0;
  width: 100%;
  max-width: none;
  height: 118%;
  object-fit: cover;
  object-position: 55% 20%;
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(6, 40, 29, 0.05) 0,
    rgba(6, 40, 29, 0.2) 6rem,
    rgba(6, 40, 29, 0.9) 13.5rem,
    var(--pine) 19rem
  );
}

/* The frame is inset from the page edge; the container gives that much back
   so the banner text lines up with the header and the sections below. */
.hero__inner {
  --bs-gutter-x: calc((var(--gutter) - var(--frame)) * 2);
  position: relative;
  display: grid;
  gap: 2rem;
  padding-top: 12rem;
  padding-bottom: calc(var(--stats-lift) + 2rem);
}

.hero__title {
  max-width: 11.6em;
  margin-top: 1.25rem;
  color: var(--white);
  font-size: clamp(2.5rem, min(1rem + 3.4vw, 8.6vh), 4.25rem);
  letter-spacing: -0.042em;
  line-height: 1.04;
}

.hero__title-sun {
  color: var(--sun-bright);
}

.hero__lede {
  max-width: 30em;
  margin-top: 1.25rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--text-lead);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero__actions .button {
  flex: 1 1 100%;
}

.hero__points {
  display: none;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 1.75rem 0 0;
  padding: 0;
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: 600;
  list-style: none;
}

.hero__points li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero__points .icon {
  color: var(--sun-bright);
}

/* Offer card: dark glass, so its text stays readable over any photo */
.hero__offer {
  position: relative;
  display: none;
  align-self: end;
  width: 17.5rem;
  padding: 1.35rem;
  border-radius: var(--r-lg);
  background: rgba(6, 40, 29, 0.74);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  color: var(--white);
  text-decoration: none;
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  transition: background-color var(--fast) ease;
}

.hero__offer:hover {
  background: rgba(6, 40, 29, 0.9);
  color: var(--white);
}

.hero__offer > span {
  display: block;
}

.hero__offer .hero__offer-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: var(--r-pill);
  background: var(--sun);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 800;
  line-height: 1.5;
}

.hero__offer-size {
  margin-top: 1rem;
  font-size: 4.25rem;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.hero__offer-size small {
  margin-left: 0.35rem;
  color: var(--sun-bright);
  font-size: 1.25rem;
  letter-spacing: 0;
}

.hero__offer-text {
  max-width: 12.5em;
  margin-top: 0.4rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.hero__offer .hero__offer-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero__offer-specs span {
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.5;
}

.hero__offer .hero__offer-go {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  transition: background-color var(--fast) ease, transform var(--medium) var(--ease-out);
}

.hero__offer:hover .hero__offer-go {
  background: var(--sun);
  transform: rotate(45deg);
}

@media (min-width: 576px) {
  .hero__actions .button {
    flex: 0 1 auto;
  }
}

/* Tablets and up: the photo fills the frame and the text sits on its left */
@media (min-width: 768px) {
  .hero__media {
    bottom: 0;
    height: auto;
  }

  .hero__media img {
    object-position: 82% 50%;
  }

  .hero__shade {
    background: linear-gradient(90deg, rgba(6, 40, 29, 0.96) 0%, rgba(6, 40, 29, 0.86) 45%, rgba(6, 40, 29, 0.5) 100%);
  }

  .hero__inner {
    padding-top: clamp(3rem, 8vh, 5.5rem);
    padding-bottom: calc(var(--stats-lift) + clamp(2.5rem, 6vh, 4rem));
  }

  .hero__points {
    display: flex;
  }
}

@media (min-width: 992px) {
  .hero__frame {
    display: grid;
    min-height: clamp(33rem, calc(100vh - 12rem), 49rem);
  }

  .hero__media img {
    object-position: 100% 50%;
  }

  .hero__shade {
    background: linear-gradient(
        90deg,
        rgba(6, 40, 29, 0.95) 0%,
        rgba(6, 40, 29, 0.88) 30%,
        rgba(6, 40, 29, 0.55) 50%,
        rgba(6, 40, 29, 0.1) 68%,
        rgba(6, 40, 29, 0) 80%
      ),
      linear-gradient(0deg, rgba(6, 40, 29, 0.55) 0%, rgba(6, 40, 29, 0) 36%);
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .hero__offer {
    display: block;
  }
}

@media (min-width: 1400px) {
  .hero__inner {
    --bs-gutter-x: calc(var(--gutter) * 2);
  }
}

/* Banner graphic with its own text, shown without .hero__inner. The frame
   takes the picture's shape so none of it is cropped: the tall phone graphic
   below 768px, the wide one above. Nothing sits on top of it, so its printed
   small print stays readable. */
/* --hero-ratio-sm / --hero-ratio are set on the frame from the banner's
   phone and desktop images (components/home-banner.php) */
.hero__frame--graphic {
  aspect-ratio: var(--hero-ratio-sm, 939 / 1251);
  box-shadow: 0 32px 64px -40px rgba(6, 40, 29, 0.6);
}

.hero__frame--graphic .hero__media {
  bottom: 0;
  height: auto;
}

.hero__frame--graphic .hero__media img {
  top: 0;
  height: 100%;
}

/* The graphic carries its own text, so it shows at full strength */
.hero__frame--graphic .hero__shade {
  display: none;
}

/* Covers the whole graphic, so the "get your proposal" button printed on it
   works. On hover a thin sun-coloured ring lights up round the frame's edge. */
.hero__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.hero__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 3px rgba(248, 168, 40, 0);
  transition: box-shadow var(--medium) var(--ease-out);
}

.hero__link:hover::after,
.hero__link:focus-visible::after {
  box-shadow: inset 0 0 0 3px rgba(248, 168, 40, 0.85);
}

.hero__link:focus-visible {
  outline: none;
}

@media (min-width: 768px) {
  .hero__frame--graphic {
    min-height: 0;
    aspect-ratio: var(--hero-ratio, 2134 / 768);
    box-shadow: 0 40px 80px -48px rgba(6, 40, 29, 0.65);
  }
}

/* Offer bar: three points and the quote button, on a white card just under
   the graphic. Phones: the points sit side by side as an icon over a short
   label, and the button runs full width beneath them. */
.hero-bar {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.75rem;
  margin-top: clamp(0.85rem, 2vw, 1.5rem);
  padding: clamp(0.75rem, 1.6vw, 1rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.hero-bar__points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-bar__points li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.35rem;
  text-align: center;
}

.hero-bar__points li + li {
  border-left: 1px solid var(--line);
}

.hero-bar__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--mist-deep);
  color: var(--green-deep);
  transition:
    background-color var(--fast) ease,
    color var(--fast) ease,
    transform var(--medium) var(--ease-out);
}

.hero-bar__icon .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.hero-bar__points li:hover .hero-bar__icon {
  background: var(--sun);
  color: var(--ink);
  transform: rotate(-10deg) scale(1.06);
}

.hero-bar strong {
  display: block;
  color: var(--ink);
  font-size: var(--text-xs);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.hero-bar small {
  display: none;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.35;
}

.hero-bar__cta {
  width: 100%;
}

@media (min-width: 768px) {
  .hero-bar__points li {
    flex-direction: row;
    gap: 0.9rem;
    padding: 0.7rem 0.5rem;
    text-align: left;
  }

  .hero-bar__points li + li {
    padding-left: clamp(0.75rem, 1.6vw, 1.25rem);
  }

  .hero-bar__icon {
    width: 3rem;
    height: 3rem;
  }

  .hero-bar__icon .icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .hero-bar strong {
    font-size: var(--text-base);
  }

  .hero-bar small {
    display: block;
  }
}

@media (min-width: 1200px) {
  .hero-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    padding-left: 1.25rem;
  }

  .hero-bar__cta {
    width: auto;
  }
}

/* Entrance: these wait, transparent, for the intro to bring them in */
html.motion [data-hero-in],
html.motion [data-hero-title] {
  opacity: 0;
}

/* Key figures */
.stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: calc(var(--stats-lift) * -1);
  padding: clamp(0.25rem, 1vw, 0.75rem);
  border-radius: var(--r-xl);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.stat {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 2.2vw, 1.75rem) clamp(0.85rem, 2vw, 1.75rem);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.stat:nth-of-type(-n + 2) {
  border-top: 0;
}

.stat:nth-of-type(odd) {
  border-left: 0;
}

.stat__icon {
  display: none;
  flex: none;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--mist-deep);
  color: var(--green-deep);
}

.stat__icon .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.stat__num {
  color: var(--ink);
  font-size: clamp(1.75rem, 1.15rem + 2vw, 2.75rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.stat__label {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.35;
}

.stats__flag {
  position: absolute;
  top: 0;
  right: clamp(1rem, 3vw, 2.25rem);
  transform: translateY(-50%);
}

@media (min-width: 576px) {
  .stat__icon {
    display: grid;
  }
}

@media (min-width: 992px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stat,
  .stat:nth-of-type(odd) {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .stat:first-of-type {
    border-left: 0;
  }
}

/* Moving strip (script duplicates the items and moves the track) */
.ticker {
  padding-top: clamp(2.75rem, 5.5vw, 5rem);
  overflow: hidden;
}

.ticker__track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
}

.ticker__track > * {
  flex: none;
  margin-right: clamp(1.25rem, 2.6vw, 2.75rem);
}

.ticker__track span {
  color: var(--ink);
  font-size: clamp(2rem, 1.1rem + 3.6vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.2;
  white-space: nowrap;
  word-spacing: var(--word-space-display);
}

/* Every other phrase is drawn as an outline */
@supports (-webkit-text-stroke: 1px black) {
  .ticker__track span.is-outline {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--green);
  }
}

.ticker__track .icon {
  width: clamp(1.5rem, 2.4vw, 2.5rem);
  height: clamp(1.5rem, 2.4vw, 2.5rem);
  color: var(--sun);
}

/* 2. About us
   ========================================================================== */

.about {
  padding-top: clamp(3.75rem, 6.5vw, 6.5rem);
  /* The dots and glow behind the photos reach past the page edge on phones */
  overflow-x: clip;
}

.about__grid {
  display: grid;
  gap: clamp(3rem, 6vw, 6.5rem);
  align-items: center;
}

/* Phones and tablets: heading, then the photos, then the copy */
@media (max-width: 991.98px) {
  .about__grid {
    row-gap: 0;
  }

  .about__text {
    display: contents;
  }

  .about__text > h2 {
    order: -1;
  }
  .about__media {
    margin-top: 2rem;
  }
}

@media (min-width: 992px) {
  .about__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
}

/* Two overlapping photos and a floating card, over a patch of
   dots and a soft sun glow */
.about__media {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 35rem;
  margin-inline: auto;
  padding-bottom: 15%;
}

.about__media::before {
  content: "";
  position: absolute;
  top: -1.5rem;
  left: -1.5rem;
  z-index: -1;
  width: 42%;
  height: 34%;
  background-image: radial-gradient(var(--green) 1.6px, transparent 1.8px);
  background-size: 16px 16px;
  opacity: 0.28;
}

.about__media::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -8%;
  z-index: -1;
  width: 75%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 168, 40, 0.24), rgba(248, 168, 40, 0) 68%);
  pointer-events: none;
}

.about__photo--main {
  width: 78%;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
}

.about__photo--side {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 56%;
  aspect-ratio: 3 / 2;
  border: 0.5rem solid var(--white);
  box-shadow: var(--shadow-md);
}

/* Tier 1 card, on the lower left corner of the main photo */
.about__card {
  position: absolute;
  bottom: 4%;
  left: -0.75rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: 15rem;
  padding: 0.85rem 1.1rem 0.85rem 0.85rem;
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: var(--shadow-md);
  font-size: var(--text-xs);
  line-height: 1.35;
}

.about__card strong {
  display: block;
  color: var(--ink);
  font-size: var(--text-base);
  letter-spacing: -0.01em;
}

.about__card-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
}

/* Narrower card on phones so it stays clear of the side photo */
@media (max-width: 575.98px) {
  .about__card {
    gap: 0.6rem;
    max-width: 11rem;
    padding: 0.7rem 0.8rem 0.7rem 0.7rem;
  }

  .about__card-icon {
    width: 2.25rem;
    height: 2.25rem;
  }
}

.about__text h2 {
  max-width: 14em;
  font-size: clamp(2rem, 1.3rem + 2vw, 3rem);
}

.about__text .lede {
  margin-top: 1.5rem;
  color: var(--ink);
  font-weight: 500;
}

.about__body {
  max-width: 36em;
  margin-top: 0.9rem;
}

/* Features as light tiles that lift on hover (`translate`, since the scroll
   reveal leaves its own transform on each one) */
.about .features {
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.about .feature {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
  transition:
    border-color var(--fast) ease,
    box-shadow var(--medium) var(--ease-out),
    translate var(--medium) var(--ease-out);
}

.about .feature:hover {
  border-color: transparent;
  box-shadow: var(--shadow-md);
  translate: 0 -3px;
}

.about .feature h3 {
  font-size: 1.0625rem;
}

.about__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 2.5rem;
}

/* 3. Reviews
   ========================================================================== */

.reviews__aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.75rem;
}

/* Cards glide in fast and settle gently, after a click, a swipe or autoplay */
.reviews__swiper {
  --swiper-wrapper-transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  cursor: grab;
}

.reviews__swiper .swiper-slide {
  height: auto;
}

/* Cards fade out towards the edges of the screen instead of being cut off.
   The padding keeps the hover lift and shadow inside the mask. */
.reviews__track {
  --fade: clamp(1rem, 7vw, 9rem);
  margin-block: -1.5rem;
  padding-block: 1.5rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
}

/* 4. Testimonials and installations
   --------------------------------------------------------------------------
   Text on the left lines up with the page; the photos on the right run off
   the edge of the screen.
   ========================================================================== */

.installs__layout {
  display: grid;
  padding-inline: var(--gutter);
}

/* Phones: heading, photos, then the matching quote and the controls */
.installs__intro {
  display: contents;
}

.installs__intro > .labels {
  order: 1;
}

.installs__intro > h2 {
  order: 2;
  margin-bottom: 2rem;
}

.installs__slider {
  order: 3;
  min-width: 0;
}

.installs__quotes {
  order: 4;
  margin-top: 2rem;
}

.installs__controls {
  order: 5;
}

@media (min-width: 992px) {
  .installs__layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2.5rem, 5vw, 5.5rem);
    align-items: center;
    padding-right: 0;
  }

  .installs__intro {
    display: block;
  }

  .installs__intro > h2 {
    margin-bottom: 0;
  }

  .installs__quotes {
    margin-top: 2.25rem;
  }
}

@media (min-width: 1400px) {
  .installs__layout {
    padding-left: calc((100% - 1320px) / 2 + var(--gutter));
  }
}

/* One quote per installation. With scripts running they share one spot and
   cross-fade; without, only the first is shown. */
.installs__quotes {
  display: grid;
}

.installs__quote {
  grid-area: 1 / 1;
  margin: 0;
}

.installs__quotes.is-enhanced .installs__quote {
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.75rem);
  transition: opacity 0.3s ease, transform 0.6s var(--ease-out), visibility 0s linear 0.3s;
}

.installs__quotes.is-enhanced .installs__quote.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0.15s, 0.15s, 0s;
}

.installs__quote blockquote {
  margin: 0;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.45;
}

.installs__quote blockquote::before {
  content: "\201C";
}

.installs__quote blockquote::after {
  content: "\201D";
}

.installs__quote figcaption {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.installs__quote figcaption strong {
  display: block;
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: 1.35;
}

.installs__quote figcaption small {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
}

.installs__controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2rem;
}

.installs__progress {
  flex: 1;
  max-width: 13rem;
  height: 2px;
  margin-inline: 0.9rem;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.installs__progress i {
  display: block;
  height: 100%;
  background: var(--green);
  transform: scaleX(var(--progress, 0.1667));
  transform-origin: left center;
  transition: transform 0.7s var(--ease-out);
}

.installs__count {
  color: var(--muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.installs__count b {
  color: var(--ink);
}

/* Installation photo card */
.install {
  position: relative;
  width: clamp(15.5rem, 23vw, 22rem);
  height: auto;
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  background: var(--pine-2);
  overflow: hidden;
  cursor: pointer;
  transition: filter 0.6s ease, opacity 0.6s ease;
}

.install img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.install.swiper-slide-active img {
  transform: scale(1.05);
}

.install::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 40, 29, 0.92) 0%, rgba(6, 40, 29, 0.4) 34%, rgba(6, 40, 29, 0) 60%);
}

.install figcaption {
  position: absolute;
  right: 1.35rem;
  bottom: 1.25rem;
  left: 1.35rem;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  color: var(--white);
}

.install__size {
  font-size: clamp(2.25rem, 1.6rem + 1.9vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.install__size small {
  margin-left: 0.25rem;
  color: var(--sun-bright);
  font-size: 0.4em;
  letter-spacing: 0;
}

.install__size--text {
  font-size: clamp(1.75rem, 1.3rem + 1.3vw, 2.25rem);
  letter-spacing: -0.04em;
}

.install__meta {
  color: rgba(255, 255, 255, 0.86);
  font-size: var(--text-xs);
  line-height: 1.4;
  text-align: right;
}

.install__meta strong {
  display: block;
  color: var(--white);
  font-size: var(--text-xs);
}

/* The photo that matches the quote is in full colour; the rest step back */
.installs.is-enhanced .install:not(.swiper-slide-active) {
  filter: saturate(0.45);
  opacity: 0.6;
}

.installs.is-enhanced .install:not(.swiper-slide-active):hover {
  filter: saturate(0.8);
  opacity: 0.85;
}

/* 5. Packages
   ========================================================================== */

.packages .section-head {
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.packages .tabs {
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.pkg-swiper .swiper-slide {
  height: auto;
}

.pkg-swiper__dots {
  --swiper-pagination-color: var(--green);
  --swiper-pagination-bullet-inactive-color: var(--pine-3);
  --swiper-pagination-bullet-inactive-opacity: 0.25;
  --swiper-pagination-bullet-size: 0.5rem;
  --swiper-pagination-bullet-horizontal-gap: 0.3rem;
  position: static;
  margin-top: 1.5rem;
}

/* On wide screens all three cards fit and the middle one is raised */
@media (min-width: 992px) {
  .pkg--featured {
    margin-block: -0.875rem 0.875rem;
  }
}

.packages__note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  font-size: var(--text-sm);
}

.packages__note .icon {
  color: var(--green);
}

.packages__note a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 700;
}

/* 6. Blog
   --------------------------------------------------------------------------
   The newest post leads in a dark card, the others are white cards beside
   it. Photos are never covered: the post images carry their own titles.
   Phones: cards stacked. Wider: --2 is two columns of equal height; --3
   puts the lead across two rows with the others stacked beside it, photo
   to the left of the text; --1 lays the lead out side by side.
   ========================================================================== */

.blog__grid {
  display: grid;
  gap: clamp(1.25rem, 2.2vw, 2rem);
}

@media (min-width: 768px) {
  .blog__grid--2 {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }

  .blog__grid--3 {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .blog__grid--3 .bpost--lead {
    grid-row: 1 / 3;
  }
}

/* Card */
.bpost {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: clamp(0.65rem, 1vw, 0.85rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--white);
  transition:
    border-color var(--fast) ease,
    transform var(--medium) var(--ease-out);
}

/* Hover shadow, drawn once and faded in */
.bpost::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity var(--medium) ease;
  pointer-events: none;
}

/* 2:1 is the shape of the post banners, so their titles are not cropped */
.bpost__media {
  position: relative;
  aspect-ratio: 2 / 1;
  border-radius: calc(var(--r-xl) - 0.55rem);
  background: var(--mist);
  overflow: hidden;
}

.bpost__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}

.bpost__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  padding: clamp(1.15rem, 2vw, 1.6rem) clamp(0.6rem, 1.2vw, 1rem) clamp(0.5rem, 1vw, 0.75rem);
}

.bpost__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
}

.bpost__date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.bpost__date .icon {
  width: 1rem;
  height: 1rem;
  color: var(--green);
}

.bpost__tag {
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--sun);
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.bpost__title {
  margin: 0;
  font-size: clamp(1.2rem, 1rem + 0.55vw, 1.45rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.bpost__title a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--fast) ease;
}

/* The whole card is the link */
.bpost__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: var(--r-xl);
}

.bpost__excerpt {
  display: -webkit-box;
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.65;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.bpost__more {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 0.6rem;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 700;
}

.bpost__arrow {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--mist-deep);
  color: var(--green-deep);
  transition:
    background-color var(--fast) ease,
    color var(--fast) ease,
    transform var(--medium) var(--ease-out);
}

.bpost__arrow .icon {
  width: 1.1rem;
  height: 1.1rem;
}

/* Lead card: dark, with soft light in two corners */
.bpost--lead {
  border-color: transparent;
  background:
    radial-gradient(ellipse 60% 45% at 100% 0%, rgba(43, 182, 115, 0.3), transparent 70%),
    radial-gradient(ellipse 55% 40% at 0% 100%, rgba(248, 168, 40, 0.16), transparent 70%),
    var(--pine);
  color: var(--on-dark);
}

.bpost--lead .bpost__meta {
  color: rgba(255, 255, 255, 0.75);
}

.bpost--lead .bpost__date .icon {
  color: var(--sun-bright);
}

.bpost--lead .bpost__title {
  font-size: clamp(1.45rem, 1.05rem + 1.2vw, 2.125rem);
  line-height: 1.18;
}

.bpost--lead .bpost__title a {
  color: var(--white);
}

.bpost--lead .bpost__excerpt {
  color: rgba(255, 255, 255, 0.82);
}

.bpost--lead .bpost__more {
  color: var(--white);
}

.bpost--lead .bpost__arrow {
  background: var(--sun);
  color: var(--ink);
}

/* Hover: the card lifts, the photo eases in and the arrow turns to point on */
@media (hover: hover) {
  .bpost:hover {
    border-color: transparent;
    transform: translateY(-0.4rem);
  }

  .bpost:hover::before {
    opacity: 1;
  }

  .bpost:hover .bpost__media img {
    transform: scale(1.05);
  }

  .bpost:hover .bpost__title a {
    color: var(--green-deep);
  }

  .bpost:hover .bpost__arrow {
    background: var(--green);
    color: var(--white);
    transform: rotate(45deg);
  }

  .bpost--lead:hover .bpost__title a {
    color: var(--sun-bright);
  }

  .bpost--lead:hover .bpost__arrow {
    background: var(--sun-bright);
    color: var(--ink);
  }
}

/* Three posts: the two beside the lead put the photo left of the text */
@media (min-width: 768px) {
  .blog__grid--3 .bpost:not(.bpost--lead) {
    flex-direction: row;
  }

  .blog__grid--3 .bpost:not(.bpost--lead) .bpost__media {
    flex: 0 0 42%;
    aspect-ratio: auto;
    min-height: 11rem;
  }

  .blog__grid--3 .bpost:not(.bpost--lead) .bpost__body {
    justify-content: center;
    padding: clamp(0.75rem, 1.4vw, 1.25rem) clamp(0.75rem, 1.4vw, 1.25rem);
  }

  .blog__grid--3 .bpost:not(.bpost--lead) .bpost__more {
    margin-top: 0.25rem;
  }

  /* One post: photo and text side by side */
  .blog__grid--1 .bpost--lead {
    flex-direction: row;
  }

  .blog__grid--1 .bpost__media {
    flex: 0 0 55%;
  }

  .blog__grid--1 .bpost__body {
    justify-content: center;
    padding: clamp(1.5rem, 3vw, 3rem);
  }
}

/* Tablets: the two small cards keep title and date only */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .blog__grid--3 .bpost:not(.bpost--lead) .bpost__excerpt {
    display: none;
  }
}

/* 7. Call to action
   ========================================================================== */

.cta-band {
  padding-bottom: var(--section);
}

/* Last on the page: the footer's frame margin is the only gap, the same
   edge the panels keep at the sides */
.cta-band:last-child {
  padding-bottom: 0;
}

/* Straight after another dark panel: a gap so the two don't touch */
.band-dark + .cta-band,
.warranties + .cta-band,
.photo-band + .cta-band {
  padding-top: calc(var(--section) / 2);
}

/* The band is drawn as one large solar panel. A cell lights up under the
   cursor and fades again, and a few light up by themselves. */
.cta-panel {
  position: relative;
  isolation: isolate;
  margin-inline: var(--frame);
  border-radius: var(--r-xl);
  background: #06162b;
  overflow: hidden;
}

/* The cells (decorative). Past 1920px they grow with the screen, so the set
   in the markup always covers the band. */
.cta-panel__cells {
  position: absolute;
  inset: 0;
  z-index: -3;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(4.5rem, 3.75vw), 1fr));
  grid-auto-rows: max(5.75rem, 4.79vw);
  align-content: start;
  gap: 4px;
  padding: 4px;
}

.cta-panel__cells i {
  position: relative;
  border-radius: 5px;
  background:
    linear-gradient(
      90deg,
      transparent calc(50% - 1px),
      rgba(255, 255, 255, 0.16) calc(50% - 1px) calc(50% + 1px),
      transparent calc(50% + 1px)
    ),
    linear-gradient(180deg, #25487f, #122950);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* A cell with light on it */
.cta-panel__cells i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--sun-bright), var(--sun));
  box-shadow: 0 0 30px rgba(248, 168, 40, 0.75);
  opacity: 0;
  transition: opacity 1.8s ease;
}

.cta-panel__cells i:nth-child(7n + 3)::after,
.cta-panel__cells i:nth-child(11n + 6)::after {
  animation: cta-panel-light 9s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.43s);
}

.cta-panel__cells i:hover::after {
  opacity: 1;
  animation: none;
  transition-duration: 0s;
}

@keyframes cta-panel-light {
  0%,
  68%,
  100% {
    opacity: 0;
  }
  78%,
  88% {
    opacity: 0.9;
  }
}

/* Narrower screens have fewer columns. The cells they have no room for are
   left out, so nothing animates out of sight. */
@media (max-width: 575.98px) {
  .cta-panel__cells i:nth-child(n + 73) {
    display: none;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .cta-panel__cells i:nth-child(n + 121) {
    display: none;
  }
}

@media (min-width: 992px) and (max-width: 1399.98px) {
  .cta-panel__cells i:nth-child(n + 181) {
    display: none;
  }
}

/* Shade behind the heading */
.cta-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    40deg,
    rgba(4, 18, 34, 0.94) 0%,
    rgba(4, 18, 34, 0.7) 34%,
    transparent 62%
  );
  pointer-events: none;
}

/* The cursor reaches the cells through the text; only the button takes it */
.cta-panel__inner {
  display: grid;
  justify-items: start;
  gap: clamp(1.75rem, 3.4vw, 2.75rem);
  padding: clamp(2rem, 6vw, 5.5rem);
  pointer-events: none;
}

.cta-panel__inner .button {
  pointer-events: auto;
}

.cta-panel__title {
  max-width: 8.5em;
  color: var(--white);
  font-size: clamp(2.75rem, 1rem + 3.5vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  word-spacing: 0.14em;
  line-height: 0.96;
}

/* Optional paragraph and second button ($cta in components/cta.php) */
.cta-panel__text {
  max-width: 34em;
  margin-top: calc(clamp(1.75rem, 3.4vw, 2.75rem) * -0.4);
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-lead);
  line-height: 1.6;
}

.cta-panel__text a {
  color: var(--sun-bright);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(255, 198, 85, 0.45);
  pointer-events: auto;
}

.cta-panel__text a:hover {
  color: var(--white);
}

.cta-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* 8a. Inside a panel (3D)
   --------------------------------------------------------------------------
   Default: a normal two-column section. On large screens with motion
   allowed, the section is made several screens tall and its inner block
   sticks in place, so scrolling opens the panel layer by layer.
   ========================================================================== */

.tech {
  position: relative;
  padding-block: var(--section);
}

.tech__grid {
  display: grid;
  align-items: center;
}

/* Phones and tablets: heading, then the panel, then the intro and the list
   of layers */
.tech__copy {
  display: contents;
}

.tech__copy > .labels {
  order: 1;
}

.tech__copy > h2 {
  order: 2;
}

.tech__stage {
  order: 3;
}

.tech__copy > .tech__lede {
  order: 4;
}

.tech__copy > .tech__layers {
  order: 5;
}

.tech__copy h2 {
  max-width: 12em;
  font-size: clamp(1.875rem, 1.25rem + 2.1vw, 3rem);
}

.tech__lede {
  max-width: 27em;
  margin-top: 1rem;
}

.tech__layers {
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.tech__layer {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.tech__layer-num {
  display: grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--white);
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 800;
  transition: background-color var(--fast) ease, color var(--fast) ease, box-shadow var(--fast) ease;
}

.tech__layer h3 {
  font-size: 1.125rem;
  line-height: 2rem;
  transition: color var(--fast) ease;
}

.tech__layer p {
  font-size: var(--text-sm);
  line-height: 1.55;
}

.tech__stage {
  position: relative;
  width: 100%;
  max-width: 42rem;
  margin: 1.5rem auto 0;
  aspect-ratio: 1 / 1;
}

@media (min-width: 992px) {
  .tech__stage {
    margin-top: 0;
  }
}

/* Soft studio light and a drawn circle behind the panel */
.tech__glow {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--white) 0%, rgba(255, 255, 255, 0.6) 55%, rgba(255, 255, 255, 0) 100%);
}

.tech__glow::after {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px dashed #c3d6cb;
  border-radius: 50%;
}

.tech__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.tech.is-live .tech__canvas {
  opacity: 1;
}

/* A photo stands in when scripts or WebGL are not available */
.tech__fallback {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  border-radius: var(--r-xl);
  object-fit: cover;
}

.js .tech__fallback {
  display: none;
}

.js .tech.is-static .tech__fallback {
  display: block;
}

/* Numbered markers that follow the layers (placed by script) */
.tech__pin-dot {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: -0.875rem 0 0 -0.875rem;
  border-radius: 50%;
  background: var(--white);
  box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow-sm);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: background-color var(--fast) ease, color var(--fast) ease;
}

.tech__pin-dot.is-active {
  background: var(--green);
  box-shadow: var(--shadow-md);
  color: var(--white);
}

.tech:not(.is-live) .tech__pin-dot {
  display: none;
}

.tech__hint {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem 0.45rem 0.7rem;
  border-radius: var(--r-pill);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
  translate: -50% 0;
  transition: opacity 0.4s ease;
}

.tech__hint .icon {
  width: 1rem;
  height: 1rem;
  color: var(--green);
  animation: nudge 1.8s ease-in-out infinite;
}

.tech__hint.is-hidden {
  opacity: 0;
}

@keyframes nudge {
  50% {
    transform: translateY(0.25rem);
  }
}

@media (min-width: 992px) {
  .tech__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 4vw, 4.5rem);
  }

  .tech__copy {
    display: block;
  }
}

/* The scroll-driven version */
@media (min-width: 992px) and (min-height: 680px) {
  html.motion .tech:not(.is-static) {
    height: 320vh;
    padding-block: 0;
  }

  html.motion .tech:not(.is-static) .tech__pin {
    position: sticky;
    top: var(--header-h);
    display: flex;
    align-items: center;
    height: calc(100vh - var(--header-h));
  }

  html.motion .tech:not(.is-static) .tech__stage {
    max-width: none;
    height: min(calc(100vh - var(--header-h) - 3rem), 46rem);
    aspect-ratio: auto;
  }

  html.motion .tech:not(.is-static) .tech__hint {
    display: inline-flex;
  }

  /* Only the layer being shown has its description open */
  html.motion .tech:not(.is-static) .tech__layer > div {
    display: grid;
    grid-template-rows: auto 0fr;
    transition: grid-template-rows 0.6s var(--ease-out);
  }

  html.motion .tech:not(.is-static) .tech__layer p {
    min-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.4s ease;
  }

  html.motion .tech:not(.is-static) .tech__layer h3 {
    color: var(--muted);
  }

  html.motion .tech:not(.is-static) .tech__layer.is-active > div {
    grid-template-rows: auto 1fr;
  }

  html.motion .tech:not(.is-static) .tech__layer.is-active p {
    opacity: 1;
  }

  html.motion .tech:not(.is-static) .tech__layer.is-active h3 {
    color: var(--ink);
  }

  html.motion .tech:not(.is-static) .tech__layer.is-active .tech__layer-num {
    background: var(--green);
    box-shadow: none;
    color: var(--white);
  }
}

/* 8b. Questions
   ========================================================================== */

.faq__grid {
  display: grid;
  gap: 2.5rem clamp(2.5rem, 6vw, 6.5rem);
}

.faq__intro .lede {
  max-width: 25em;
  margin-top: 1.25rem;
}

/* Dark tile that offers a phone call */
.faq__help {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 24rem;
  margin-top: 2.25rem;
  padding: 1.1rem 1.25rem 1.1rem 1.1rem;
  border-radius: var(--r-md);
  background: var(--pine);
  color: var(--white);
  text-decoration: none;
  transition: background-color var(--fast) ease;
}

.faq__help:hover {
  background: var(--pine-3);
  color: var(--white);
}

.faq__help-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
}

.faq__help small {
  display: block;
  color: var(--on-dark);
  font-size: var(--text-xs);
  font-weight: 500;
}

.faq__help strong {
  display: block;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.faq__help-go {
  margin-left: auto;
  color: var(--sun-bright);
  transition: transform var(--medium) var(--ease-out);
}

.faq__help:hover .faq__help-go {
  transform: translate(3px, -3px);
}

@media (min-width: 992px) {
  .faq__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }

  .faq__intro {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
}
