/* ================================================================
   yaseldelgadorealtor.com
   Palette pulled from the live Trexy/MiamiCasasForSale site:
   black #000, white, accent blue #2D68FF, green #2ABB67,
   headings #1F1F1F, body text #666. Typeface: Roboto.
   ================================================================ */

:root {
  --black: #000000;
  --ink: #1f1f1f;
  --gray: #666666;
  --gray-light: #6f6f6f;   /* AA: 5.02:1 on white, 4.69:1 on --surface */
  --blue: #2c65f9;         /* AA: 4.84:1 both as text on white and as button bg */
  --blue-dark: #1f4fd8;
  --green: #2abb67;
  --green-dark: #1e864a;   /* AA: 4.60:1 with white text */
  --green-darker: #17683a;
  --line: #e4e6ea;        /* decorative dividers / card edges */
  --field-line: #858d9b;  /* form control borders — 3.34:1 on white, WCAG 1.4.11 */
  --surface: #f6f7f9;
  --white: #ffffff;
  --radius: 8px;
  --max: 1180px;
  --font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--gray);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.22; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.85rem, 4vw, 2.7rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--black); color: #fff; padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--black);
  color: #d6d9de;
  font-size: .82rem;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap;
}
.topbar a { color: #fff; text-decoration: none; font-weight: 500; }
.topbar a:hover { color: var(--blue); }
.topbar .social { display: flex; gap: 14px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 20px;
}
.logo { text-decoration: none; line-height: 1.15; display: flex; align-items: center; gap: 11px; }
.logo-mark { width: auto; height: 44px; flex: none; }
.logo-text { display: block; }
.logo .name {
  display: block; font-size: 1.22rem; font-weight: 900;
  color: var(--ink); letter-spacing: -.02em;
}
.logo .role {
  display: block; font-size: .68rem; font-weight: 700;
  color: var(--gray-light); text-transform: uppercase; letter-spacing: .13em;
}
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 6px; padding: 9px 10px; cursor: pointer;
}
.nav-toggle .bar { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; }

.main-nav ul { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: .93rem; white-space: nowrap;
}
.main-nav a:hover { color: var(--blue); }
.main-nav a[aria-current="page"] { color: var(--blue); font-weight: 700; }
.main-nav .nav-search a {
  background: var(--blue); color: #fff; padding: 9px 17px; border-radius: 999px; font-weight: 700;
}
.main-nav .nav-search a:hover { background: var(--blue-dark); color: #fff; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 20px 18px; }
  .main-nav li { border-top: 1px solid var(--line); }
  .main-nav a { display: block; padding: 13px 0; }
  .main-nav .nav-search a { display: inline-block; margin-top: 12px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(115deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.82) 45%, rgba(45,104,255,.72) 100%),
    var(--black);
  color: #fff;
  overflow: hidden;
}
.hero .skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; opacity: .18; }
.hero .container { position: relative; z-index: 2; padding-top: 74px; padding-bottom: 82px; }
.hero-inner { max-width: 720px; }
.hero .eyebrow {
  display: inline-block; background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.28);
  padding: 6px 14px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero p.lead { font-size: 1.12rem; color: #dfe3ea; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 26px; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 28px; margin-top: 40px;
  padding-top: 26px; border-top: 1px solid rgba(255,255,255,.18);
}
.hero-trust div { min-width: 120px; }
.hero-trust .num { display: block; font-size: 1.65rem; font-weight: 900; color: #fff; line-height: 1.1; }
.hero-trust .lbl { font-size: .82rem; color: #b9c0cc; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; font-family: inherit;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-green { background: var(--green-dark); color: #fff; }
.btn-green:hover { background: var(--green-darker); color: #fff; }
.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { background: #23262b; color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.09); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* ---------- Sections ---------- */
section { padding: 62px 0; }
.section-alt { background: var(--surface); }
.section-dark { background: var(--black); color: #c9ced6; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 680px; margin-bottom: 38px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow-2 {
  font-size: .78rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 8px;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 46px 0; }
.page-hero p.sub { margin: 0; max-width: 68ch; font-size: 1.05rem; }
.breadcrumb { font-size: .82rem; color: var(--gray-light); margin-bottom: 12px; }
.breadcrumb a { color: var(--gray); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-areas { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1050px) { .grid-areas { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .grid, .grid-4, .grid-areas { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid, .grid-2, .grid-4, .grid-areas { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card h3 { margin-bottom: .4em; }
.card p { font-size: .94rem; margin-bottom: 0; }
.card.linked:hover { box-shadow: 0 14px 32px rgba(0,0,0,.09); transform: translateY(-2px); border-color: #d3d7de; }
.card a.stretched { text-decoration: none; color: var(--ink); }
.card .more { display: inline-block; margin-top: 14px; color: var(--blue); font-weight: 700; font-size: .9rem; }

.area-card { padding: 0; overflow: hidden; }
.area-card .swatch {
  height: 92px;
  background: linear-gradient(120deg, var(--black) 0%, var(--blue) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 1.15rem; letter-spacing: -.01em;
  text-align: center; padding: 0 14px;
}
.area-card:nth-child(2n) .swatch { background: linear-gradient(120deg, var(--black) 0%, var(--green-dark) 100%); }
.area-card:nth-child(3n) .swatch { background: linear-gradient(120deg, #16233f 0%, var(--blue) 100%); }
.area-card .body { padding: 20px 22px 24px; }

.num-card .n {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(45,104,255,.1); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; margin-bottom: 14px;
}

/* ---------- Split content ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; }
.split.narrow-left { grid-template-columns: 380px 1fr; align-items: start; }
@media (max-width: 860px) { .split, .split.narrow-left { grid-template-columns: 1fr; gap: 30px; } }
.portrait {
  width: 100%; height: auto; min-width: 0; align-self: start;
  aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius);
}

/* ---------- Steps ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: s; position: relative;
  padding: 0 0 26px 58px; margin-left: 21px;
  border-left: 2px solid var(--line);
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: -21px; top: -4px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--black); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: .95rem;
}
.steps h3 { margin-bottom: .25em; }
.steps p { margin-bottom: 0; font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 12px; background: var(--white);
}
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--ink); font-size: 1rem;
  list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.4rem; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 12px 0 0; font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(115deg, var(--black) 0%, #10224a 60%, var(--blue-dark) 140%);
  color: #fff; border-radius: var(--radius); padding: 46px 34px; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #e4e8ef; max-width: 58ch; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------- Forms ---------- */
.lead-form {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.form-row { margin-bottom: 15px; }
.form-row label { display: block; font-size: .84rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 11px 13px; font-family: inherit; font-size: .95rem;
  border: 1px solid var(--field-line); border-radius: 6px; color: var(--ink); background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent;
}
.form-note { font-size: .8rem; color: var(--gray-light); margin: 10px 0 0; }
#form-status { margin: 12px 0 0; font-weight: 600; font-size: .9rem; }
#form-status[data-state="error"] { color: #c0392b; }
#form-status[data-state="success"] { color: var(--green-dark); }

/* ---------- Contact details ---------- */
.contact-item { margin-bottom: 22px; }
.contact-item h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-light); margin-bottom: 4px; }
.contact-item a, .contact-item p { color: var(--ink); font-weight: 600; text-decoration: none; margin: 0; }
.contact-item a:hover { color: var(--blue); }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: #9aa1ad; padding: 52px 0 26px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 34px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #9aa1ad; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-brand .name { color: #fff; font-weight: 900; font-size: 1.1rem; display: block; margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .78rem; color: #8f97a5;
}
.legal { max-width: 78ch; margin-top: 10px; font-size: .75rem; color: #8f97a5; line-height: 1.6; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.lead { font-size: 1.06rem; }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.pill-list { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; padding: 0; margin: 0; }
.pill-list li { margin: 0; }
.pill-list a, .pill-list span {
  display: inline-block; padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: .87rem; font-weight: 500; text-decoration: none;
}
.pill-list a:hover { border-color: var(--blue); color: var(--blue); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}


/* ================================================================
   Accessibility
   Colour pairings above are checked against WCAG 2.1 AA
   (4.5:1 body text, 3:1 large text). See accessibility.html.
   ================================================================ */

/* Visible keyboard focus on every interactive element. :focus-visible
   shows the ring for keyboard users without adding an outline on mouse click. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 3px;
}
/* On dark backgrounds a blue ring can disappear — use white there. */
.hero a:focus-visible,
.site-footer a:focus-visible,
.topbar a:focus-visible,
.cta-band a:focus-visible,
.section-dark a:focus-visible {
  outline-color: #ffffff;
}
/* Fallback for browsers without :focus-visible support */
a:focus, button:focus, summary:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible), summary:focus:not(:focus-visible) { outline: none; }

/* Respect a reduced-motion preference (vestibular disorders, migraine). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card.linked:hover { transform: none; }
}

/* Honour a forced-colors / high-contrast mode. */
@media (forced-colors: active) {
  .btn { border: 1px solid currentColor; }
  .card { border: 1px solid currentColor; }
}


/* ---------- Brand logo, footer lockup, map ---------- */
.footer-logo {
  width: auto; height: 74px; margin-bottom: 14px;
  background: #fff; border-radius: 6px; padding: 8px 10px;
}
@media (max-width: 960px) { .logo-mark { height: 38px; } }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  max-height: 420px;
  background: var(--surface);
  margin-top: 6px;
}
@media (max-width: 700px) { .map-embed { aspect-ratio: 4 / 3; } }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* ---------- Language switcher (topbar) ----------
   Contrast: #ffffff text on --black with a 1px #8a8f98 border — the border
   is decorative only, the link text itself carries the affordance, so the
   3:1 non-text contrast minimum is met and the text is 21:1. */
.topbar .lang-switch {
  border: 1px solid #8a8f98;
  border-radius: 3px;
  padding: 2px 9px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.topbar .lang-switch:hover,
.topbar .lang-switch:focus-visible {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}
@media (max-width: 560px) {
  /* Keep the switcher reachable on a phone even when the social links wrap. */
  .topbar .social { flex-wrap: wrap; gap: 10px 12px; }
  .topbar .lang-switch { order: -1; }
}
@media (forced-colors: active) {
  .topbar .lang-switch { border-color: ButtonBorder; }
}
