/* Badshah Palace — light fractal glass
   Technique from Bedimcode fractal-glass (ribbed frost + ellipse glow).
   Not the dark AI Toolbox clone. Fonts: Libre Baskerville + DM Sans. Title Case. */

:root {
  --paper: #e7e3db;
  --ink: #1c1a17;
  --mute: #6f6a63;
  --line: rgba(28, 26, 23, 0.1);
  --gold: #9a7b3c;
  --orange: #da7934;
  --red: #e60215;
  --glass: rgba(255, 255, 255, 0.34);
  --glass-edge: rgba(255, 255, 255, 0.72);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font-display: "Libre Baskerville", "Iowan Old Style", Palatino, serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
  --font-ar: "Noto Naskh Arabic", serif;
}

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

html {
  background: var(--paper);
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
}

body {
  font-family: var(--font-ui);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  isolation: isolate;
  background: transparent;
}

body.home .entry-header,
body.home .entry-title,
body.home .page-header,
body.home .elementor-page-title,
body.home h1.wp-block-post-title {
  display: none !important;
}

/* Header/footer live inside .bp-shell — hide Hello chrome */
body:has(.bp-shell) .site-header,
body:has(.bp-shell) header.site-header,
body:has(.bp-shell) #masthead,
body:has(.bp-shell) .site-footer,
body:has(.bp-shell) footer.site-footer,
body:has(.bp-shell) #colophon {
  display: none !important;
}

.elementor-location-header,
.elementor-location-footer,
.elementor-location-header .elementor-section,
.elementor-location-footer .elementor-section,
.elementor-location-header .elementor-container,
.elementor-location-footer .elementor-container,
.elementor-location-header .elementor-widget-html .elementor-widget-container,
.elementor-location-footer .elementor-widget-html .elementor-widget-container,
body.elementor-page,
body.elementor-page .elementor,
body.home .elementor-section,
body.home .elementor-element-populated {
  background: transparent !important;
  box-shadow: none !important;
  max-width: none !important;
}

.elementor-location-header .elementor-section,
.elementor-location-footer .elementor-section {
  padding: 0 !important;
}

/* Ellipse glows behind the glass — house colours, not one neon */
body::before {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 48% at 12% 78%, rgba(218, 121, 52, 0.42), transparent 62%),
    radial-gradient(ellipse 38% 44% at 50% 42%, rgba(193, 162, 79, 0.38), transparent 64%),
    radial-gradient(ellipse 42% 48% at 88% 76%, rgba(230, 2, 21, 0.22), transparent 62%),
    radial-gradient(ellipse 30% 28% at 50% 100%, rgba(193, 162, 79, 0.18), transparent 70%);
}

/* Ribbed frost — vertical slats smear the glows */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.58) 0,
      rgba(255, 255, 255, 0.08) 1px,
      rgba(231, 227, 219, 0.12) 9px,
      rgba(255, 255, 255, 0.42) 14px,
      rgba(231, 227, 219, 0.05) 22px
    );
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  opacity: 0.92;
  mix-blend-mode: soft-light;
}

.bp-grain {
  display: none;
}

.bp-shell {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.bp-masthead {
  width: min(1120px, calc(100% - 2rem));
  margin: 1.15rem auto 0;
  padding: 1.15rem 1.5rem 1.2rem;
  text-align: center;
  border-radius: 1.35rem;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 40px rgba(28, 26, 23, 0.06);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
}

.bp-masthead__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.bp-masthead__icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}

.bp-masthead__name,
.site-header .site-title,
.site-header .site-title a {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  text-transform: capitalize;
  text-wrap: balance;
}

.bp-masthead__tag,
.site-header .site-description {
  margin: 0 auto;
  max-width: 34rem;
  font-family: var(--font-ui);
  font-size: clamp(0.82rem, 1.5vw, 0.92rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--mute);
  text-transform: capitalize;
}

body.home .site-header,
body.home header.site-header,
body.home #masthead {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 1.15rem 1rem 0 !important;
  text-align: center;
}

body.home .site-header .site-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  border-radius: 1.35rem;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  backdrop-filter: blur(22px);
}

body.home .site-footer,
body.home footer.site-footer,
body.home #colophon {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.bp-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 5vh, 3rem) 0 clamp(1.25rem, 3vh, 2rem);
}

.bp-glass-stage {
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem) clamp(1.35rem, 3vw, 2rem);
  border-radius: 1.75rem;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 24px 60px rgba(28, 26, 23, 0.07);
  backdrop-filter: blur(26px) saturate(1.2);
  -webkit-backdrop-filter: blur(26px) saturate(1.2);
}

.bp-glass-stage > h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  text-transform: capitalize;
  text-wrap: balance;
}

.bp-glass-stage > p {
  margin: 0;
  max-width: 38rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--mute);
}

.bp-houses {
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  align-items: end;
  gap: 0;
}

.bp-house {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.05rem;
  padding: 0 1.4rem 0.2rem;
  text-decoration: none;
  color: inherit;
}

.bp-house + .bp-house {
  border-left: 1px solid rgba(28, 26, 23, 0.08);
}

.bp-mark {
  display: block;
  width: min(100%, 240px);
}

.bp-house--tf7 .bp-mark {
  width: min(100%, 290px);
}

.bp-mark img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  transform: translateY(6px);
  transition: transform 0.7s var(--ease);
  filter: drop-shadow(0 18px 24px rgba(28, 26, 23, 0.08));
}

.bp-house:hover .bp-mark img {
  transform: translateY(0) scale(1.03);
}

.bp-house:active .bp-mark img {
  transform: scale(0.985);
}

.bp-house__area {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--mute);
  text-transform: capitalize;
  transition: color 0.45s var(--ease);
}

.bp-house--oud:hover .bp-house__area { color: var(--orange); }
.bp-house--karama:hover .bp-house__area { color: var(--red); }
.bp-house--tf7:hover .bp-house__area { color: var(--gold); }

.bp-status {
  text-align: center;
  margin-top: clamp(1.4rem, 3vw, 2rem);
  padding-top: 1.15rem;
  border-top: 1px solid rgba(28, 26, 23, 0.08);
}

.bp-status h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.02em;
  text-transform: capitalize;
  color: var(--ink);
  text-wrap: balance;
}

.bp-status p {
  margin: 0.55rem 0 0;
  font-family: var(--font-ar);
  font-size: 1.12rem;
  color: var(--gold);
}

.bp-foot,
body.home .site-footer .footer-inner,
body.home .site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 1.15rem;
  padding: 1rem 1.35rem;
  font-size: 0.78rem;
  color: var(--mute);
  border-radius: 1.2rem;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.bp-foot a,
body.home .site-footer a {
  color: var(--ink);
  text-decoration: none;
  text-transform: none;
  border-bottom: 1px solid transparent;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.bp-foot a:hover,
body.home .site-footer a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.bp-foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.25rem;
}

.bp-houses .bp-house:nth-child(1) { animation: bp-in 0.85s var(--ease) 0.04s both; }
.bp-houses .bp-house:nth-child(2) { animation: bp-in 0.85s var(--ease) 0.12s both; }
.bp-houses .bp-house:nth-child(3) { animation: bp-in 0.85s var(--ease) 0.2s both; }
.bp-status { animation: bp-in 0.9s var(--ease) 0.18s both; }

@keyframes bp-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  body::after {
    background: repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.5) 0,
      rgba(255, 255, 255, 0.08) 1px,
      rgba(231, 227, 219, 0.1) 14px,
      rgba(255, 255, 255, 0.35) 20px
    );
  }
  .bp-houses {
    grid-template-columns: 1fr;
    justify-items: center;
    max-width: 320px;
    margin: 0 auto;
  }
  .bp-house {
    width: 100%;
    padding: 1.15rem 0;
  }
  .bp-house + .bp-house {
    border-left: 0;
    border-top: 1px solid rgba(28, 26, 23, 0.08);
  }
  .bp-mark,
  .bp-house--tf7 .bp-mark {
    width: min(100%, 240px);
  }
  .bp-foot,
  body.home .site-footer {
    justify-content: center;
    text-align: center;
  }
  .bp-foot__links { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .bp-house,
  .bp-status,
  .bp-mark img {
    animation: none;
    transition: none;
  }
  .bp-mark img { transform: none; }
  body::after {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
