/* style.css */
:root {
  --brand-navy: #14243B;
  --accent-copper: #C7855B;
  --accent-copper-hover: #a9714d;
  --neutral-gray: #E6E7E8;
  --text-main: #14243B;
  --white: #FFFFFF;
  --r: 10px;
  --t: .25s ease;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

img {
  max-width: 100%;
  height: auto;
  display: block
}

a {
  color: inherit;
  text-decoration: none
}

.container {
  width: min(1200px, 92%);
  margin-inline: auto
}

.visually-hidden {
  position: absolute!important;
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0;
  border: 0;
  height: 1px;
  width: 1px;
  overflow: hidden;
  white-space: nowrap
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: .6rem .8rem;
  background: var(--white);
  border-radius: 8px;
  z-index: 999
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--brand-navy);
  z-index: 9999;
  padding: .35rem 0
}

.top-nav__inner {
  width: 100%;
  padding: 0 .75rem;
  display: flex;
  align-items: center;
  gap: .5rem
}

.top-nav__links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
  justify-content: flex-end;
  text-align: right
}

.top-nav__links a {
  color: var(--white);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-variant: all-small-caps;
  opacity: .9;
  transition: opacity .2s ease;
  text-decoration: none
}

.top-nav__links a:hover,
.top-nav__links a:focus {
  opacity: 1;
  outline: none
}

.top-nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 6px;
  padding: .6rem;
  gap: .3rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  margin-left: .75rem;
  min-width: 44px;
  min-height: 44px
}

.top-nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  border-radius: 999px
}

.top-nav__toggle:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px
}

.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(20, 36, 59, 0.85);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 9998;
  padding-top: 40px
}

.mobile-nav__panel {
  background: var(--brand-navy);
  color: var(--white);
  width: min(80vw, 320px);
  height: calc(100% - 40px);
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  position: relative;
  box-shadow: -10px 0 30px rgba(0, 0, 0, .4);
  transform: translateX(100%);
  transition: transform .3s ease;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px
}

.mobile-nav__panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: center
}

.mobile-nav__panel a {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase
}

.mobile-nav__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--white);
  cursor: pointer
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: auto
}

.mobile-nav.open .mobile-nav__panel {
  transform: translateX(0)
}

body.nav-locked {
  overflow: hidden
}

@media(max-width:64rem) {
  .top-nav__toggle {
    display: flex;
    margin-left: auto
  }
  .top-nav__links {
    display: none
  }
  .top-nav__inner {
    justify-content: flex-end
  }
}

.hero-shell {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--brand-navy)
}


/* Header */

header {
  position: relative;
  border: none;
  margin: 0;
  padding: 0;
  color: var(--white)
}


/* Buttons */

.btn {
  display: inline-block;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  transition: transform var(--t), background var(--t), color var(--t);
  border: none;
  cursor: pointer
}

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

.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-copper-hover);
  transform: translateY(-2px);
  outline: 2px solid var(--accent-copper);
  outline-offset: 2px;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white)
}

.btn-outline:hover,
.btn-outline:focus {
  background: var(--white);
  color: var(--brand-navy);
  outline: 2px solid var(--white);
  outline-offset: 2px;
}


/* Layout */

main {
  padding-top: 3rem
}

body:not(.home) main {
  padding-top: 1.5rem
}

section {
  padding: 4.5rem 0
}


/* Hero */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 100vh;
  padding: 0;
  background: var(--brand-navy)
}

.split-hero__media {
  margin: 0;
  min-height: 560px
}

.split-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.hero-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 430px);
  background: var(--brand-navy);
  color: var(--white);
  text-align: center;
  border-radius: 30px;
  padding: 2.5rem 2.25rem;
  box-shadow: 0 40px 90px rgba(3, 7, 14, .6);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 2
}

.hero-card__logo {
  width: min(420px, 90%);
  height: auto;
  margin: 0 auto 0;
  display: block
}

.hero-card__nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .01em
}

.hero-card__nav a {
  color: var(--white);
  text-decoration: none
}

.hero-card__nav a:hover,
.hero-card__nav a:focus {
  color: var(--accent-copper);
  outline: none
}

.hero-card h1 {
  color: var(--white);
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.6rem)
}

.hero-card p {
  margin: 0;
  color: var(--white);
  font-size: 1.05rem;
  opacity: .9
}

.hero-card__cta {
  width: 100%
}

@media(max-width:68.75rem) {
  .split-hero__media {
    min-height: 500px
  }
}

@media(max-width:56.25rem) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto
  }
  .split-hero__media--right {
    display: none
  }
  .hero-card {
    position: relative;
    transform: none;
    left: auto;
    top: auto;
    margin: -140px auto 2.5rem;
    width: min(94vw, 430px)
  }
}

@media(max-width:40rem) {
  .split-hero__media {
    min-height: 420px
  }
  .hero-card {
    margin: -90px auto 1.5rem;
    padding: 2rem 1.75rem
  }
  .hero-card__nav ul {
    flex-wrap: wrap;
    gap: .75rem
  }
}


/* Cards */

#advantage .grid {
  display: grid;
  gap: 1.2rem;
  margin-top: 2rem
}

@media(min-width:43.75rem) {
  #advantage .grid {
    grid-template-columns: repeat(3, 1fr)
  }
}

.card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.4rem;
  border: 1px solid var(--neutral-gray);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
  text-align: center
}

.card svg {
  width: 48px;
  height: 48px;
  stroke: var(--accent-copper);
  margin-bottom: .5rem
}


/* Services */

#services .grid {
  display: grid;
  gap: 1.2rem;
  margin-top: 2rem
}

@media(min-width:48rem) {
  #services .grid {
    grid-template-columns: repeat(3, 1fr)
  }
}

.service {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--neutral-gray);
  display: flex;
  flex-direction: column
}

.service img {
  aspect-ratio: 4/3;
  object-fit: cover
}

.service .body {
  padding: 1rem 1.1rem 1.25rem
}

.service h3 {
  min-height: 3.8rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  margin: 0 0 .75rem;
}

.badge {
  display: inline-block;
  background: rgba(20, 36, 59, 0.08);
  color: var(--brand-navy);
  padding: .25rem .5rem;
  border-radius: 6px;
  margin-bottom: .35rem
}


/* Featured areas */

.chip {
  cursor: pointer;
  background: var(--accent-copper);
  border: none;
  border-radius: 8px;
  padding: .45rem .8rem;
  color: var(--brand-navy)
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}


/*
.balloon {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #F5F1E8;
  color: var(--text-main);
  border: 1px solid var(--neutral-gray);
  border-radius: 8px;
  padding: 10px;
  width: 300px;
  z-index: 1;
  margin-top: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.balloon::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent var(--neutral-gray) transparent;
}
*/

/* Page Hero */

.page-hero {
  background: var(--brand-navy);
  color: var(--white);
  padding: 3rem 0 3.5rem;
  text-align: center
}

.page-hero h1 {
  color: var(--white)
}

.page-hero p {
  max-width: 800px;
  margin: 1rem auto 0;
  font-size: 1.1rem;
  opacity: .9
}


/* Flex layout */

#founder .flex,
.flex {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  align-items: center
}

@media(min-width:50rem) {
  #founder .flex,
  .flex {
    flex-direction: row;
    align-items: flex-start
  }
}

.headshot {
  width: 260px;
  height: 300px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--white);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .08)
}


/* Contact form */

#contact,
.cta-bar {
  background: linear-gradient(#F5F1E8, var(--white));
  text-align: center
}

form {
  background: var(--white);
  border: 1px solid rgba(20, 36, 59, 0.25);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
  padding: 1.4rem;
  max-width: 680px;
  margin-inline: auto
}

label {
  display: block;
  margin-bottom: .4rem;
  color: var(--brand-navy)
}

input,
select,
textarea {
  width: 100%;
  padding: .75rem;
  border: 1px solid rgba(20, 36, 59, 0.35);
  border-radius: 10px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-copper);
  border-color: var(--accent-copper)
}

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

.row {
  display: grid;
  gap: .8rem
}

@media(min-width:37.5rem) {
  .row.two {
    grid-template-columns: 1fr 1fr
  }
}

#contact-form button[type="submit"],
#contact-form .btn[type="submit"] {
  margin-top: .5rem
}

html {
  font-size: 100%
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-main);
  background: #F5F1E8;
  padding-top: 40px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p,
.copy,
.prose,
li {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
}

p,
.copy,
.prose {
  max-width: 65ch;
  margin-inline: auto;
}

h1,
.brand,
.btn {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--brand-navy);
}

h2,
h3,
h4 {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--brand-navy);
}

h1 {
  font-weight: 700;
  line-height: 1.15;
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: .01em;
  margin: .15em 0 .4em
}

h2 {
  font-weight: 700;
  line-height: 1.2;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  margin: .85rem 0 .6rem
}

h3 {
  font-weight: 600;
  line-height: 1.3;
  font-size: clamp(1.125rem, 2.1vw, 1.35rem);
  margin: .7rem 0 .4rem
}

h4 {
  font-weight: 500;
  line-height: 1.3;
  font-size: 1.05rem;
  margin: .6rem 0 .35rem
}

.btn {
  font-weight: 500;
  letter-spacing: .02em
}

.btn-amber,
.btn.btn-amber {
  background: var(--accent-copper);
  color: var(--white)
}

.btn-outline {
  color: var(--white);
  border-color: var(--white)
}

a {
  color: var(--brand-navy);
  text-decoration: underline;
  text-underline-offset: 2px
}

a.btn,
.btn a {
  text-decoration: none
}

.smallcaps {
  letter-spacing: .04em;
  text-transform: uppercase
}

@media (max-width:40rem) {
  body {
    font-size: 1.4rem; /* Increased for better mobile readability (~22.4px) */
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-panel {
  background: #F5F1E8;
  color: var(--text-main);
  border: 1px solid var(--neutral-gray);
  border-radius: 12px;
  width: 90vw;
  max-width: 500px;
  max-height: 75vh;
  overflow: auto;
  padding: 1.5rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .25);
  z-index: 1150;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
  line-height: 1;
}

.modal-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-navy);
}

.modal-content {
  margin: 0;
}


/* Font rendering fallback to avoid invisible text */

@supports (font-variation-settings: normal) {
  html {
    font-display: swap;
  }
}


/* Respect prefers-reduced-motion; no visual change for others */

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}


/* === NEW COMPLIANT FOOTER === */

.site-footer {
  background-color: var(--brand-navy);
  color: var(--white);
  border-top: 6px solid var(--accent-copper);
  padding: 3rem 1.5rem 2rem;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--accent-copper);
  text-decoration: underline;
}


/* --- GRID ARCHITECTURE --- */

.footer-grid {
  display: grid;
  max-width: 1200px;
  margin: 0 auto;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  grid-template-areas: "brand brand brand brand agent agent agent agent broker broker broker broker" "legal legal legal legal legal legal legal legal legal legal legal legal";
}


/* Area Assignments */

.area-brand,
.area-agent,
.area-broker {
  text-align: center;
  padding: 0 1rem;
}

.area-brand {
  grid-area: brand;
  grid-column: span 4;
}

.area-agent {
  grid-area: agent;
  grid-column: span 4;
}

.area-broker {
  grid-area: broker;
  grid-column: span 4;
}

.area-legal {
  grid-area: legal;
  grid-column: span 12;
}


/* --- COMPONENT STYLING --- */


/* Footer Headers: Bold, Centered, Gold Color */
.footer-heading {
    color: #C7855B;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    margin: 0 0 1.05rem 0;
    font-weight: 800;
    text-align: center;
}

.area-brand .footer-heading {
    margin: 0 auto -1.4rem;
}

/* Footer: Brand Logo (Left Column) */
.brand-logo {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: -2.2rem auto -1.7rem;
    transform: scale(1.3) translateY(-32px);
    transform-origin: center;
}

.brand-tagline {
    margin: 0 auto;
    line-height: 1;
    position: relative;
    top: -90px;
}

/* Footer: Broker Logo (Right Column) */
.broker-logo {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 auto 0.5rem auto;
}

@media (max-width: 768px) {
  .area-brand .footer-heading {
    margin-bottom: 0.5rem;
  }

  .brand-logo {
    max-width: 260px;
    transform: none;
    margin: 0.2rem auto 0.1rem;
  }

  .brand-tagline {
    margin: 0.2rem auto 0.5rem;
    line-height: 1.3;
    top: 0;
  }
}

/* Footer: Agent Card Layout (Center Column) */
.agent-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Keeps spacing between name, creds, and contact links */
    align-items: center;
    text-align: center;
    color: #ffffff;
    margin-top: 0.5rem;
}

/* Footer: Agent Label (Bronze) */
.agent-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #C7855B;      /* Bronze Brand Color */
    margin: 0 0 2px 0;   /* Tight bottom margin */
    padding: 0;
    line-height: 1;
    font-weight: 700;
    display: block;
}

/* Footer: Agent Name */
.agent-name {
    font-weight: 800;
    font-size: 1.4rem;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

/* Footer: Agent Details */
.agent-line-item {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    padding: 0;
    line-height: 1.3;
    white-space: nowrap; /* Prevent wrapping */
}

/* Footer: Contact Links */
.agent-contact-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 6px;
    margin-bottom: 10px;
}

.contact-link {
    display: block;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: nowrap;
    padding-block: 6px;
}
.contact-link:hover { color: #C7855B; }

.footer-logo {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: contain;
}


/* Broker Section (Compliance Core) */

.broker-address {
  font-style: normal;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.compliance-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.badge-realtor {
  height: 60px;
  width: auto;
  margin-top: 0.5rem;
  margin-inline: auto;
}

.badge-eho {
  display: none;
}


/* Legal Sub-Footer */

.area-legal {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.8rem;
  opacity: 0.7;
  gap: 0.25rem;
}

.legal-nav {
  display: flex;
  gap: 0.5rem;
}

.legal-nav .separator {
  display: none;
}


/* --- MEDIA QUERIES (Responsive Behavior) --- */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-areas: "brand agent" "broker broker" "legal legal";
  }
  .area-brand {
    grid-column: span 6;
  }
  .area-agent {
    grid-column: span 6;
  }
  .area-broker {
    grid-column: span 12;
    margin-top: 1rem;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  .footer-heading {
    border-bottom: none;
    display: block;
    margin-bottom: 0.75rem;
  }
  .builder-credentials {
    display: block;
    margin: 0.5rem auto;
    width: fit-content;
  }
  .area-broker {
    margin-top: 0;
  }
}

/* === PATCH: Logo Sizing & Hero Layout === */
.hero-card {
  overflow: visible;
  /* Allow logo to expand outside the box */
}

.hero-card__logo {
  width: 100%;
  max-width: 380px;
  display: block;
  /* Zoom in 1.2x to crop transparent padding */
  transform: scale(1.2);
  transform-origin: center center;
  /* Negative margins pull text up to close the gap */
  margin-top: -15px;
  margin-bottom: -26px;
}


/* Adjust for mobile to prevent header overlap */

@media (max-width: 767px) {
  .hero-card__logo {
    transform: scale(1.05);
    margin-top: -11px;
    margin-bottom: -19px;
  }
}


/* === PATCH: Featured Areas tooltips on small mobile screens === */

@media (max-width: 480px) {
  .balloon {
    position: absolute;
    width: 94vw;
    max-width: 350px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--brand-navy);
  }
}


/* === PATCH: Button contrast for accessibility === */

.btn-primary {
  background: var(--accent-copper);
  color: var(--brand-navy);
  /* CHANGED from white for better contrast */
  font-weight: 500;
  /* Stronger weight improves legibility */
}