@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Noto+Sans+Devanagari:wght@400;500&display=swap');

/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
  /* Brand Colors */
  --color-navy: #1C2E4A;
  --color-gold: #C8922A;
  --color-gold-hover: #A8781A;
  --color-cream: #F7F2EB;
  --color-white: #FFFFFF;
  
  /* Text Colors */
  --color-charcoal: #2C2C2C;
  --color-grey: #6B6B6B;
  --color-divider: #EDE9E3;
  --color-card-bg: #EDE9E3;
  
  /* Semantic Colors */
  --color-success-bg: #EAF4EF;
  --color-success-border: #2A6049;
  --color-success-text: #2A6049;
  --color-warning: #E6952A;
  --color-whatsapp: #25D366;
  --color-whatsapp-shadow: rgba(37, 211, 102, 0.4);
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(28, 46, 74, 0.08);
  --shadow-lg: 0 8px 32px rgba(28, 46, 74, 0.12);
  --shadow-lift: 0 12px 36px rgba(28, 46, 74, 0.16);
  
  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout Spacing */
  --section-padding-desktop: 80px;
  --section-padding-mobile: 48px;
}

/* ==========================================================================
   Base Reset & Typography
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--color-charcoal);
  background-color: var(--color-white);
  line-height: 1.7;
}

h1, h2, h3, h4, .font-serif {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--color-navy);
}

h1 {
  font-size: 3.5rem; /* 56px */
  line-height: 1.15;
}

h2 {
  font-size: 2.5rem; /* 40px */
  line-height: 1.2;
}

h3 {
  font-size: 1.75rem; /* 28px */
  line-height: 1.3;
  font-weight: 400;
}

h4 {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem; /* 20px */
  line-height: 1.4;
  font-weight: 600;
}

p.large {
  font-size: 1.125rem; /* 18px */
  line-height: 1.7;
}

p {
  font-size: 1rem; /* 16px */
  color: var(--color-charcoal);
}

.meta-text {
  font-size: 0.875rem; /* 14px */
  color: var(--color-grey);
  line-height: 1.6;
}

.tag-badge {
  font-size: 0.75rem; /* 12px */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.devanagari {
  font-family: 'Noto Sans Devanagari', sans-serif;
}

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

/* ==========================================================================
   Layout Structure
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: var(--section-padding-desktop) 0;
  position: relative;
  overflow: hidden;
}

/* Alternating Section Backgrounds */
.section-cream {
  background-color: var(--color-cream);
}

.section-white {
  background-color: var(--color-white);
}

.section-navy {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.section-navy h2, 
.section-navy h3 {
  color: var(--color-white);
}

.section-navy p {
  color: rgba(255, 255, 255, 0.8);
}

/* 12-Column Responsive Grid */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }

/* Flex Utility Helpers */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

/* ==========================================================================
   Global Header & Sticky Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  transition: var(--transition-normal);
}

.site-header.scrolled {
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--color-divider);
}

.site-header.scrolled .nav-link {
  color: var(--color-charcoal);
}

.site-header.scrolled .logo-text {
  color: var(--color-navy);
}

.site-header.scrolled .logo-tagline {
  color: var(--color-grey);
}

.nav-container {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-normal);
}

.site-header.scrolled .nav-container {
  height: 70px;
}

/* Logo Design */
.logo-block {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.01em;
  transition: var(--transition-normal);
}

.logo-tagline {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 3px;
  transition: var(--transition-normal);
}

/* Navigation Links */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  font-size: 0.9375rem; /* 15px */
  font-weight: 500;
  color: var(--color-white);
  position: relative;
  padding: 8px 0;
}

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

.nav-link:hover, .nav-link.active {
  color: var(--color-gold) !important;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Hamburger Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  margin: 5px 0;
  transition: var(--transition-normal);
}

.site-header.scrolled .mobile-toggle span {
  background-color: var(--color-navy);
}

/* Open states for hamburger icon */
.mobile-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 14px 28px;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  gap: 8px;
  text-align: center;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--color-gold);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-gold-hover);
  box-shadow: 0 4px 12px rgba(200, 146, 42, 0.2);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--color-navy);
  color: var(--color-navy);
  padding: 12px 26px; /* Offset the 2px border */
}

.btn-secondary:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
}

/* Secondary Button Light (for Navy backgrounds) */
.btn-secondary-light {
  background-color: transparent;
  border: 2px solid var(--color-white);
  color: var(--color-white);
  padding: 12px 26px;
}

.btn-secondary-light:hover {
  background-color: var(--color-white);
  color: var(--color-navy);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-gold);
  padding: 8px 16px;
  font-weight: 500;
}

.btn-ghost:hover {
  text-decoration: underline;
  color: var(--color-gold-hover);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

/* ==========================================================================
   Cards Component
   ========================================================================== */
.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-divider);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  aspect-ratio: 16/9;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card h3 {
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--color-navy);
}

.card p {
  color: var(--color-grey);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.form-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem; /* 14px */
  font-weight: 500;
  color: var(--color-charcoal);
  margin-bottom: 8px;
}

.form-control {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  width: 100%;
  background-color: var(--color-white);
  border: 1px solid var(--color-divider);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--color-charcoal);
  transition: var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--color-navy);
  box-shadow: 0 0 0 3px rgba(28, 46, 74, 0.1);
}

.form-control::placeholder {
  color: #A0A0A0;
}

.form-error {
  color: #C0392B;
  font-size: 0.8125rem;
  margin-top: 6px;
  display: none;
}

/* ==========================================================================
   RERA Badge
   ========================================================================== */
.rera-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  color: var(--color-success-text);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.8125rem; /* 13px */
  font-weight: 600;
}

.rera-badge svg {
  stroke: var(--color-success-text);
  width: 16px;
  height: 16px;
  fill: none;
  stroke-width: 2px;
}

/* ==========================================================================
   Stats Bar Section
   ========================================================================== */
.stats-bar {
  background-color: var(--color-navy);
  padding: 40px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.75rem; /* 44px */
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem; /* 14px */
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ==========================================================================
   Hero Section Layout
   ========================================================================== */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color-white);
  padding: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(28, 46, 74, 0.6);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-content h1 {
  color: var(--color-white);
  margin-bottom: 8px;
}

.hero-content p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

/* ==========================================================================
   WhatsApp Floating Widget
   ========================================================================== */
.whatsapp-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
}

.whatsapp-button {
  width: 56px;
  height: 56px;
  background-color: var(--color-whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--color-whatsapp-shadow);
  color: var(--color-white);
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition-normal);
  animation: pulse-whatsapp 2s infinite;
}

.whatsapp-button:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px var(--color-whatsapp-shadow);
}

.whatsapp-button svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.whatsapp-tooltip {
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition: var(--transition-normal);
  position: relative;
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent var(--color-navy);
}

.whatsapp-widget:hover .whatsapp-tooltip,
.whatsapp-tooltip.visible {
  opacity: 1;
  transform: translateX(0);
}

@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ==========================================================================
   EMI Calculator Layout
   ========================================================================== */
.emi-calculator {
  background-color: var(--color-white);
  border: 1px solid var(--color-divider);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.emi-inputs {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--color-navy);
  font-size: 0.9375rem;
}

.slider-value-box {
  background-color: var(--color-cream);
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 700;
  color: var(--color-navy);
  font-size: 0.9375rem;
}

/* Custom Range Input Styling */
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background-color: var(--color-divider);
  border-radius: 3px;
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-gold);
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.range-slider::-webkit-slider-thumb:hover {
  background-color: var(--color-gold-hover);
  transform: scale(1.1);
}

.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background-color: var(--color-gold);
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.range-slider::-moz-range-thumb:hover {
  background-color: var(--color-gold-hover);
  transform: scale(1.1);
}

.emi-results {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--color-cream);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  height: 100%;
}

.emi-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 12px 0;
}

.emi-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-divider);
}

.emi-detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.emi-detail-num {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: var(--color-charcoal);
  font-size: 1.125rem;
}

/* Chart visualization wrapper */
.emi-chart-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 20px auto 10px;
}

.emi-pie-chart {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--color-navy) 0% 70%, var(--color-gold) 70% 100%);
  transition: var(--transition-normal);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--color-navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 30px;
  border-top: 4px solid var(--color-gold);
}

.site-footer h3,
.site-footer h4 {
  color: var(--color-white);
  margin-bottom: 20px;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-logo .logo-text {
  color: var(--color-white);
  font-size: 1.75rem;
}

.footer-logo .logo-tagline {
  color: var(--color-gold);
}

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

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a:hover {
  color: var(--color-gold);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-contact-item svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  stroke: var(--color-gold);
  stroke-width: 2px;
  fill: none;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2rem; }
  
  .col-8 { grid-column: span 12; }
  .col-4 { grid-column: span 12; }
  .col-3 { grid-column: span 6; }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Nav Overlay */
@media (max-width: 768px) {
  section {
    padding: var(--section-padding-mobile) 0;
  }
  
  .site-header {
    background-color: var(--color-navy); /* Always solid dark on mobile */
    box-shadow: var(--shadow-sm);
  }
  
  .logo-text {
    color: var(--color-white) !important;
  }
  .logo-tagline {
    color: var(--color-gold) !important;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 90px;
    left: 0;
    width: 100%;
    height: calc(100vh - 90px);
    background-color: var(--color-navy);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 48px;
    gap: 36px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
  }
  
  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .nav-link {
    font-size: 1.25rem;
    color: var(--color-white) !important;
  }
  
  .nav-actions {
    display: none; /* Hide top CTA on mobile, it will be placed inside mobile menu if needed */
  }
  
  .site-header.scrolled .nav-container {
    height: 90px; /* Keep height same on mobile scroll */
  }
}

/* Mobile Screens (max-width: 576px) */
@media (max-width: 576px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.375rem; }
  
  .col-6 { grid-column: span 12; }
  .col-3 { grid-column: span 12; }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .whatsapp-widget {
    bottom: 16px;
    right: 16px;
  }
  
  .whatsapp-tooltip {
    display: none; /* Hide tooltips on small mobile */
  }
  
  .emi-calculator {
    padding: 20px;
  }
  
  .emi-details-grid {
    grid-template-columns: 1fr;
  }
}
