/* ==========================================================================
   Zilla Real Estate — Coming Soon
   ========================================================================== */

:root {
  --orange: #f3752e;
  --ink: #0b0a09;
  --white: #ffffff;
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.42);
  --hair: rgba(255, 255, 255, 0.22);

  --font-sans: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-kufi: "Noto Kufi Arabic", "Segoe UI", Tahoma, "Geeza Pro", sans-serif;
  --font-naskh: "Noto Naskh Arabic", "Noto Kufi Arabic", "Segoe UI", Tahoma, "Geeza Pro", serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-soft: cubic-bezier(0.33, 0, 0.2, 1);

  --pad-x: clamp(20px, 4.2vw, 56px);
  --pad-y: clamp(18px, 3.6vh, 44px);
}

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

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--orange);
  color: var(--white);
}

/* --------------------------------------------------------------------------
   Background scene
   -------------------------------------------------------------------------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 38%, #1d1915 0%, #100e0c 55%, #080706 100%);
}

.scene__parallax,
.scene__drift,
.scene picture {
  position: absolute;
  inset: 0;
}

.scene__parallax {
  transform: translate3d(calc(var(--px, 0) * -16px), calc(var(--py, 0) * -12px), 0) scale(1.04);
  will-change: transform;
}

.scene__drift {
  animation: drift 38s var(--ease-in-out) infinite alternate;
}

.scene__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: saturate(0.7) sepia(0.1) contrast(1.06) brightness(0.9);
}

.js .scene__img {
  opacity: 0;
  transform: scale(1.14);
  transition:
    opacity 2.8s var(--ease-soft),
    transform 9s var(--ease-out);
}

.js .scene.is-loaded .scene__img {
  opacity: 1;
  transform: scale(1);
}

.scene__shade {
  position: absolute;
  inset: 0;
  background:
    /* calm pool behind the brand */
    radial-gradient(62% 52% at 50% 47%, rgba(8, 7, 6, 0.62) 0%, rgba(8, 7, 6, 0.38) 55%, rgba(8, 7, 6, 0) 100%),
    /* top & bottom falloff for the switcher and copyright */
    linear-gradient(180deg, rgba(8, 7, 6, 0.72) 0%, rgba(8, 7, 6, 0.18) 26%, rgba(8, 7, 6, 0.18) 70%, rgba(8, 7, 6, 0.86) 100%),
    /* overall grade */
    rgba(10, 9, 8, 0.34);
}

.scene__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(38% 30% at 50% 44%, rgba(243, 117, 46, 0.1), rgba(243, 117, 46, 0) 70%);
  mix-blend-mode: screen;
}

.js .scene__glow {
  opacity: 0;
  transition: opacity 3s var(--ease-soft) 0.6s;
}

.js.is-ready .scene__glow {
  opacity: 1;
}

.scene__grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.4 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  pointer-events: none;
}

@keyframes drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.06) translate3d(-0.6%, -0.8%, 0); }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(var(--pad-y), env(safe-area-inset-top))
    max(var(--pad-x), env(safe-area-inset-right))
    max(var(--pad-y), env(safe-area-inset-bottom))
    max(var(--pad-x), env(safe-area-inset-left));
}

/* --------------------------------------------------------------------------
   Language switcher (kept top-right in every language)
   -------------------------------------------------------------------------- */

.topbar {
  display: flex;
  justify-content: flex-end;
  direction: ltr;
}

.lang {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.4vw, 18px);
  margin: -10px -4px 0 0;
}

.lang__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.56);
  text-decoration: none;
  line-height: 1;
  transition: color 0.5s var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}

.lang__link[lang="en"] {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-right: -0.2em;
}

.lang__link[lang="ar"],
.lang__link[lang="ckb"] {
  font-family: var(--font-kufi);
  font-size: 13px;
  font-weight: 400;
  padding-bottom: 2px;
}

.lang__link::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 6px;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.6s var(--ease-out);
}

.lang__link[lang="en"]::after {
  right: calc(4px + 0.2em);
}

.lang__link:hover,
.lang__link:focus-visible {
  color: var(--text);
}

.lang__link[aria-current="true"] {
  color: var(--white);
}

.lang__link[aria-current="true"]::after {
  transform: scaleX(1);
}

.lang__link:focus-visible {
  outline: 1px solid rgba(243, 117, 46, 0.7);
  outline-offset: 2px;
}

.lang__sep {
  width: 1px;
  height: 11px;
  background: var(--hair);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(28px, 6vh, 64px) 0;
}

.brand {
  width: min(640px, 82vw);
  margin: 0;
  direction: ltr;
  line-height: 0;
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  fill-rule: evenodd;
}

.logo__roof,
.logo__tower,
.logo__rule {
  fill: var(--orange);
}

.logo__letter,
.logo__subletter {
  fill: var(--white);
}

.logo__roof,
.logo__tower,
.logo__letter,
.logo__rule,
.logo__subletter {
  transform-box: fill-box;
}

/* Messages (all languages share one grid cell so switching never shifts layout) */

.messages {
  display: grid;
  width: 100%;
  margin-top: clamp(40px, 8vh, 84px);
}

.message {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  visibility: hidden;
}

.message__title {
  margin: 0;
  color: var(--white);
  font-weight: 300;
  line-height: 1.1;
}

.message__rule {
  display: block;
  width: 36px;
  height: 1px;
  margin: clamp(18px, 2.6vh, 26px) 0 clamp(16px, 2.4vh, 24px);
  background: var(--orange);
}

.message__line {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  text-wrap: balance;
}

.message[lang="en"] .message__title {
  font-family: var(--font-sans);
  font-size: clamp(22px, 5.1vw, 40px);
  letter-spacing: 0.42em;
  padding-left: 0.42em; /* balance the trailing tracking */
  text-transform: uppercase;
}

.message[lang="en"] .message__line {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(19px, 2.9vw, 26px);
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.message:is([lang="ckb"], [lang="ar"]) .message__title {
  font-family: var(--font-kufi);
  font-size: clamp(30px, 6.2vw, 50px);
  font-weight: 400;
  line-height: 1.5;
}

.message:is([lang="ckb"], [lang="ar"]) .message__line {
  font-family: var(--font-naskh);
  font-size: clamp(18px, 2.8vw, 24px);
  font-weight: 400;
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  display: grid;
  justify-items: center;
  text-align: center;
}

.footer__note {
  grid-area: 1 / 1;
  margin: 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
  visibility: hidden;
}

.footer__note[lang="en"] {
  font-family: var(--font-sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-left: 0.22em;
}

.footer__note:is([lang="ckb"], [lang="ar"]) {
  font-family: var(--font-kufi);
  font-size: 11.5px;
}

.footer__note bdi {
  font-family: var(--font-sans);
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Language visibility
   -------------------------------------------------------------------------- */

html[lang="en"] :is(.message, .footer__note)[lang="en"],
html[lang="ckb"] :is(.message, .footer__note)[lang="ckb"],
html[lang="ar"] :is(.message, .footer__note)[lang="ar"] {
  visibility: visible;
}

/* ==========================================================================
   Motion (only when JS is running; without JS everything is simply visible)
   ========================================================================== */

.js .logo__roof,
.js .logo__tower,
.js .logo__letter {
  transform: translate3d(0, 104%, 0);
}

.js .logo__rule {
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.js .logo__subletter {
  opacity: 0;
  transform: translate3d(-26px, 0, 0);
}

.js .topbar,
.js .footer {
  opacity: 0;
}

/* Message elements: hidden state */
.js .message > * {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  filter: blur(6px);
  transition:
    opacity 0.45s var(--ease-soft),
    transform 0.6s var(--ease-soft),
    filter 0.45s var(--ease-soft);
}

.js .message .message__rule {
  transform: scaleX(0);
  filter: none;
}

.js .message {
  transition: visibility 0s linear 0.6s;
}

.js .footer__note {
  opacity: 0;
  transition: opacity 0.45s var(--ease-soft), visibility 0s linear 0.45s;
}

/* ---- Entrance sequence --------------------------------------------------- */

.is-ready .logo__roof,
.is-ready .logo__tower,
.is-ready .logo__letter {
  transform: translate3d(0, 0, 0);
}

.is-ready .logo__roof {
  transition: transform 1.25s var(--ease-out) 0.1s;
}

.is-ready .logo__tower {
  transition: transform 1.25s var(--ease-out) 0.26s;
}

.is-ready .logo__letter {
  transition: transform 1.1s var(--ease-out) calc(0.5s + var(--i) * 0.07s);
}

.is-ready .logo__rule {
  transform: scaleX(1);
  transition: transform 1.35s var(--ease-in-out) 0.92s;
}

.is-ready .logo__rule + .logo__rule {
  transition-delay: 1.04s;
}

.is-ready .logo__subletter {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 0.9s var(--ease-soft) calc(1.62s + var(--i) * 0.04s),
    transform 1.1s var(--ease-out) calc(1.62s + var(--i) * 0.04s);
}

.is-ready .topbar,
.is-ready .footer {
  opacity: 1;
  transition: opacity 1.6s var(--ease-soft) 2.45s;
}

/* Active message: visible state */
html.is-ready[lang="en"] .message[lang="en"],
html.is-ready[lang="ckb"] .message[lang="ckb"],
html.is-ready[lang="ar"] .message[lang="ar"] {
  transition-delay: 0s;
}

html.is-ready[lang="en"] .message[lang="en"] > *,
html.is-ready[lang="ckb"] .message[lang="ckb"] > *,
html.is-ready[lang="ar"] .message[lang="ar"] > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
  transition:
    opacity 1s var(--ease-soft) var(--d, 0.3s),
    transform 1.3s var(--ease-out) var(--d, 0.3s),
    filter 1s var(--ease-soft) var(--d, 0.3s);
}

html.is-ready[lang="en"] .message[lang="en"] > .message__rule,
html.is-ready[lang="ckb"] .message[lang="ckb"] > .message__rule,
html.is-ready[lang="ar"] .message[lang="ar"] > .message__rule {
  transform: scaleX(1);
}

html.is-ready .message .message__title { --d: 0.3s; }
html.is-ready .message .message__rule { --d: 0.42s; }
html.is-ready .message .message__line { --d: 0.52s; }

html.is-ready:not(.is-settled) .message .message__title { --d: 1.9s; }
html.is-ready:not(.is-settled) .message .message__rule { --d: 2.1s; }
html.is-ready:not(.is-settled) .message .message__line { --d: 2.22s; }

/* "Tracking-in" on the English title during the first reveal */
.js:not(.is-ready) .message[lang="en"] .message__title {
  letter-spacing: 0.9em;
  padding-left: 0.9em;
}

html.is-ready:not(.is-settled)[lang="en"] .message[lang="en"] .message__title {
  transition:
    opacity 1.2s var(--ease-soft) 1.9s,
    transform 1.6s var(--ease-out) 1.9s,
    filter 1.2s var(--ease-soft) 1.9s,
    letter-spacing 2.2s var(--ease-out) 1.9s,
    padding-left 2.2s var(--ease-out) 1.9s;
}

html.is-ready[lang="en"] .footer__note[lang="en"],
html.is-ready[lang="ckb"] .footer__note[lang="ckb"],
html.is-ready[lang="ar"] .footer__note[lang="ar"] {
  opacity: 1;
  transition: opacity 0.9s var(--ease-soft) 0.35s, visibility 0s linear 0s;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 600px) {
  .brand {
    width: min(360px, 84vw);
  }

  .messages {
    margin-top: clamp(34px, 6.5vh, 56px);
  }

  .message[lang="en"] .message__title {
    letter-spacing: 0.34em;
    padding-left: 0.34em;
  }

  .message__line {
    max-width: 26ch;
  }

  .footer__note[lang="en"] {
    font-size: 9.5px;
    letter-spacing: 0.16em;
    padding-left: 0.16em;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .brand {
    width: min(420px, 46vw);
  }

  .hero {
    padding: 12px 0;
  }

  .messages {
    margin-top: 22px;
  }

  .message__rule {
    margin: 12px 0;
  }
}

@media (min-width: 1800px) and (min-height: 1000px) {
  .brand {
    width: 760px;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion: keep gentle fades, drop movement
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .scene__drift {
    animation: none;
  }

  .scene__parallax {
    transform: none;
  }

  .js .scene__img,
  .js .scene.is-loaded .scene__img {
    transform: none;
  }

  .js .scene__img {
    transition: opacity 1.2s ease;
  }

  .js .logo__roof,
  .js .logo__tower,
  .js .logo__letter,
  .js .logo__subletter,
  .js .logo__rule,
  .js .message > * {
    transform: none;
    filter: none;
  }

  .js .logo__mark,
  .js .logo__word,
  .js .logo__rules,
  .js .logo__sub {
    opacity: 0;
    transition: opacity 1s ease 0.1s;
  }

  .is-ready .logo__mark,
  .is-ready .logo__word,
  .is-ready .logo__rules,
  .is-ready .logo__sub {
    opacity: 1;
  }

  .is-ready .logo__subletter {
    transition: none;
  }

  .js .message .message__rule {
    transform: none;
  }

  .js:not(.is-ready) .message[lang="en"] .message__title {
    letter-spacing: 0.42em;
    padding-left: 0.42em;
  }

  html.is-ready:not(.is-settled) .message > * {
    --d: 0.6s !important;
  }

  html.is-ready:not(.is-settled)[lang="en"] .message[lang="en"] .message__title {
    transition: opacity 1s ease 0.6s;
  }

  .is-ready .topbar,
  .is-ready .footer {
    transition-delay: 0.6s;
  }
}
