/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   AIMS GREEN CONSTRUCTION â€” ULTRA PREMIUM DESIGN SYSTEM v2
   Inspired by McAlpine, Arcca Group, Visions Design
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,300&family=DM+Sans:ital,wght@0,200;0,300;0,400;0,500;1,300&display=swap');

/* â•â•â• DESIGN TOKENS â•â•â• */
:root {
  --bg-cream: #f7f5f0;
  --bg-warm: #eeebe3;
  --bg-dark: #0d0d0b;
  --bg-darker: #080807;
  --text-primary: #111110;
  --text-secondary: #5a5850;
  --text-muted: #9a9790;
  --text-light: #f7f5f0;
  --accent: #3d4d35;
  --accent-light: #9dbc8c; /* Lighter sage for dark backgrounds */
  --accent-warm: #8b7355;
  --border: rgba(17,17,16,0.1);
  --border-light: rgba(247,245,240,0.12);

  --font-primary: 'Montserrat', sans-serif;
  --font-secondary: 'DM Sans', sans-serif;
  --font-accent: 'Cormorant Garamond', serif;

  --tracking-wide: 0.15em;
  --tracking-mid: 0.08em;
  --tracking-tight: -0.02em;

  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-cinemtic: cubic-bezier(0.19, 1, 0.22, 1);
  --nav-h: 80px;
  --pad-x: clamp(24px, 5vw, 80px);
  --section-pad: clamp(80px, 12vw, 180px);
}

/* â•â•â• RESET â•â•â• */
*, *::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; }
body { font-family: var(--font-sans); background: transparent; color: var(--text-primary); overflow-x: hidden; line-height: 1.6; }
img { max-width: 100%; display: block; object-fit: cover; }
a, button { color: inherit; text-decoration: none; border: none; background: none; cursor: pointer; font-family: inherit; }
ul { list-style: none; }
em { font-style: italic; font-family: var(--font-serif); font-weight: 300; }

/* â•â•â• SELECTION â•â•â• */
::selection { background: var(--accent); color: var(--text-light); }

/* â•â•â• SCROLLBAR â•â•â• */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg-cream); }
::-webkit-scrollbar-thumb { background: var(--accent); }

/* â•â•â• TYPOGRAPHY BASE â•â•â• */
h1, h2, h3, h4 { 
  font-family: var(--font-primary); 
  font-weight: 500; 
  line-height: 1.05; 
  letter-spacing: var(--tracking-mid); 
  text-transform: uppercase; 
}
p { font-family: var(--font-secondary); font-weight: 300; line-height: 1.8; }
.eyebrow { 
  font-family: var(--font-primary); 
  font-size: 9px; 
  letter-spacing: var(--tracking-wide); 
  text-transform: uppercase; 
  font-weight: 500; 
  color: var(--text-muted); 
}
.serif-accent { font-family: var(--font-accent); font-style: italic; text-transform: none; letter-spacing: 0; }

/* â•â•â• PRELOADER â•â•â• */
#preloader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--accent); /* the green color */
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s var(--ease-expo), visibility 0.8s;
}
#preloader.hidden { opacity: 0; visibility: hidden; }

.preloader-inner {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.preloader-spinner {
  position: absolute;
  inset: 0;
  animation: ringRotate 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.preloader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 20%, rgba(255,255,255,0.8) 100%);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 2px), black calc(100% - 1px));
  mask: radial-gradient(closest-side, transparent calc(100% - 2px), black calc(100% - 1px));
}

.preloader-dot {
  position: absolute;
  top: -2px;
  left: calc(50% - 2px);
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.preloader-logo {
  font-family: var(--font-primary); 
  font-size: 28px;
  font-weight: 500;
  color: var(--text-light); 
  letter-spacing: var(--tracking-wide);
  opacity: 0; 
  transform: translateY(10px);
  animation: preloaderFade 0.6s 0.2s var(--ease-expo) forwards;
  z-index: 2;
}

@keyframes ringRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes preloaderFade { 
  to { opacity: 1; transform: translateY(0); } 
}

/* â•â•â• NAVIGATION â•â•â• */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--nav-h); display: flex; align-items: center;
  justify-content: space-between; padding: 0 var(--pad-x);
  color: var(--text-light); /* default: hero is always dark */
  transition: color 0.5s ease, background 0.5s ease, border-color 0.5s ease;
}
.nav::after {
  content: ''; position: absolute; inset: 0;
  backdrop-filter: blur(0px);
  transition: backdrop-filter 0.5s, background 0.5s;
  z-index: -1;
}
/* â”€â”€ Unscrolled nav: color driven by atmosphere engine class â”€â”€ */
.nav.atm-dark-env:not(.scrolled)  { color: var(--text-light); }
.nav.atm-light-env:not(.scrolled) { color: var(--text-primary); }

/* â”€â”€ Scrolled nav: frosted glass â€” always readable â”€â”€ */
.nav.scrolled {
  color: var(--text-primary);
}
.nav.scrolled::after {
  background: rgba(247,245,240,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

/* â”€â”€ Dark-env + scrolled: dark frosted but with light text â”€â”€ */
.nav.scrolled.atm-dark-env {
  color: var(--text-light);
}
.nav.scrolled.atm-dark-env::after {
  background: rgba(8, 8, 7, 0.88);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}


.nav-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.nav-links { display: flex; gap: 40px; }
.nav-link {
  font-family: var(--font-primary); font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  opacity: 0.65; transition: opacity 0.3s;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px; background: currentColor;
  transition: width 0.4s var(--ease-expo);
}
.nav-link:hover { opacity: 1; }
.nav-link:hover::after { width: 100%; }

.nav-cta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-primary); font-size: 10px; font-weight: 500;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  padding: 12px 28px; border: 1px solid currentColor;
  transition: background 0.4s var(--ease-expo), color 0.4s;
}
.nav-cta:hover { background: currentColor; }
.nav-cta:hover span { color: var(--bg-dark); }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; background: none; }
.bar { display: block; width: 28px; height: 1px; background: currentColor; transition: 0.4s var(--ease-expo); }
.nav-hamburger.active .bar-1 { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.active .bar-2 { opacity: 0; transform: scaleX(0); }
.nav-hamburger.active .bar-3 { transform: translateY(-6px) rotate(-45deg); }

/* â•â•â• MOBILE MENU â•â•â• */
.mobile-menu {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg-dark); display: flex; align-items: center; justify-content: center;
  clip-path: circle(0% at calc(100% - 60px) 40px);
  transition: clip-path 0.8s var(--ease-expo);
}
.mobile-menu.active { clip-path: circle(150% at calc(100% - 60px) 40px); }
.mobile-menu-inner { text-align: center; }
.mobile-link {
  display: block; font-family: var(--font-primary);
  font-size: clamp(32px, 8vw, 64px); color: var(--text-light);
  text-transform: uppercase; letter-spacing: var(--tracking-mid);
  margin-bottom: 12px; opacity: 0.7; transition: opacity 0.3s;
}
.mobile-link:hover { opacity: 1; }
.mobile-cta {
  display: inline-block; margin-top: 32px;
  font-family: var(--font-primary); font-size: 11px; letter-spacing: var(--tracking-wide); 
  text-transform: uppercase; font-weight: 500;
  color: var(--text-light); border: 1px solid rgba(255,255,255,0.3);
  padding: 14px 36px;
}

/* â•â•â• HERO â•â•â• */
.hero {
  position: relative; height: 100vh; min-height: 700px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--pad-x) clamp(48px, 7vw, 100px);
  overflow: hidden; color: var(--text-light);
}
.hero-media {
  position: absolute; inset: 0; z-index: 0;
}
.hero-img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.0); filter: brightness(0.6) blur(10px);
  transition: transform 12s ease-out, filter 2s ease-in-out;
}
.hero.loaded .hero-img { transform: scale(1.05); filter: brightness(1) blur(0px); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(17,17,16,0.6) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 5;
  width: 100%;
}

.hero-meta { 
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; 
  opacity: 0; transform: translateY(20px);
  transition: opacity 1s 1.2s, transform 1s 1.2s var(--ease-expo);
}
.hero.loaded .hero-meta { opacity: 1; transform: translateY(0); }
.hero-meta .eyebrow { color: rgba(247,245,240,0.5); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; }

.hero-title {
  font-family: var(--font-primary);
  font-size: clamp(48px, 8.5vw, 110px); /* Reduced scale for architectural breathing room */
  line-height: 1; font-weight: 600; letter-spacing: var(--tracking-tight);
  margin-bottom: 40px;
  color: var(--text-light);
  text-transform: uppercase;
}
.hero-title .reveal-line {
  display: block;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(15px);
  transition: all 1.2s var(--ease-expo);
}
.hero.loaded .hero-title .reveal-line:nth-child(1) { opacity: 1; filter: blur(0); transform: translateY(0); transition-delay: 0.4s; }
.hero.loaded .hero-title .reveal-line:nth-child(2) { opacity: 1; filter: blur(0); transform: translateY(0); transition-delay: 0.6s; }
.hero.loaded .hero-title .reveal-line:nth-child(3) { opacity: 1; filter: blur(0); transform: translateY(0); transition-delay: 0.8s; }

.hero-title .secondary-reveal {
  font-size: 0.35em;
  letter-spacing: 0.4em;
  font-weight: 300;
  margin-top: 20px;
  opacity: 0.6 !important;
}

.hero-bottom {
  display: flex; flex-direction: column; align-items: flex-start; gap: 40px;
  opacity: 0; transform: translateY(20px);
  transition: opacity 1s 1.5s, transform 1s 1.5s var(--ease-expo);
}
.hero.loaded .hero-bottom { opacity: 1; transform: translateY(0); }
.hero-sub {
  font-size: clamp(14px, 1.4vw, 17px); font-weight: 300;
  line-height: 1.7; color: rgba(247,245,240,0.6); max-width: 420px;
}
.hero-cta { display: flex; align-items: center; gap: 20px; transition: opacity 0.3s; }
.hero-cta:hover { opacity: 0.8; }
.hero-cta-text {
  font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--text-light);
}
.hero-cta-line {
  width: 40px; height: 1px; background: rgba(255,255,255,0.3);
  transition: width 0.6s var(--ease-expo);
}
.hero-cta:hover .hero-cta-line { width: 70px; background: var(--accent); }

/* â•â•â• HERO UPGRADE: THERMAL LENS â•â•â• */
.hero-thermal {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: url('../images/hero-new.jpg') center/cover;
  filter: contrast(1.2) brightness(1.1) hue-rotate(180deg) saturate(2);
  mix-blend-mode: color-dodge;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.5s var(--ease-cinemtic);
  mask-image: radial-gradient(circle 200px at var(--x, 50%) var(--y, 50%), black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle 200px at var(--x, 50%) var(--y, 50%), black 0%, transparent 100%);
}
.hero:hover .hero-thermal { opacity: 0.8; }

.hero-thermal-label {
  position: absolute; top: var(--y, 50%); left: var(--x, 50%);
  transform: translate(20px, 20px);
  font-family: var(--font-sans); font-size: 8px; letter-spacing: 0.1em; color: var(--accent);
  text-transform: uppercase; white-space: nowrap; pointer-events: none; opacity: 0; z-index: 10;
  transition: opacity 0.5s;
}
.hero:hover .hero-thermal-label { opacity: 1; }

.hero-title em { font-family: var(--font-serif); font-style: italic; font-weight: 300; }

.hero-scroll-indicator {
  position: absolute; bottom: clamp(48px, 7vw, 100px); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 2; opacity: 0; transition: opacity 1s 2.2s;
}
.hero.loaded .hero-scroll-indicator { opacity: 1; }
.scroll-line {
  width: 1px; height: 60px; background: rgba(255,255,255,0.25);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0;
  width: 100%; height: 100%; background: white;
  animation: scrollPulse 2s 2.5s infinite;
}
@keyframes scrollPulse {
  0% { top: -100%; }
  100% { top: 100%; }
}
.scroll-label { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.4); }

.hero-counter {
  position: absolute; right: var(--pad-x); bottom: clamp(48px, 7vw, 100px);
  z-index: 2; font-family: var(--font-serif); color: rgba(255,255,255,0.3);
  font-size: 13px; letter-spacing: 0.1em;
  opacity: 0; transition: opacity 1s 2s;
}
.hero.loaded .hero-counter { opacity: 1; }

/* â•â•â• MARQUEE â•â•â• */
.marquee-section {
  overflow: hidden; background: transparent;
  border-top: none; border-bottom: none;
  padding: clamp(18px, 2.5vw, 28px) 0;
}
.marquee-track { display: flex; white-space: nowrap; }
.marquee-content {
  display: flex; align-items: center; gap: 0;
  font-family: var(--font-serif); font-size: clamp(13px, 1.3vw, 16px);
  font-weight: 300; color: var(--text-secondary); letter-spacing: 0.05em;
  padding-right: 0;
  animation: marqueScroll 30s linear infinite;
  flex-shrink: 0;
}
.marquee-content span { padding: 0 32px; }
.marquee-dot { color: var(--accent); font-size: 20px; padding: 0 8px !important; }
@keyframes marqueScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* â•â•â• SECTION LAYOUT â•â•â• */
.section { padding: clamp(80px, 12vw, 200px) var(--pad-x); }
.dark-section { background: var(--bg-dark); color: var(--text-light); }

/* â•â•â• SCROLL ANIMATION SYSTEM â•â•â• */
.reveal-line {
  display: block; overflow: hidden;
}
.reveal-line-inner {
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-expo);
  display: block;
}
.anim-target.is-visible .reveal-line-inner { transform: translateY(0); }

/* Stagger delays for reveal lines */
.anim-target.is-visible .reveal-line:nth-child(1) .reveal-line-inner,
.anim-target.is-visible .reveal-line:nth-child(1) { transform: translateY(0); transition-delay: 0s; }
.anim-target.is-visible .reveal-line:nth-child(2) .reveal-line-inner,
.anim-target.is-visible .reveal-line:nth-child(2) { transform: translateY(0); transition-delay: 0.12s; }
.anim-target.is-visible .reveal-line:nth-child(3) .reveal-line-inner,
.anim-target.is-visible .reveal-line:nth-child(3) { transform: translateY(0); transition-delay: 0.24s; }

.fade-up {
  opacity: 0; transform: translateY(32px);
  transition: opacity 1s var(--ease-expo), transform 1s var(--ease-expo);
}
.anim-target.is-visible .fade-up { opacity: 1; transform: translateY(0); }
.anim-target.is-visible .fade-up:nth-child(1) { transition-delay: 0.1s; }
.anim-target.is-visible .fade-up:nth-child(2) { transition-delay: 0.2s; }
.anim-target.is-visible .fade-up:nth-child(3) { transition-delay: 0.3s; }

/* â•â•â• RESPONSIVE NAV â•â•â• */
@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 640px) {
  .hero-meta { flex-direction: column; gap: 12px; align-items: flex-start; }
  .hero-bottom { flex-direction: column; align-items: flex-start; gap: 28px; }
}
