/* ============ Aldar — Register Interest ============ */
/* Design tokens taken from aldar.com/properties/en/communities:
   canvas #f5f4f2 · ink rgba(0,0,0,.87) · dark #2d2d2d · taupe #82807e · radius 12px · Poppins */

:root {
  --canvas: #f5f4f2;
  --white: #ffffff;
  --ink: rgba(0, 0, 0, 0.87);
  --dark: #2d2d2d;
  --muted: #747474;
  --taupe: #82807e;
  --line: #dcdad6;
  --error: #b3523c;
  --radius: 12px;
  --font-sans: "Poppins", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============ Layout ============ */

.page {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: clamp(0px, 1.2vw, 18px);
  gap: clamp(0px, 1.2vw, 18px);
}

/* ============ Visual panel ============ */

.visual {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--dark);
}

.visual__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.visual__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 22, 28, 0.42) 0%,
    rgba(20, 22, 28, 0.06) 32%,
    rgba(16, 18, 24, 0.72) 100%
  );
}

.visual__top {
  position: absolute;
  z-index: 2;
  top: clamp(22px, 2.6vw, 38px);
  left: clamp(24px, 2.8vw, 42px);
  right: clamp(24px, 2.8vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.visual__logo {
  width: clamp(58px, 5vw, 76px);
  height: auto;
  display: block;
}

.visual__logo-nova {
  width: clamp(84px, 7.9vw, 119px);
  height: auto;
  display: block;
}

.visual__caption {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 2.8vw, 42px);
  right: clamp(24px, 2.8vw, 42px);
  bottom: clamp(26px, 4vh, 48px);
  color: var(--white);
}

.visual__headline {
  font-weight: 500;
  font-size: clamp(24px, 2.5vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.visual__sub {
  margin-top: 12px;
  max-width: 40ch;
  font-weight: 300;
  font-size: clamp(12.5px, 1.05vw, 14.5px);
  color: rgba(255, 255, 255, 0.86);
}

/* ============ Form panel ============ */

.panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Legal line — pinned to the bottom of the form panel, aligned with the form.
   Barely darker than the background. */
.legal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.legal p {
  width: min(560px, 100%);
  padding: 0 clamp(24px, 3vw, 52px) 18px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #dedcd8;
}

.panel__inner {
  width: min(560px, 100%);
  padding: clamp(24px, 3vw, 52px);
}

.panel__head { margin-bottom: clamp(18px, 3.2vh, 32px); }

.panel__eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 10px;
}

.panel__title {
  font-weight: 600;
  font-size: clamp(25px, 2.5vw, 35px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.panel__lead {
  margin-top: 10px;
  font-weight: 300;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 44ch;
}

/* ---- Fields ---- */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vh, 20px) 20px;
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 7px;
}

.req { color: var(--taupe); }

.field input,
.field select {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 400;
  padding: 13px 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.field input::placeholder {
  color: #b0aca6;
  font-weight: 300;
}

.field input:hover,
.field select:hover { border-color: #c6c2bc; }

.field input:focus,
.field select:focus {
  border-color: var(--dark);
  box-shadow: 0 0 0 3px rgba(130, 128, 126, 0.13);
}

.field.invalid input,
.field.invalid select {
  border-color: var(--error);
}

.field.invalid input:focus,
.field.invalid select:focus {
  box-shadow: 0 0 0 3px rgba(179, 82, 60, 0.12);
}

/* select chevron — mirrors the Sort/Show All dropdowns on Aldar */
.select-wrap { position: relative; }

.select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--dark);
  border-bottom: 1.6px solid var(--dark);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.field select { cursor: pointer; padding-right: 38px; }
.field select:required:invalid { color: #b0aca6; }
.field select option { color: var(--ink); }
.field select option[value=""] { color: #b0aca6; }

.error {
  min-height: 15px;
  font-size: 11.5px;
  font-weight: 300;
  color: var(--error);
  margin-top: 5px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.error.visible { opacity: 1; }

/* ---- Actions ---- */

.actions {
  margin-top: clamp(18px, 3vh, 30px);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--white);
  background: var(--dark);
  border: 1px solid var(--dark);
  border-radius: var(--radius);
  padding: 14px 34px;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, opacity 0.22s ease;
}

.btn:hover { background: var(--taupe); border-color: var(--taupe); }

.btn:disabled { opacity: 0.55; cursor: wait; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover { background: transparent; border-color: var(--dark); color: var(--ink); }

.form-status {
  font-size: 12.5px;
  color: var(--error);
}

/* ---- Consent footer ---- */

.consent {
  margin-top: clamp(16px, 2.6vh, 26px);
  max-width: 56ch;
  font-size: 11px;
  font-weight: 300;
  line-height: 1.55;
  color: #a09c96;
}

/* ---- Success state ---- */

.success {
  text-align: center;
  padding: clamp(20px, 5vh, 48px) 0;
}

.success__mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--taupe);
}

.success__title {
  font-weight: 600;
  font-size: 27px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.success__text {
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 24px;
}

/* ============ Mobile ============ */

@media (max-width: 880px) {
  html, body { height: auto; }

  .page {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
    padding: 0;
    gap: 0;
  }

  .visual {
    min-height: 52vh;
    border-radius: 0;
  }

  .visual__caption { bottom: 28px; }

  .visual__logo-nova { width: 78px; }

  /* stack the form and the legal line instead of sitting them side by side */
  .panel {
    overflow: visible;
    flex-direction: column;
    align-items: stretch;
  }

  .legal {
    position: static;
    pointer-events: auto;
    justify-content: flex-start;
  }

  .legal p { width: 100%; padding: 0 22px 30px; }

  .panel__inner { padding: 30px 22px 40px; }

  .grid { grid-template-columns: 1fr; gap: 15px; }

  .actions .btn { width: 100%; }
}

/* Short desktop screens — keep the page on one screen */
@media (min-width: 881px) and (max-height: 720px) {
  .panel__lead { display: none; }
  .visual__sub { display: none; }
}
