/*
 * Shared base styles for Alex's realty network.
 * Each site overrides brand colors via CSS variables in its own <style> block:
 *   --brand, --brand-dark, --accent, --ink, --bg
 * Keep this file generic. Site-specific looks live in each index.html.
 */

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Never allow horizontal scroll / content bleeding past the screen edge */
html, body { max-width: 100%; overflow-x: hidden; }

:root {
  --brand: #1f6feb;
  --brand-dark: #14488f;
  --accent: #16a34a;
  --ink: #111827;
  --muted: #6b7280;
  --bg: #ffffff;
  --line: #e5e7eb;
  --radius: 12px;
  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Avoid leaving a single word alone on the last line of paragraphs/headings.
   text-wrap: pretty handles this in modern browsers automatically. */
p, h1, h2, h3, li, .sub, .lead-sub, .who, .proof-caption {
  text-wrap: pretty;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px; gap: 16px;
}
.site-logo img { max-height: 56px; width: auto; }
.site-logo .text-logo {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; color: var(--ink);
}
.header-phone {
  font-weight: 800; font-size: 1.15rem; color: var(--brand-dark);
  text-decoration: none; white-space: nowrap;
}
.header-phone small { display: block; font-size: 0.7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

/* Hero */
.hero { padding: 64px 0; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start;
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.1; letter-spacing: -1px; }
.hero h1 .hl { color: var(--brand); }
.hero .sub { font-size: 1.2rem; color: var(--muted); margin-top: 18px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-top: 26px; }
.trust-row li { list-style: none; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.trust-row li::before { content: "\2713"; color: var(--accent); font-weight: 900; }

/* Form card */
.lead-card {
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}
.lead-card h2 { font-size: 1.4rem; margin-bottom: 4px; }
.lead-card p.small { color: #cbd5e1; font-size: 0.92rem; margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid #334155; border-radius: 8px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-submit {
  width: 100%; padding: 16px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 1.1rem; font-weight: 800;
  transition: background 0.15s;
}
.btn-submit:hover { background: var(--brand-dark); }
.btn-submit:disabled { opacity: 0.7; cursor: default; }
.form-error { display: none; color: #fecaca; font-size: 0.9rem; margin-top: 10px; }
.disclaimer { color: #94a3b8; font-size: 0.78rem; margin-top: 12px; text-align: center; }

.form-thanks {
  display: none; background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 40px 28px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}
.form-thanks h2 { font-size: 1.6rem; margin-bottom: 10px; color: var(--accent); }
.form-thanks p { color: #cbd5e1; }

/* Sections */
.section { padding: 64px 0; }
.section.alt { background: #f8fafc; }
.section h2.title { font-size: clamp(1.6rem, 3vw, 2.3rem); text-align: center; letter-spacing: -0.5px; }
.section .lead-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 12px auto 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card .ic { font-size: 1.8rem; }
.card h3 { margin: 12px 0 8px; font-size: 1.15rem; }
.card p { color: var(--muted); font-size: 0.96rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.step { text-align: center; }
.step .num {
  width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; margin: 0 auto 14px;
}

.cta-band { background: var(--brand); color: #fff; text-align: center; padding: 60px 0; }
.cta-band h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); max-width: 760px; margin: 0 auto; line-height: 1.15; }
.cta-band .cta-sub { max-width: 620px; margin: 16px auto 0; font-size: 1.12rem; opacity: 0.92; }
.cta-band .cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; margin-top: 26px; }
.cta-band a.cta-btn {
  display: inline-block; background: #fff; color: var(--brand-dark);
  padding: 16px 38px; border-radius: 8px; font-weight: 800; text-decoration: none; font-size: 1.15rem;
  box-shadow: 0 8px 22px rgba(0,0,0,0.18); transition: transform 0.12s;
}
.cta-band a.cta-btn:hover { transform: translateY(-2px); }
.cta-band a.cta-phone { color: #fff; font-weight: 800; font-size: 1.15rem; text-decoration: none; opacity: 0.95; }
.cta-band a.cta-phone:hover { text-decoration: underline; }
.cta-band .cta-reassure { margin-top: 18px; font-size: 0.92rem; opacity: 0.85; }

/* Shared seller sections (situations / compare / faq) */
.seller-situations { max-width: 880px; margin: 28px auto 0; columns: 2; column-gap: 36px; }
.seller-situations li { list-style: none; padding: 9px 0 9px 30px; position: relative; break-inside: avoid; color: #374151; }
.seller-situations li::before { content: "\2192"; position: absolute; left: 0; color: var(--brand); font-weight: 900; }
.seller-compare-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; margin-top: 36px; font-size: 0.98rem; }
.compare th, .compare td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.compare thead th { background: var(--ink); color: #fff; }
.compare thead th:last-child { background: var(--brand); }
.compare td:first-child { font-weight: 700; }
.compare td:last-child { color: var(--brand-dark); font-weight: 700; }
.seller-faq { max-width: 820px; margin: 36px auto 0; }
.seller-faq details { border: 1px solid var(--line); border-radius: 10px; padding: 4px 18px; margin-bottom: 12px; background: var(--bg); }
.seller-faq summary { font-weight: 700; padding: 14px 0; cursor: pointer; list-style: none; }
.seller-faq summary::-webkit-details-marker { display: none; }
.seller-faq summary::after { content: "+"; float: right; color: var(--brand); font-weight: 900; }
.seller-faq details[open] summary::after { content: "\2212"; }
.seller-faq details p { color: var(--muted); padding-bottom: 16px; }
@media (max-width: 600px) { .seller-situations { columns: 1; } }

/* Shared proof module (testimonials / recent sales / video testimonials) */
.proof-quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.proof-quote { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.proof-quote blockquote { margin: 0; font-style: italic; color: #374151; quotes: none; }
.proof-quote blockquote::before { content: "\201C"; color: var(--brand); font-size: 1.6rem; font-weight: 800; margin-right: 2px; }
.proof-quote figcaption { margin-top: 14px; font-weight: 800; color: var(--brand-dark); }

.proof-sales { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.proof-sale { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.proof-sale-img { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.proof-sale-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proof-sale-tag { position: absolute; top: 10px; left: 10px; font-size: 0.72rem; font-weight: 900; letter-spacing: 1px; color: #fff; background: var(--brand); border-radius: 5px; padding: 4px 11px; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.proof-sale figcaption { padding: 14px 16px; }
.proof-sale-addr { font-weight: 800; color: var(--ink); }
.proof-sale-city { color: var(--muted); font-size: 0.9rem; }

.proof-videos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.proof-video { position: relative; border: 0; padding: 0; cursor: pointer; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16/10; }
.proof-video img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; transition: opacity 0.15s; }
.proof-video:hover img { opacity: 1; }
.proof-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,0.55); }
.proof-play::after { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%); border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.proof-video:hover .proof-play { background: var(--brand); }
.proof-video-label { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: #fff; font-size: 0.8rem; font-weight: 700; padding: 18px 10px 8px; text-align: left; }

@media (max-width: 860px) {
  .proof-quotes { grid-template-columns: 1fr; }
  .proof-sales, .proof-videos { grid-template-columns: repeat(2, 1fr); }
}

/* Footer */
.site-footer { background: var(--ink); color: #94a3b8; padding: 48px 0 28px; font-size: 0.9rem; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 1.4fr; gap: 40px; align-items: start; }
.foot-logo { max-height: 48px; width: auto; margin-bottom: 14px; background: #fff; padding: 6px 10px; border-radius: 8px; }
.foot-about p { color: #94a3b8; margin-bottom: 12px; line-height: 1.6; }
.foot-contact a { font-weight: 800; font-size: 1.05rem; }
.foot-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1px; }
.foot-col a { display: block; margin-bottom: 10px; }
.foot-areas p { color: #94a3b8; line-height: 1.7; font-size: 0.86rem; }
.foot-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.82rem; color: #6b7280; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } .foot-legal { flex-direction: column; } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .cards, .steps { grid-template-columns: 1fr; }
  /* On mobile the headline + subtitle always come first; any form column drops below */
  .hero-grid .form-col { order: 2; }
}

/* Phone-size refinements (applies to every site) */
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  /* Header: shrink logo + phone so they never overflow or clip */
  .site-header .wrap { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .site-logo img { max-height: 42px; }
  .site-logo .text-logo { font-size: 0.95rem; line-height: 1.1; }
  .header-phone { font-size: 0.95rem; }
  .header-phone small { font-size: 0.6rem; }
  /* Headings never overflow the edge */
  h1, .hero h1, .hero-center h1 { font-size: 1.7rem; line-height: 1.15; word-break: normal; overflow-wrap: break-word; }
  .section { padding: 44px 0; }
  .hero { padding: 40px 0; }
  /* Tables scroll horizontally instead of squishing */
  .compare { display: block; overflow-x: auto; white-space: nowrap; }
  /* Form cards full width, comfortable padding */
  .lead-card, .form-panel { padding: 22px; }
  /* Two-up field rows stack on phones so inputs never overflow */
  .field-row { grid-template-columns: 1fr; gap: 0; }
  /* About-Alex headshot: small, centered, ABOVE the text (never a huge block) */
  .about-grid { grid-template-columns: 1fr !important; gap: 22px !important; text-align: center; }
  .about-grid img { width: 160px !important; height: auto; margin: 0 auto; order: -1; }
  .about-grid h2.title { text-align: center !important; }
  .about-body { text-align: left; }
}
