/* CJ-selected upper-title prototype A, local rollout, October 28, 2026.
   Home and redirected/operational templates retain their existing owners. */
body[data-hero-layout="upper-title"] {
  --hero-fade-color: 246 241 231;
}

body[data-hero-layout="upper-title"] .coastal-page-scene {
  --upper-title-photo-height: 400px;
  background: var(--ivory);
}

body[data-hero-layout="upper-title"] .coastal-page-scene::before,
body[data-hero-layout="upper-title"] .coastal-page-scene::after {
  display: none;
}

body[data-hero-layout="upper-title"] .coastal-page-scene .primary-page-hero {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
}

body[data-hero-layout="upper-title"] .coastal-hero-photo {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr);
  min-height: var(--upper-title-photo-height);
  overflow: hidden;
}

body[data-hero-layout="upper-title"] .coastal-hero-photo::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: var(--hero-photo-image, url("vero-beach-hero.jpg"));
  background-position: var(--hero-photo-position, center);
  background-size: var(--hero-photo-size, cover);
  background-repeat: no-repeat;
}

body[data-hero-layout="upper-title"] .coastal-hero-photo::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 38px;
  pointer-events: none;
  background: linear-gradient(transparent, var(--ivory));
}

body[data-hero-layout="upper-title"] .coastal-page-scene .hero-copy {
  padding: 30px 24px 70px;
  background: linear-gradient(180deg, rgb(246 241 231 / .98), rgb(246 241 231 / .94) 55%, transparent);
}

body[data-hero-layout="upper-title"] .coastal-page-scene h1 {
  max-width: 26ch;
  margin: 0 auto;
  font-size: clamp(44px, 4.4vw, 60px);
  font-weight: 400;
  line-height: 1.06;
}

body[data-hero-layout="upper-title"] .coastal-hero-support {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 26px;
  background: var(--ivory);
}

body[data-hero-layout="upper-title"] .coastal-page-scene .lead {
  max-width: 760px;
  margin: 0 auto;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
}

@media (max-width: 767px) {
  body[data-hero-layout="upper-title"] .coastal-page-scene {
    --upper-title-photo-height: 320px;
  }

  body[data-hero-layout="upper-title"] .coastal-hero-photo {
    grid-template-rows: auto minmax(140px, 1fr);
  }

  body[data-hero-layout="upper-title"] .coastal-hero-photo::before {
    background-position: var(--hero-photo-phone-position, center);
    background-size: var(--hero-photo-phone-size, cover);
  }

  /* These wide street frames have substantial sky above their buildings. */
  body[data-hero-layout="upper-title"][data-hero-photo="51"],
  body[data-hero-layout="upper-title"][data-hero-photo="53"] {
    --hero-photo-phone-position: 54% 100%;
    --hero-photo-phone-size: auto 210%;
  }

  body[data-hero-layout="upper-title"] .coastal-page-scene .hero-copy {
    padding: 24px 22px 62px;
  }

  body[data-hero-layout="upper-title"] .coastal-page-scene h1 {
    max-width: 18ch;
    font-size: 38px;
    line-height: 1.08;
  }

  body[data-hero-layout="upper-title"] .coastal-hero-support {
    padding: 24px;
  }

  body[data-hero-layout="upper-title"] .coastal-page-scene .lead {
    max-width: 36ch;
    font-size: 17px;
    line-height: 1.6;
  }
}
