/* =============================================================================
   SET HOMES REALTY — STYLES
   Brand: Royal Blue #3F76C4  |  Charcoal #2B2E34
============================================================================= */

:root {
  --blue: #3F76C4;
  --blue-dark: #305f9e;
  --blue-soft: #eaf1fb;
  --charcoal: #2B2E34;
  --charcoal-2: #3a3e46;
  --ink: #1c1f24;
  --muted: #5b626d;
  --line: #e6e8ec;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --white: #ffffff;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(27, 31, 36, .08);
  --shadow: 0 10px 30px rgba(27, 31, 36, .10);
  --shadow-lg: 0 24px 60px rgba(27, 31, 36, .16);
  --maxw: 1180px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; }

h1, h2, h3 { color: var(--charcoal); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }

a { color: var(--blue); text-decoration: none; }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 14px;
}

.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section__head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.section__head p { color: var(--muted); font-size: 1.08rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 10px; font-weight: 600; font-size: 1rem;
  cursor: pointer; border: 2px solid transparent; transition: all .2s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--charcoal); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--light { background: #fff; color: var(--charcoal); }
.btn--light:hover { background: var(--blue-soft); }
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; }
.brand-name { font-weight: 800; font-size: 1.1rem; line-height: 1; color: var(--charcoal); }
.brand-name span { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .22em; color: var(--blue); margin-top: 4px; }
.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a { color: var(--charcoal); font-weight: 500; font-size: .98rem; transition: color .2s; }
.nav__links a:hover { color: var(--blue); }
.nav__cta { display: flex; align-items: center; gap: 14px; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle svg { width: 26px; height: 26px; stroke: var(--charcoal); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--charcoal); color: #fff; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(115deg, rgba(43,46,52,.94) 0%, rgba(43,46,52,.78) 45%, rgba(43,46,52,.45) 100%),
    url('../assets/img/hero-home.jpg') center/cover;
}
.hero__inner { position: relative; padding: 120px 0 130px; max-width: 720px; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4rem); }
.hero h1 .accent { color: var(--blue); }
.hero p { font-size: 1.2rem; color: #dfe3ea; max-width: 560px; margin: 18px 0 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18); padding: 8px 16px; border-radius: 999px;
  font-size: .9rem; margin-bottom: 26px; color: #eef1f6;
}
.hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #58d68d; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 8px; }
.stat__num { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--blue); line-height: 1; }
.stat__label { color: var(--muted); font-weight: 500; margin-top: 8px; font-size: .98rem; }

/* ---------- Features / Why ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d6dbe4; }
.feature__icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--blue-soft);
  display: grid; place-items: center; margin-bottom: 18px;
}
.feature__icon svg { width: 26px; height: 26px; stroke: var(--blue); fill: none; stroke-width: 1.9; }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--muted); margin: 0; }

/* ---------- Listings ---------- */
.listings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card__media { position: relative; aspect-ratio: 3 / 2; background: var(--bg-alt); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__status {
  position: absolute; top: 14px; left: 14px; background: var(--blue); color: #fff;
  font-size: .76rem; font-weight: 700; letter-spacing: .04em; padding: 6px 12px; border-radius: 999px;
  text-transform: uppercase;
}
.card__status--new { background: #2e9e5b; }
.card__body { padding: 22px; }
.card__price { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.55rem; font-weight: 800; color: var(--charcoal); }
.card__addr { color: var(--charcoal); font-weight: 600; margin: 6px 0 2px; }
.card__city { color: var(--muted); font-size: .92rem; }
.card__specs {
  display: flex; gap: 18px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--charcoal); font-size: .92rem; font-weight: 500;
}
.card__specs span { display: inline-flex; align-items: center; gap: 6px; }
.card__specs svg { width: 17px; height: 17px; stroke: var(--blue); fill: none; stroke-width: 1.8; }

.idx-note {
  margin-top: 40px; text-align: center; font-size: .92rem; color: var(--muted);
  background: var(--blue-soft); border: 1px dashed #bcd0ee; border-radius: 12px; padding: 16px 20px;
}
.idx-note strong { color: var(--charcoal); }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.agent {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  display: flex; flex-direction: column;
}
.agent:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.agent__photo { aspect-ratio: 1 / 1; background: linear-gradient(135deg, var(--blue) 0%, var(--charcoal) 100%); position: relative; }
.agent__photo img { width: 100%; height: 100%; object-fit: cover; }
.agent__initials {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 3rem; letter-spacing: .04em;
}
.agent__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.agent__name { font-size: 1.18rem; font-weight: 700; color: var(--charcoal); margin: 0; }
.agent__title { color: var(--blue); font-weight: 600; font-size: .9rem; margin: 4px 0 12px; }
.agent__bio { color: var(--muted); font-size: .92rem; margin: 0 0 16px; flex: 1; }
.agent__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.agent__tag { background: var(--bg-alt); color: var(--charcoal); font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.agent__contact { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
.agent__contact a { display: inline-flex; align-items: center; gap: 9px; color: var(--charcoal); font-size: .9rem; font-weight: 500; transition: color .2s; }
.agent__contact a:hover { color: var(--blue); }
.agent__contact svg { width: 16px; height: 16px; stroke: var(--blue); fill: none; stroke-width: 1.8; flex: none; }
.agent__license { font-size: .74rem; color: var(--muted); margin-top: 12px; }

/* ---------- Team empty state ---------- */
.team-placeholder {
  grid-column: 1 / -1; text-align: center; max-width: 560px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 48px 32px; box-shadow: var(--shadow-sm);
}
.team-placeholder__icon {
  width: 64px; height: 64px; border-radius: 16px; background: var(--blue-soft);
  display: grid; place-items: center; margin: 0 auto 22px; color: var(--blue);
}
.team-placeholder__icon svg { width: 30px; height: 30px; }
.team-placeholder h3 { font-size: 1.4rem; }
.team-placeholder p { color: var(--muted); margin: 0 auto 24px; max-width: 440px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--blue); color: #fff; border-radius: 20px; padding: 56px; text-align: center; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.4rem); }
.cta-band p { color: #e6eefb; font-size: 1.1rem; max-width: 560px; margin: 0 auto 28px; }
.cta-band .btn--light { color: var(--blue-dark); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item__icon { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-soft); display: grid; place-items: center; flex: none; }
.contact-item__icon svg { width: 22px; height: 22px; stroke: var(--blue); fill: none; stroke-width: 1.8; }
.contact-item h4 { margin: 0 0 2px; color: var(--charcoal); font-size: 1rem; }
.contact-item p, .contact-item a { margin: 0; color: var(--muted); font-size: .96rem; }
.contact-item a:hover { color: var(--blue); }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .88rem; font-weight: 600; color: var(--charcoal); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(63,118,196,.16);
}
.field textarea { resize: vertical; min-height: 120px; }
.footer__agentlink { color: #9aa1ad; }
.footer__agentlink:hover { color: #fff; }

/* ===================== ACCOUNT / LOGIN PAGE ===================== */
.account-body { background: var(--bg-alt, #f6f8fb); min-height: 100vh; }
.account-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; background: #fff; border-bottom: 1px solid var(--line);
}
.account-back { color: var(--muted); font-weight: 600; font-size: .92rem; }
.account-back:hover { color: var(--blue); }
.account-main { max-width: 880px; margin: 0 auto; padding: 48px 20px 80px; }
.account-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 36px; max-width: 460px; margin: 0 auto;
}
.account-card--wide { max-width: 880px; }
.account-card--center { text-align: center; }
.account-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.account-card .muted { color: var(--muted); }
.account-card label { display: block; font-weight: 600; font-size: .9rem; margin: 16px 0 6px; }
.account-card input[type=text], .account-card input[type=email],
.account-card input[type=password], .account-card input[type=tel],
.account-card textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; background: #fff; color: var(--ink, #1a1d23);
}
.account-card input:focus, .account-card textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft);
}
.account-card .btn { margin-top: 20px; }
.linkbtn { background: none; border: none; color: var(--blue); font-weight: 600; cursor: pointer; padding: 14px 0 0; font-size: .92rem; }
.linkbtn:hover { text-decoration: underline; }
.account-hint { margin-top: 18px; font-size: .85rem; }

.spinner {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 14px;
  border: 3px solid var(--line); border-top-color: var(--blue); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.editor-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.editor-top .btn { margin-top: 0; }
.editor-grid { display: grid; grid-template-columns: 200px 1fr; gap: 32px; }
.editor-photo { text-align: center; }
.editor-photo .btn { margin-top: 14px; }
.photo-preview {
  width: 160px; height: 160px; border-radius: 18px; margin: 0 auto; overflow: hidden;
  background: var(--blue-soft); display: grid; place-items: center; border: 1px solid var(--line);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
#photo-initials { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 2.4rem; color: var(--blue); }
.editor-fields .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.toggle { display: flex !important; align-items: center; gap: 10px; margin-top: 20px; font-weight: 600; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--blue); }
.pw-details { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.pw-details summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.editor-actions { display: flex; align-items: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.editor-actions .btn { margin-top: 0; }
.tiny { font-size: .78rem; }
@media (max-width: 640px) {
  .editor-grid { grid-template-columns: 1fr; }
  .editor-fields .form__row { grid-template-columns: 1fr; }
}

.form__note { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.form__status { font-size: .92rem; font-weight: 600; margin: 14px 0 0; min-height: 1px; }
.form__status--ok { color: #1f8a4c; }
.form__status--error { color: #c0392b; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Footer ---------- */
.footer { background: var(--charcoal); color: #c3c8d1; padding: 64px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; margin-bottom: 44px; }
.footer .brand-name { color: #fff; }
.footer p { color: #aeb4bf; font-size: .94rem; }
.footer h5 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: #aeb4bf; font-size: .94rem; transition: color .2s; }
.footer ul a:hover { color: #fff; }
.affiliations {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 48px; padding: 26px 36px; margin: 4px 0 36px;
  background: #fff; border-radius: 16px;
}
.affiliations img { width: auto; }
.affil-eho { height: 54px; }
.affil-realtor { height: 60px; }
.affil-stellar { height: 42px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: #8c93a0; }
.footer__legal { max-width: 720px; font-size: .78rem; color: #7e8593; line-height: 1.6; margin-top: 8px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .team { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav__links, .nav__cta .btn { display: none; }
  .nav__toggle { display: block; }
  .nav.is-open .nav__links {
    display: flex; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column;
    background: #fff; padding: 20px 24px; gap: 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .features, .listings { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 72px 0; }
  .cta-band { padding: 40px 24px; }
}
@media (max-width: 560px) {
  .team { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .form__row { grid-template-columns: 1fr; }
  .hero__inner { padding: 90px 0 96px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
