/* ==========================================================================
   ASCEND GROUP - STYLE SYSTEM & UI (SCROLL SNAP VERTICAL FLOW)
   Quiet Luxury / Modern Premium Corporate Hospitality
   Colors: Cream, Olive Green, Crisp White
   ========================================================================== */

/* DESIGN SYSTEM TOKENS */
:root {
  /* Colors */
  --color-cream: #F5F1E9;
  --color-cream-light: #FDFBF7;
  --color-cream-dark: #DFD9CE;
  --color-royal: #0B2F64; /* Royal Blue */
  --color-royal-dark: #070F24; /* Deep Royal/Navy backing color */
  --color-royal-light: #2563EB; /* Vibrant Royal Blue accent */
  --color-white: #FFFFFF;
  
  /* Fonts */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', Helvetica, Arial, sans-serif;
  
  /* Transitions */
  --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-royal-dark);
  color: var(--color-cream);
  overflow: hidden; /* Prevent default window overflow, container handles snap */
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* SCROLL SNAP LAYOUT */
.scroll-container {
  height: 100vh;
  width: 100vw;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  
  /* Hide standard scrollbars for pure aesthetic */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.scroll-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* INDIVIDUAL SNAP SECTIONS */
.snap-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  padding: 110px 24px 40px 24px;
  background-color: var(--color-royal-dark);
}



/* VIDEO BACKGROUND SYSTEM WITH FIXED 35% OPACITY */
.video-background-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Below content but above solid background */
  overflow: hidden;
  background-color: var(--color-royal-dark);
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0.55; /* Increased opacity to clearly see pool and skyline background */
}

/* FIXED HEADER & BRANDING */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 24px 40px;
  background: transparent;
  transition: var(--transition-smooth);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  height: 48px; /* Enlarged header logo */
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1); /* Render logo crisp white */
  transition: var(--transition-smooth);
}

.header-logo:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

/* HAMBURGER TOGGLE BUTTON */
.menu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bar {
  width: 100%;
  height: 1.5px;
  background-color: var(--color-white);
  transition: var(--transition-smooth);
  transform-origin: left center;
}

/* Hamburger active transformation */
.menu-toggle.active .bar-1 {
  transform: rotate(45deg);
  background-color: var(--color-cream);
}

.menu-toggle.active .bar-2 {
  opacity: 0;
  width: 0;
}

.menu-toggle.active .bar-3 {
  transform: rotate(-45deg);
  background-color: var(--color-cream);
}

/* OVERLAY NAV MENU */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 15, 36, 0.97);
  backdrop-filter: blur(15px);
  z-index: 90;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.overlay-nav {
  text-align: center;
}

.nav-links {
  list-style: none;
}

.nav-links li {
  margin: 24px 0;
  overflow: hidden;
}

.nav-item-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--color-cream-dark);
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
  transition: var(--transition-smooth);
  position: relative;
  opacity: 0;
  transform: translateY(30px);
}

.nav-overlay.active .nav-item-link {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger transitions for menu links */
.nav-overlay.active .nav-links li:nth-child(1) .nav-item-link { transition-delay: 0.1s; }
.nav-overlay.active .nav-links li:nth-child(2) .nav-item-link { transition-delay: 0.2s; }
.nav-overlay.active .nav-links li:nth-child(3) .nav-item-link { transition-delay: 0.3s; }
.nav-overlay.active .nav-links li:nth-child(4) .nav-item-link { transition-delay: 0.4s; }
.nav-overlay.active .nav-links li:nth-child(5) .nav-item-link { transition-delay: 0.5s; }


.nav-number {
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--color-royal-light);
  letter-spacing: 2px;
  margin-top: -10px;
}

.nav-label {
  position: relative;
}

.nav-label::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-cream);
  transition: var(--transition-fast);
}

.nav-item-link:hover {
  color: var(--color-cream-light);
}

.nav-item-link:hover .nav-label::after {
  width: 100%;
}

/* SIDE NAVIGATION DOTS */
.sidebar-nav {
  position: fixed;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 50;
}

.dot {
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
}

.dot-inner {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(245, 241, 233, 0.35);
  transition: var(--transition-smooth);
}

.dot::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--color-cream);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.5);
  transition: var(--transition-smooth);
}

.dot.active .dot-inner {
  background-color: var(--color-cream-light);
  transform: scale(1.3);
}

.dot.active::after {
  opacity: 1;
  transform: scale(1.1);
}

.dot:hover .dot-inner {
  background-color: var(--color-cream-light);
}

/* UNIFIED GLASSMORPHISM CARD DESIGN */
.glass-card {
  background: rgba(11, 19, 43, 0.65); /* Rich royal-navy overlay tint */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  transition: var(--transition-smooth);
}

/* TYPOGRAPHY & LAYOUTS */
.serif-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 400;
  color: var(--color-cream-light);
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 20px;
}

.serif-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 400;
  color: var(--color-cream-light);
  margin-bottom: 12px;
  line-height: 1.2;
}

.accent-line {
  width: 60px;
  height: 1px;
  background-color: var(--color-royal-light);
  margin: 0 auto 24px auto;
}

.body-text {
  font-family: var(--font-sans);
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.5px;
  color: var(--color-cream);
  max-width: 820px;
  margin: 0 auto;
}

.mt-20 {
  margin-top: 20px;
}

.text-center {
  text-align: center;
}

/* LARGE BRANDING LOGO ON TOP OF SLIDES */
.slide-logo-wrapper {
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.slide-logo {
  height: clamp(55px, 10vw, 84px); /* Enlarged slide logo */
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* GLOBAL CONTENT LAYOUT WRAPPER */
.section-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  max-height: 82vh; /* Prevent content overflowing the 100vh slide */
  overflow-y: auto;
  scrollbar-width: none;
}

.section-content::-webkit-scrollbar {
  display: none;
}

/* SECTION 1: HERO SPECIAL LOGO & BUTTON */
.large-logo-wrapper {
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
}

.large-hero-logo {
  height: clamp(100px, 18vw, 175px); /* Enlarged hero logo */
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.discover-btn {
  display: inline-block;
  text-decoration: none;
  background-color: var(--color-royal);
  color: var(--color-cream-light);
  border: none;
  padding: 18px 40px;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition-smooth);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.discover-btn:hover {
  background-color: var(--color-royal-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(11, 47, 100, 0.4);
}

.discover-btn:active {
  transform: translateY(0);
}

/* SECTION 2: GENESIS */
.genesis-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.central-card {
  padding: 40px 32px;
  max-width: 880px;
}

/* SECTION 3: EXPERIENCE GRID */
.experience-container {
  width: 100%;
}

.experience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .experience-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.grid-card {
  padding: 32px 24px;
  text-align: center;
}

.grid-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(11, 19, 43, 0.75);
}

.card-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-royal-light);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 16px auto;
  color: var(--color-cream-light);
}

.card-icon {
  width: 22px;
  height: 22px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-cream-light);
  margin-bottom: 12px;
}

.card-text {
  font-size: 0.85rem;
  line-height: 1.6;
  font-weight: 300;
  color: rgba(245, 241, 233, 0.8);
}

/* SECTION 4: ARCHITECT & CONTACT */
.architect-contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 992px) {
  .architect-contact-layout {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
  }
}

.architect-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}

@media (min-width: 992px) {
  .architect-layout {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 40px;
  }
}

.photo-column {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.photo-frame {
  display: block;
  max-width: 320px;
  aspect-ratio: 4 / 5; /* Crop ratio to focus on upper body */
  overflow: hidden; /* Hide lower stomach/legs */
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.photo-frame:hover {
  transform: translateY(-4px) scale(1.02);
}

@media (min-width: 768px) {
  .photo-frame {
    max-width: 440px;
  }
}

@media (min-width: 992px) {
  .photo-frame {
    max-width: 520px;
  }
}


.founder-photo {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cover crop behavior */
  object-position: top center; /* Cut above navel */
  display: block;
  border-radius: 2px;
  filter: brightness(1.04) contrast(1.02); /* Enhances skin tones & makes jacket pop */
}

.bio-column {
  max-width: 650px;
  padding: 32px 40px;
  text-align: left;
}

.founder-role {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-cream-dark);
  margin-top: -6px;
  margin-bottom: 12px;
}

.founder-bio {
  font-size: 1.12rem;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(245, 241, 233, 0.85);
  margin-bottom: 16px;
}

.contact-card {
  padding: 40px;
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
}

.contact-subtext {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--color-cream-dark);
  margin-top: -6px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* FLOATING LABELS FORM STYLING */
.inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  position: relative;
  width: 100%;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 241, 233, 0.25);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 300;
  outline: none;
  transition: var(--transition-fast);
}

.form-group textarea {
  resize: none;
}

.form-group label {
  position: absolute;
  top: 8px;
  left: 0;
  color: rgba(245, 241, 233, 0.5);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 300;
  pointer-events: none;
  transition: var(--transition-fast);
}

/* Floating Label Animation */
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: -14px;
  font-size: 0.7rem;
  color: var(--color-cream-dark);
  letter-spacing: 1px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-bottom: 1px solid var(--color-cream);
}

/* SUBMIT BUTTON */
.submit-btn {
  background-color: var(--color-royal);
  color: var(--color-cream-light);
  border: none;
  padding: 14px 20px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-top: 6px;
}

.submit-btn:hover {
  background-color: var(--color-royal-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(11, 47, 100, 0.3);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn.loading .btn-text {
  opacity: 0;
}

.submit-btn.loading .spinner {
  display: block;
}

/* SPINNER FOR LOADING */
.spinner {
  display: none;
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: var(--color-cream);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ANIMATION CLASSES FOR FLOATING TEXT ON SCROLL SNAP */
.animated-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 1.8s; /* 1.8s delay lets the background video of pools & skylines load and show first */
}

#section-1 .animated-element {
  transition-delay: 0.4s; /* Shorter delay on the Hero to keep load snappy and engaging */
}

.animated-element.active {
  opacity: 1;
  transform: translateY(0);
}

/* GLASSMORPHIC MODAL SYSTEM */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 15, 36, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  max-width: 440px;
  width: 90%;
  text-align: center;
  padding: 40px 24px;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

.modal-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid var(--color-royal-light);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px auto;
  color: var(--color-cream-light);
}

.success-icon {
  width: 24px;
  height: 24px;
}

.modal-message {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-cream-dark);
  margin-bottom: 28px;
}

.close-modal-btn {
  background: transparent;
  border: 1px solid var(--color-cream-dark);
  color: var(--color-cream-light);
  padding: 10px 28px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.close-modal-btn:hover {
  background: var(--color-cream-light);
  color: var(--color-royal-dark);
  border-color: var(--color-cream-light);
}

/* RESPONSIVE ADAPTATIONS */
@media (max-height: 800px) {
  .snap-section {
    padding-top: 90px;
  }
  .slide-logo-wrapper {
    margin-bottom: 16px;
  }
  .slide-logo {
    height: 45px;
  }
  .serif-title {
    margin-bottom: 12px;
  }
  .accent-line {
    margin-bottom: 16px;
  }
  .discover-btn {
    padding: 12px 28px;
  }
  .central-card {
    padding: 24px;
  }
  .grid-card {
    padding: 20px;
  }
  .card-icon-wrapper {
    margin-bottom: 10px;
  }
  .card-title {
    margin-bottom: 8px;
  }
  .architect-layout {
    gap: 20px;
  }
  .photo-frame {
    max-width: 300px;
  }
  .founder-bio {
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 8px;
  }
  .contact-card {
    padding: 20px;
  }
  .inquiry-form {
    gap: 14px;
  }
}

@media (max-width: 991px) {
  .snap-section {
    overflow-y: auto; /* Fallback to internal scroll *only* on tiny landscape viewports */
  }
  .photo-frame {
    max-width: 320px;
  }
  .founder-bio {
    font-size: 0.85rem;
    line-height: 1.6;
  }
  .bio-column {
    padding: 24px 20px;
    text-align: center;
  }
}
