/* ==========================================================================
   AURA NIRMAN — SCROLL-CONTROLLED BRUSH-WRITING SIGNATURE
   Matches 9-panel storyboard reference:
   01 Initial State: Dark construction site, cranes, blueprint lines, scroll indicator
   02-04: Letter "A" through "Aura" writing with glowing brush effect
   05: Flourish pause before second word
   06-08: "Nirman" writing and final signature reveal
   09: Brand Tagline "BUILDING BETTER LIVING" with architectural glow
   ========================================================================== */

:root {
  --an-brush-bg: #040907;
  --an-brush-lime: #D4F54C;
  --an-brush-gold: #CBB05C;
  --an-brush-gold-light: #F6EDB9;
  --an-brush-amber: #E5A93C;
}

/* Section Wrapper (Scroll Track)
   CRITICAL: Must have overflow: visible so that .an-brush-viewport remains
   stationary in the viewport while scrolling through the continuous 1400vh track. */
.an-brush-section {
  position: relative;
  width: 100%;
  height: 1400vh;
  /* Smooth scrub track duration for continuous 5-act brand story & project collage */
  background-color: var(--an-brush-bg);
  color: #ffffff;
  overflow: visible !important;
  z-index: 20;
}

@media (max-width: 768px) {
  .an-brush-section {
    height: 1200vh;
  }
}

/* Section 5 Stage Container inside Stationary Viewport */
.an-stage-section-5 {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  left: 0 !important;
  top: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  overflow: hidden !important;
  pointer-events: none;
  z-index: 25;
  perspective: 1200px;
  will-change: opacity;
}

/* Stationary Pinned Viewport */
.an-brush-viewport {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  display: block !important;
  overflow: hidden !important;
  z-index: 20;
  background-color: var(--an-brush-bg);
}

/* Background: Cinematic Construction Site at Dusk with 3D Parallax Depth */
.an-brush-bg-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  perspective: 1000px;
}

.an-brush-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 130%;
  /* Generous bleed allows smooth upward translation without exposing edge */
  object-fit: cover;
  object-position: center bottom;
  filter: brightness(0.65) contrast(1.22) saturate(1.15);
  transform-origin: center bottom;
  will-change: transform;
}

.an-brush-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center 45%,
      rgba(4, 9, 7, 0.45) 0%,
      rgba(4, 9, 7, 0.82) 65%,
      rgba(3, 7, 5, 0.96) 100%);
  z-index: 2;
}

/* Subtle Architectural Blueprint Grid */
.an-brush-blueprint-grid {
  position: absolute;
  top: -15%;
  left: 0;
  right: 0;
  height: 130%;
  background-image:
    linear-gradient(rgba(212, 245, 76, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 245, 76, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center center;
  opacity: 0.85;
  z-index: 3;
  will-change: transform;
}

/* Architectural Linework & Blueprint Details */
.an-brush-architectural-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  will-change: transform;
}

.an-blueprint-circle {
  position: absolute;
  top: 48%;
  left: 28%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(212, 245, 76, 0.22);
}

.an-blueprint-circle--1 {
  width: 240px;
  height: 240px;
}

.an-blueprint-circle--2 {
  width: 420px;
  height: 420px;
  border-color: rgba(255, 255, 255, 0.06);
}

/* Blueprint Dimension Callouts (250 and 300 from reference storyboard) */
.an-blueprint-dim {
  position: absolute;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--an-brush-lime);
  opacity: 0.65;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.an-blueprint-dim--h {
  top: 24%;
  left: 48%;
  transform: translateX(-50%);
}

.an-blueprint-dim--h::before,
.an-blueprint-dim--h::after {
  content: "";
  width: 60px;
  height: 1px;
  background: rgba(212, 245, 76, 0.35);
}

.an-blueprint-dim--v {
  top: 48%;
  left: 36%;
  transform: translateY(-50%) rotate(-90deg);
}

.an-blueprint-dim--v::before,
.an-blueprint-dim--v::after {
  content: "";
  width: 45px;
  height: 1px;
  background: rgba(212, 245, 76, 0.35);
}

/* Corner Blueprint Crosshairs */
.an-blueprint-cross {
  position: absolute;
  font-family: monospace;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--an-brush-lime);
  opacity: 0.35;
}

.an-blueprint-cross--tl {
  top: 10%;
  left: 6%;
}

.an-blueprint-cross--tr {
  top: 10%;
  right: 6%;
}

.an-blueprint-cross--bl {
  bottom: 10%;
  left: 6%;
}

.an-blueprint-cross--br {
  bottom: 10%;
  right: 6%;
}

/* Panel 01: Initial State Scroll Down Indicator */
.an-scroll-indicator {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  z-index: 5;
  transition: opacity 0.4s ease;
}

.an-scroll-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--an-brush-lime);
  text-shadow: 0 0 10px rgba(212, 245, 76, 0.5);
}

.an-scroll-mouse {
  width: 20px;
  height: 32px;
  border-radius: 9999px;
  border: 1.5px solid rgba(212, 245, 76, 0.5);
  display: flex;
  justify-content: center;
  padding-top: 5px;
}

.an-scroll-wheel {
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: var(--an-brush-lime);
  animation: an-mouse-wheel 1.6s infinite ease-in-out;
}

@keyframes an-mouse-wheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  60% {
    transform: translateY(8px);
    opacity: 0.2;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.an-scroll-arrow {
  color: var(--an-brush-lime);
  font-size: 0.9rem;
  opacity: 0.7;
  animation: an-bounce-arrow 1.6s infinite ease-in-out;
}

@keyframes an-bounce-arrow {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(4px);
  }
}

/* Central Brush Stage */
.an-brush-stage {
  position: absolute !important;
  inset: 0 !important;
  z-index: 10;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none;
}

.an-brush-stage > * {
  pointer-events: auto;
}

/* SVG Handwriting Canvas */
.an-brush-svg {
  width: 92%;
  max-width: 1240px;
  height: auto;
  max-height: 62vh;
  overflow: visible;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.85));
}

/* ==========================================================================
   AUTHENTIC CALLIGRAPHY BRUSH ARTWORK & GLOW LAYERS
   Matches Reference: Dry-brush pure white "Aura", electric lime "Nirman",
   tapered dry-brush flourish underline, and pure white "BUILDING A BETTER TOMORROW"
   ========================================================================== */

/* Ambient Architectural Glow Layer */
.an-brush-ambient-layer {
  opacity: 0.85;
  filter: blur(14px);
  pointer-events: none;
}

.an-glow-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.an-glow-aura {
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.85));
}

.an-glow-nirman {
  filter: drop-shadow(0 0 28px rgba(212, 245, 76, 0.95));
}

.an-glow-flourish {
  filter: drop-shadow(0 0 22px rgba(212, 245, 76, 0.85));
}

/* Razor-Sharp Core Brush Lettering Artwork Layer */
.an-brush-core-layer {
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.85));
}

.an-art-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Progressive Reveal Mask Paths */
.an-mask-path {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
  will-change: stroke-dashoffset;
}

.an-mask-path.an-path-aura {
  stroke-width: 85;
}

.an-mask-path.an-path-nirman {
  stroke-width: 85;
}

.an-mask-path.an-path-flourish {
  stroke-width: 65;
}

.an-mask-fill {
  transition: opacity 0.25s ease;
  will-change: opacity;
}

/* Leading Brush Tip Glowing Particle */
.an-brush-tip {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  will-change: transform;
}

.an-brush-tip-core {
  fill: #ffffff;
  filter: drop-shadow(0 0 8px #ffffff);
}

.an-brush-tip-inner {
  fill: var(--an-brush-lime);
  opacity: 0.85;
}

.an-brush-tip-outer {
  fill: var(--an-brush-lime);
  opacity: 0.45;
  filter: blur(5px);
}

/* Dot on "i" of Nirman (cx=625, cy=174) */
.an-brush-idot {
  opacity: 0;
  transform: scale(0.3);
  transform-origin: 625px 174px;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.an-brush-idot.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Final Reveal Glow Pulse */
.an-brush-svg.is-complete {
  filter: drop-shadow(0 15px 45px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 35px rgba(212, 245, 76, 0.35));
  transition: filter 0.8s ease;
}

/* Panel 09: Brand Tagline (Pure White geometric sans-serif matching reference image) */
.an-brush-tagline {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(0.72rem, 1.45vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.48em;
  text-transform: uppercase;
  color: #ffffff;
  margin-top: 1.4rem;
  margin-left: 0.48em;
  /* Compensate for letter-spacing to ensure absolute center */
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.4), 0 2px 10px rgba(0, 0, 0, 0.95);
  user-select: none;
}

.an-brush-tagline.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   BRAND STORY SECTIONS (SECTIONS 2, 3, 4)
   ========================================================================== */

/* Dark Stationary Canvas Overlay for Story Sections 2, 3, 4 */
.an-brush-dark-canvas {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(14, 28, 20, 0.45) 0%, rgba(4, 9, 7, 0.96) 72%, #040907 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  will-change: opacity;
}

.an-story-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 245, 76, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 245, 76, 0.032) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center center;
  opacity: 0.8;
  pointer-events: none;
}

/* Story Stages Base */
.an-story-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 15;
  will-change: opacity;
}

.an-story-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.an-story-heading,
.an-story-message,
.an-story-results {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.an-story-line {
  display: block;
  will-change: opacity, transform;
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.an-accent-lime {
  color: var(--an-brush-lime) !important;
  text-shadow: 0 0 28px rgba(212, 245, 76, 0.45);
}

/* --------------------------------------------------------------------------
   SECTION 2 — YOUR DREAM HOME
   Exact: "Your Search for Your Dream Home Ends Here."
   -------------------------------------------------------------------------- */
.an-s2-line-1 {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.85rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.an-s2-line-2 {
  font-family: 'Outfit', 'Space Grotesk', sans-serif;
  font-size: clamp(2.8rem, 7.8vw, 6.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--an-brush-lime);
  text-shadow: 0 0 45px rgba(212, 245, 76, 0.52), 0 4px 20px rgba(0, 0, 0, 0.95);
  margin-bottom: 0.5rem;
}

.an-s2-line-3 {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2rem, 5.2vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.95);
}

/* --------------------------------------------------------------------------
   SECTION 3 — AURA NIRMAN BRAND IDENTITY
   Exact: "Aura Nirman Is More Than a Company."
          "We Are a Family of 1,000+ People"
          "Who Trust Us With Their Dream Home."
   -------------------------------------------------------------------------- */
.an-s3-line-1 {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: clamp(0.95rem, 1.9vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 1.15rem 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.an-s3-line-2 {
  font-family: 'Outfit', 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 6.8vw, 5.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: #ffffff;
  margin: 0 0 1.25rem 0;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.95);
}

.an-s3-line-2 .an-accent-lime {
  color: var(--an-brush-lime) !important;
  font-weight: 900;
  text-shadow: 0 0 45px rgba(212, 245, 76, 0.6), 0 4px 20px rgba(0, 0, 0, 0.95);
}

.an-s3-line-3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.35rem, 3.4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.9);
}

/* --------------------------------------------------------------------------
   SECTION 4 — OUR RESULTS
   Exact: "And We Exceeded"
          "Their Expectations"
          "By Delivering Extraordinary Results."
   -------------------------------------------------------------------------- */
.an-s4-line-1 {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: clamp(0.95rem, 1.9vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.85rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.an-s4-line-2 {
  font-family: 'Outfit', 'Space Grotesk', sans-serif;
  font-size: clamp(2.8rem, 7.8vw, 6.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--an-brush-lime);
  text-shadow: 0 0 50px rgba(212, 245, 76, 0.55), 0 4px 24px rgba(0, 0, 0, 0.95);
  margin: 0 0 0.8rem 0;
}

.an-s4-line-3 {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.5rem, 3.8vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   MOBILE & RESPONSIVE BEHAVIOR
   ========================================================================== */
@media (max-width: 768px) {
  .an-brush-section {
    height: 1000vh;
  }

  .an-brush-viewport {
    height: 100vh;
    height: 100dvh;
  }

  .an-brush-stage {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .an-brush-svg {
    width: 92% !important;
    max-width: 380px !important;
    max-height: 46vh !important;
  }

  .an-brush-stroke-deep-glow {
    stroke-width: 38;
  }

  .an-brush-stroke-ambient {
    stroke-width: 26;
  }

  .an-brush-stroke-body {
    stroke-width: 15;
  }

  .an-brush-stroke-core {
    stroke-width: 4.5;
  }

  .an-blueprint-circle--2,
  .an-blueprint-dim--v {
    display: none;
  }

  .an-scroll-indicator {
    top: 10%;
  }

  .an-scroll-text {
    font-size: 0.62rem;
    letter-spacing: 0.28em;
  }

  .an-brush-tagline {
    font-size: clamp(0.6rem, 2.7vw, 0.78rem);
    letter-spacing: 0.24em;
    margin-top: 1rem;
    margin-left: 0.24em;
    text-align: center;
    max-width: 90vw;
  }

  .an-story-stage {
    padding: 1.5rem 1rem;
  }

  /* Section 2 — Your Dream Home */
  .an-s2-line-1 {
    font-size: clamp(0.75rem, 3.2vw, 0.95rem);
    letter-spacing: 0.18em;
    margin-bottom: 0.6rem;
  }
  .an-s2-line-2 {
    font-size: clamp(2rem, 8.2vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
  }
  .an-s2-line-3 {
    font-size: clamp(1.4rem, 5.8vw, 1.95rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  /* Section 3 — Aura Nirman Brand Identity */
  .an-s3-line-1 {
    font-size: clamp(0.75rem, 3.2vw, 0.95rem);
    letter-spacing: 0.18em;
    margin-bottom: 0.75rem;
  }
  .an-s3-line-2 {
    font-size: clamp(1.85rem, 7.5vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
  }
  .an-s3-line-3 {
    font-size: clamp(1rem, 4.2vw, 1.4rem);
    line-height: 1.25;
  }

  /* Section 4 — Our Results */
  .an-s4-line-1 {
    font-size: clamp(0.75rem, 3.2vw, 0.95rem);
    letter-spacing: 0.18em;
    margin-bottom: 0.6rem;
  }
  .an-s4-line-2 {
    font-size: clamp(2rem, 8.2vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
  }
  .an-s4-line-3 {
    font-size: clamp(1.15rem, 4.6vw, 1.6rem);
    line-height: 1.25;
  }

  /* Section 5 overlay container */
  .an-stage-section-5 {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
  }
}

/* ==========================================================================
   REDUCED MOTION SUPPORT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .an-brush-section {
    height: auto !important;
  }

  .an-brush-viewport {
    position: relative !important;
    height: auto !important;
    min-height: 100vh;
    padding: 4rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 6rem;
  }

  .an-brush-stroke-deep-glow,
  .an-brush-stroke-ambient,
  .an-brush-stroke-body,
  .an-brush-stroke-core {
    stroke-dashoffset: 0 !important;
  }

  .an-brush-tip,
  .an-scroll-indicator {
    display: none !important;
  }

  .an-brush-stage {
    position: relative !important;
    opacity: 1 !important;
  }

  .an-story-stage {
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
    inset: auto !important;
  }

  .an-story-line {
    opacity: 1 !important;
    transform: none !important;
  }

  .an-brush-idot,
  .an-brush-tagline {
    opacity: 1 !important;
    transform: none !important;
  }
}