/* ============================================================
   John Abril — Real Estate and Lending, Simplified.
   main.css : design tokens, reset, typography, buttons, cards,
   nav, generic section layout, footer.
   ============================================================ */

:root {
  /* Brand palette */
  --navy:        #1B2A4A;
  --navy-90:     rgba(27, 42, 74, 0.90);
  --navy-60:     rgba(27, 42, 74, 0.60);
  --gold:        #C9A84C;
  --gold-bright: #F5A623; /* review stars */
  --white:       #FFFFFF;
  --light-gray:  #F5F5F5;
  --dark-gray:   #2C2C2C;
  --body:        #333333;
  --muted:       #555555;
  --faint:       #888888;
  --cream-border:#E8DCC8;

  /* Type */
  --serif:  "Playfair Display", Georgia, serif;
  --sans:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --script: "Great Vibes", "Brush Script MT", cursive;

  /* Layout */
  --maxw: 1180px;
  --radius: 8px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.06);
  --header-h: 76px;
  --header-h-shrunk: 60px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

/* ---------- utilities ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.heading-ls { letter-spacing: .12em; }
.comm-grid--pair { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 0 auto; }
.birdeye-txt { font-weight: 600; color: var(--navy); }
.mt-lg { margin-top: 36px; }
/* Prevent flash of unstyled content */
body { opacity: 1; }
.hero-content { opacity: 1; }
.section { padding: 80px 0; }
.section--gray  { background: var(--light-gray); }
.section--navy  { background: var(--navy); color: var(--white); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.center { text-align: center; }
.eyebrow {
  font-family: var(--sans); font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; font-size: 13px; color: var(--gold);
}
.lead { font-size: 19px; color: var(--muted); }
.script-name { font-family: var(--script); color: var(--gold); line-height: 1; }
.tm { font-size: .7em; vertical-align: super; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { font-size: 18px; color: var(--muted); }
.section--navy .section-head p { color: rgba(255,255,255,.8); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 16px;
  padding: 15px 26px; border-radius: 50px; border: 2px solid transparent;
  transition: transform .15s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  text-align: center; line-height: 1.1;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold      { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn--gold:hover{ background: #d9b85c; }
.btn--outline-gold { background: transparent; color: var(--navy); border-color: var(--gold); }
.btn--outline-gold:hover { background: var(--gold); color: var(--navy); }
/* dark outlined (navy bg, gold border, white text) — used on hero */
.btn--dark { background: var(--navy); color: var(--white); border-color: var(--gold); }
.btn--dark:hover { background: var(--gold); color: var(--navy); }
.btn--ghost-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.btn--ghost-white:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn--block { width: 100%; }
.btn--lg { padding: 17px 32px; font-size: 17px; }

/* ---------- cards ---------- */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 28px;
}
.stat-card { text-align: center; padding: 26px 18px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.stat-card .ico { font-size: 30px; }
.stat-card .num { font-family: var(--serif); font-size: 30px; color: var(--navy); font-weight: 700; margin-top: 6px; }
.stat-card .lbl { font-size: 14px; color: var(--muted); }

/* ---------- generic grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   STICKY HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--navy); color: var(--white);
  transition: box-shadow .25s var(--ease);
}
.site-header.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,.25); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); transition: height .25s var(--ease);
}
.site-header.scrolled .nav { height: var(--header-h-shrunk); }
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand .brand-name { font-family: var(--script); font-size: 30px; color: var(--white); transition: font-size .25s var(--ease); }
.site-header.scrolled .brand .brand-name { font-size: 25px; }
.brand .brand-tag { font-size: 10.5px; letter-spacing: .04em; color: var(--gold); font-weight: 600; }
.nav-links { display: flex; gap: 26px; list-style: none; }
.nav-links a { font-size: 15px; font-weight: 500; color: rgba(255,255,255,.88); padding: 6px 0; position: relative; }
.nav-links a:hover { color: var(--gold); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--gold); transition: width .2s var(--ease); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .btn { padding: 11px 20px; font-size: 14px; }
.license-bar {
  background: #16223c; color: rgba(255,255,255,.72);
  font-size: 12px; text-align: center; padding: 6px 0; letter-spacing: .02em;
}
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.hamburger span { width: 26px; height: 2px; background: var(--white); transition: .25s var(--ease); }

/* mobile overlay nav */
.mobile-nav {
  position: fixed; inset: 0; background: var(--navy); z-index: 1100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; transform: translateY(-100%); transition: transform .35s var(--ease);
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav a { color: var(--white); font-family: var(--serif); font-size: 26px; }
.mobile-nav a:hover { color: var(--gold); }
.mobile-nav .btn { margin-top: 10px; }
.mobile-nav .close { position: absolute; top: 22px; right: 24px; font-size: 34px; color: var(--white); background: none; border: 0; line-height: 1; }
.mobile-nav .m-license { position: absolute; bottom: 26px; font-size: 12px; color: rgba(255,255,255,.6); text-align: center; padding: 0 20px; }

/* ============================================================
   TRUST TICKER (Section 3)
   ============================================================ */
.trust-bar { background: var(--navy); color: var(--gold); overflow: hidden; padding: 14px 0; }
.trust-track { display: flex; gap: 0; white-space: nowrap; align-items: center; justify-content: center; flex-wrap: wrap; }
.trust-track span { padding: 4px 18px; font-size: 15px; font-weight: 600; }
.trust-track .sep { color: rgba(201,168,76,.45); padding: 0; }

/* ============================================================
   AUTHORITY (Section 2)
   ============================================================ */
.authority { max-width: 900px; }
.authority h2 { font-size: clamp(28px, 4vw, 42px); }
.authority .body { font-size: 18px; color: var(--muted); max-width: 760px; margin: 0 auto 36px; }

/* ============================================================
   VIDEO (Section 4)
   ============================================================ */
.video-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.video-frame { position: relative; aspect-ratio: 16/9; background: #000; }
.video-frame iframe, .video-frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-label { padding: 14px 18px; font-weight: 600; color: var(--navy); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.video-label .yt-watch { color: var(--gold); font-size: 14px; font-weight: 700; white-space: nowrap; }
.video-label .yt-watch:hover { text-decoration: underline; }
.video-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }

/* ============================================================
   ABOUT (Section 8)
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 0.85fr 1fr; gap: 48px; align-items: center; }
.about-photo { border-radius: var(--radius); border: 3px solid var(--gold); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 3/4; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-badges { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 22px 0 26px; }
.about-badges img { height: 42px; width: auto; }

/* ============================================================
   WHY CHOOSE JOHN (Section 9)
   ============================================================ */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card {
  background: #15223c; border: 1px solid rgba(201,168,76,.25); border-radius: var(--radius);
  padding: 28px; transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.why-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.why-card .ico { font-size: 30px; }
.why-card h3 { color: var(--white); font-size: 20px; margin: 12px 0 8px; }
.why-card p { color: rgba(255,255,255,.78); font-size: 15px; margin: 0; }
.editorial-single { margin-top: 44px; display: flex; justify-content: center; }
.editorial-single img { border-radius: var(--radius); border: 3px solid var(--gold); width: 100%; max-width: 420px; aspect-ratio: 4/5; object-fit: cover; object-position: top; box-shadow: var(--shadow-card); }

/* ============================================================
   COMMUNITIES (Section 7)
   ============================================================ */
.comm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.comm-card { border: 1px solid var(--cream-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); background: var(--white); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.comm-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.comm-card .ph { aspect-ratio: 3/2; background: linear-gradient(135deg, #2b3c5e, var(--navy)); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.25); font-size: 13px; }
.comm-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.comm-card .meta { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; }
.comm-card .city { font-family: var(--serif); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 15px; color: var(--navy); }
.comm-card .meta a { color: var(--gold); font-weight: 600; font-size: 14px; }

/* ============================================================
   COMMISSION (Section 10)
   ============================================================ */
.commission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.commission-grid .card h3 { font-size: 22px; }
.compliance-note { color: var(--faint); font-size: 13px; text-align: center; margin-top: 28px; max-width: 680px; margin-left: auto; margin-right: auto; }

/* ============================================================
   BLOG (Section 11)
   ============================================================ */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); background: var(--white); display: flex; flex-direction: column; }
.blog-card .thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, #2b3c5e, var(--navy)); overflow: hidden; }
.blog-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tag { align-self: flex-start; background: rgba(201,168,76,.16); color: #94772a; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; }
.blog-card h3 { font-size: 19px; margin: 4px 0; }
.blog-card .date { font-size: 13px; color: var(--faint); }
.blog-card .more { color: var(--gold); font-weight: 600; margin-top: auto; }

/* ============================================================
   FINAL CTA (Section 12)
   ============================================================ */
.final-cta { text-align: center; }
.final-cta h2 { font-size: clamp(30px, 5vw, 46px); }
.final-cta p { font-size: 19px; color: rgba(255,255,255,.85); max-width: 600px; margin: 0 auto 32px; }
.final-cta .btn-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--navy); color: rgba(255,255,255,.82); padding: 64px 0 28px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 40px; }
.footer-grid h4 { color: var(--white); font-family: var(--sans); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.footer-brand .script-name { font-size: 38px; }
.footer-brand .tag { color: var(--gold); font-size: 14px; margin-top: 4px; }
.social-row { display: flex; gap: 14px; margin-top: 18px; }
.social-row a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; color: var(--white); transition: .2s var(--ease); }
.social-row a:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.social-row svg { width: 18px; height: 18px; fill: currentColor; }
.footer-links { list-style: none; display: grid; gap: 10px; }
.footer-links a:hover { color: var(--gold); }
.footer-contact p { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.compliance-block { border-top: 1px solid rgba(255,255,255,.15); margin-top: 48px; padding-top: 28px; font-size: 12px; line-height: 1.7; color: rgba(255,255,255,.6); text-align: center; max-width: 940px; margin-left: auto; margin-right: auto; }
.compliance-block a { color: var(--gold); }
.eho-row { display: flex; gap: 18px; justify-content: center; align-items: center; margin: 22px 0; }
.eho-row img { height: 54px; width: auto; }
.footer-bottom { text-align: center; font-size: 13px; color: rgba(255,255,255,.55); margin-top: 22px; }
.footer-bottom a:hover { color: var(--gold); }

/* ---------- inline form thank-you ---------- */
.form-status { display: none; padding: 16px 18px; border-radius: var(--radius); margin-top: 14px; font-weight: 500; }
.form-status.ok  { display: block; background: #e9f6ec; color: #1c6b34; border: 1px solid #b6e0c0; }
.form-status.err { display: block; background: #fdecec; color: #a12626; border: 1px solid #f1c0c0; }

/* ============================================================
   AI chat widget (chat.js)
   ============================================================ */
.ja-chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 1200; width: 62px; height: 62px; border-radius: 50%; border: 3px solid var(--gold); background: var(--navy); padding: 0; overflow: hidden; box-shadow: 0 6px 22px rgba(0,0,0,.3); cursor: pointer; transition: transform .2s var(--ease); }
.ja-chat-fab img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ja-chat-fab .ja-fab-dot { position: absolute; right: 3px; bottom: 5px; width: 13px; height: 13px; border-radius: 50%; background: #38b24a; border: 2px solid #fff; }
.ja-chat-fab:hover { transform: scale(1.07); }
.ja-chat-fab.hidden { display: none; }
.ja-head-av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); margin-right: 10px; flex: 0 0 38px; }
.ja-head-txt { flex: 1; }
.ja-row { display: flex; gap: 7px; align-items: flex-end; }
.ja-row-user { justify-content: flex-end; }
.ja-row-bot { justify-content: flex-start; }
.ja-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: 0 0 26px; }
.ja-chat-panel { position: fixed; right: 20px; bottom: 20px; z-index: 1200; width: 360px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 90px); background: #fff; border-radius: 16px; box-shadow: 0 14px 44px rgba(0,0,0,.32); display: none; flex-direction: column; overflow: hidden; }
.ja-chat-panel.open { display: flex; }
.ja-chat-head { background: var(--navy); color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.ja-chat-head strong { display: block; font-family: var(--sans); font-size: 15px; }
.ja-chat-head span { font-size: 11px; color: var(--gold); }
.ja-chat-close { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.ja-chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--light-gray); }
.ja-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; word-wrap: break-word; }
.ja-msg a { color: var(--gold); font-weight: 600; }
.ja-bot { background: #fff; color: var(--body); align-self: flex-start; border: 1px solid #e7e7e7; border-bottom-left-radius: 4px; }
.ja-user { background: var(--navy); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ja-user a { color: #fff; }
.ja-typing { color: var(--faint); font-style: italic; }
.ja-chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; background: #fff; }
.ja-chat-form input { flex: 1; padding: 11px 14px; border: 1px solid #ccd3df; border-radius: 24px; font-size: 14px; font-family: inherit; outline: none; }
.ja-chat-form input:focus { border-color: var(--gold); }
.ja-chat-form button { flex: 0 0 42px; height: 42px; border-radius: 50%; border: 0; background: var(--gold); color: var(--navy); font-size: 15px; cursor: pointer; }
.ja-chat-disc { font-size: 10.5px; color: var(--faint); text-align: center; padding: 0 10px 8px; background: #fff; }
@media (max-width: 480px) { .ja-chat-panel { right: 10px; bottom: 10px; width: calc(100vw - 20px); height: calc(100vh - 80px); } }
