.home-entry.home-entry--preview {
  --entry-height: 100vh;
  --preview-bottom-space: clamp(1.5rem, 5.25vh, 4.5rem);
  --preview-foliage-image: url("../images/home/hero-preview-foliage.webp");
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: var(--entry-height);
  padding-bottom: var(--preview-bottom-space);
  overflow: clip;
  background:
    radial-gradient(ellipse at 88% 74%, #f8e6d0, transparent 53%),
    #f9f6ef;
}

@supports (height: 100svh) {
  .home-entry.home-entry--preview { --entry-height: 100svh; }
}

.home-entry--preview::before {
  content: "";
  position: absolute;
  inset: var(--site-header-height) 0 0 34%;
  background-image:
    linear-gradient(#52705e0d 1px, transparent 1px),
    linear-gradient(90deg, #52705e0d 1px, transparent 1px);
  background-size: 2.75rem 2.75rem;
  mask-image: radial-gradient(ellipse at 58% 48%, #000 20%, transparent 70%);
  pointer-events: none;
}

.home-entry--preview .home-entry__showcase::before { content: none; }

.home-entry__preview-compare {
  position: relative;
  display: inline-block;
  font: inherit;
  letter-spacing: inherit;
}

.home-entry__preview-compare svg {
  position: absolute;
  bottom: -.21em;
  left: .025em;
  width: calc(100% - .18em);
  height: .25em;
  color: #c74b0b;
  pointer-events: none;
}

.home-entry--preview .home-entry__actions {
  --control-padding: clamp(.875rem, 1.15vw, 1rem);
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem clamp(.65rem, 1.4vw, 1.25rem);
}

.home-entry--preview .home-entry__cta {
  min-width: min(100%, clamp(10.75rem, 19vw, 15rem));
  justify-content: center;
  gap: .625rem;
}

.home-entry__preview-planner-button {
  gap: .625rem;
  cursor: pointer;
}

.home-entry__preview-planner-button .icon { flex: none; }

.home-entry__preview-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  width: max-content;
  max-width: 100%;
  margin: clamp(1.15rem, 3.7vh, 2.25rem) 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.home-entry__preview-benefits li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-content: start;
  gap: .55rem;
  min-width: 0;
  padding-inline: clamp(.5rem, .8vw, .9rem);
  color: #45564c;
  font-size: .825rem;
  line-height: 1.35;
}

.home-entry__preview-benefits li + li { border-inline-start: 1px solid var(--control-border); }
.home-entry__preview-benefits li:first-child { padding-inline-start: 0; }
.home-entry__preview-benefits li:last-child { padding-inline-end: 0; }

.home-entry__preview-benefits li > span {
  display: grid;
  gap: .1rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-entry__preview-benefits strong { color: #263b32; font-size: .95rem; }
.home-entry__preview-benefits .icon {
  width: clamp(1.35rem, 1.8vw, 1.875rem);
  height: auto;
}
.home-entry__preview-benefits .icon,
.home-entry__preview-step-icon { color: #c74b0b; }

.home-entry--preview .home-entry__visual::before,
.home-entry--preview .home-entry__visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 43%;
  top: 48%;
  width: 85%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(148deg, #efd5b650, #f6e3c823 72%, transparent);
}

.home-entry--preview .home-entry__visual::after {
  left: 50%;
  top: 54%;
  width: 66%;
  background: linear-gradient(148deg, #f0c99453, #f5d9ae1c 72%, transparent);
}

.home-entry__preview-opening-outline { display: none; }
.home-entry__preview-shadow-ink { filter: blur(2px); }
.home-entry__preview-shadow-ink--wall { filter: blur(7.5px); }

.home-entry--preview [data-proposal-enclosure-ink] {
  stroke: #365149;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-entry--preview [data-proposal-enclosure-stroke] { stroke-dasharray: 1; }

.home-entry__preview-roof-light {
  fill: none;
  stroke: #ffe2b0;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px #ffb15e);
}

.home-entry--preview .home-entry__proposal-roof--sketch { color: #374d46; }

.home-entry--preview :is(.home-entry__sketch-layout, .home-entry__sketch-retrace,
  .home-entry__sketch-dimension, .home-entry__sketch-notes--dimension, [data-proposal-phase="hatching"]:not([data-proposal-part="footing"])) {
  display: none;
}

.home-entry--preview .home-entry__sketch-main { stroke-width: 4.2; }
.home-entry--preview .home-entry__sketch-fine { opacity: .28; }

.home-entry__preview-features,
.home-entry__preview-feature,
.home-entry__preview-feature-line {
  position: absolute;
  inset: 0;
}

.home-entry__preview-features {
  --feature-accent: #ed650f;
  z-index: 2;
}

.home-entry__preview-feature-line {
  width: 100%;
  height: 100%;
}

.home-entry__preview-feature-line path {
  fill: none;
  stroke: #e8ad7f;
  stroke-width: 2;
  stroke-dasharray: 1;
}

.home-entry__preview-feature-line--compact { display: none; }

.home-entry__preview-feature-point {
  fill: var(--feature-accent);
  stroke: #fffdfa;
  stroke-width: 2.4;
}

.home-entry__preview-feature-ring {
  fill: none;
  stroke: #fffdfa;
  stroke-width: 2;
}

.home-entry__preview-feature-card {
  position: absolute;
  left: var(--feature-x);
  top: var(--feature-y);
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
  display: flex;
  align-items: center;
  gap: .6rem;
  width: max-content;
  max-width: clamp(9.75rem, 13vw, 13.25rem);
  min-height: 3rem;
  padding: .52rem .67rem;
  border: 1px solid #efd4bd;
  border-radius: 1rem;
  background: linear-gradient(#fffdfa, #fff8f1);
  box-shadow: 0 .3rem .8rem #623d2320, 0 .08rem .18rem #623d2310;
  color: #142522;
  font-size: clamp(.76rem, .86vw, .98rem);
  font-weight: 650;
  line-height: 1.2;
}

.home-entry__preview-feature-card .icon {
  flex: none;
  width: clamp(1.25rem, 1.53vw, 1.6rem);
  height: auto;
  color: var(--feature-accent);
}

.home-entry__preview-feature-card > span { text-wrap: balance; }

@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .home-entry__preview-opening-outline {
    display: block;
    color: #405a53;
    opacity: 0;
    transition: opacity 1.9s ease-out .35s;
  }

  .home-entry--preview:is([data-proposal-opening="pending"], [data-proposal-opening="running"]) .home-entry__preview-opening-outline {
    opacity: .26;
    transition: none;
  }
}

.home-entry__preview-planter {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-entry__preview-drawings { display: none; }

.home-entry--preview .home-entry__proposal-adviser {
  left: 10%;
  bottom: 25.5%;
  width: 18.5%;
  height: 41.625%;
  filter: none;
}

.home-entry__adviser-shadow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) blur(1.6px);
  opacity: .15;
  transform-origin: var(--shadow-origin);
  transform: var(--shadow-transform);
}

.home-entry__adviser-contact {
  position: absolute;
  width: 23%;
  height: 3%;
  transform: translate(-50%, -45%);
  border-radius: 50%;
  background: radial-gradient(ellipse, #3d322f5c, transparent 72%);
}

.home-entry__preview-homeowner {
  position: absolute;
  z-index: 1;
  left: 63.88%;
  bottom: -5%;
  width: 10.3%;
  aspect-ratio: 256 / 760;
  /* Keep the near shoe at the same ground point at different portrait sizes. */
  translate: -40.23% 0;
}

.home-entry__preview-homeowner-art {
  position: relative;
  width: 100%;
  height: auto;
  transform-origin: var(--shadow-origin);
}

.home-entry__preview-process {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.75rem, 2.2vw, 2rem);
  width: min(calc(100% - 2 * var(--entry-gutter)), 80rem);
  margin: 0 auto;
  padding: clamp(.85rem, 1.55vw, 1.25rem);
  border: 1px solid #e2cdb7;
  border-radius: 1.125rem;
  list-style: none;
  background: #fffaf4;
  box-shadow: 0 .7rem 1.65rem #77512c25, 0 .15rem .35rem #77512c12;
}

.home-entry__preview-process li {
  display: flex;
  align-items: center;
  gap: clamp(.55rem, 1.2vw, 1rem);
  min-width: 0;
}

.home-entry__preview-step-number {
  display: grid;
  flex: none;
  place-items: center;
  width: clamp(2rem, 3.5vw, 3.25rem);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #a8430c;
  background: #f8e6d2;
  font-size: clamp(1rem, 1.8vw, 1.45rem);
  font-weight: 600;
}

.home-entry__preview-step-icon {
  flex: none;
  width: clamp(2rem, 2.65vw, 2.625rem);
  height: auto;
  stroke-width: 1.6;
}

.home-entry__preview-step-arrow { flex: none; margin-inline-start: auto; color: #6c7569; }

.home-entry__preview-step-copy {
  display: grid;
  gap: .16rem;
  color: #525b52;
  line-height: 1.35;
  font-size: .9rem;
}

.home-entry__preview-step-copy strong {
  color: #263b32;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  font-weight: 600;
}

@media (min-width: 901px) {
  .home-entry__preview-drawings {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .home-entry__preview-drawing {
    position: absolute;
    color: #637c6d;
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linejoin: round;
    opacity: .28;
  }

  .home-entry__preview-drawing--left {
    left: -1.5rem;
    bottom: clamp(1.75rem, 9vh, 7rem);
    width: clamp(10rem, 15vw, 17rem);
    mask-image: radial-gradient(ellipse at 4% 63%, #000 27%, transparent 77%);
  }

  .home-entry__preview-drawing--right {
    top: calc(var(--site-header-height) + .125rem);
    right: -.2rem;
    width: clamp(11rem, 18vw, 21rem);
    mask-image: radial-gradient(ellipse at 76% 45%, #000 32%, transparent 74%);
  }

  .home-entry--preview .container.home-entry__stage {
    --preview-stage-padding: clamp(1.25rem, 2.5vh, 2rem);
    --preview-scene-bleed: clamp(0px, calc((100vw - var(--site-header-max-width)) / 2), 12rem);
    flex: 1;
    min-height: 0;
    padding-block: var(--preview-stage-padding);
  }

  .home-entry--preview .home-entry__showcase { align-items: flex-start; }

  .home-entry--preview .home-entry__cta {
    min-width: clamp(10.25rem, 15vw, 15rem);
  }

  .home-entry--preview .home-entry__visual {
    /* Keep the line drawings and terrace locked to the same canvas. */
    --preview-scene-height: calc(var(--entry-height) - var(--site-header-height) - var(--preview-bottom-space) - 6rem - 2 * var(--preview-stage-padding));
    width: min(calc(100% + var(--entry-gutter) + var(--preview-scene-bleed) - .75rem), max(23rem, calc(var(--preview-scene-height) * 1.5)));
    max-height: none;
  }

  .home-entry__preview-homeowner {
    /* The ground in front of the slab stays above the process bar on short screens. */
    bottom: max(-5%, calc(11px - var(--preview-stage-padding) - (var(--preview-scene-height) - 100%) / 2));
  }
}

@media (min-width: 1200px) {
  .home-entry--preview .container.home-entry__stage {
    max-width: calc(var(--site-header-max-width) + 6rem);
    grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
    column-gap: clamp(1.5rem, 2.15vw, 2.5rem);
  }

  .home-entry--preview .home-entry__intro {
    margin-block-end: clamp(0rem, calc(14vh - 4rem), 4.5rem);
  }

  .home-entry--preview .home-entry__visual { max-width: clamp(58rem, 56vw, 68rem); }
}

@media (min-width: 1200px) and (max-width: 1370px) {
  .home-entry--preview .home-entry__actions {
    --control-padding: .75rem;
    column-gap: .875rem;
  }

  .home-entry--preview .home-entry__cta { min-width: 0; }
}

@media (min-width: 1400px) {
  .home-entry__preview-benefits { max-width: calc(100% + 2.75rem); }
}

.home-entry__preview-foliage { display: none; }

@media (min-width: 601px) {
  .home-entry__preview-foliage {
    display: block;
    position: absolute;
    z-index: 1;
    inset: auto 0 0;
    pointer-events: none;
  }

  .home-entry__preview-foliage::before,
  .home-entry__preview-foliage::after {
    content: "";
    position: absolute;
    bottom: -.65rem;
    aspect-ratio: 3 / 2;
    background: var(--preview-foliage-image) center / contain no-repeat;
    filter: blur(clamp(1.5px, .14vw, 3px));
  }

  .home-entry__preview-foliage::before {
    left: clamp(-4.75rem, -3.45vw, -1.85rem);
    width: clamp(8rem, 16.5vw, 26rem);
    opacity: .65;
    transform: scaleX(-1);
  }

  .home-entry__preview-foliage::after {
    right: clamp(-4.5rem, -3vw, -2.25rem);
    width: clamp(11rem, 24.75vw, 33rem);
    opacity: .74;
  }
}

@media (max-width: 900px) {
  .home-entry.home-entry--preview {
    --preview-bottom-space: 1.5rem;
    min-height: 0;
  }

  .home-entry--preview::before {
    inset: 34% 0 8%;
    background-size: 2rem 2rem;
  }

  .home-entry--preview .container.home-entry__stage {
    width: 100%;
    gap: clamp(1.25rem, 3vw, 2rem);
    padding-block: clamp(1.25rem, 4vh, 2.5rem) .625rem;
  }

  .home-entry--preview .home-entry__showcase { width: min(100%, 42rem); }
  .home-entry--preview .home-entry__visual { margin-bottom: 5.65rem; }

  .home-entry__preview-features {
    inset: calc(100% + .2rem) var(--entry-gutter) auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
  }

  .home-entry__preview-feature {
    position: relative;
    inset: auto;
    display: flex;
    padding-top: 1.45rem;
  }

  .home-entry__preview-feature-line { display: none; }
  .home-entry__preview-feature-line--compact {
    display: block;
    inset: 0 auto auto 50%;
    width: 1.1rem;
    height: 1.45rem;
    transform: translateX(-50%);
  }

  .home-entry__preview-feature-card {
    position: static;
    transform: none;
    transform-origin: 50% 0;
    width: 100%;
    max-width: none;
    padding: .5rem .48rem;
    font-size: .76rem;
    gap: .4rem;
  }

  .home-entry__preview-feature-card .icon { width: 1.15rem; }
  .home-entry__preview-benefits { margin-inline: auto; }
  .home-entry__preview-step-arrow { display: none; }
}

@media (min-width: 601px) and (max-width: 900px) and (min-height: 481px) {
  .home-entry.home-entry--preview { --preview-bottom-space: clamp(2.25rem, 5.25vw, 3rem); }
}

@media (max-height: 480px) and (pointer: coarse) {
  .home-entry__preview-foliage { display: none; }
}

@media (max-width: 680px) {
  .home-entry__preview-process {
    grid-template-columns: 1fr;
    gap: 0;
    padding: .25rem 1rem;
  }

  .home-entry__preview-process li { gap: .65rem; padding-block: .65rem; }
  .home-entry__preview-process li + li { border-top: 1px solid #ecdfd2; }

  .home-entry__preview-step-icon { width: 1.6rem; }
}

@media (max-width: 1399px) {
  .home-entry__preview-benefits {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.15fr);
    width: min(100%, 25rem);
    text-align: center;
  }

  .home-entry__preview-benefits li {
    grid-template-columns: minmax(0, 1fr);
    gap: .35rem;
    justify-items: center;
    padding-inline: .35rem;
    font-size: .75rem;
  }

  .home-entry__preview-benefits strong { font-size: clamp(.72rem, 3.15vw, .875rem); }
  .home-entry__preview-benefits .icon { width: 1.35rem; }
}

@media (max-width: 600px) {
  .home-entry--preview .home-entry__visual { width: calc(100% + var(--entry-gutter)); }
  .home-entry__adviser-shadow { filter: brightness(0) blur(1px); }
  .home-entry--preview .home-entry__preview-planner-button { width: min(100%, 18rem); }
}
