/* ============================================================
   ALTAIR — Luxury Apartments
   Design System & Hero Section Styles
   ============================================================ */

/* ---- Google Font ---- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=Roboto:wght@300;400;500&display=swap');

@font-face {
    font-family: 'Bizantheum';
    src: url('fonts/bizantheum.otf') format('opentype');
}

/* ---- CSS Custom Properties ---- */
:root {
  /* Palette — drawn from the twilight render */
  --color-bg-deep:       #0a0e1a;
  --color-bg-dark:       #111827;
  --color-surface:       #1a2035;
  --color-accent-gold:   #c9a96e;
  --color-accent-warm:   #d4a95a;
  --color-text-primary:  #f0ece4;
  --color-text-muted:    rgba(240, 236, 228, 0.5);
  --color-white:         #ffffff;

  /* Typography */
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-roboto: 'Roboto', sans-serif;
  --font-bizantheum: 'Bizantheum', 'Playfair Display', Georgia, serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --transition-fast: 0.3s var(--ease-smooth);
  --transition-medium: 0.6s var(--ease-out-expo);
  --transition-slow: 1.2s var(--ease-out-expo);
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: auto; /* GSAP handles scroll, don't interfere */
}

body {
  font-family: var(--font-primary);
  background: var(--color-bg-deep);
  color: var(--color-text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ============================================================
   SITE HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100; /* Stays above everything */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-xl);
  background: linear-gradient(to bottom, rgba(10, 14, 26, 0.9) 0%, rgba(10, 14, 26, 0) 100%);
  pointer-events: none; /* Let clicks pass through the gradient */
}

.header-left, .header-center, .header-right {
  display: flex;
  align-items: center;
  pointer-events: auto; /* Enable clicks on actual content */
}

.header-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  justify-content: flex-start;
}

.header-center {
  flex: 1;
  justify-content: center;

  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  margin: 0 auto;
}

.header-right {
  flex: 1;
  justify-content: flex-end;
  gap: var(--space-lg);
}

.header-logo {
  height: 80px;
  width: auto;
}

.header-link, .header-text {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--color-white);
  text-decoration: none;
  text-transform: uppercase;
}

.header-link {
  transition: opacity var(--transition-fast);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.header-link:hover {
  opacity: 0.7;
}

.header-right .arrow {
  margin-left: 0.25rem;
  font-weight: 300;
  font-size: 20px;
  line-height: 1;
  margin-top: -2px;
}

/* Prevent scroll while loading */
body.is-loading {
  overflow: hidden;
  height: 100vh;
}

/* ============================================================
   PRELOADER
   ============================================================ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-deep);
  transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Circular progress ring */
.preloader__ring {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: var(--space-lg);
}

.preloader__ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.preloader__ring-bg {
  fill: none;
  stroke: rgba(201, 169, 110, 0.12);
  stroke-width: 2;
}

.preloader__ring-progress {
  fill: none;
  stroke: var(--color-accent-gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 283; /* 2 * π * 45 */
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.15s linear;
}

.preloader__percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--color-text-primary);
}

.preloader__label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* Subtle brand name in preloader */
.preloader__brand {
  position: absolute;
  bottom: var(--space-xl);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(201, 169, 110, 0.3);
}

/* ============================================================
   HERO CANVAS
   ============================================================ */
#hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  will-change: transform;
}

/* ################## */
.custome-text{
    position: absolute;
    position: fixed;
    bottom: 140px;
    z-index: 2;
    text-align: center;
    display: block;
    width: 100%;
    font-size: 90px;
    line-height: 75px;
    font-family: 'Bizantheum', sans-serif;
    text-transform: uppercase;
    span{      
      font-family: "Inter", sans-serif;
      text-transform: none;
      font-size: 15px;
      width: 100%;
      display: block;
    }
}

/* ============================================================
   HERO SCROLL SPACER
   — This tall div creates the scrollable area.
   — The canvas stays fixed while the user scrolls through this.
   ============================================================ */
#hero-scroll-spacer {
  position: relative;
  width: 100%;
  height: 500vh; /* 5× viewport — the scroll runway */
  z-index: 0;
}

/* ============================================================
   SCROLL INDICATOR
   ============================================================ */
#scroll-indicator {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition-medium);
  pointer-events: none;
}

#scroll-indicator.visible {
  opacity: 1;
}

#scroll-indicator.fade-out {
  opacity: 0;
}

.scroll-indicator__text {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.scroll-indicator__line {
  width: 1px;
  height: 40px;
  position: relative;
  overflow: hidden;
  background: rgba(201, 169, 110, 0.15);
}

.scroll-indicator__line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-accent-gold);
  animation: scrollPulse 2s var(--ease-smooth) infinite;
}

@keyframes scrollPulse {
  0% {
    top: -100%;
  }
  50% {
    top: 0;
  }
  100% {
    top: 100%;
  }
}

/* ============================================================
   INTRO LAYERED SECTION
   ============================================================ */
#intro-layered-section {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 100vh; /* Force exactly viewport height */
  width: 100%;
  overflow: hidden;
  background: var(--color-white);
}

/* Layer 1: Atmospheric Background */
.intro-bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  will-change: opacity;
}

/* Layer 2: Typography */
.intro-text-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 5vh; /* Nudge it slightly up from true center */
}

.intro-overline {
  display: block;
  font-family: var(--font-roboto);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: #333;
  margin-bottom: 60px;
  opacity: 0;
  will-change: opacity, transform;
}

.intro-main-text {
  font-family: var(--font-bizantheum);
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 100;
  color: #1a1a1a;
  margin: 0;
  text-transform: uppercase;
  line-height: 1.1;


}
.intro-text-line {
  display: block;
  overflow: hidden; /* Clips text before it rises */
}

.intro-text-inner {
  display: block;
  transform: translateY(100%);
  opacity: 0;
  will-change: transform, opacity;
}

/* Layer 3: Foreground Building */
.intro-building-layer {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  height: 90vh; /* Adjust height to overlap text nicely */
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  will-change: opacity, transform;
}

.intro-building-img {
  height: 100%;
  width: auto;
  max-width: 100vw;
  object-fit: contain;
  object-position: bottom center;
}

/* ============================================================
   BODY DESIGN SECTION
   ============================================================ */
#body-design-section {
  position: relative;
  z-index: 5; /* Higher than intro section to scroll over it */
  width: 100%;
  background: var(--color-bg-deep); /* Opaque background so it fully covers the sticky section */
}

.body-design-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   UTILITY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
