/* ==========================================================================
   D1 Texas Realty — shared stylesheet
   ========================================================================== */

:root {
  --navy: #0e2a52;
  --navy-deep: #081a35;
  --red: #d32029;
  --red-bright: #e8352b;
  --cream: #f8f5ee;
  --sand: #f0ebe0;
  --white: #ffffff;
  --ink: #1f2937;
  --gray: #6b7280;
  --line: #e5e0d3;

  --serif: "Playfair Display", Georgia, serif;
  --sans: "Jost", Arial, sans-serif;

  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 112.5%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy);
  margin: 0 0 .5em;
  line-height: 1.15;
  font-weight: 600;
}

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

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  color: var(--red);
  font-weight: 500;
  display: block;
  margin-bottom: .9em;
}

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

section { padding: 90px 0; }
@media (max-width: 700px) {
  section { padding: 56px 0; }
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .8rem;
  font-weight: 500;
  padding: 16px 34px;
  border: 1px solid var(--navy);
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  transition: all .25s ease;
}
.btn:hover { background: var(--navy); color: var(--white); }

.btn-solid {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-solid:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--white); }

.btn-red {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-red:hover { background: #ad1a21; border-color: #ad1a21; }

.btn-light {
  border-color: rgba(255,255,255,.75);
  color: var(--white);
}
.btn-light:hover { background: var(--white); color: var(--navy); }

/* ---------------------------------- Header ---------------------------------- */

.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 22px 0;
  color: var(--white);
}
.site-header.solid {
  position: sticky;
  background: var(--white);
  box-shadow: 0 1px 0 var(--line);
  color: var(--navy);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 54px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.28)); }
.site-header.solid .brand img { filter: none; }

.brand-text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: inherit;
}

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0; padding: 0;
}
.main-nav a {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, opacity .2s ease;
}
.main-nav a:hover { border-color: currentColor; }
.main-nav a.current { border-color: currentColor; }

.header-phone {
  font-size: .82rem;
  letter-spacing: .06em;
  font-weight: 500;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: inherit;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
}

@media (max-width: 920px) {
  .main-nav ul { display: none; }
  .header-phone { display: none; }
  .nav-toggle { display: block; }
  .main-nav.open ul {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 78%;
    max-width: 340px;
    background: var(--navy);
    padding: 100px 40px;
    gap: 26px;
    z-index: 60;
  }
  .main-nav.open ul a { color: var(--white); font-size: 1rem; }
}

/* ---------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  background: var(--navy) center/cover no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,26,53,.45) 0%, rgba(8,26,53,.35) 45%, rgba(8,26,53,.82) 100%);
}

.hero-content { position: relative; z-index: 2; padding: 0 24px; max-width: 700px; }
.hero .eyebrow { color: #f2c94c; text-align: center; }
.hero h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
  margin-bottom: .4em;
  line-height: 1.2;
}
.hero p.lede {
  font-size: 1.15rem;
  color: rgba(255,255,255,.88);
  max-width: 560px;
  margin: 0 auto 2em;
}
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  z-index: 2;
}

/* smaller page hero for interior pages */
.page-hero {
  min-height: 40vh;
  padding-top: 40px;
}
.page-hero h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }

/* ---------------------------------- Value props ---------------------------------- */

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.value-card {
  background: var(--white);
  padding: 40px 30px;
  text-align: center;
}
.value-card .icon {
  width: 46px; height: 46px;
  margin: 0 auto 18px;
  color: var(--red);
}
.value-card h3 { font-size: 1.05rem; margin-bottom: .5em; }
.value-card p { color: var(--gray); font-size: .92rem; margin: 0; }

@media (max-width: 860px) {
  .value-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .value-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------- Section headers ---------------------------------- */

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
}
.section-head p { color: var(--gray); }
.section-head.left { text-align: left; margin-left: 0; }

.bg-cream { background: var(--cream); }
.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy h2, .bg-navy h3 { color: var(--white); }
.bg-navy p { color: rgba(255,255,255,.8); }

/* ---------------------------------- Listings ---------------------------------- */

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 960px) { .listing-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .listing-grid { grid-template-columns: 1fr; } }

.listing-card {
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
}
.listing-card:hover { box-shadow: 0 18px 40px rgba(14,42,82,.12); transform: translateY(-3px); }

.listing-photo {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.listing-photo svg, .listing-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.listing-photo.cta-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 30px;
  background: var(--cream);
  color: var(--navy);
}
.listing-photo.cta-tile svg { width: 40px; height: 40px; }

.listing-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--navy);
  color: var(--white);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 12px;
  z-index: 2;
}
.listing-tag.sample { background: var(--red); }

.listing-body { padding: 22px 24px 26px; }
.listing-price {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 6px;
}
.listing-addr { font-size: .92rem; color: var(--ink); margin-bottom: 4px; }
.listing-city { font-size: .82rem; color: var(--gray); margin-bottom: 14px; }
.listing-specs {
  display: flex;
  gap: 16px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.listing-note {
  text-align: center;
  color: var(--gray);
  font-size: .88rem;
  margin: -30px auto 50px;
  max-width: 640px;
}

/* ---------------------------------- About / Meet Juan ---------------------------------- */

.agent-split {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 64px;
  align-items: center;
}
.agent-split img {
  width: 100%;
  border-radius: 4px;
  aspect-ratio: 4/5;
  object-fit: cover;
}
.agent-split.reverse { grid-template-columns: 1.2fr .8fr; }
.agent-split.reverse img { order: 2; aspect-ratio: 5/4; }
.agent-split.reverse > div { order: 1; }
.agent-split h2 { margin-bottom: .3em; }
.agent-title {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  color: var(--red);
  font-weight: 500;
  margin-bottom: 1.3em;
}
.agent-split p { color: var(--gray); margin-bottom: 1.1em; }

@media (max-width: 860px) {
  .agent-split { grid-template-columns: 1fr; gap: 34px; }
  .agent-split img { max-width: 340px; margin: 0 auto; }
}

/* ---------------------------------- Communities ---------------------------------- */

.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 960px) { .community-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .community-grid { grid-template-columns: 1fr; } }

.community-card {
  position: relative;
  aspect-ratio: 5/4;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: var(--white);
}
.community-card svg, .community-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.community-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,26,53,0) 40%, rgba(8,26,53,.82) 100%);
}
.community-card .label {
  position: relative;
  z-index: 2;
  padding: 22px;
}
.community-card .label h3 { color: var(--white); margin-bottom: .15em; font-size: 1.15rem; }
.community-card .label span { font-size: .78rem; letter-spacing: .08em; color: rgba(255,255,255,.8); text-transform: uppercase; }

/* Simplified 2-up layout: big feature blocks for RGV / South Padre Island */
.community-grid.simple {
  grid-template-columns: 1fr 1fr;
}
.community-grid.simple .community-card { aspect-ratio: 4/5; }
.community-grid.simple .community-card .label { padding: 32px; }
.community-grid.simple .community-card .label h3 { font-size: 1.6rem; }
.community-grid.simple .community-card .label p { color: rgba(255,255,255,.85); font-size: .92rem; max-width: 34ch; margin: 10px 0 0; }
@media (max-width: 760px) {
  .community-grid.simple { grid-template-columns: 1fr; }
  .community-grid.simple .community-card { aspect-ratio: 5/4; }
}

/* ---------------------------------- Testimonials ---------------------------------- */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 860px) { .testimonial-grid { grid-template-columns: 1fr; } }

.testimonial-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 860px;
  margin: 0 auto;
}
@media (max-width: 700px) { .testimonial-grid.cols-2 { grid-template-columns: 1fr; } }

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 34px 30px;
}
.testimonial-card .stars { color: #f2c94c; letter-spacing: .12em; margin-bottom: 16px; font-size: .95rem; }
.testimonial-card .source { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.testimonial-card .source svg { width: 18px; height: 18px; flex-shrink: 0; }
.testimonial-card p { color: var(--ink); font-style: italic; margin-bottom: 18px; }
.testimonial-card .who { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gray); }

/* ---------------------------------- Social / Instagram ---------------------------------- */

.social-strip { text-align: center; }
.social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 40px;
}
@media (max-width: 700px) { .social-grid { grid-template-columns: repeat(2, 1fr); } }

.social-tile {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}
.social-tile svg { width: 100%; height: 100%; }

.social-icons { display: flex; gap: 18px; justify-content: center; margin-top: 8px; }
.social-icons a {
  width: 42px; height: 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.social-icons a:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.social-icons svg { width: 18px; height: 18px; }

/* ---------------------------------- Contact / Lead form ---------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-info h2 { margin-bottom: .4em; }
.contact-info p { color: var(--gray); margin-bottom: 1.6em; }
.contact-line { margin-bottom: 18px; }
.contact-line .label {
  display: block;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--red);
  margin-bottom: 4px;
}
.contact-line a, .contact-line span { font-size: 1.02rem; }

form.lead-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
form.lead-form .full { grid-column: 1 / -1; }
form.lead-form label {
  display: block;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gray);
  margin-bottom: 7px;
}
form.lead-form input,
form.lead-form select,
form.lead-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--cream);
  padding: 13px 14px;
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--ink);
}
form.lead-form textarea { resize: vertical; min-height: 110px; }
form.lead-form input:focus,
form.lead-form select:focus,
form.lead-form textarea:focus {
  outline: none;
  border-color: var(--navy);
}
form.lead-form .consent { font-size: .76rem; color: var(--gray); line-height: 1.5; }
.form-status { font-size: .88rem; margin-top: 12px; display: none; }
.form-status.ok { color: #1e7a34; display: block; }
.form-status.err { color: var(--red); display: block; }

@media (max-width: 600px) {
  form.lead-form { grid-template-columns: 1fr; }
}

/* ---------------------------------- CTA band ---------------------------------- */

.cta-band {
  text-align: center;
  color: var(--white);
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,.82); max-width: 560px; margin: 0 auto 2em; }

/* ---------------------------------- Footer ---------------------------------- */

.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.75);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand img { height: 50px; margin-bottom: 14px; }
.footer-brand p { font-size: .88rem; color: rgba(255,255,255,.6); max-width: 260px; }
.site-footer h4 {
  color: var(--white);
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .78rem;
  margin-bottom: 18px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 11px; font-size: .9rem; }
.site-footer a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  font-size: .78rem;
  color: rgba(255,255,255,.5);
}
.footer-bottom .social-icons a { width: 36px; height: 36px; color: rgba(255,255,255,.75); }
.footer-bottom .social-icons svg { width: 15px; height: 15px; }

.trec-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .76rem;
  color: rgba(255,255,255,.55);
}
.trec-links a { text-decoration: underline; text-underline-offset: 2px; }
.trec-links a:hover { color: var(--white); }
.trec-links .divider { color: rgba(255,255,255,.3); }
