/* ============================================
   STELLA KHAVO — EDGE HOME FINANCE
   Refined v3: Original palette + modern typography
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* ---- Design Tokens ---- */
:root {
  --navy:        #0D1B2A;
  --navy-mid:    #162840;
  --slate:       #2C4A7A;
  --slate-light: #4A6FA5;
  --gold:        #C4973A;
  --gold-light:  #D9AF60;
  --gold-dim:    rgba(196,151,58,0.12);
  --gold-border: rgba(196,151,58,0.28);
  --white:       #FFFFFF;
  --off-white:   #F7F6F2;
  --fog:         #EEF1F7;
  --text:        #18243A;
  --muted:       #5A6882;
  --border:      #DDE3EE;
  --border-light:#E8ECF5;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Manrope', system-ui, sans-serif;

  --radius:    6px;
  --radius-lg: 14px;
  --radius-xl: 22px;

  --shadow-sm:   0 1px 4px rgba(13,27,42,0.07), 0 4px 16px rgba(13,27,42,0.05);
  --shadow-md:   0 4px 16px rgba(13,27,42,0.10), 0 12px 40px rgba(13,27,42,0.08);
  --shadow-lg:   0 8px 32px rgba(13,27,42,0.14), 0 24px 64px rgba(13,27,42,0.10);
  --shadow-card: 0 2px 8px rgba(13,27,42,0.06), 0 8px 32px rgba(13,27,42,0.06);

  --max-w: 1160px;
  --pad-section: 96px 0;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 72px;
  background: rgba(10,20,34,0.96);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 4px 32px rgba(0,0,0,0.28);
}
.site-nav::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 20%, var(--gold-light) 80%, transparent 100%);
}
.nav-inner {
  display: flex; align-items: center;
  height: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 28px;
  gap: 0;
}
.nav-logo {
  display: flex; align-items: center; gap: 13px;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(196,151,58,0.55);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 18px; font-weight: 400;
  font-style: italic; color: var(--gold-light); letter-spacing: -0.5px;
  flex-shrink: 0;
  transition: border-color .25s, box-shadow .25s;
}
.nav-logo:hover .nav-logo-mark {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(196,151,58,0.28);
}
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav-logo-name {
  font-family: var(--font-display); font-size: 19px; font-weight: 400;
  color: var(--white); letter-spacing: -0.2px;
}
.nav-logo-sub {
  font-size: 9px; color: rgba(255,255,255,0.28);
  letter-spacing: 2px; margin-top: 2px; text-transform: uppercase;
}

.nav-sep {
  width: 1px; height: 28px;
  background: rgba(255,255,255,0.10);
  margin: 0 24px; flex-shrink: 0;
}

.nav-links {
  display: flex; align-items: center; gap: 0;
  list-style: none; flex: 1;
}
.nav-links a {
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.52);
  padding: 8px 15px;
  transition: color .18s;
  letter-spacing: 0.15px;
  position: relative; display: block;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: 3px; left: 15px; right: 15px;
  height: 1.5px; background: var(--gold); border-radius: 2px;
  transform: scaleX(0); transform-origin: center;
  transition: transform .24s cubic-bezier(.34,1.56,.64,1);
}
.nav-links a:hover { color: rgba(255,255,255,0.92); }
.nav-links a.active { color: var(--white); font-weight: 600; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-cta { margin-left: 10px; }
.nav-cta a {
  display: inline-flex !important; align-items: center !important; gap: 7px !important;
  background: var(--gold) !important; color: var(--navy) !important;
  font-weight: 700 !important; font-size: 12.5px !important;
  padding: 9px 20px !important;
  border-radius: 100px !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  transition: all .22s !important;
}
.nav-cta a:hover {
  background: var(--gold-light) !important;
  box-shadow: 0 4px 22px rgba(196,151,58,0.42) !important;
  transform: translateY(-1px) !important;
}

/* GTranslate */
.nav-right {
  display: flex; align-items: center;
  margin-left: 18px; padding-left: 18px;
  border-left: 1px solid rgba(255,255,255,0.09);
  flex-shrink: 0;
}
.gtranslate_wrapper { display: flex; align-items: center; gap: 4px; }
.gtranslate_wrapper a {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 1px;
  color: rgba(255,255,255,0.42);
  padding: 5px 9px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: all .18s; text-transform: uppercase;
}
.gtranslate_wrapper a img { border-radius: 2px; }
.gtranslate_wrapper a:hover,
.gtranslate_wrapper a.active {
  color: var(--navy);
  background: var(--gold);
  border-color: var(--gold);
}
.gtranslate_wrapper a:hover img { opacity: 0.85; }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 4px; margin-left: 12px; }
.nav-hamburger span { width: 22px; height: 2px; background: var(--white); border-radius: 2px; display: block; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 700;
  letter-spacing: -0.1px;
  transition: all .22s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold); color: var(--navy);
}
.btn-primary:hover {
  background: var(--gold-light); transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196,151,58,0.32);
}
.btn-navy {
  background: var(--navy); color: var(--white);
}
.btn-navy:hover { background: var(--navy-mid); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  border: 1.5px solid var(--border); color: var(--text); background: var(--white);
}
.btn-outline:hover { border-color: var(--gold-border); color: var(--navy); transform: translateY(-1px); }
.btn-ghost-white {
  border: 1.5px solid rgba(255,255,255,0.35); color: var(--white); background: transparent;
}
.btn-ghost-white:hover { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.08); }

/* ============================================
   TYPOGRAPHY HELPERS
   ============================================ */
.eyebrow {
  font-size: 10.5px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before { content:''; width: 22px; height: 2px; background: var(--gold); flex-shrink: 0; border-radius: 2px; }
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { display: none; }
.eyebrow.center::after { content:''; width: 22px; height: 2px; background: var(--gold); flex-shrink: 0; border-radius: 2px; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 400; line-height: 1.1;
  color: var(--navy);
  letter-spacing: -0.3px;
}
.section-title.light { color: var(--white); }
.section-sub {
  font-size: 17px; color: var(--muted); line-height: 1.75;
  max-width: 540px; margin-top: 16px;
}
.section-sub.light { color: rgba(255,255,255,0.65); }
.gold-rule { width: 44px; height: 3px; background: var(--gold); border-radius: 2px; margin: 18px 0; }
.gold-rule.center { margin-left: auto; margin-right: auto; }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--border); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,0.6);
  padding: 72px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr;
  gap: 52px; padding-bottom: 52px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
.footer-brand p { font-size: 14px; line-height: 1.75; max-width: 250px; margin-top: 16px; }
.footer-contacts { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.footer-ci { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.footer-ci svg { opacity: 0.45; flex-shrink: 0; }
.footer-col h5 {
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col ul a { font-size: 14px; color: rgba(255,255,255,0.55); transition: color .18s; }
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  padding: 20px 0; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12.5px;
}
.footer-disclaimer {
  font-size: 11px; line-height: 1.75; opacity: 0.38;
  padding: 16px 0; border-top: 1px solid rgba(255,255,255,0.07);
}

/* ============================================
   AI CHAT WIDGET
   ============================================ */
.chat-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gold); color: var(--navy);
  box-shadow: 0 4px 20px rgba(196,151,58,0.45);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; transition: transform .25s, box-shadow .25s;
}
.chat-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(196,151,58,0.55); }
.chat-fab .badge {
  position: absolute; top: 2px; right: 2px;
  width: 14px; height: 14px; background: #e74c3c;
  border-radius: 50%; border: 2px solid var(--white);
}
.chat-window {
  position: fixed; bottom: 98px; right: 28px; z-index: 998;
  width: 364px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: scale(0.88) translateY(14px);
  transform-origin: bottom right; opacity: 0; pointer-events: none;
  transition: all .28s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden; max-height: 530px;
}
.chat-window.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }
.chat-head {
  background: var(--navy); padding: 16px 18px;
  display: flex; align-items: center; gap: 12px;
}
.chat-av {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gold); color: var(--navy);
  font-family: var(--font-body); font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-hname { font-weight: 700; color: var(--white); font-size: 14px; letter-spacing: -0.2px; }
.chat-hstatus { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.chat-hstatus::before { content:''; width: 6px; height: 6px; background: #22c55e; border-radius: 50%; display: inline-block; }
.chat-close { color: rgba(255,255,255,0.5); font-size: 20px; line-height: 1; padding: 4px; margin-left: auto; transition: color .18s; }
.chat-close:hover { color: var(--white); }
.chat-msgs {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 290px; max-height: 290px;
}
.chat-msgs::-webkit-scrollbar { width: 4px; }
.chat-msgs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.chat-msg { display: flex; gap: 8px; align-items: flex-end; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-bubble { max-width: 80%; padding: 10px 14px; font-size: 13.5px; line-height: 1.55; border-radius: 14px; }
.chat-msg.bot  .chat-bubble { background: var(--fog); color: var(--text); border-bottom-left-radius: 4px; }
.chat-msg.user .chat-bubble { background: var(--navy); color: var(--white); font-weight: 500; border-bottom-right-radius: 4px; }
.chat-mav {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--gold); color: var(--navy);
  font-size: 10px; font-weight: 800; font-family: var(--font-body);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-typing { display: flex; gap: 4px; align-items: center; padding: 10px 14px; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay:.2s; }
.chat-typing span:nth-child(3) { animation-delay:.4s; }
@keyframes blink { 0%,60%,100%{opacity:.3;transform:translateY(0)} 30%{opacity:1;transform:translateY(-4px)} }
.chat-foot { padding: 12px 14px; border-top: 1px solid var(--border-light); }
.chat-sugs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chat-sug {
  font-size: 11.5px; padding: 5px 11px;
  border: 1px solid var(--border); border-radius: 20px;
  background: var(--off-white); color: var(--muted);
  transition: all .18s; cursor: pointer;
}
.chat-sug:hover { border-color: var(--gold-border); color: var(--navy); background: var(--gold-dim); }
.chat-row { display: flex; gap: 8px; }
.chat-input {
  flex: 1; border: 1.5px solid var(--border); border-radius: 20px;
  padding: 9px 16px; font-size: 13px; font-family: inherit;
  background: var(--white); color: var(--text); outline: none; transition: border-color .18s;
}
.chat-input:focus { border-color: var(--gold-border); }
.chat-send {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); color: var(--navy); font-size: 15px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .18s;
}
.chat-send:hover { background: var(--gold-light); transform: scale(1.08); }

/* ============================================
   PAGE HERO (shared across inner pages)
   ============================================ */
.page-hero { padding: 140px 0 80px; position: relative; overflow: hidden; }
.page-hero::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,151,58,0.6), transparent);
}
.page-hero .container { position: relative; z-index: 1; }
.breadcrumb { font-size: 12px; color: rgba(255,255,255,0.4); margin-bottom: 20px; }
.breadcrumb a { color: var(--gold-light); }
.breadcrumb a:hover { color: var(--white); }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 6.2vw, 72px);
  font-weight: 400; color: var(--white);
  line-height: 1.05; margin-bottom: 18px; letter-spacing: -0.3px;
}
.page-hero p { font-size: 17px; color: rgba(255,255,255,0.65); max-width: 520px; line-height: 1.75; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  :root { --pad-section: 64px 0; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--navy); border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 16px 24px; gap: 4px; z-index: 100;
  }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .chat-window { width: calc(100vw - 32px); right: 16px; bottom: 88px; }
  .chat-fab { right: 16px; bottom: 20px; }
}
