/* =========================================================
   global.css
   Tokens, Base Resets, Navigation, Footer, Modals, Forms
   ========================================================= */

   :root {
    --bg-base: #F5F2ED;
    --bg-card: #FFFFFF;
    --bg-alt: #EDE8DF;
    --bg-deep: #22252A;
    --bg-deep-card: #2A2D33;
    --text-primary: #22252A;
    --text-body: #3A3A3A;
    --text-muted: #6B6B6B;
    --text-light: #E2E5E0;
    --accent-sage: #5F7A5D;
    --accent-sand: #B5975C;
    --accent-sand-hover: #9C8047;
    --border-subtle: rgba(34,37,42,0.12);
    --border-sage: rgba(95,122,93,0.3);
    --logo-blue: #1E3FA8;
    --logo-orange: #E8761E;
    --serif: 'EB Garamond', Georgia, serif;
    --sans: 'DM Sans', system-ui, sans-serif;
    --devnag: 'Noto Serif Devanagari', serif;
    --container: 1280px;
    --section-y: clamp(64px, 8vw, 120px);
  }
  
  /* Base */
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-body);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  img { max-width: 100%; display: block; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
  h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 400; color: var(--text-primary); letter-spacing: -0.01em; }
  p { margin: 0 0 1em; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  
  /* Layout & Headings */
  .container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
  section { padding: var(--section-y) 0; position: relative; }
  .section-label {
    display: inline-block;
    font-family: var(--sans); font-weight: 500; font-size: 12px;
    color: var(--accent-sage); text-transform: uppercase;
    letter-spacing: 0.16em; margin-bottom: 20px; position: relative; padding-left: 32px;
  }
  .section-label::before {
    content: ""; position: absolute; left: 0; top: 50%;
    width: 22px; height: 1px; background: var(--accent-sage);
  }
  .section-head h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.08; max-width: 820px; margin-bottom: 14px; }
  .section-head .lede { max-width: 620px; color: var(--text-body); font-size: 17px; }
  
  /* Buttons */
  .btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--sans); font-weight: 500; font-size: 13px;
    text-transform: uppercase; letter-spacing: 0.12em;
    padding: 18px 28px; transition: all .25s ease;
    border: 1px solid transparent; min-height: 48px;
  }
  .btn-primary { background: var(--accent-sand); color: var(--bg-deep); }
  .btn-primary:hover { background: var(--accent-sand-hover); color: #fff; transform: translateY(-1px); }
  .btn-secondary { background: transparent; color: var(--accent-sand); border-color: var(--accent-sand); }
  .btn-secondary:hover { background: var(--accent-sand); color: var(--bg-deep); }
  .btn-dark { background: var(--bg-deep); color: var(--text-light); }
  .btn-dark:hover { background: #000; }
  .btn svg { width: 14px; height: 14px; }
  
  /* Navigation */
  .nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 18px 0; transition: padding .25s ease, background .25s ease, border-color .25s ease;
    background: transparent; border-bottom: 1px solid transparent;
  }
  .nav.scrolled {
    background: rgba(245,242,237,0.96); backdrop-filter: saturate(140%) blur(10px);
    border-bottom-color: var(--border-subtle); padding: 12px 0;
  }
  .nav-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: nowrap; }
  .nav-brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; text-decoration: none; }
  .nav-brand img { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
  .brand-text { display: flex; flex-direction: column; line-height: 1; white-space: nowrap; }
  .brand-text .b1 { font-family: var(--serif); font-weight: 500; font-size: 30px; color: var(--text-primary); }
  .brand-text .b2 { font-family: var(--sans); font-weight: 400; font-size: 11px; color: var(--accent-sage); text-transform: uppercase; letter-spacing: 0.18em; margin-top: 3px; }
  .nav-links { display: flex; gap: 24px; align-items: center; justify-content: center; flex: 1 1 auto; min-width: 0; }
  .nav-links a { font-family: var(--sans); font-weight: 500; font-size: 17px; color: var(--text-primary); position: relative; padding: 6px 0; white-space: nowrap; }
  .nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent-sage); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
  .nav-links a:hover::after { transform: scaleX(1); }
  .nav-cta { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
  .nav-phone { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 500; font-size: 17px; color: var(--text-primary); padding: 10px 14px; border: 1px solid var(--border-subtle); transition: all .25s ease; white-space: nowrap; }
  .nav-phone:hover { border-color: var(--accent-sage); color: var(--accent-sage); }
  .nav-phone svg { width: 17px; height: 17px; }
  .nav-enquire { display: inline-flex; align-items: center; background: var(--accent-sand); color: var(--bg-deep); padding: 12px 18px; font-family: var(--sans); font-weight: 500; font-size: 16px; text-transform: uppercase; letter-spacing: 0.1em; transition: all .25s ease; white-space: nowrap; }
  .nav-enquire:hover { background: var(--accent-sand-hover); color: #fff; }
  .hamburger { display: none; width: 40px; height: 40px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; flex-shrink: 0; }
  .hamburger span { width: 22px; height: 1.5px; background: var(--text-primary); transition: all .3s; display: block; flex-shrink: 0; }
  .hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .mobile-menu { position: fixed; inset: 0; background: var(--bg-base); z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
  .mobile-menu.open { opacity: 1; pointer-events: auto; }
  .mobile-menu a { font-family: var(--serif); font-size: 32px; color: var(--text-primary); }
  .mobile-menu .mobile-enquire { font-family: var(--sans); font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; background: var(--accent-sand); color: var(--bg-deep); padding: 16px 32px; margin-top: 12px; }
  
  /* Forms & Inputs */
  .contact-form { background: var(--bg-card); border: 1px solid var(--border-subtle); padding: 40px; }
  .contact-form h3 { font-family: var(--serif); font-size: 26px; margin-bottom: 8px; line-height: 1.2; }
  .contact-form .sub { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
  .form-field { display: flex; flex-direction: column; margin-bottom: 16px; }
  .form-field label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-sage); margin-bottom: 8px; font-weight: 500; }
  .form-field input, .form-field select, .form-field textarea { font-family: var(--sans); font-size: 15px; color: var(--text-primary); background: var(--bg-base); border: 1px solid var(--border-subtle); padding: 14px 16px; outline: none; transition: all .2s; width: 100%; }
  .form-field textarea { resize: vertical; min-height: 90px; }
  .form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent-sage); background: #fff; }
  .form-submit-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
  .form-status { font-size: 14px; min-height: 20px; }
  .form-status.ok { color: var(--accent-sage); }
  .form-status.err { color: #b03a3a; }
  .form-consent { margin: 8px 0 4px; }
  .consent-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13.5px; line-height: 1.5; color: var(--text-body); }
  .consent-label input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent-sage); }
  .consent-label a { color: var(--accent-sage); text-decoration: underline; }
  
  /* Modals & Popups */
  .modal-overlay { position: fixed; inset: 0; background: rgba(34,37,42,.6); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
  .modal-overlay.open { opacity: 1; pointer-events: auto; }
  .modal { background: var(--bg-base); max-width: 540px; width: 100%; max-height: 80vh; overflow: auto; padding: 40px; position: relative; }
  .modal.modal-legal { max-width: 760px; max-height: 85vh; }
  .modal-legal h4 { font-family: var(--serif); font-size: 18px; margin: 22px 0 8px; color: var(--text-primary); }
  .modal-legal p { font-size: 14.5px; line-height: 1.65; color: var(--text-body); margin-bottom: 10px; }
  .modal-legal .legal-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border-subtle); }
  .modal-legal a { color: var(--accent-sage); text-decoration: underline; }
  .modal h3 { font-family: var(--serif); font-size: 28px; margin-bottom: 16px; }
  .modal .close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-subtle); border-radius: 50%; font-size: 22px; line-height: 1; color: var(--text-primary); }
  
  .lead-popup-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(34,37,42,0.58); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; padding: 20px; }
  .lead-popup-overlay.open { display: flex; }
  .lead-popup-box { width: min(640px, 100%); max-height: 90vh; overflow-y: auto; position: relative; border-radius: 18px; box-shadow: 0 28px 90px rgba(0,0,0,0.28); }
  .lead-popup-close { position: absolute; top: 14px; right: 16px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-base); border: 1px solid var(--border-subtle); font-size: 26px; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
  .lead-popup-form { margin: 0; }
  .popup-consent-text { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--text-muted); text-align: center; }
  .popup-consent-text a { color: var(--accent-sage); text-decoration: underline; text-underline-offset: 2px; }
  .lead-popup-form .btn-primary { display: flex; justify-content: center; align-items: center; margin: 8px auto 0; width: fit-content; }
  
  /* WhatsApp Float */
  .wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 95; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(37,211,102,.4); transition: transform .25s ease; }
  .wa-float:hover { transform: scale(1.08); }
  .wa-float svg { width: 28px; height: 28px; }
  .wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25D366; opacity: .5; z-index: -1; animation: pulse 2.2s ease-out infinite; }
  @keyframes pulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.6); opacity: 0; } }
  
  /* Footer */
  footer { background: var(--bg-deep); color: var(--text-light); padding-top: 80px; }
  .footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 48px; padding-bottom: 48px; }
  .footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
  .footer-brand img { width: 52px; height: 52px; object-fit: contain; }
  .footer-brand .brand-text .b1 { color: var(--text-light); }
  .footer-brand .brand-text .b2 { color: rgba(226,229,224,.6); }
  footer p { color: rgba(226,229,224,.72); font-size: 14px; line-height: 1.6; max-width: 320px; }
  footer h4 { font-family: var(--sans); font-weight: 500; font-size: 12px; color: rgba(226,229,224,.55); text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 18px; }
  footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
  footer ul a { color: var(--text-light); font-size: 14px; transition: color .2s; }
  footer ul a:hover { color: var(--accent-sand); }
  .footer-social { display: flex; gap: 10px; margin-top: 20px; }
  .footer-social a { width: 38px; height: 38px; border: 1px solid rgba(226,229,224,.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-light); transition: all .25s ease; }
  .footer-social a:hover { background: var(--accent-sand); color: var(--bg-deep); border-color: var(--accent-sand); }
  .footer-social svg { width: 15px; height: 15px; }
  .listed-on { padding: 28px 0; border-top: 1px solid rgba(226,229,224,.12); display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
  .listed-on .label-sm { font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: rgba(226,229,224,.55); }
  .listed-on .portals { display: flex; gap: 18px; flex-wrap: wrap; }
  .listed-on .portals a { font-family: var(--serif); font-size: 17px; color: rgba(226,229,224,.85); transition: color .2s; }
  .listed-on .portals a:hover { color: var(--accent-sand); }
  .legal-line { padding: 18px 0; border-top: 1px solid rgba(226,229,224,.12); font-size: 12px; color: rgba(226,229,224,.45); line-height: 1.7; }
  .bottom-bar { padding: 22px 0; border-top: 1px solid rgba(226,229,224,.12); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(226,229,224,.5); }
  .bottom-bar a { color: rgba(226,229,224,.65); margin-left: 16px; transition: color .2s; }
  .bottom-bar a:hover { color: var(--accent-sand); }
  
  /* Global Responsive Base */
  @media (max-width: 1250px) and (min-width: 900px) {
    .nav-inner { gap: 14px; }
    .nav-brand { gap: 12px; }
    .brand-text .b2 { display: none; }
    .nav-links { gap: 16px; }
    .nav-links a { font-size: 15px; }
    .nav-cta { gap: 10px; }
    .nav-phone { font-size: 14px; padding: 9px 11px; gap: 7px; }
    .nav-enquire { font-size: 12px; padding: 11px 13px; }
  }
  @media (max-width: 1100px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 1000px) and (min-width: 900px) {
    .nav-phone { width: 42px; height: 42px; padding: 0; font-size: 0; gap: 0; }
    .nav-phone svg { width: 18px; height: 18px; }
  }
  @media (max-width: 899px) {
    .nav { padding: 12px 0; }
    .nav-inner { justify-content: space-between; gap: 10px; }
    .nav-brand img { width: 42px; height: 42px; }
    .brand-text .b1 { font-size: clamp(18px, 4vw, 24px); }
    .brand-text .b2, .nav-links, .nav-phone, .nav-enquire { display: none !important; }
    .nav-cta { width: 40px; }
    .hamburger { display: flex !important; width: 40px; }
    .form-row { grid-template-columns: 1fr; }
  }
  @media (max-width: 640px) {
    .container { padding: 0 22px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-brand, .footer-social, .listed-on .portals { justify-content: center; }
    footer p { max-width: 100%; }
    .listed-on, .bottom-bar { flex-direction: column; text-align: center; }
    .bottom-bar a { margin-left: 0; }
    .emi-calc, .contact-form { padding: 26px; }
  }
  @media (max-width: 400px) {
    .nav-brand img { width: 36px; height: 36px; }
    .brand-text .b1 { font-size: 18.5px; }
    .nav-cta, .hamburger { width: 34px; height: 34px; }
  }