/* ============================================================
   The Biltmore Residences Sufouh — Register Interest
   OSUS Properties (sales partner) · GJ Properties (developer)

   Tokens read from gjrerealestate.ae/biltmore (custom.min.css):
     espresso  #473425     champagne #BCAA8B
     bone      #EDE9E2     near-black #1B130D
     mid-brown #8C6D54
   Type on the brand site is Vanitas ExtraBold (licensed) + Roboto.
   Roboto is kept as-is for body; Josefin Sans stands in for the
   display face — a 1920s geometric sans whose high-waisted caps
   echo the Art Deco Biltmore wordmark far better than Vanitas does.
   ============================================================ */

:root {
  --espresso: #473425;
  --espresso-deep: #1b130d;
  --champagne: #bcaa8b;
  --champagne-deep: #a3906e;
  --mid-brown: #8c6d54;
  --bone: #ede9e2;
  --card: #f7f4ef;
  --field: #ffffff;

  --text: #2c2018;
  --muted: #6d5c4d;
  --faint: #9b8b7c;
  --line: rgba(71, 52, 37, 0.16);
  --line-soft: rgba(71, 52, 37, 0.09);
  --error: #a8442f;

  --font-display: "Josefin Sans", "Century Gothic", "Futura", sans-serif;
  --font-sans: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* fine film grain — inline so it costs no request */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

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

html, body {
  min-height: 100%;
  background: var(--espresso-deep);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--champagne); color: var(--espresso-deep); }

/* Hidden by the inline head script when the page is opened with ?cnt=0 */
.cnt-off .consent-block { display: none; }

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

/* Desktop two-up. The render is sticky rather than fixed-height so that on a
   short laptop viewport the form scrolls with the ordinary page scrollbar —
   an affordance people actually notice — while the image holds its place. */
.page {
  display: grid;
  grid-template-columns: minmax(0, 57fr) minmax(0, 43fr);
  min-height: 100vh;
  min-height: 100dvh;
}

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

.visual {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--espresso-deep);
  border-right: 1px solid rgba(188, 170, 139, 0.4);
}

.visual__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% center;
  animation: slow-push 30s ease-out forwards;
}

@keyframes slow-push {
  from { transform: scale(1.07); }
  to   { transform: scale(1); }
}

/* The render is a pale rose sunset, so the scrim has to do real work at
   both ends: darken the top for the logo, the bottom for the caption. */
.visual__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(27, 19, 13, 0.72) 0%,
      rgba(27, 19, 13, 0.18) 26%,
      rgba(27, 19, 13, 0.30) 52%,
      rgba(27, 19, 13, 0.90) 100%),
    linear-gradient(to right,
      rgba(27, 19, 13, 0.42) 0%,
      rgba(27, 19, 13, 0) 46%);
}

.visual__grain {
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: 0.14;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.visual__top {
  position: absolute;
  z-index: 3;
  top: clamp(28px, 4.4vh, 56px);
  left: clamp(28px, 3.4vw, 60px);
  right: clamp(28px, 3.4vw, 60px);
}

.visual__logo {
  display: block;
  width: clamp(146px, 15vw, 224px);
  height: auto;
  opacity: 0.96;
}

.visual__caption {
  position: absolute;
  z-index: 3;
  left: clamp(28px, 3.4vw, 60px);
  right: clamp(28px, 3.4vw, 60px);
  bottom: clamp(30px, 5vh, 62px);
  max-width: 44em;
  color: #fff;
}

.visual__eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: 16px;
}

.visual__headline {
  font-family: var(--font-display);
  font-size: clamp(31px, 3.5vw, 54px);
  font-weight: 200;
  line-height: 1.12;
  letter-spacing: 0.005em;
  text-shadow: 0 2px 26px rgba(27, 19, 13, 0.5);
}

.visual__sub {
  margin-top: 16px;
  max-width: 34em;
  font-size: 14.5px;
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 14px rgba(27, 19, 13, 0.6);
}

/* ---- Fact row ---- */

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 2.6vw, 44px);
  margin-top: clamp(22px, 3.4vh, 40px);
  padding-top: clamp(18px, 2.6vh, 28px);
  border-top: 1px solid rgba(188, 170, 139, 0.34);
  list-style: none;
}

.fact { display: flex; flex-direction: column; gap: 5px; }

.fact__value {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #fff;
}

.fact__label {
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(188, 170, 139, 0.92);
}

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

.panel {
  position: relative;
  background: var(--card);
  display: flex;
  flex-direction: column;
}

.panel__inner {
  width: 100%;
  max-width: 470px;
  margin: auto;
  padding: clamp(30px, 4.4vh, 54px) clamp(26px, 3.2vw, 52px);
}

.panel__lockup {
  display: block;
  width: 164px;
  height: auto;
  margin-bottom: clamp(20px, 2.8vh, 32px);
}

.panel__eyebrow {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--champagne-deep);
  margin-bottom: 12px;
}

.panel__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 200;
  line-height: 1.18;
  letter-spacing: 0.012em;
  color: var(--espresso);
}

/* Double hairline — echoes the rule under the Biltmore wordmark */
.rule-deco {
  display: block;
  width: 62px;
  height: 4px;
  margin: 20px 0 18px;
  border-top: 1px solid var(--champagne);
  border-bottom: 1px solid var(--champagne);
}

.panel__lead {
  font-size: 14px;
  line-height: 1.68;
  color: var(--muted);
}

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

form { margin-top: clamp(20px, 2.8vh, 30px); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }

.field--full { grid-column: 1 / -1; }

/* Email and phone only pair up once the panel is wide enough to hold two
   usable columns; below that they stack like everything else. */
.field--pair { grid-column: 1 / -1; }

@media (min-width: 1200px) {
  .field--pair { grid-column: auto; }
}

.field label {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--espresso);
  margin-bottom: 8px;
}

.req { color: var(--champagne-deep); }

.opt {
  margin-left: 2px;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--faint);
  text-transform: lowercase;
}

.control { position: relative; }

input, textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea { resize: vertical; min-height: 66px; }

input::placeholder, textarea::placeholder { color: #b7a99b; }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--champagne-deep);
  box-shadow: 0 0 0 3px rgba(188, 170, 139, 0.22);
}

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

.field.invalid input:focus,
.field.invalid textarea:focus { box-shadow: 0 0 0 3px rgba(168, 68, 47, 0.16); }

.error {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  color: var(--error);
}

.error.visible { display: block; }

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

.consent-block {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  cursor: pointer;
  align-items: start;
}

.consent__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.consent__box {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.consent__box svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: var(--espresso-deep);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.consent__input:checked + .consent__box {
  background: var(--champagne);
  border-color: var(--champagne-deep);
}

.consent__input:checked + .consent__box svg { opacity: 1; transform: scale(1); }

.consent__input:focus-visible + .consent__box {
  border-color: var(--champagne-deep);
  box-shadow: 0 0 0 3px rgba(188, 170, 139, 0.3);
}

.consent__text {
  font-size: 11.5px;
  line-height: 1.62;
  color: var(--muted);
}

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

.actions { margin-top: 24px; }

.btn {
  width: 100%;
  padding: 15px 22px;
  background: var(--espresso-deep);
  border: 1px solid var(--espresso-deep);
  border-radius: 2px;
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.btn:hover:not(:disabled) {
  background: var(--espresso);
  border-color: var(--champagne-deep);
  color: #fff;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(188, 170, 139, 0.42);
}

.btn:disabled { opacity: 0.6; cursor: default; }

.btn--ghost {
  width: auto;
  margin-top: 26px;
  padding: 12px 26px;
  background: transparent;
  border-color: var(--line);
  color: var(--espresso);
}

.btn--ghost:hover {
  background: transparent;
  border-color: var(--champagne-deep);
  color: var(--espresso-deep);
}

.form-status {
  margin-top: 12px;
  min-height: 1em;
  font-size: 12.5px;
  color: var(--error);
  text-align: center;
}

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

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

.success__mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--champagne);
  border-radius: 50%;
}

.success__mark svg {
  fill: none;
  stroke: var(--champagne-deep);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 200;
  letter-spacing: 0.04em;
  color: var(--espresso);
}

.success__text {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---- Legal ---- */

.legal {
  margin-top: clamp(22px, 3vh, 34px);
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.legal p {
  font-size: 10.5px;
  line-height: 1.66;
  color: var(--faint);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1100px) {
  .page { grid-template-columns: minmax(0, 50fr) minmax(0, 50fr); }
  .visual__bg { object-position: 40% center; }
  .facts { gap: 18px 26px; }
}

/* Below 860px the two-up unstacks: the render becomes a band of fixed height
   and the caption drops out of absolute positioning onto solid espresso. */
@media (max-width: 860px) {
  .page {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .visual {
    position: static;
    height: auto;
    background: var(--espresso-deep);
    border-right: 0;
    border-bottom: 1px solid rgba(188, 170, 139, 0.4);
  }

  /* overflow:hidden matters — the slow-push scale would otherwise spill the
     image past the scrim and print a bright seam over the caption */
  .visual picture {
    display: block;
    height: 46vh;
    min-height: 260px;
    overflow: hidden;
  }

  .visual__bg {
    position: relative;
    height: 100%;
    object-position: center 38%;
  }

  /* Reach solid espresso just before the image ends, so the band dissolves
     into the caption instead of stopping on a bright strip of city lights. */
  .visual__scrim {
    bottom: auto;
    height: 46vh;
    min-height: 260px;
    background:
      linear-gradient(to bottom,
        rgba(27, 19, 13, 0.78) 0%,
        rgba(27, 19, 13, 0.10) 30%,
        rgba(27, 19, 13, 0.34) 56%,
        rgba(27, 19, 13, 0.92) 78%,
        rgba(27, 19, 13, 1) 88%);
  }

  .visual__caption {
    position: static;
    max-width: none;
    padding: 18px 24px 32px;
  }

  .visual__logo { width: 132px; }

  .facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
  }

  .fact__label { font-size: 9.5px; letter-spacing: 0.12em; }

  .panel { overflow-y: visible; }
  .panel__inner { max-width: 560px; padding: 40px 24px 44px; }
}

@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .visual picture,
  .visual__scrim { height: 40vh; min-height: 230px; }
  .visual__headline { font-size: clamp(28px, 8.4vw, 36px); }
  .visual__sub { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .visual__bg { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
