/* ==========================================================================
   Christine Chong — Vancouver Realtor
   Shared design system (static rebuild of christinechong.ca)
   Palette + type derived from the live Sitejet site, adjusted to meet
   WCAG 2.2 AA and the studio typographic scale.
   ========================================================================== */

:root {
  /* Brand palette (AA-tuned) */
  --gold:        #b87200;  /* heading accent — 3.85:1 on white (large text) */
  --gold-bright: #e8a200;  /* decorative only (rules/icons), never text on white */
  --pink:        #d81b60;  /* primary button — 4.95:1 with white text */
  --pink-dark:   #b01550;
  --wine:        #931745;  /* footer + secondary — 8.5:1 with white text */
  --wine-dark:   #7a1039;
  --ink:         #2b2b2b;  /* strong text / h4-h5 */
  --body:        #565656;  /* body copy — 7.3:1 on white */
  --muted:       #6c6c6c;
  --cream:       #f7f2ec;  /* hero panel */
  --band:        #ece7e1;  /* alternating section band */
  --blush:       #f6ebe7;  /* feature-card / icon tint */
  --gold-soft:   #d8bd86;  /* soft gold borders (contact tiles) */
  --line:        #e4ded6;
  --white:       #ffffff;

  /* Type scale (studio standard) */
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-36: 2.25rem;
  --fs-40: 2.5rem;
  --fs-56: 3.5rem;

  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans:  "Open Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 10px;
  --shadow: 0 10px 30px rgba(60, 20, 35, 0.08);
}

/* --------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-18);
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wine); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 4px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------- type */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  color: var(--gold);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 5.5vw, var(--fs-56)); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.85rem, 4vw, var(--fs-36)); }
h3 { font-size: var(--fs-24); }
h4 { font-size: var(--fs-18); color: var(--ink); }
h5 { font-size: var(--fs-16); color: var(--ink); }
p  { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong { color: var(--ink); }

.eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink-dark);
  margin: 0 0 0.75rem;
}
.lead { font-size: var(--fs-20); color: var(--ink); }

/* --------------------------------------------------------------- layout */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--band { background: var(--band); }
.section--tight { padding-block: clamp(40px, 6vw, 64px); }
.center { text-align: center; }
.section-head { max-width: 720px; margin-inline: auto; margin-bottom: 2.5rem; text-align: center; }
.section-head .rule {
  width: 64px; height: 3px; background: var(--gold-bright);
  border: 0; margin: 1rem auto 0;
}
.section-head.left { margin-inline: 0; text-align: left; }
.section-head.left .rule { margin-inline: 0; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--fs-16);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.85em 1.7em;
  border-radius: 2px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn--pink  { background: var(--pink); color: #fff; border-color: var(--pink); }
.btn--pink:hover  { background: var(--pink-dark); border-color: var(--pink-dark); }
.btn--wine  { background: var(--wine); color: #fff; border-color: var(--wine); }
.btn--wine:hover  { background: var(--wine-dark); border-color: var(--wine-dark); }
.btn--outline { background: transparent; color: var(--wine); border-color: var(--wine); }
.btn--outline:hover { background: var(--wine); color: #fff; }
.btn--ghost { background: rgba(255,255,255,.14); color: #fff; border-color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--wine); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-row.center { justify-content: center; }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  min-height: 76px;
}
.brand {
  display: inline-flex; flex-direction: column; justify-content: center;
  align-items: flex-start; gap: 3px; margin-right: auto; line-height: 1;
}
.brand:hover { text-decoration: none; }
.brand__name {
  font-family: var(--serif); font-weight: 700; font-size: var(--fs-24);
  color: var(--wine); letter-spacing: 0.01em; line-height: 1;
}
.brand__prec {
  font-family: var(--sans); font-size: var(--fs-12); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); line-height: 1;
}
@media (max-width: 420px) {
  .brand__name { font-size: var(--fs-20); }
  .brand__prec { font-size: 0.6875rem; letter-spacing: 0.08em; }
}
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--wine); color: #fff; padding: 10px 16px; border-radius: 0 0 6px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 0; color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-nav > ul > li { position: relative; }
.nav-link, .nav-btn {
  font-family: var(--sans);
  font-size: var(--fs-16);
  font-weight: 600;
  color: var(--ink);
  background: none; border: 0; cursor: pointer;
  padding: 12px 12px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: 6px; line-height: 1;
}
.nav-link:hover, .nav-btn:hover { color: var(--pink); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--pink-dark); }
.nav-btn svg { width: 12px; height: 12px; transition: transform .18s ease; }
li.open > .nav-btn svg { transform: rotate(180deg); }

/* submenu */
.submenu {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 232px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow);
  padding: 8px; margin: 0; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu,
li.open > .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu a {
  display: block; padding: 10px 12px; border-radius: 6px;
  color: var(--ink); font-size: var(--fs-16); font-weight: 500;
}
.submenu a:hover { background: var(--band); color: var(--pink-dark); text-decoration: none; }

/* language switch */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.lang-switch a {
  font-size: var(--fs-14); font-weight: 700; color: var(--muted);
  padding: 6px 8px; border-radius: 6px;
}
.lang-switch a[aria-current="true"] { color: var(--wine); background: var(--band); }
.lang-switch .sep { color: var(--line); }

/* --------------------------------------------------------------- hero (home) */
.hero {
  position: relative; overflow: hidden;
  min-height: 560px; min-height: calc(100svh - 77px);
  display: flex; align-items: center;
  background:
    radial-gradient(120% 120% at 15% 20%, #fbf8f3 0%, var(--cream) 55%, #efe6da 100%);
}
.hero .wrap {
  position: relative; z-index: 2; width: 100%;
  padding-block: clamp(48px, 6vw, 88px);
}
.hero__copy { max-width: 560px; }
.hero__name { margin-bottom: 0.1em; }
.hero__prec {
  font-family: var(--sans); font-size: var(--fs-16); font-weight: 700;
  color: var(--ink); margin: 0 0 1.4rem;
}
.hero__tagline { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 1.75rem); color: var(--wine); line-height: 1.35; margin: 0 0 1rem; }
.hero__sub { font-size: var(--fs-18); margin-bottom: 1.8rem; }
.hero__media { position: absolute; right: 0; top: 0; bottom: 0; z-index: 1; width: clamp(420px, 50vw, 820px); pointer-events: none; }
.hero__media img {
  position: absolute; right: 0; bottom: 0;
  height: 96%; width: auto; max-width: 100%; display: block;
}

/* --------------------------------------------------------------- interior page hero */
.page-hero {
  background: linear-gradient(180deg, var(--cream), #fff);
  padding-block: clamp(40px, 6vw, 72px);
}
.page-hero .wrap { text-align: center; max-width: 820px; }
.page-hero--image {
  position: relative; padding-block: clamp(64px, 10vw, 120px);
  background: linear-gradient(rgba(74,10,32,.62), rgba(74,10,32,.62)),
              var(--hero-img, none) center/cover no-repeat;
}
.page-hero--image .wrap { position: relative; }
.page-hero--image h1 { color: #fff; }
.page-hero--image .lead { color: rgba(255,255,255,.92); }

.split {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.split__media img { border-radius: 14px; box-shadow: var(--shadow); width: 100%; object-fit: cover; }

/* --------------------------------------------------------------- about */
.about-split { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.about-portrait { border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 20px; width: 100%; }
.lead--wine { color: var(--wine); font-weight: 500; }
.speak {
  display: inline-block; font-weight: 600; color: var(--ink);
  background: var(--band); padding: 8px 16px; border-radius: 999px;
  font-size: var(--fs-16); margin-bottom: 1.4rem;
}
.prose p { margin-bottom: 1.2em; }
.prose { max-width: 760px; }

/* --------------------------------------------------------------- cards */
.card-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 24px; box-shadow: var(--shadow); text-align: center;
}
.card--feature { background: var(--blush); border-color: transparent; box-shadow: none; }
.card__icon {
  width: 56px; height: 56px; border-radius: 12px;
  display: grid; place-items: center; background: var(--blush);
  margin: 0 auto 18px; color: var(--wine);
}
.card--feature .card__icon { background: #fff; }
.card__icon svg { width: 28px; height: 28px; }
.card h3 { color: var(--gold); margin-bottom: .4rem; }
.card p { font-size: var(--fs-16); }

/* intro split: wine copy box beside an image (service pages) */
.intro-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; }
.intro-box {
  background: var(--wine); color: #fff; border-radius: 14px 0 0 14px;
  padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; justify-content: center;
}
.intro-box h2 { color: #fff; }
.intro-box p { color: rgba(255,255,255,.92); }
.intro-media { position: relative; }
.intro-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 0 14px 14px 0;
}

/* --------------------------------------------------------------- listings embed */
.embed { background: #fff; }
.embed iframe { width: 100%; border: 0; display: block; transition: height .2s ease; }
/* Homepage short widgets don't report their height, so size them per kind.
   They reflow to fewer columns as the screen narrows, hence the breakpoints. */
.embed--featured  .embed__frame { height: 440px; }
.embed--sold-home .embed__frame { height: 840px; }
.embed--sold-com  .embed__frame { height: 640px; }
@media (max-width: 1000px) {
  .embed--featured  .embed__frame { height: 960px; }
  .embed--sold-home .embed__frame { height: 1800px; }
  .embed--sold-com  .embed__frame { height: 800px; }
}
@media (max-width: 600px) {
  .embed--featured  .embed__frame { height: 1780px; }
  .embed--sold-home .embed__frame { height: 1780px; }
  .embed--sold-com  .embed__frame { height: 1240px; }
}

/* --------------------------------------------------------------- contact info tiles */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; max-width: 860px; margin-inline: auto; }
.contact-tile {
  position: relative; text-align: center;
  background: #fff; border: 1px solid var(--gold-soft); border-radius: 18px;
  padding: 46px 24px 30px;
}
.contact-tile__icon {
  position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: #fff; border: 1px solid var(--gold-soft);
  display: grid; place-items: center; color: var(--wine);
}
.contact-tile__icon svg { width: 26px; height: 26px; }
.contact-tile h3 { font-size: var(--fs-24); margin-bottom: .35rem; }
.contact-tile .muted { font-size: var(--fs-16); color: var(--muted); margin-bottom: .3rem; }
.contact-tile a { font-size: var(--fs-18); font-weight: 600; word-break: break-word; }

/* --------------------------------------------------------------- band CTA */
.cta-band {
  position: relative; color: #fff; text-align: center;
  background: linear-gradient(rgba(74,10,32,.82), rgba(74,10,32,.82)), var(--band-img, none);
  background-size: cover; background-position: center; background-attachment: scroll;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.92); max-width: 620px; margin-inline: auto; }
.cta-band .wrap { padding-block: clamp(64px, 9vw, 120px); }

/* --------------------------------------------------------------- contact form */
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
label { font-size: var(--fs-14); font-weight: 700; color: var(--ink); margin-bottom: 6px; }
label .req { color: var(--pink); }
input, textarea {
  font: inherit; font-size: var(--fs-16); color: var(--ink);
  padding: 12px 14px; border: 1px solid #c9c2b9; border-radius: 8px; background: #fff;
  width: 100%;
}
input:focus, textarea:focus { border-color: var(--pink); outline: 2px solid rgba(216,27,96,.25); outline-offset: 0; }
textarea { min-height: 130px; resize: vertical; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; grid-column: 1 / -1; }
.checkbox input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.checkbox label { font-weight: 500; font-size: var(--fs-16); color: var(--body); margin: 0; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }
.form-status { grid-column: 1 / -1; margin: 0; font-weight: 600; font-size: var(--fs-16); }
.form-status[data-state="ok"]  { color: #1a7a3c; }
.form-status[data-state="err"] { color: #b3261e; }

/* contact CTA (home) — full-bleed curved image left, underline form right */
.home-cta { position: relative; background: #fff; overflow: hidden; }
.home-cta .wrap {
  display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(28px, 5vw, 68px);
  align-items: center; padding-block: clamp(40px, 6vw, 80px); padding-left: 0;
}
.home-cta__media { position: relative; align-self: stretch; min-height: 460px; margin-left: calc(-1 * var(--gutter)); }
.home-cta__media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 0 46% 46% 0 / 0 50% 50% 0;
}
.home-cta__copy h2 { color: var(--wine); margin-bottom: 0; }
.home-cta__copy .rule { width: 88px; height: 3px; background: var(--gold-bright); border: 0; margin: 14px 0 22px; }
.home-cta__copy > p { max-width: 480px; }

/* underline form variant (home CTA) */
.form--underline { background: none; border: 0; box-shadow: none; padding: 0; }
.form--underline .form-grid { gap: 6px 28px; }
.form--underline input,
.form--underline textarea {
  border: 0; border-bottom: 1px solid #c9c2b9; border-radius: 0;
  padding: 12px 2px; background: transparent;
}
.form--underline input:focus,
.form--underline textarea:focus { outline: 0; border-bottom-color: var(--pink); box-shadow: 0 1px 0 var(--pink); }
.form--underline textarea { min-height: 84px; }
.form--underline .btn { border-radius: 2px; }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--wine); color: rgba(255,255,255,.85); }
.site-footer a { color: #fff; }
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: center;
  list-style: none; margin: 0 0 28px; padding: 0 0 26px;
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.footer-nav a { font-weight: 600; font-size: var(--fs-16); }
.footer-cols { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 30px; }
.footer-cols h3 { color: #fff; font-family: var(--serif); font-size: var(--fs-20); margin-bottom: .6rem; }
.footer-cols p, .footer-cols address { font-style: normal; font-size: var(--fs-16); line-height: 1.7; margin: 0 0 .5rem; }
.footer-brand { display: flex; flex-direction: column; gap: 3px; }
.footer-brand .brand__name { font-size: var(--fs-28); color: #fff; }
.footer-brand .brand__prec { color: rgba(255,255,255,.72); margin-bottom: 14px; }
.footer-brand address { margin-bottom: 18px; }
.partner-logos { max-width: 300px; height: auto; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.18); margin-top: 30px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
  font-size: var(--fs-14); color: rgba(255,255,255,.7);
}
.site-footer .wrap { padding-block: 56px; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 940px) {
  .card-grid, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .about-split { grid-template-columns: 1fr; }
  .about-portrait { max-width: 360px; }
}
/* Hero stacks (photo on top) below the width where side-by-side fits cleanly */
@media (max-width: 1000px) {
  .hero { display: block; min-height: 0; }
  .hero .wrap { display: flex; flex-direction: column; text-align: center; }
  .hero__copy { max-width: none; margin-inline: auto; }
  .hero .btn-row { justify-content: center; }
  .hero__media { position: static; width: auto; order: -1; margin: 0 auto 10px; pointer-events: auto; }
  .hero__media img { position: static; height: auto; width: min(320px, 74%); margin-inline: auto; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; place-items: center; margin-left: auto; }
  .main-nav {
    position: fixed; inset: 76px 0 0 auto; width: min(360px, 86vw);
    background: #fff; border-left: 1px solid var(--line);
    transform: translateX(100%); transition: transform .25s ease;
    overflow-y: auto; padding: 12px 16px 40px; box-shadow: var(--shadow);
  }
  body.nav-open .main-nav { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link, .nav-btn { width: 100%; justify-content: space-between; padding: 14px 10px; font-size: var(--fs-18); }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-radius: 0; padding: 0 0 8px 12px;
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  li.open > .submenu { max-height: 520px; }
  .has-sub:hover > .submenu:not(.forced) { max-height: 0; }
  li.open.has-sub > .submenu { max-height: 520px; }
  .lang-switch { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split__media { order: -1; }
  .intro-split { grid-template-columns: 1fr; }
  .intro-box { order: 1; border-radius: 0 0 14px 14px; }
  .intro-media { order: 0; min-height: 260px; }
  .intro-media img { position: absolute; border-radius: 14px 14px 0 0; }
  .home-cta .wrap { grid-template-columns: 1fr; padding-left: var(--gutter); }
  .home-cta__media { min-height: 240px; order: -1; margin-left: 0; }
  .home-cta__media img { border-radius: 14px; }
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; text-align: center; }
  .footer-brand img { margin-inline: auto; }
}
@media (max-width: 480px) {
  .card-grid, .card-grid.cols-4 { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
}

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