/* ==========================================================================
   Orbit Homes — Lead Capture Page
   Content is capped at 1240px (.container); section backgrounds run full-bleed.
   ========================================================================== */

@font-face {
  font-family: "DIN";
  src: url("../assets/edcdb89a48d0abf0.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DIN";
  src: url("../assets/a0cefbdb2fcc5bd4.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/012871e2d430c6a5.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #233443;
  --teal: #62938f;
  --teal-dark: #557f7b;
  --light-grey: #f8f9f7;
  --soft-cream: #f6f4f1;
  --oat: #ebe9e2;
  --white: #fff;

  --font-display: "DIN", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1240px;
  --gutter: 20px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.1;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

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

/* Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 10px 20px;
  font: 500 16px/1.1 var(--font-body);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 0;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.btn--teal {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.btn--outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.btn--white {
  background: var(--white);
}

@media (hover: hover) and (pointer: fine) {
  .btn--teal:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
  }
  .btn--outline:hover {
    background: var(--navy);
    color: var(--white);
  }
}

/* Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 527px;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 40%;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

.hero__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(1240px, 100%);
  margin-inline: auto;
  padding: 24px 24px 28px;
  text-align: center;
  background: rgba(246, 244, 241, 0.8);
}

.hero__logo {
  width: 49px;
  height: 49px;
}

.hero__title {
  font: 500 clamp(26px, 1.2rem + 1.9vw, 45px) / 1.15 var(--font-display);
  max-width: 14ch;
}

.hero__lede {
  max-width: 48ch;
  font-size: clamp(15px, 0.85rem + 0.3vw, 18px);
}

.hero__panel .btn {
  margin-top: 6px;
}

@media (min-width: 900px) {
  .hero {
    min-height: 697px;
  }
  .hero__panel {
    gap: 15px;
    padding: 40px 60px;
  }
  .hero__logo {
    width: 84px;
    height: 84px;
  }
  .hero__title {
    max-width: none;
  }
}

/* Intro ---------------------------------------------------------------- */
.intro {
  padding: 32px 0 40px;
}

.eyebrow {
  margin-bottom: 24px;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.intro__copy {
  display: grid;
  gap: 1em;
  font: 500 clamp(20px, 1rem + 0.7vw, 29px) / 1.15 var(--font-display);
}

@media (min-width: 900px) {
  .intro {
    padding: 67px 0 75px;
  }
  .intro__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: 20px;
  }
  .eyebrow {
    margin-bottom: 0;
    font-size: 18px;
    padding-top: 6px;
  }
  .intro__copy {
    max-width: 819px;
  }
}

/* Home designs --------------------------------------------------------- */
.homes {
  padding: 20px 0 40px;
  background: var(--oat);
}

.section-head {
  display: grid;
  gap: 15px;
  margin-bottom: 24px;
}

.section-head__title {
  font: 500 clamp(20px, 1rem + 0.7vw, 30px) / 1.1 var(--font-display);
}

.section-head__sub {
  max-width: 360px;
  font-size: clamp(15px, 0.85rem + 0.3vw, 18px);
}

.homes__grid {
  display: grid;
  gap: 40px;
}

/* Mobile: swipeable scroll-snap carousel. Pure CSS, so it works even if
   page scripts are stripped; main.js only adds the dot indicators. */
@media (max-width: 639px) {
  .homes__grid {
    /* Positioned so the cards' visually-hidden labels (absolute) are
       clipped by this scroller instead of widening the page. */
    position: relative;
    display: flex;
    gap: 16px;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .homes__grid::-webkit-scrollbar {
    display: none;
  }
  .home-card {
    flex: 0 0 min(84%, 320px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

.homes__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.homes__dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  opacity: 0.25;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms var(--ease-out);
}

.homes__dots button[aria-current="true"] {
  opacity: 1;
  transform: scale(1.25);
}

.homes__dots button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

@media (min-width: 640px) {
  .homes__dots {
    display: none;
  }
}

.home-card {
  display: grid;
  grid-template-rows: auto auto auto auto auto;
}

.home-card__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 20px;
}

.home-card__name {
  font-size: clamp(15px, 0.85rem + 0.3vw, 18px);
  font-weight: 700;
}

.home-card__block {
  font-size: clamp(15px, 0.85rem + 0.3vw, 18px);
  font-weight: 400;
}

.home-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 16px 0 20px;
}

.home-card__specs li {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 18px/1 var(--font-display);
}

.home-card__specs img {
  flex: none;
  width: auto;
  height: auto;
}

.home-card .btn {
  width: 100%;
}

@media (min-width: 640px) {
  .homes__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
  .home-card .btn {
    width: auto;
    min-width: 140px;
    justify-self: start;
  }
}

@media (min-width: 900px) {
  .homes {
    padding: 60px 0 72px;
  }
  .section-head {
    margin-bottom: 40px;
  }
  .home-card__img {
    margin-bottom: 30px;
  }
  .home-card__block {
    font-weight: 500;
  }
}

/* Inclusions ----------------------------------------------------------- */
.inclusions {
  background: var(--light-grey);
}

.inclusions__img {
  width: 100%;
  aspect-ratio: 320 / 312;
  object-fit: cover;
  object-position: 50% 50%;
}

.inclusions__copy {
  display: grid;
  gap: 16px;
  padding: 16px 0 40px;
  font-size: clamp(15px, 0.85rem + 0.3vw, 18px);
  line-height: 1.2;
}

.inclusions__title {
  font: 400 clamp(30px, 1.5rem + 0.5vw, 30px) / 1.1 var(--font-display);
}

.inclusions__copy .btn {
  justify-self: start;
  min-width: 183px;
  margin-top: 14px;
}

@media (max-width: 899px) {
  /* Image runs edge to edge on mobile, matching the artboard. */
  .inclusions__grid {
    width: 100%;
  }
  .inclusions__copy {
    width: min(var(--container), 100% - var(--gutter) * 2);
    margin-inline: auto;
  }
}

@media (min-width: 900px) {
  .inclusions {
    padding: 100px 0;
  }
  .inclusions__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(40px, 7vw, 100px);
  }
  .inclusions__img {
    max-width: 554px;
    aspect-ratio: 554 / 540;
  }
  .inclusions__copy {
    gap: 30px;
    padding: 0;
    max-width: 554px;
    line-height: 1.1;
  }
  .inclusions__copy .btn {
    margin-top: 0;
  }
}

/* Banner --------------------------------------------------------------- */
.banner {
  position: relative;
  height: 180px;
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin: 0 auto;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}

/* Navy tint is desktop-only; the mobile artboard shows the photo untinted. */
@media (min-width: 900px) {
  .banner {
    width: 100%;
    height: 360px;
  }
  .banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(35, 52, 67, 0.3);
  }
}

/* CTA ------------------------------------------------------------------ */
/* Mobile: cream panel sits flush under the banner, 20px before the form. */
.cta {
  padding: 0 0 20px;
}

.cta__panel {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 24px 20px 28px;
  text-align: center;
  background: var(--soft-cream);
}

.cta__title {
  max-width: 15ch;
  font: 400 clamp(30px, 1rem + 2.9vw, 64px) / 1 var(--font-display);
}

.cta__sub {
  max-width: 56ch;
  font-size: clamp(15px, 0.85rem + 0.3vw, 18px);
}

@media (min-width: 900px) {
  .cta {
    padding: 100px 0;
  }
  .cta__panel {
    gap: 30px;
    padding: 60px;
  }
  .cta__title {
    max-width: none;
  }
}

/* Register form -------------------------------------------------------- */
.register {
  padding: 30px 0 40px;
  color: var(--white);
  background: var(--navy);
  scroll-margin-top: 0;
}

.register__intro {
  display: grid;
  gap: 15px;
  margin-bottom: 30px;
}

.register__title {
  font: 400 clamp(30px, 1.2rem + 2.2vw, 60px) / 1 var(--font-display);
}

.register__sub {
  max-width: 361px;
}

.register__logo {
  width: 115px;
  height: 115px;
  margin: 48px auto 0;
}

.register__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 20px;
}

/* Fields are plain block flow (no grid gap) so anything Trellis injects
   next to the input — phone widget wrapper, validation markers — cannot
   change the row height on focus or once a value is present. */
.field {
  grid-column: 1 / -1;
  min-width: 0;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.1;
}

.field input,
.field select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 20px;
  font: 500 18px/1.1 var(--font-body);
  color: var(--white);
  background: transparent;
  border: 1px solid var(--white);
  border-radius: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 160ms ease;
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

/* Build Region dropdown: custom chevron, placeholder-grey until a region is
   picked (the empty placeholder option keeps it :invalid), and a navy option
   list so white text stays readable where the OS draws the popup. */
.field select {
  padding-right: 52px;
  cursor: pointer;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 20px center;
}

.field select:invalid {
  color: rgba(255, 255, 255, 0.3);
}

.field select option {
  color: var(--white);
  background: var(--navy);
}

.field select::-ms-expand {
  display: none;
}

/* Focus and filled states only recolour the border — never resize. */
.field input:focus,
.field input:focus-visible,
.field select:focus,
.field select:focus-visible {
  border-color: var(--teal);
  box-shadow: none;
}

/* Trellis's international phone widget wraps the tel input; keep the
   wrapper full-width and let the input keep its own height. */
.field > div,
.field .iti {
  width: 100%;
}

.form-privacy {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.75);
}

.form-privacy a {
  color: var(--white);
  text-underline-offset: 2px;
}

.register__form .btn {
  grid-column: 1 / -1;
  width: 100%;
}

@media (min-width: 560px) {
  .field--half {
    grid-column: span 1;
  }
  .register__form .btn {
    width: auto;
    min-width: 183px;
    justify-self: start;
  }
}

@media (min-width: 900px) {
  .register {
    padding: 136px 0 96px;
  }
  .register__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "intro form"
      "logo  form";
    column-gap: 40px;
  }
  .register__intro {
    grid-area: intro;
    align-content: start;
    margin-bottom: 0;
    padding-left: clamp(0px, 8.33% + 8px, 108px);
  }
  .register__title {
    max-width: 384px;
  }
  .register__logo {
    grid-area: logo;
    align-self: end;
    margin: 40px 0 0 clamp(0px, 8.33% + 8px, 108px);
  }
  .register__form {
    grid-area: form;
    max-width: 508px;
    justify-self: end;
    width: 100%;
    gap: 26px 20px;
  }
}

/* Sticky CTA (mobile only) --------------------------------------------- */
/* position: sticky at the end of <body> behaves like a fixed bottom bar
   but keeps working inside a transformed/scroll-container wrapper (Trellis
   SPA), where position: fixed would silently break. */
.sticky-cta {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 50;
  width: 100%;
  margin-top: calc(var(--sticky-h) * -1);
  height: var(--sticky-h);
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(35, 52, 67, 0.96);
  box-shadow: 0 -8px 24px rgba(35, 52, 67, 0.18);
  /* Hidden by clipping from the top edge down rather than translating it
     off-screen: a transform would still count towards scroll height and
     leave a 60px white strip below the footer. */
  opacity: 0;
  clip-path: inset(100% 0 0 0);
  visibility: hidden;
  transition: opacity 220ms var(--ease-out), clip-path 220ms var(--ease-out), visibility 0s linear 220ms;
  --sticky-h: 60px;
}

.sticky-cta .btn {
  width: 100%;
  height: 100%;
  min-height: 0;
  font-size: 17px;
}

.sticky-cta.is-visible {
  opacity: 1;
  /* Negative top inset leaves room for the upward box-shadow. */
  clip-path: inset(-40px 0 0 0);
  visibility: visible;
  transition-delay: 0s;
}

@media (min-width: 900px) {
  .sticky-cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .sticky-cta {
    transition-duration: 1ms;
  }
}

/* Hero headline: sized for the 49-character inclusions H1.
   The 14ch cap was set for the previous 29-character headline and
   forced the new one to break mid-phrase on mobile. */
.hero__title {
  max-width: none;
  font-size: clamp(24px, 1.1rem + 1.8vw, 45px);
}
.nw {
  white-space: nowrap;
}
