/* =====================================================================
   Frank Chen — Vancouver REALTOR®  |  shared design system
   Rebuild of frankchenrealtor.com (Sitejet) as static HTML.
   Type scale + hierarchy follow the Preview Design Guide.
   Colours match the live brand tan, deepened where text sits on them
   so contrast meets WCAG 2.2 AA.
   ===================================================================== */

/* ---------- design tokens ---------- */
:root {
  /* brand */
  --tan-light: #b99a6a;   /* signature light tan — decorative fills only   */
  --brand:     #8d6d38;   /* deep bronze-gold — text surfaces (AA w/ #fff) */
  --brand-dk:  #755a2c;   /* hover / active                                */
  --ink:       #16181f;   /* headings                                      */
  --text:      #4c5350;   /* body copy (AA on light)                       */
  --muted:     #5c6360;   /* meta / captions (AA on light)                 */

  /* surfaces */
  --cream:     #fbf9f8;   /* page background          */
  --paper:     #ffffff;
  --sand:      #f1ede7;   /* alt light section        */
  --charcoal:  #17181a;   /* near-black listings band */
  --cta:       #3f3c38;   /* CTA band                 */
  --footer:    #6d6353;   /* footer taupe (AA w/ #fff)*/
  --line:      #e4ddd2;   /* hairlines                */

  /* type */
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans:  "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1200px;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;          /* 18px body */
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dk); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ---------- type scale (design guide) ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.18;
  margin: 0 0 .5em;
  text-wrap: balance;           /* no orphans in headings */
}
h1 { font-size: 2.5rem; }        /* 40 — standard page title */
h2 { font-size: 2.25rem; }       /* 36 */
h3 { font-size: 1.5rem; }        /* 24 */
h4 { font-size: 1.125rem; }      /* 18 */
h5 { font-size: 1rem; }          /* 16 */
p  { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.eyebrow {                        /* small serif italic label above a heading */
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--muted);
  margin: 0 0 .35em;
}
.lead { font-size: 1.25rem; color: var(--muted); }

@media (max-width: 700px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
}

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.section { padding: 80px 0; }
.section--tight { padding: 56px 0; }
.section--sand { background: var(--sand); }
.section--paper { background: var(--paper); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* rule used under eyebrows / titles */
.rule { width: 56px; height: 2px; background: var(--tan-light); border: 0; margin: 0 0 20px; }
.center .rule { margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 15px 26px;
  border-radius: 2px;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--brand-dk); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn .arrow { font-size: 1.05em; line-height: 0; }
.btn--ghost {
  background: transparent;
  border-color: rgba(255,255,255,.7);
  color: #fff;
}
.btn--ghost:hover { background: rgba(255,255,255,.12); }

/* visible keyboard focus everywhere (WCAG 2.4.7) */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 3px solid #2f6fbf;
  outline-offset: 2px;
}

/* skip link */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: #fff; color: var(--brand-dk); padding: 10px 16px; border-radius: 0 0 4px 0;
  font-weight: 600;
}
.skip:focus { left: 0; }

/* =====================================================================
   HEADER / NAV
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--brand);
  color: #fff;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 24px;
  min-height: 80px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: .5px;
}
.brand span { opacity: .92; }

.primary-nav { margin-inline: auto; }
.primary-nav > ul {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.primary-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: 2px;
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { background: rgba(0,0,0,.20); }

/* dropdowns */
.has-sub { position: relative; }
.has-sub > a::after {
  content: "";
  display: inline-block;
  width: .42em; height: .42em;
  margin-left: .5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: .8;
}
.submenu {
  position: absolute; left: 0; top: 100%;
  min-width: 232px;
  list-style: none; margin: 0; padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0,0,0,.16);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu,
.has-sub > .submenu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a {
  color: var(--ink);
  font-size: .9375rem;
  padding: 10px 12px;
  border-radius: 3px;
}
.submenu a:hover { background: var(--sand); color: var(--brand-dk); }

/* header phone */
.header-phone {
  color: #fff; text-decoration: none; font-weight: 600; font-size: 1rem;
  white-space: nowrap;
}
.header-phone:hover { text-decoration: underline; }

/* mobile toggle */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent; border: 1px solid rgba(255,255,255,.6);
  color: #fff; border-radius: 3px; padding: 8px 10px; cursor: pointer;
}
.nav-toggle svg { display: block; }

@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }
  .header-phone.desktop { display: none; }
  .primary-nav {
    position: fixed; inset: 80px 0 auto 0;
    margin: 0; background: var(--brand);
    max-height: 0; overflow: hidden;
    transition: max-height .25s ease;
  }
  .primary-nav.open { max-height: calc(100vh - 80px); overflow-y: auto; }
  .primary-nav > ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; }
  .primary-nav a { padding: 14px 10px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .has-sub > a::after { float: right; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: transparent; padding: 0 0 6px 14px;
    max-height: 0; overflow: hidden; transition: max-height .2s ease;
  }
  .has-sub > .submenu.open { max-height: 500px; }
  .submenu a { color: rgba(255,255,255,.85); border-bottom: 0; }
  .submenu a:hover { background: rgba(255,255,255,.12); color: #fff; }
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative;
  /* fill the viewport below the 80px sticky header on landing */
  min-height: 640px;
  min-height: calc(100vh - 80px);
  min-height: calc(100svh - 80px);
  display: flex; align-items: center;
  background: #232a33;            /* dark fallback under the photo (keeps white text legible) */
  overflow: hidden;
  color: #fff;
}
.hero__bg {
  position: absolute; inset: 0;
  background-image: image-set(
      url("../images/hero.webp") 1x,
      url("../images/hero@2x.webp") 2x);
  background-size: cover;
  background-position: center 30%;
}
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
  z-index: 1;
}
.hero__scrim {                     /* darken for text contrast (WCAG AA over photo) */
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, rgba(16,22,30,.84) 0%, rgba(16,22,30,.62) 44%, rgba(16,22,30,.14) 80%);
}
.hero__portrait {
  position: absolute; bottom: 0;
  right: max(0px, calc((100vw - var(--wrap)) / 2));  /* align to the content column edge */
  height: 86%; width: auto;
  z-index: 3;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.4));
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 4; padding-block: 64px; }
.hero__inner { max-width: 640px; }
.hero h1 { font-size: 3.5rem; color: #fff; margin-bottom: .2em; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
@media (max-width: 700px) { .hero h1 { font-size: 2.375rem; } }
.hero__sub { font-size: 1.25rem; color: #fff; margin: 0 0 1.25rem; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.hero__awards {
  list-style: none; margin: 0 0 1.75rem; padding: 0;
  font-size: 1rem; color: #fff;
}
.hero__awards li { position: relative; padding-left: 20px; margin-bottom: 6px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.hero__awards li::before { content: "•"; position: absolute; left: 4px; color: var(--tan-light); }

/* scroll-down cue */
.hero__scroll {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 4;
  display: inline-flex; flex-direction: column; align-items: center; gap: 7px;
  color: #fff; text-decoration: none;
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  opacity: .88; text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.hero__scroll:hover { opacity: 1; }
.hero__scroll svg { width: 26px; height: 26px; animation: scroll-bob 1.8s ease-in-out infinite; }
@keyframes scroll-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

@media (max-width: 860px) {
  .hero { min-height: calc(100svh - 80px); }
  .hero__portrait { opacity: .3; height: 78%; right: 0; }
  .hero__scrim { background: rgba(16,22,30,.6); }
  .hero__inner { max-width: none; }
  .hero__scroll { display: none; }   /* space is tighter on phones */
}
@media (prefers-reduced-motion: reduce) {
  .hero__scroll svg { animation: none; }
}

/* =====================================================================
   FEATURE / EXPERTISE
   ===================================================================== */
.split { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.split__aside .eyebrow { font-size: 1.75rem; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 24px; } }

.feature-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 40px 48px; margin-top: 32px;
}
@media (max-width: 720px) { .feature-grid { grid-template-columns: 1fr; gap: 28px; } }
.feature h4 { color: var(--brand-dk); margin-bottom: .5em; }
.feature .rule { margin-bottom: 14px; }
.feature p { color: var(--text); }

/* =====================================================================
   LISTING SECTIONS (webcard iframe)
   ===================================================================== */
.listings { background: var(--charcoal); color: #fff; }
.listings h2 { color: #fff; }
.listings .eyebrow { color: #cbb48c; }
.listing-block { padding: 64px 0; }
.listing-block + .listing-block { border-top: 1px solid rgba(255,255,255,.08); }
.listing-frame {
  width: 100%; min-height: 420px; border: 0;
  background: #1f2022; border-radius: 6px; margin: 28px 0;
}
.listing-note {
  color: rgba(255,255,255,.66); font-size: .9375rem; margin-top: 12px;
}

/* =====================================================================
   BIO BLOCK
   ===================================================================== */
.bio { position: relative; background: var(--paper); overflow: hidden; }
.bio__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.bio__body ol { padding-left: 1.2em; margin: 0 0 1rem; }
.bio__body ol li { margin-bottom: 6px; }
.bio__awards { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.bio__awards li { position: relative; padding-left: 18px; margin-bottom: 4px; }
.bio__awards li::before { content: "▸"; position: absolute; left: 0; color: var(--tan-light); }
.bio__media { position: relative; }
.bio__media img { position: relative; z-index: 2; border-radius: 4px; width: 100%; }
.bio__media::before,
.bio__media::after {
  content: ""; position: absolute; width: 46%; height: 46%;
  background: var(--tan-light); z-index: 1;
}
.bio__media::before { top: -22px; right: -22px; }
.bio__media::after  { bottom: -22px; left: -22px; opacity: .5; }
.contact-info { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.contact-info p { margin-bottom: 4px; }
.contact-info a { color: var(--brand-dk); font-weight: 600; }
@media (max-width: 860px) {
  .bio__grid { grid-template-columns: 1fr; gap: 40px; }
  .bio__media { max-width: 420px; margin-inline: auto; }
}

/* =====================================================================
   SERVICE PAGES (buyer / seller)
   ===================================================================== */
.svc-hero { background: var(--brand); color: #fff; }   /* deep bronze so white text meets AA */
.svc-hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.svc-hero h1 { color: #fff; }
.svc-list { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.svc-list li { position: relative; padding-left: 26px; margin-bottom: 14px; color: #fff; }
.svc-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 9px; height: 9px; background: #fff; border-radius: 50%;
}
.svc-list strong { color: #fff; }
.svc-hero__media img { border-radius: 4px; width: 100%; box-shadow: 0 20px 44px rgba(0,0,0,.22); }
@media (max-width: 820px) { .svc-hero__grid { grid-template-columns: 1fr; gap: 28px; } }

.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; margin-top: 40px; }
.why__col { text-align: center; }
.why__icon { width: 46px; height: 46px; margin: 0 auto 20px; color: var(--ink); }
.why__icon svg { width: 100%; height: 100%; }
.why__col h3 { font-size: 1.25rem; }
.why__col p { color: var(--text); }
@media (max-width: 820px) { .why { grid-template-columns: 1fr; gap: 34px; } }

/* =====================================================================
   TESTIMONIALS
   ===================================================================== */
.testimonials { background: var(--sand); }
.tcard {
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  padding: 40px; max-width: 900px; margin: 28px auto 0;
}
.tcard p { color: var(--text); }
.tcard__author { font-weight: 700; color: var(--ink); font-family: var(--serif); }
.tcarousel { position: relative; }
.tcarousel__track > .tslide { display: none; }
.tcarousel__track > .tslide.active { display: block; }
.tcarousel__nav { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.tdot {
  width: 11px; height: 11px; border-radius: 50%; border: 0; padding: 0;
  background: #cdc4b6; cursor: pointer;
}
.tdot[aria-selected="true"] { background: var(--brand); }
.tarrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 1.2rem;
}
.tarrow:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.tarrow--prev { left: -6px; }
.tarrow--next { right: -6px; }
@media (max-width: 980px) { .tarrow { display: none; } }

/* =====================================================================
   CTA BAND
   ===================================================================== */
.cta-band {
  position: relative; color: #fff; text-align: center;
  background: var(--cta);
}
.cta-band__bg {
  position: absolute; inset: 0;
  background: url("../images/cta-house.webp") center/cover no-repeat;
  background-attachment: fixed;      /* parallax: image holds still as the band scrolls */
  opacity: .28;
}
.cta-band .wrap { position: relative; z-index: 2; padding-block: 84px; }
.cta-band h2 { color: #fff; font-style: italic; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 640px; margin-inline: auto; }
.cta-band .btn { margin-top: 26px; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { background: var(--footer); color: #fff; }
.site-footer .wrap { padding-block: 56px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 40px; align-items: start; }
.site-footer h4, .site-footer h5 { color: #fff; }
.site-footer p { color: rgba(255,255,255,.9); margin-bottom: 2px; }
.site-footer a { color: #fff; }
.footer-logo img { width: 150px; background: #fff; padding: 12px 16px; border-radius: 3px; }
.footer-rule { border: 0; border-top: 1px solid rgba(255,255,255,.28); margin: 40px 0 18px; }
.footer-meta { font-size: .875rem; color: rgba(255,255,255,.78); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

/* larger portrait on the About page */
.bio--about .bio__grid { grid-template-columns: 1fr 1.02fr; gap: 64px; }
.bio--about .bio__media { max-width: 560px; margin-left: auto; }
@media (max-width: 860px) {
  .bio--about .bio__grid { grid-template-columns: 1fr; }
  .bio--about .bio__media { margin-inline: auto; }
}

/* respect reduced-motion: no autoplay video, no parallax */
@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
  .cta-band__bg { background-attachment: scroll; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   CONTACT PAGE
   ===================================================================== */
.contact-intro { text-align: center; max-width: 720px; margin-inline: auto; }
.contact-intro h1 { margin-bottom: .35em; }
.contact-intro .contact-lines { font-size: 1.25rem; color: var(--muted); }
.contact-intro .contact-lines a { color: var(--brand-dk); font-weight: 600; }

.contact-form {
  max-width: 820px; margin: 40px auto 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.contact-form .full { grid-column: 1 / -1; }
.contact-form label { display: block; font-weight: 600; font-size: .9375rem; color: var(--ink); margin-bottom: 6px; }
.contact-form input,
.contact-form textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper);
  padding: 13px 15px; border: 1px solid #cbc4b8; border-radius: 3px;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #8b8578; }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form .btn { justify-self: start; }
.form-status { margin: 6px 0 0; font-weight: 600; min-height: 1.2em; }
.form-status.ok  { color: #1c7a43; }
.form-status.err { color: #b3261e; }
@media (max-width: 640px) { .contact-form { grid-template-columns: 1fr; } }

/* utility */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
