/* ============================================================
   AQUAVISTA LLC — Main Stylesheet
   Complements Tailwind CDN v3 with custom utilities
   ============================================================ */

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --radius: 0.75rem;
  --font-poppins: 'Poppins', sans-serif;
  --font-inter: 'Inter', sans-serif;

  --brand-emerald: #0F766E;
  --brand-gold:    #C4953A;

  --background:        #FFFFFF;
  --foreground:        #1F2937;
  --muted:             #F5F5F5;
  --muted-foreground:  #6B7280;
  --primary:           #0F766E;
  --primary-foreground:#FAFAFA;
  --accent:            #EFF9F7;
  --border:            #E5E7EB;
  --destructive:       #DC2626;
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-inter);
  background-color: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-poppins); }

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Custom Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F5F5F5; }
::-webkit-scrollbar-thumb { background: var(--brand-emerald); border-radius: 3px; }

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Stagger delays */
.stagger > *:nth-child(1)  { transition-delay: 0ms;   }
.stagger > *:nth-child(2)  { transition-delay: 110ms; }
.stagger > *:nth-child(3)  { transition-delay: 220ms; }
.stagger > *:nth-child(4)  { transition-delay: 330ms; }
.stagger > *:nth-child(5)  { transition-delay: 440ms; }
.stagger > *:nth-child(6)  { transition-delay: 550ms; }
.stagger > *:nth-child(7)  { transition-delay: 660ms; }
.stagger > *:nth-child(8)  { transition-delay: 770ms; }
.stagger > *:nth-child(9)  { transition-delay: 880ms; }
.stagger > *:nth-child(10) { transition-delay: 990ms; }
.stagger > *:nth-child(11) { transition-delay: 1100ms;}
.stagger > *:nth-child(12) { transition-delay: 1210ms;}

/* ============================================================
   LUXURY UTILITY CLASSES
   ============================================================ */

/* Gold accent line above section headings */
.gold-line {
  display: block;
  width: 3.5rem;
  height: 3px;
  background-color: var(--brand-gold);
  border-radius: 9999px;
}

/* Hero overlay gradient */
.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(0,0,0,0.74) 0%,
    rgba(0,0,0,0.48) 55%,
    rgba(15,118,110,0.28) 100%
  );
}

/* Button / CTA emerald gradient */
.gradient-emerald {
  background: linear-gradient(135deg, #0F766E 0%, #085f58 100%);
}

/* Dark stats section */
.gradient-dark {
  background: linear-gradient(135deg, #111827 0%, #1F2937 100%);
}

/* Gold gradient text */
.text-gradient-gold {
  background: linear-gradient(135deg, #C4953A 0%, #D4AA4A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Image zoom on hover */
.img-zoom { overflow: hidden; }
.img-zoom img {
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-zoom:hover img { transform: scale(1.07); }

/* Card lift on hover */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 56px -12px rgba(0,0,0,0.18);
}

/* Glassmorphism helpers */
.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.15);
}

.glass-dark {
  background: rgba(0,0,0,0.38);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* Parallax hero background */
.parallax-hero {
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Inner page hero (shorter) */
.page-hero {
  position: relative;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}
.page-hero > * { position: relative; z-index: 1; }

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: all 0.5s ease;
}

#navbar.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
  border-bottom: 1px solid var(--border);
}

#navbar:not(.scrolled) .nav-link { color: rgba(255,255,255,0.85); }
#navbar.scrolled .nav-link       { color: rgba(31,41,55,0.75); }

#navbar:not(.scrolled) .nav-link:hover { color: white; }
#navbar.scrolled .nav-link:hover       { color: var(--primary); }

.nav-link.active-nav {
  color: var(--brand-gold) !important;
}

.nav-underline {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 2px;
  background: var(--brand-gold);
  border-radius: 9999px;
  width: 0;
  transition: width 0.3s ease;
}
.nav-link:hover .nav-underline,
.nav-link.active-nav .nav-underline { width: 1.25rem; }

/* Logo text colour */
#navbar:not(.scrolled) .logo-text     { color: white; }
#navbar.scrolled .logo-text           { color: var(--foreground); }
#navbar:not(.scrolled) .logo-sub      { color: rgba(255,255,255,0.7); }
#navbar.scrolled .logo-sub            { color: var(--muted-foreground); }

/* Mobile menu toggle button */
.hamburger-btn {
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background 0.2s;
}
#navbar:not(.scrolled) .hamburger-btn { color: white; }
#navbar.scrolled .hamburger-btn       { color: var(--foreground); }
#navbar:not(.scrolled) .hamburger-btn:hover { background: rgba(255,255,255,0.1); }
#navbar.scrolled .hamburger-btn:hover       { background: var(--muted); }

/* Mobile drawer */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
#mobile-menu.open { pointer-events: auto; }

#mobile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.4s ease;
}
#mobile-menu.open #mobile-overlay { opacity: 1; }

#mobile-drawer {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: 320px;
  max-width: 100%;
  background: white;
  box-shadow: -20px 0 60px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
#mobile-menu.open #mobile-drawer { transform: translateX(0); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0F766E 0%, #085f58 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(15,118,110,0.3);
}
.btn-primary:hover { opacity: 0.9; box-shadow: 0 8px 24px rgba(15,118,110,0.4); }

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-outline-white {
  background: transparent;
  border-color: rgba(255,255,255,0.6);
  color: white;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: white; }

.btn-sm  { padding: 0.4rem 1rem;  font-size: 0.8125rem; }
.btn-lg  { padding: 0.875rem 2rem; font-size: 1rem; }

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge-primary  { background: rgba(15,118,110,0.1); color: var(--primary); }
.badge-gold     { background: rgba(196,149,58,0.1);  color: var(--brand-gold); border-color: rgba(196,149,58,0.4); }
.badge-white    { background: rgba(0,0,0,0.4);        color: white; border-color: rgba(255,255,255,0.2); }

/* ============================================================
   FORMS
   ============================================================ */
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.9rem;
  font-family: var(--font-inter);
  color: var(--foreground);
  background: white;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
}
.form-input.error,
.form-textarea.error { border-color: var(--destructive); }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.4rem;
}
.form-error { color: var(--destructive); font-size: 0.75rem; margin-top: 0.25rem; }
.form-textarea { resize: none; line-height: 1.6; }

/* ============================================================
   GALLERY LIGHTBOX
   ============================================================ */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#lightbox.open { display: flex; }

#lightbox img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.75rem;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.accordion-item { border-radius: 0.75rem; overflow: hidden; }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  background: white;
  color: var(--foreground);
  cursor: pointer;
  border: none;
  gap: 0.75rem;
  transition: color 0.2s;
}
.accordion-trigger:hover { color: var(--primary); }
.accordion-trigger.open  { color: var(--primary); }

.accordion-arrow {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s ease;
  color: currentColor;
}
.accordion-trigger.open .accordion-arrow { transform: rotate(180deg); }

.accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease;
  background: white;
  padding: 0 1.25rem;
}
.accordion-content.open {
  max-height: 500px;
  padding: 0 1.25rem 1rem;
}
.accordion-content p { font-size: 0.875rem; line-height: 1.75; color: var(--muted-foreground); }

/* ============================================================
   PROJECTS FILTER TABS
   ============================================================ */
.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: white;
  color: rgba(31,41,55,0.7);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: rgba(15,118,110,0.5); color: var(--primary); }
.filter-btn.active {
  background: linear-gradient(135deg, #0F766E 0%, #085f58 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(15,118,110,0.3);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #0F766E 0%, #085f58 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15,118,110,0.35);
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top:hover   { opacity: 0.9; box-shadow: 0 8px 24px rgba(15,118,110,0.45); }

/* ============================================================
   MISC LAYOUT HELPERS
   ============================================================ */
.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* Subtle page-section background tint */
.bg-tint { background-color: #F7F8FA; }

/* Separator */
.separator { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 0; }
