/* ==========================================================================
   Yovan Gabric | REALTOR® — Royal LePage Pinnacle Real Estate
   Design system v2 (modern). Built to the Royal LePage Brand Book (2024).

   COMPLIANCE NOTES — do not "improve" these without checking the brand book:
   - Red is #EA002A (PMS 185 C). No other red.
   - NEVER use blue, yellow, or gold anywhere near the RLP trademarks.
   - Approved digital typefaces only: Raleway, Roboto, Arial. No serif.
   - The RLP logo is a protected mark: use the supplied file, never redraw it.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  /* Primary palette */
  --rlp-red: #EA002A;
  --rlp-red-dark: #C00023;   /* hover only — darkened brand red, not a new hue */
  --black: #000000;
  --white: #FFFFFF;

  /* Secondary palette */
  --taupe: #C4C18E;
  --stone: #D7D3C7;
  --grey-light: #E7E7E7;
  --grey-warm: #A59D95;
  --grey-dark: #4D4D4D;

  /* Derived neutrals */
  --ink: #141414;
  --ink-2: #1E1D1B;
  --ink-soft: #4D4D4D;
  --rule: #E4E1DA;
  --bg-soft: #F6F5F1;

  /* Type */
  --font-head: 'Raleway', Arial, Helvetica, sans-serif;
  --font-body: 'Roboto', Arial, Helvetica, sans-serif;

  /* Layout */
  --maxw: 1240px;
  --gutter: 24px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 2px rgba(20,20,20,.05), 0 4px 16px rgba(20,20,20,.06);
  --shadow-2: 0 2px 4px rgba(20,20,20,.06), 0 14px 34px rgba(20,20,20,.12);

  /* Decorative architectural grid (neutral, drawn in CSS — no external image) */
  --grid-lines: repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 72px),
                repeating-linear-gradient(0deg,  rgba(255,255,255,.045) 0 1px, transparent 1px 72px);
}

/* --- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* --- Typography -------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.12rem, 2vw, 1.35rem); font-weight: 700; }

p { margin-bottom: 1.1rem; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rlp-red);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px;
}
.eyebrow--light { color: var(--taupe); }

.lead { font-size: 1.2rem; line-height: 1.65; color: var(--ink-soft); }
.fineprint { font-size: 0.82rem; line-height: 1.6; color: var(--grey-warm); }

/* --- Layout ------------------------------------------------------------ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(3.75rem, 8vw, 7rem) 0; }
.section--soft { background: var(--bg-soft); }
.section--stone {
  background: linear-gradient(160deg, var(--stone), #E3E0D6 60%, var(--bg-soft));
}
.section--dark {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(234,0,42,.14), transparent 60%),
    linear-gradient(150deg, var(--ink-2), var(--black));
  color: var(--white);
  position: relative;
}
.section--dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--grid-lines);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30% 70%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 30% 70%, transparent);
}
.section--dark > .wrap { position: relative; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: rgba(255,255,255,0.82); }

.grid { display: grid; gap: 1.6rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.measure { max-width: 780px; }
.center { text-align: center; }
.center p { margin-left: auto; margin-right: auto; }
.center .eyebrow { justify-content: center; }

/* --- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease,
              background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--rlp-red); color: var(--white);
  box-shadow: 0 8px 22px rgba(234,0,42,.28);
}
.btn--primary:hover { background: var(--rlp-red-dark); box-shadow: 0 12px 28px rgba(234,0,42,.34); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--light { border-color: rgba(255,255,255,.85); color: var(--white); }
.btn--light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.1rem; }
.center .btn-row { justify-content: center; }

.textlink {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--rlp-red);
  transition: gap .18s ease, color .18s ease;
}
.textlink:hover { color: var(--ink); gap: .6rem; }

/* --- Announcement bar -------------------------------------------------- */
.announce {
  background: linear-gradient(90deg, var(--black), #221F1E);
  color: rgba(255,255,255,.9);
  font-size: 0.84rem;
  text-align: center;
  padding: 0.65rem var(--gutter);
}
.announce a { color: var(--taupe); font-weight: 500; }
.announce a:hover { color: var(--white); }

/* --- Header ------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 0.8rem var(--gutter);
  max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 0.9rem; flex-shrink: 0; }
.brand__rlp { height: 40px; width: auto; }
.brand__team { height: 40px; width: auto; border-radius: 8px; }
.brand__name {
  font-family: var(--font-head); font-weight: 800;
  font-size: 0.95rem; line-height: 1.2; white-space: nowrap;
}
.brand__name span { display: block; font-weight: 500; font-size: 0.7rem; color: var(--grey-warm); letter-spacing: 0.12em; }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav a {
  font-family: var(--font-head); font-weight: 600; font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 0.45rem 0.8rem; border-radius: 999px;
  transition: background-color .16s ease, color .16s ease;
}
.nav a:hover { color: var(--rlp-red); background: rgba(234,0,42,.08); }
.nav a:active { color: var(--white); background: var(--rlp-red); }
.nav a[aria-current="page"] { color: var(--white); background: var(--rlp-red); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  font-size: 1.5rem; line-height: 1; padding: 0.4rem 0.6rem; color: var(--ink);
  border-radius: var(--radius-sm);
  transition: color .16s ease, background-color .16s ease;
}
.nav-toggle:hover { color: var(--rlp-red); background: rgba(234,0,42,.08); }
.nav-toggle[aria-expanded="true"] { color: var(--white); background: var(--rlp-red); }

@media (max-width: 1160px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .25rem;
    background: rgba(255,255,255,.97);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--rule);
    padding: 0.9rem var(--gutter) 1.2rem;
    box-shadow: var(--shadow-2);
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding: 0.8rem 1rem; border-radius: var(--radius-sm); }
  .header-inner { position: relative; flex-wrap: wrap; }
  .header-cta { display: none; }
}
@media (max-width: 560px) {
  .brand__name { font-size: 0.8rem; }
  .brand__rlp, .brand__team { height: 32px; }
}

/* --- Hero -------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  /* Page photo goes in markup: <img class="hero__photo" src="assets/img/x.jpg" alt=""> */
  background: linear-gradient(150deg, #1B1A18, var(--black));
  color: var(--white);
  padding: clamp(4.5rem, 12vw, 9rem) 0;
}
.hero__photo {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
/* Readability overlay above the photo: dark on the left, photo shows through right */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(100deg, rgba(12,11,10,.93) 0%, rgba(12,11,10,.74) 46%, rgba(12,11,10,.34) 100%),
    radial-gradient(1200px 560px at 110% -20%, rgba(234,0,42,.18), transparent 62%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { color: var(--white); margin-bottom: 1.4rem; text-wrap: balance; }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.16rem; }
.hero__meta {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  margin-top: 2.6rem; padding: .65rem 1.2rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--taupe);
}

/* --- Cards ------------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-1);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--stone); }
.card h3 { margin-bottom: 0.7rem; }
.card__img {
  margin: -2rem -2rem 1.4rem;
  border-radius: var(--radius) var(--radius) 0 0;
  width: calc(100% + 4rem); max-width: none;
  height: 190px; object-fit: cover;
}
.card p { font-size: 0.97rem; color: var(--ink-soft); flex-grow: 1; }
.card .textlink { margin-top: 1.25rem; align-self: flex-start; }
.section--dark .card {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.12);
}
.section--dark .card p { color: rgba(255,255,255,.78); }

/* Numbered steps */
.step {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-1);
  position: relative;
}
.step::before {
  content: ""; position: absolute; left: 0; top: 1.4rem; bottom: 1.4rem;
  width: 3px; border-radius: 3px; background: var(--rlp-red);
}
.step__num {
  font-family: var(--font-head); font-weight: 800; font-size: 0.78rem;
  color: var(--rlp-red); letter-spacing: 0.12em; display: block; margin-bottom: 0.55rem;
}
.step h3 { font-size: 1.08rem; margin-bottom: 0.55rem; }
.step p { font-size: 0.95rem; color: var(--ink-soft); }
.section--soft .step, .section--stone .step { border-color: transparent; }

/* Stat */
.stat__num {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(3.2rem, 9vw, 6rem); line-height: 1;
  color: var(--rlp-red);
  letter-spacing: -0.03em;
}
.stat__label { font-size: 0.95rem; color: var(--ink-soft); margin-top: 0.5rem; }

/* Stats band (rlppinnacle-style results snapshot) */
.stats-band {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 2.5rem;
}
.stats-band > div {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  background: rgba(255,255,255,.045);
  padding: 1.6rem 1.4rem;
}

/* Checklist */
.checklist li {
  padding: 0.7rem 0 0.7rem 2rem; position: relative;
  border-bottom: 1px solid var(--rule); font-size: 0.97rem;
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 1.02rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(234,0,42,.12);
}
.checklist li::after {
  content: ""; position: absolute; left: 4.5px; top: 1.31rem;
  width: 7px; height: 4.5px;
  border-left: 2px solid var(--rlp-red);
  border-bottom: 2px solid var(--rlp-red);
  transform: rotate(-45deg);
}
.section--dark .checklist li { border-bottom-color: rgba(255,255,255,0.13); }

/* Question list */
.qlist li {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.02rem, 2.2vw, 1.3rem);
  padding: 1.1rem 0 1.1rem 1.6rem; border-bottom: 1px solid var(--rule);
  position: relative;
}
.qlist li::before {
  content: ""; position: absolute; left: 0; top: 1.55rem;
  width: 9px; height: 9px; border-radius: 50%; background: var(--rlp-red);
}
.section--dark .qlist li { border-bottom-color: rgba(255,255,255,0.13); }

/* Pill links (communities, builders) */
.pills { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.pill {
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem;
  padding: 0.62rem 1.35rem; border: 1px solid var(--rule);
  border-radius: 999px; background: var(--white); color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: transform .16s ease, border-color .16s ease, color .16s ease;
}
a.pill:hover { transform: translateY(-2px); border-color: var(--rlp-red); color: var(--rlp-red); }

/* Split layout */
.split { display: grid; gap: 3rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split__img { position: relative; }
.split__img img {
  border-radius: var(--radius); width: 100%;
  box-shadow: var(--shadow-2);
}
.split__img::after {
  content: ""; position: absolute; inset: auto -14px -14px auto;
  width: 46%; height: 46%; z-index: -1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--stone), var(--taupe));
}

/* Quote */
.quote {
  border-left: 3px solid var(--rlp-red); padding: .35rem 0 .35rem 1.5rem;
  font-family: var(--font-head); font-weight: 600;
  font-size: 1.15rem; line-height: 1.5;
}
.quote cite { display: block; margin-top: 0.9rem; font-size: 0.85rem; font-style: normal; font-weight: 500; color: var(--grey-warm); }

/* Disclaimer band */
.disclaimer {
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-left: 3px solid var(--grey-warm);
  padding: 1.25rem 1.5rem; font-size: 0.85rem; color: var(--grey-dark);
  border-radius: var(--radius-sm); margin-top: 2rem;
}

/* --- Forms ------------------------------------------------------------- */
.form { display: grid; gap: 1.1rem; max-width: 640px; }
.field label {
  display: block; font-family: var(--font-head); font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.07em; text-transform: uppercase;
  margin-bottom: 0.45rem;
}
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  padding: 0.85rem 1rem; border: 1px solid var(--rule);
  border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(20,20,20,.04);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--rlp-red);
  box-shadow: 0 0 0 3px rgba(234,0,42,.14);
}
.field textarea { min-height: 140px; resize: vertical; }
.field--row { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .field--row { grid-template-columns: 1fr 1fr; } }
.consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.85rem; color: var(--ink-soft); }
.consent input { width: auto; margin-top: 0.25rem; flex-shrink: 0; accent-color: var(--rlp-red); }

.contact-details li { padding: 0.5rem 0; font-size: 1rem; }
.contact-details a:hover { color: var(--rlp-red); }

/* --- Footer ------------------------------------------------------------ */
.site-footer {
  background:
    radial-gradient(900px 380px at 10% 0%, rgba(234,0,42,.10), transparent 60%),
    linear-gradient(160deg, var(--ink-2), var(--black));
  color: rgba(255,255,255,0.75);
  padding: 4.5rem 0 2rem; font-size: 0.9rem;
}
.site-footer h4 {
  color: var(--white); font-size: 0.76rem; letter-spacing: 0.16em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-brand { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.footer-brand img {
  height: 42px; width: auto; background: var(--white);
  padding: 5px; border-radius: 8px;
}
.site-footer nav a { display: block; padding: 0.32rem 0; color: rgba(255,255,255,0.72); transition: color .15s ease, padding-left .15s ease; }
.site-footer nav a:hover { color: var(--white); padding-left: .3rem; }
.site-footer a:hover { color: var(--white); }
.footer-legal {
  margin-top: 3rem; padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.14);
  font-size: 0.76rem; line-height: 1.65; color: rgba(255,255,255,0.55);
}
.footer-legal p { max-width: none; margin-bottom: 0.8rem; }

/* --- Reveal-on-scroll (progressive enhancement) ------------------------ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* --- Accessibility ----------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--rlp-red); color: var(--white); padding: 0.75rem 1.25rem;
  font-family: var(--font-head); font-weight: 700;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--rlp-red); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
