/* ==========================================================================
   DEVENDRA GREEN CITY - CORE DESIGN SYSTEM & STYLESHEET
   Developer: Mahendra Green Homes Pvt. Ltd.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES & DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Color System */
  --bg-white: #FFFFFF;
  --text-primary: #111111;
  --text-muted: #555555;
  --text-subtle: #888888;
  --surface-bg: #FAFAFA;
  --surface-card: #F7F8F7;
  --border-light: #EAEAEA;
  --border-dark: #222222;
  
  /* Brand Accents */
  --accent-green: #1B3B2B;
  --accent-green-hover: #132C1F;
  --accent-green-light: #F0F4F2;
  --accent-gold: #C5A880;
  --accent-gold-light: #E5D6C3;

  /* Typography Fonts */
  --font-serif: 'Cormorant Garamond', Playfair Display, Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing & Layout */
  --container-max: 1280px;
  --viewport-max: 1440px;
  --radius-btn: 8px;
  --radius-card: 12px;
  --header-height: 80px;
  --transition-smooth: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. GLOBAL RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-white);
  color: var(--text-primary);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 1.125rem; /* 18px body size as requested */
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-white);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.15;
}

p {
  color: var(--text-muted);
}

::selection {
  background-color: var(--accent-green);
  color: #FFFFFF;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-white);
}

::-webkit-scrollbar-thumb {
  background: #D5D8D5;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-green);
}

/* --------------------------------------------------------------------------
   3. LAYOUT & CONTAINER UTILITIES
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 768px) {
  .container {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
}

.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.25rem;
}

@media (max-width: 767px) {
  .section-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
  }
  .section-header-flex .btn {
    width: 100% !important;
  }
}

/* Section Dividers */
.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(197, 168, 128, 0.4) 0%, rgba(197, 168, 128, 0.1) 100%);
  border: none;
}

.subtle-divider {
  height: 1px;
  background-color: var(--border-light);
  border: none;
}

/* --------------------------------------------------------------------------
   4. BUTTONS & INTERACTIVE ELEMENTS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-btn);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--text-primary);
  color: #FFFFFF;
  border: 1px solid var(--text-primary);
}

.btn-primary:hover {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 59, 43, 0.2);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
}

.btn-outline:hover {
  background-color: var(--text-primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-gold {
  background-color: var(--accent-green);
  color: #FFFFFF;
  border: 1px solid var(--accent-green);
}

.btn-gold:hover {
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   5. NAVIGATION HEADER STYLING
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: var(--transition-smooth);
  padding: 1.25rem 0;
  color: #FFFFFF;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0) 100%);
}

.site-header.scrolled,
.site-header.header-solid {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.site-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
  transition: var(--transition-smooth);
}

.scrolled .site-logo-img,
.header-solid .site-logo-img {
  filter: none;
}

.logo-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.75rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
}

.logo-subtitle {
  font-size: 0.625rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 0.2rem;
  color: var(--accent-gold);
}

.scrolled .logo-subtitle,
.header-solid .logo-subtitle {
  color: var(--accent-green);
  font-weight: 600;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  position: relative;
  padding: 0.35rem 0;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  opacity: 0.95;
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  opacity: 1;
  color: var(--accent-gold);
}

.scrolled .nav-link,
.header-solid .nav-link {
  color: var(--text-primary);
  text-shadow: none;
  opacity: 0.9;
}

.scrolled .nav-link:hover, 
.scrolled .nav-link.active,
.header-solid .nav-link:hover, 
.header-solid .nav-link.active {
  color: var(--accent-green);
  opacity: 1;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-gold);
}

.scrolled .nav-link.active::after,
.header-solid .nav-link.active::after {
  background-color: var(--accent-green);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 8px;
  position: relative;
  z-index: 105;
  color: inherit;
  border-radius: var(--radius-btn);
  transition: var(--transition-smooth);
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  min-height: 2.5px;
  background-color: currentColor;
  margin: 4px auto;
  border-radius: 2px;
  flex-shrink: 0;
  transition: transform 300ms ease, opacity 300ms ease;
}

/* Mobile Drawer Overlay */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.99);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1), opacity 300ms ease;
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
}

.mobile-drawer.open {
  display: flex;
  transform: translateX(0);
  opacity: 1;
}

.drawer-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 10;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.drawer-close:hover {
  background-color: var(--surface-bg);
}

.drawer-body {
  padding: 1.5rem;
  flex: 1;
}

.drawer-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.drawer-link {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--text-primary);
  border-radius: var(--radius-btn);
  font-weight: 500;
  transition: var(--transition-smooth);
}

.drawer-link:hover, .drawer-link.active {
  background-color: var(--surface-bg);
  color: var(--accent-green);
  padding-left: 1.25rem;
}

.drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-light);
  background: #FAFCFA;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.drawer-phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--accent-green);
  padding: 0.75rem;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
}

/* --------------------------------------------------------------------------
   6. FOOTER STYLING
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--bg-white);
  color: var(--text-primary);
  border-top: 1px solid var(--border-light);
  padding-top: 5rem;
  padding-bottom: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2.5rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border-light);
}

.footer-col-brand {
  grid-column: span 5;
}

.footer-col-links {
  grid-column: span 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.footer-col-contact {
  grid-column: span 3;
}

.footer-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-list a:hover {
  color: var(--accent-green);
}

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   7. SITE VISIT MODAL POPUP
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
}

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

.modal-card {
  background-color: var(--bg-white);
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-card);
  padding: 2.5rem;
  position: relative;
  border: 1px solid var(--border-light);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.25rem;
  color: var(--text-subtle);
}

.modal-close:hover {
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--surface-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-green);
  background-color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   8. SCROLL PROGRESS BAR
   -------------------------------------------------------------------------- */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background-color: var(--accent-green);
  z-index: 150;
  width: 0%;
  transition: width 100ms ease-out;
}
