/* Center the FAQ block while keeping its text left-aligned */
#faq {
  max-width: min(900px, calc(100% - (var(--pad-x) * 2)));
  margin-left: auto;
  margin-right: auto;
}

:root {
  --topbar-h: 82px;
  /* base height of the top bar on mobile */
  --avatar-size: clamp(98px, 22vw, 140px);
  /* responsive avatar size */
  --pad-x: clamp(14px, 4vw, 28px);
  --brand: #fff;
  /* header text color on black */
  --ink: #1a1a1a;
  --muted: #9ca3af;
  /* light gray on dark footers and muted copy */
  --surface: #ffffff;
  --bg: #f8fafc;
  --accent: #0ea5e9;
  --header-bg: #000000;
  /* black header */
  --footer-bg: #000000;
  /* black footer */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Fixed Top Bar with Avatar Union Shape ===== */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  /* top:0; left:0; right:0 */
  height: var(--topbar-h);
  background: var(--header-bg);
  color: #fff;
  z-index: 1000;
  /* sits above scrolling content */
  box-shadow: 0 1px 0 rgba(0, 0, 0, .4);
  display: grid;
  grid-template-columns: auto 1fr auto;
  /* big logo | centered text | CTAs */
  align-items: center;
  padding: 0 var(--pad-x);
  overflow: visible;
  /* ensure pseudo-element can show */
}

.topbar::after {
  content: "";
  position: absolute;
  width: var(--avatar-size);
  aspect-ratio: 1/1;
  border-radius: 999px;
  background: var(--header-bg);
  /* match header to form a single shape */
  top: 6px;
  right: calc(var(--pad-x) - 2px);
  z-index: 0;
  /* below header content, above hero */
  box-shadow: 0 1px 0 rgba(0, 0, 0, .4);
}

/* Left: brand text (baseline version used text, not a logo) */
.brand {
  grid-column: 1;
  justify-self: start;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: .2px;
  font-size: clamp(28px, 7.5vw, 44px);
}

/* Center: name + license */
.header-center {
  grid-column: 2;
  text-align: center;
  line-height: 1.1;
  color: #fff;
}

.agent-name {
  font-weight: 800;
  font-size: clamp(24px, 6.9vw, 33px);
  letter-spacing: .3px;
}

.license-no {
  margin-top: 4px;
  font-size: clamp(12px, 3.6vw, 14px);
  color: var(--muted);
  letter-spacing: .2px;
}

/* Right: socials + Property Search */
.header-cta {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: calc(var(--avatar-size) + var(--pad-x) + 8px);
}

.header-cta a {
  color: #fff;
  text-decoration: none;
}

.social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Property Search button */
.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(14, 165, 233, .35);
  white-space: nowrap;
}

/* Avatar that overlaps the hero below */
.avatar {
  position: absolute;
  top: 0;
  right: var(--pad-x);
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  outline: 6px solid var(--header-bg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}

/* ===== Main Content (baseline used static topbar height) ===== */
main {
  padding-top: calc(var(--topbar-h) + (var(--avatar-size) * 0.35));
}

.hero {
  position: relative;
  margin-top: calc(var(--avatar-size) * -0.25);
  isolation: isolate;
  overflow: clip;
  background: #000;
}

.hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(85vh, 1080px);
  object-fit: cover;
  object-position: center;
  filter: contrast(1.02) saturate(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .25), rgba(0, 0, 0, .1) 40%, rgba(0, 0, 0, 0));
  pointer-events: none;
}

.hero-text {
  position: absolute;
  left: var(--pad-x);
  right: calc(var(--pad-x) + var(--avatar-size) * 0.25);
  bottom: clamp(16px, 6vh, 32px);
  color: white;
  z-index: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.hero-title {
  font-size: clamp(22px, 5.8vw, 42px);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 8px 0;
}

.hero-sub {
  font-size: clamp(14px, 3.8vw, 18px);
  color: rgba(255, 255, 255, .92);
  margin: 0;
}

.section {
  padding: clamp(18px, 5vw, 40px) var(--pad-x);
  background: var(--bg);
}

.promo {
  background: var(--surface);
  border-radius: 16px;
  padding: clamp(14px, 4vw, 22px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
  text-align: center;
}

.promo h2 {
  margin: 0 0 8px;
  font-size: clamp(18px, 5vw, 26px);
}

.promo p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: clamp(13px, 3.6vw, 16px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  background: var(--accent);
  color: white;
  box-shadow: 0 6px 16px rgba(14, 165, 233, .35);
}

.btn.secondary {
  background: #111827;
  box-shadow: 0 6px 16px rgba(17, 24, 39, .25);
}

/* About + Contact */
.contact {
  display: grid;
  gap: 14px;
}

.form {
  display: grid;
  gap: 12px;
  background: var(--surface);
  padding: clamp(16px, 5vw, 24px);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.field {
  display: grid;
  gap: 6px;
}

label {
  font-size: 13px;
  color: #6b7280;
}

input,
textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 15px;
  background: #fff;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Footer */
footer.site-footer {
  padding: 32px var(--pad-x);
  background: var(--footer-bg);
  color: #fff;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.site-footer .footer-contact {
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.4;
}

.site-footer a {
  color: #fff;
}

.footer-brand img {
  max-width: 180px;
  height: auto;
  display: block;
  margin: 0 auto 8px;
}

.footer-partner img {
  max-width: 160px;
  height: auto;
  display: block;
  margin: 12px auto 0;
}

.wrap {
  padding: 18px var(--pad-x) 48px;
  background: transparent;
}

.wrap .footer-main {
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

.wrap .footer-main a.muted {
  color: #6b7280;
}

.wrap ul.credits {
  list-style: disc;
  margin: 10px auto 0;
  padding: 0 0 0 22px;
  max-width: 720px;
  color: #6b7280;
  font-size: 12px;
}

.wrap ul.credits a {
  color: #334155;
  text-underline-offset: 2px;
}

.muted {
  color: var(--muted);
}

.rule {
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(14, 165, 233, .45));
  margin: 6px 0 12px;
}

.grid2 {
  display: grid;
  gap: clamp(10px, 3vw, 18px);
  align-items: start;
  max-width: min(900px, 100%);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .grid2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Larger screens */
@media (min-width: 768px) {
  :root {
    --topbar-h: 92px;
  }
}

@media (min-width: 1024px) {
  .hero img {
    max-height: min(78vh, 1200px);
  }

  .hero-text {
    right: calc(var(--pad-x) + var(--avatar-size) * 0.6);
  }
}

/* Mobile tweaks (baseline version) */
/*@media (max-width: 600px) {
  .brand { font-size: clamp(16px, 4vw, 20px); }
  .agent-name { font-size: clamp(16px, 4.6vw, 22px); }
  .license-no { font-size: clamp(12px, 3.6vw, 14px); }
  :root { --topbar-h: 82px; --avatar-size: clamp(98px, 22vw, 140px); }
  .topbar { padding-right: calc(var(--pad-x) + var(--avatar-size) * 0.40); }
  .hide-sm { display: none; }
  .header-cta { gap: 8px; margin-right: calc(var(--avatar-size) + var(--pad-x) + 6px); }
  .icon { width: 18px; height: 18px; }
  .search-btn { padding: 8px 12px; font-size: 13px; }
}
*/

/* Header logo sizing + alignment */
.brand-logo-wrap {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  line-height: 0;
  /* removes baseline gap around the img */
}

.brand-logo {
  height: clamp(22px, 5.5vw, 40px);
  /* responsive; fits your header height */
  width: auto;
  display: block;
}

/* Left logo in the header */
.brand-logo-wrap {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  line-height: 0;
  /* removes extra inline spacing */
}

.brand-logo {
  /* Make the logo fill most of the header height */
  height: calc(var(--topbar-h) - 18px);
  /* ~90% of bar height */
  width: auto;
  display: block;
}

/* Desktop: give the bar more height so the logo can be big */
@media (min-width: 1024px) {
  :root {
    --topbar-h: 120px;
    /* was 92px; adjust to taste (110–130px) */
  }
}

/* Keep current mobile sizing as you had it */
@media (max-width: 600px) {
  .brand-logo {
    height: calc(var(--topbar-h) - 16px);
    /* fits the 82px mobile bar */
  }
}
