/* ════════════════════════════════════════════════════════════
   BEVERLY HILLS ERBIL — single-screen aerial experience
   ════════════════════════════════════════════════════════════ */
:root {
  --ink: #0b1410;
  --ink-2: #101e17;
  --cream: #f2ead6;
  --cream-dim: rgba(242, 234, 214, 0.72);
  --gold: #c9a86a;
  --line: rgba(242, 234, 214, 0.28);
  --font-title: 'Cormorant Garamond', serif;
  --font-logo: 'Marcellus', serif;
  --font-ui: 'Manrope', sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-ui);
  background: var(--ink);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
}
body.no-native-cursor, body.no-native-cursor * { cursor: none !important; }
::selection { background: var(--gold); color: var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* split chars */
.word { display: inline-block; white-space: nowrap; }
.char-wrap { display: inline-block; overflow: hidden; vertical-align: bottom; }
.char { display: inline-block; transform: translateY(112%); will-change: transform; }

/* ════ PRELOADER ════════════════════════════════════════════ */
.preloader { position: fixed; inset: 0; z-index: 1000; background: var(--ink); display: grid; place-items: center; }
.preloader__inner { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--cream); }
.preloader__mark { width: 52px; height: 52px; opacity: 0.9; }
.preloader__ar { font-family: var(--font-title); font-size: 20px; letter-spacing: 0.1em; color: var(--gold); }
.preloader__en { font-family: var(--font-title); font-size: clamp(26px, 4vw, 40px); letter-spacing: 0.34em; text-indent: 0.34em; font-weight: 400; }
.preloader__pct { margin-top: 18px; font-size: 11px; letter-spacing: 0.4em; color: var(--cream-dim); }

/* ════ CURSOR ═══════════════════════════════════════════════ */
.cursor { position: fixed; inset: 0; z-index: 2000; pointer-events: none; }
.cursor__dot { position: absolute; top: 0; left: 0; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--cream); }
.cursor__ring {
  position: absolute; top: 0; left: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border-radius: 50%; border: 1px solid rgba(242, 234, 214, 0.5);
  display: grid; place-items: center;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background-color .35s, border-color .35s;
}
.cursor__label { font-size: 10px; letter-spacing: 0.18em; color: var(--ink); opacity: 0; transition: opacity .25s; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.cursor.is-hover .cursor__ring { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: rgba(242, 234, 214, 0.1); }
.cursor.is-label .cursor__ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--cream); border-color: var(--cream); }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor.is-label .cursor__dot { opacity: 0; }
.cursor.is-down .cursor__ring { transform: scale(0.85); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ════ CANVAS + ATMOSPHERE ══════════════════════════════════ */
.world-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; }
body[data-mode="explore"] .world-canvas { pointer-events: auto; }

.grade {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 105% 90% at 50% 42%, rgba(8, 16, 12, 0) 38%, rgba(6, 12, 9, 0.52) 100%);
}
.scrim {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse 46% 38% at 50% 47%, rgba(7, 13, 10, 0.46), rgba(7, 13, 10, 0) 72%);
  transition: opacity 1.2s var(--ease-out);
}
body[data-mode="explore"] .scrim { opacity: 0; }

/* drifting foreground haze */
.haze {
  position: fixed; top: -20%; height: 140%; width: 160%; z-index: 4; pointer-events: none;
  opacity: 0.55; will-change: transform;
}
.haze--a {
  left: -30%;
  background:
    radial-gradient(38% 26% at 18% 30%, rgba(214, 222, 216, 0.16), transparent 70%),
    radial-gradient(30% 22% at 64% 72%, rgba(206, 214, 206, 0.12), transparent 70%),
    radial-gradient(26% 18% at 88% 22%, rgba(214, 222, 216, 0.10), transparent 70%);
}
.haze--b {
  left: -60%;
  background:
    radial-gradient(34% 24% at 30% 64%, rgba(210, 218, 210, 0.13), transparent 70%),
    radial-gradient(26% 20% at 76% 36%, rgba(216, 224, 218, 0.10), transparent 70%);
}

/* district labels (explore) */
.world-labels { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.world-label {
  position: absolute; top: 0; left: 0;
  display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translate(-4px, -50%); transition: opacity 0.4s; will-change: transform;
  background: none; border: 0;
}
body[data-mode="explore"] .world-label { opacity: 1; pointer-events: auto; }
.world-label__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 4px rgba(242, 234, 214, 0.22); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(242, 234, 214, 0.22); }
  50% { box-shadow: 0 0 0 11px rgba(242, 234, 214, 0.04); }
}
.world-label__name {
  font-size: 10.5px; letter-spacing: 0.24em; font-weight: 600; text-transform: uppercase;
  color: var(--cream);
  background: rgba(10, 18, 14, 0.55); backdrop-filter: blur(8px);
  padding: 8px 13px; border: 1px solid rgba(242, 234, 214, 0.18);
  transition: background 0.3s, color 0.3s;
}
.world-label:hover .world-label__name, .world-label.is-active .world-label__name { background: var(--cream); color: var(--ink); }

/* ════ PERSISTENT UI ════════════════════════════════════════ */
.ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.ui > * { pointer-events: auto; }

/* sound toggle */
.sound { position: absolute; top: 26px; left: clamp(20px, 3.4vw, 48px); padding: 10px; opacity: 0.9; }
.sound__bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.sound__bars i { width: 1.6px; height: 30%; background: var(--cream); transition: height 0.3s; }
.sound.is-on .sound__bars i { animation: soundbar 1.1s ease-in-out infinite alternate; }
.sound.is-on .sound__bars i:nth-child(1) { animation-delay: 0s; }
.sound.is-on .sound__bars i:nth-child(2) { animation-delay: .15s; }
.sound.is-on .sound__bars i:nth-child(3) { animation-delay: .3s; }
.sound.is-on .sound__bars i:nth-child(4) { animation-delay: .45s; }
.sound.is-on .sound__bars i:nth-child(5) { animation-delay: .6s; }
@keyframes soundbar { from { height: 22%; } to { height: 100%; } }

/* brand */
.brand {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--cream); text-align: center;
}
.brand__mark { width: 38px; height: 38px; margin-bottom: 4px; }
.brand__ar { font-family: var(--font-title); font-size: 15px; letter-spacing: 0.12em; color: var(--gold); }
.brand__en { font-family: var(--font-logo); font-size: 13px; letter-spacing: 0.42em; text-indent: 0.42em; text-transform: uppercase; }

/* top-right links */
.ui__topright { position: absolute; top: 32px; right: clamp(20px, 3.4vw, 48px); display: flex; gap: 28px; align-items: center; }
.ui__link {
  position: relative; font-size: 11px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--cream); padding: 6px 0;
}
.ui__link::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--cream); transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease-out);
}
.ui__link:hover::after { transform: scaleX(1); transform-origin: left; }
.ui__link--exit { display: none; }
body[data-mode="explore"] .ui__link--exit { display: inline-block; }

/* ════ HERO CENTRE ══════════════════════════════════════════ */
.hero {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  width: min(94vw, 1100px);
}
body[data-mode="explore"] .hero { pointer-events: none; }
.hero__star { font-size: 14px; color: var(--gold); margin-bottom: 26px; text-shadow: 0 0 18px rgba(201, 168, 106, 0.8); }
.hero__kicker {
  font-size: clamp(10px, 1.05vw, 13px); font-weight: 600; letter-spacing: 0.52em; text-indent: 0.52em;
  color: var(--cream); text-transform: uppercase;
  text-shadow: 0 1px 14px rgba(5, 10, 8, 0.8);
}
.hero__kicker i { font-style: normal; font-size: 0.72em; vertical-align: 0.35em; letter-spacing: 0.4em; }
.hero__title {
  margin-top: 22px;
  font-family: var(--font-title); font-weight: 400;
  font-size: clamp(44px, 7.4vw, 118px);
  line-height: 1.04; letter-spacing: 0.16em; text-indent: 0.16em;
  color: #f7f2e4; text-transform: uppercase;
  text-shadow: 0 2px 30px rgba(5, 10, 8, 0.75), 0 1px 8px rgba(5, 10, 8, 0.5);
  display: flex; flex-wrap: wrap; justify-content: center; column-gap: 0.45em;
}
.hero__sub {
  margin-top: 20px;
  font-family: var(--font-title); font-weight: 400;
  font-size: clamp(16px, 1.6vw, 21px); letter-spacing: 0.04em;
  color: rgba(247, 242, 228, 0.92);
  text-shadow: 0 1px 12px rgba(5, 10, 8, 0.8);
}
.btn-cream {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  margin-top: 38px; padding: 17px 38px;
  background: var(--cream); color: #4a4632;
  font-size: 11px; font-weight: 700; letter-spacing: 0.32em; text-indent: 0.32em; text-transform: uppercase;
  border: 1px solid var(--cream); overflow: hidden; isolation: isolate;
  transition: color 0.45s var(--ease-out);
  box-shadow: 0 14px 44px rgba(4, 9, 7, 0.45);
}
.btn-cream::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink-2); transform: translateY(101%); transition: transform 0.5s var(--ease-out);
}
.btn-cream:hover { color: var(--cream); }
.btn-cream:hover::before { transform: translateY(0); }
.btn-cream span { position: relative; }

/* ════ BOTTOM ROW ═══════════════════════════════════════════ */
.ui__bottom {
  position: absolute; left: 0; right: 0; bottom: 26px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 clamp(20px, 3.4vw, 48px); gap: 16px;
}
.ui__coords { font-size: 10px; letter-spacing: 0.28em; color: rgba(242, 234, 214, 0.55); font-weight: 600; }
.ui__start {
  font-size: 11px; font-weight: 700; letter-spacing: 0.3em; text-indent: 0.3em; text-transform: uppercase;
  color: var(--cream); padding: 8px 2px 10px; position: relative;
}
.ui__start::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 4px; height: 1px; background: rgba(242, 234, 214, 0.6); transition: background 0.3s; }
.ui__start:hover::after { background: var(--cream); }
.ui__bottom .ui__link { justify-self: end; }
body[data-mode="explore"] .ui__start { visibility: hidden; }

/* ════ EXPLORE UI ═══════════════════════════════════════════ */
.explore-ui { position: fixed; inset: 0; z-index: 8; pointer-events: none; visibility: hidden; }
body[data-mode="explore"] .explore-ui { visibility: visible; }
.explore-ui__rail {
  position: absolute; left: clamp(20px, 3.4vw, 48px); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 5px; pointer-events: auto; opacity: 0;
}
.explore-ui__rail-title { font-size: 9.5px; letter-spacing: 0.4em; font-weight: 700; color: rgba(242, 234, 214, 0.55); margin-bottom: 10px; }
.rail-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cream); background: rgba(10, 18, 14, 0.5); backdrop-filter: blur(10px);
  border: 1px solid rgba(242, 234, 214, 0.16);
  transition: background 0.35s, color 0.35s, transform 0.35s var(--ease-out);
}
.rail-btn i { font-style: normal; font-size: 9px; color: var(--gold); letter-spacing: 0.1em; }
.rail-btn:hover { transform: translateX(5px); }
.rail-btn:hover, .rail-btn.is-active { background: var(--cream); color: var(--ink); }
.rail-btn:hover i, .rail-btn.is-active i { color: #8a7340; }
.explore-ui__hint {
  position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%);
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; font-weight: 600;
  color: rgba(242, 234, 214, 0.6); white-space: nowrap;
}
.explore-ui__compass { position: absolute; bottom: 60px; right: clamp(20px, 3.4vw, 48px); width: 52px; color: rgba(242, 234, 214, 0.7); }

/* district panel */
.district-panel {
  position: absolute; top: 50%; right: clamp(20px, 3.4vw, 48px); transform: translateY(-50%) translateX(30px);
  width: min(370px, calc(100vw - 40px));
  background: rgba(9, 16, 12, 0.78); backdrop-filter: blur(18px);
  border: 1px solid rgba(242, 234, 214, 0.18);
  padding: 36px 34px 32px;
  pointer-events: auto; opacity: 0; visibility: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}
.district-panel__close { position: absolute; top: 14px; right: 16px; font-size: 13px; opacity: 0.6; padding: 6px; }
.district-panel__close:hover { opacity: 1; }
.district-panel__kicker { font-size: 9.5px; letter-spacing: 0.4em; font-weight: 700; color: var(--gold); }
.district-panel__title { font-family: var(--font-title); font-weight: 400; font-size: 32px; letter-spacing: 0.04em; color: var(--cream); margin: 12px 0 12px; }
.district-panel__desc { font-size: 13.5px; line-height: 1.75; color: rgba(242, 234, 214, 0.78); }
.district-panel__facts { list-style: none; margin: 20px 0 24px; border-top: 1px solid rgba(242, 234, 214, 0.16); }
.district-panel__facts li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid rgba(242, 234, 214, 0.16);
  font-size: 12px; font-weight: 500; color: rgba(242, 234, 214, 0.65);
}
.district-panel__facts li b { color: var(--cream); font-weight: 700; }
.district-panel__cta { width: 100%; margin-top: 0; box-shadow: none; }

/* ════ DETAILS DRAWER ═══════════════════════════════════════ */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
  width: min(440px, 100vw);
  background: rgba(8, 14, 11, 0.88); backdrop-filter: blur(22px);
  border-left: 1px solid rgba(242, 234, 214, 0.16);
  padding: 86px clamp(28px, 4vw, 52px) 40px;
  transform: translateX(102%); visibility: hidden;
  overflow-y: auto;
}
.drawer__close { position: absolute; top: 26px; right: 28px; font-size: 14px; opacity: 0.7; padding: 8px; }
.drawer__close:hover { opacity: 1; }
.drawer__kicker { font-size: 10px; letter-spacing: 0.42em; font-weight: 700; color: var(--gold); }
.drawer__title { font-family: var(--font-title); font-weight: 400; font-size: clamp(34px, 3.4vw, 44px); line-height: 1.1; letter-spacing: 0.05em; margin: 16px 0 18px; text-transform: uppercase; }
.drawer__text { font-size: 13.5px; line-height: 1.8; color: rgba(242, 234, 214, 0.75); }
.drawer__facts { list-style: none; margin: 26px 0 30px; border-top: 1px solid rgba(242, 234, 214, 0.16); }
.drawer__facts li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid rgba(242, 234, 214, 0.16);
  font-size: 12px; color: rgba(242, 234, 214, 0.65);
}
.drawer__facts li b { color: var(--cream); font-weight: 700; }
.drawer__cta { width: 100%; margin-top: 0; box-shadow: none; }

/* ════ INQUIRE MODAL ════════════════════════════════════════ */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; visibility: hidden; }
.modal__bg { position: absolute; inset: 0; background: rgba(5, 9, 7, 0.7); backdrop-filter: blur(10px); opacity: 0; }
.modal__card {
  position: relative; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--ink-2);
  border: 1px solid rgba(242, 234, 214, 0.18);
  padding: 48px clamp(28px, 5vw, 56px) 40px;
  opacity: 0; transform: translateY(36px);
}
.modal__close { position: absolute; top: 20px; right: 22px; font-size: 14px; opacity: 0.7; padding: 8px; }
.modal__close:hover { opacity: 1; }
.modal__kicker { font-size: 10px; letter-spacing: 0.42em; font-weight: 700; color: var(--gold); }
.modal__title { font-family: var(--font-title); font-weight: 400; font-size: clamp(30px, 3.2vw, 40px); line-height: 1.12; letter-spacing: 0.05em; margin: 14px 0 10px; text-transform: uppercase; }
.modal__form { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field { position: relative; padding-top: 20px; }
.field input, .field select {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(242, 234, 214, 0.3);
  padding: 11px 2px; color: var(--cream); font: 500 14px var(--font-ui); outline: none;
  border-radius: 0; transition: border-color 0.4s;
}
.field select { appearance: none; }
.field select option { color: #1a1a16; }
.field label {
  position: absolute; left: 2px; top: 31px; font-size: 13px; color: rgba(242, 234, 214, 0.5);
  pointer-events: none; transition: all 0.35s var(--ease-out);
}
.field input:focus, .field select:focus { border-color: var(--gold); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field select:focus + label, .field select:valid + label {
  top: 6px; font-size: 9.5px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold);
}
.modal__form .btn-cream { margin-top: 26px; box-shadow: none; }
.form-success { opacity: 0; height: 0; overflow: hidden; font-size: 12.5px; color: var(--gold); letter-spacing: 0.04em; transition: opacity 0.6s; }
.form-success.is-shown { opacity: 1; height: auto; margin-top: 14px; }
.modal__mail { display: inline-block; margin-top: 22px; font-size: 11px; letter-spacing: 0.2em; color: rgba(242, 234, 214, 0.6); border-bottom: 1px solid rgba(242, 234, 214, 0.25); padding-bottom: 3px; }
.modal__mail:hover { color: var(--cream); }

/* ════ GRAIN ════════════════════════════════════════════════ */
.grain {
  position: fixed; inset: -100%; z-index: 1500; pointer-events: none; opacity: 0.055;
  background-image: 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.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); } 75% { transform: translate(-3%, -3%); }
}

/* ════ RESPONSIVE ═══════════════════════════════════════════ */
@media (max-width: 820px) {
  .hero { top: 44%; }
  .hero__title { letter-spacing: 0.1em; text-indent: 0.1em; }
  .ui__bottom { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .ui__coords { display: none; }
  .ui__bottom .ui__link { justify-self: center; }
  .explore-ui__rail { left: 50%; top: auto; bottom: 88px; transform: translateX(-50%); flex-direction: row; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 20px); }
  .explore-ui__rail-title { display: none; }
  .rail-btn { padding: 9px 11px; font-size: 9.5px; }
  .rail-btn i { display: none; }
  .district-panel { top: auto; bottom: 150px; right: 50%; transform: translate(50%, 20px); }
  .explore-ui__compass, .explore-ui__hint { display: none; }
  .brand__mark { width: 30px; height: 30px; }
  .brand__en { font-size: 11px; }
  .sound { top: 20px; }
  .ui__topright { top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
