/* KW Mountain Real Estate — Static Replacement
   Design system: TypeUI "premium" (Apple-inspired minimal). Tokens translated
   from the premium design skill to portable CSS custom properties. Brand red
   #DE2A45 aligns with the Keller Williams identity. Font: system San Francisco
   stack in place of the skill's "Miranda Sans" (unavailable / no webfont, keeps
   the Apple look and avoids render-blocking). */

:root {
  /* neutrals */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-tertiary: #e8e8ed;
  /* brand (KW red) */
  --brand: #de2a45;
  --brand-strong: #b8203a;
  --brand-medium: #ffbcc6;
  --brand-softer: #fff0f2;
  /* text */
  --heading: #1d1d1f;
  --body: #6e6e73;
  --body-subtle: #86868b;
  --on-brand: #ffffff;
  /* borders */
  --border-default: #d2d2d7;
  --border-light: #e8e8ed;
  --dark: #1d1d1f;
  /* radius */
  --r-base: 16px;
  --r-default: 10px;
  --r-lg: 32px;
  --r-full: 9999px;
  /* shadows */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 8px -2px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 12px 20px -4px rgb(0 0 0 / 0.08), 0 4px 8px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 32px -8px rgb(0 0 0 / 0.1), 0 8px 16px -6px rgb(0 0 0 / 0.06);
  --shadow-2xl: 0 28px 56px -16px rgb(0 0 0 / 0.2);
  /* button glint */
  --glint-hi: rgba(255, 255, 255, 0.2);
  --glint-lo: rgba(0, 0, 0, 0.08);
  --container: 1200px;
  --reading: 720px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --spring-snappy: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%, 1.067 22.5%, 1.089 26%, 1.079 30.3%, 1.049 36%, 1.024 42.6%, 1.011 50.3%, 1.004 59.2%, 1.001 69.3%, 1);
  --ease-snap: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #1d1d1f;
    --bg-tertiary: #2d2d2d;
    --brand: #e84860;
    --brand-strong: #de2a45;
    --brand-medium: #7a1527;
    --brand-softer: #3d0a14;
    --heading: #f5f5f7;
    --body: #a1a1a6;
    --body-subtle: #a1a1a6;
    --border-default: #2d2d2d;
    --border-light: #1d1d1f;
    --dark: #2d2d2d;
    --glint-hi: rgba(255, 255, 255, 0.08);
    --glint-lo: rgba(0, 0, 0, 0.2);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.reading { max-width: var(--reading); }

h1, h2, h3, h4 { color: var(--heading); font-weight: 600; margin: 0; text-wrap: balance; letter-spacing: -0.5px; }
h1 { font-size: 34px; line-height: 1.05; letter-spacing: -1px; margin-bottom: 24px; }
h2 { font-size: 32px; line-height: 1.07; margin-bottom: 16px; }
h3 { font-size: 24px; line-height: 1.2; }
h4 { font-size: 20px; line-height: 1.3; }
p { margin: 0 0 16px; }
:where(main a) { color: var(--brand); text-underline-offset: 2px; transition: color .18s ease; }
:where(main a):hover { color: var(--brand-strong); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.eyebrow { font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.6px; color: var(--brand-strong); margin: 0 0 12px; }
.lede { font-size: 18px; line-height: 1.6; color: var(--body); max-width: 68ch; }
.meta { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; color: var(--body-subtle); margin: 0 0 8px; }
.meta a { color: var(--brand); }

@media (min-width: 768px) {
  h1 { font-size: 44px; } h2 { font-size: 40px; } h3 { font-size: 30px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 56px; } h2 { font-size: 48px; } h3 { font-size: 36px; }
}

/* skip link + focus */
.skip { position: absolute; left: -999px; top: 0; background: var(--dark); color: #fff; padding: 12px 16px; z-index: 20; border-radius: 0 0 var(--r-default) 0; }
.skip:focus { left: 0; }
:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--brand-medium); border-radius: 6px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--border-light); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.brand { display: inline-flex; line-height: 0; padding: 4px 0; }
.brand img { height: 34px; width: auto; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--heading); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 14px; border-radius: var(--r-full); transition: background-color .18s ease, color .18s ease; }
.site-nav a:hover { background: var(--bg-alt); }
.site-nav a[aria-current="page"] { color: var(--brand); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-size: 16px; font-weight: 500; padding: 12px 20px; border-radius: var(--r-base); border: 1px solid transparent; cursor: pointer; text-decoration: none; box-sizing: border-box; transition: background-color .18s ease, color .18s ease, box-shadow .18s ease; }
.btn-brand { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-xs), inset var(--glint-hi) 0 6px 0 -5px, var(--glint-lo) 0 4px 10px -5px; }
.btn-brand:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-secondary { background: var(--bg-alt); color: var(--heading); border-color: var(--border-default); box-shadow: var(--shadow-xs), inset var(--glint-hi) 0 6px 0 -5px, var(--glint-lo) 0 4px 10px -5px; }
.btn-secondary:hover { background: var(--bg-tertiary); }

/* section rhythm */
.section { padding-block: 64px; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 40px; }
@media (min-width: 768px) { .section { padding-block: 88px; } .section-head { margin-bottom: 56px; } }
@media (min-width: 1024px) { .section { padding-block: 120px; } }

/* hero: a full-bleed subject within the existing TypeUI frame */
.hero { padding: 16px 0 24px; overflow: hidden; }
.hero-frame {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: calc(100dvh - 96px);
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--r-lg);
  background: #1d1d1f;
  box-shadow: var(--shadow-2xl);
}
.hero-media { position: absolute; inset: 0; z-index: -3; overflow: hidden; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  transform: scale(1.015);
  transition: transform .7s var(--ease-snap);
}
.hero-frame:hover .hero-media img { transform: scale(1.035); }
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgb(0 0 0 / .12) 0%, rgb(0 0 0 / .08) 35%, rgb(0 0 0 / .82) 100%),
    linear-gradient(90deg, rgb(0 0 0 / .5) 0%, transparent 68%);
  pointer-events: none;
}
.hero-copy { width: min(100%, 1100px); padding: clamp(32px, 6vw, 80px); color: #fff; }
.hero .eyebrow { color: #fff; opacity: .82; letter-spacing: .13em; margin-bottom: 18px; }
.hero h1 {
  max-width: 12ch;
  margin-bottom: 24px;
  color: #fff;
  font-size: clamp(3.25rem, 7.4vw, 7.5rem);
  font-weight: 700;
  line-height: .88;
  letter-spacing: -.058em;
}
.hero h1 span { color: #ffbcc6; }
.hero .lede { max-width: 53ch; color: rgb(255 255 255 / .82); font-size: clamp(1rem, 1.3vw, 1.2rem); }
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 28px; }
.hero .btn-brand {
  min-height: 48px;
  padding-inline: 26px;
  transition: transform .45s var(--ease-snap), box-shadow .45s var(--ease-snap), background-color .3s var(--ease-snap);
}
.hero .btn-brand:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgb(0 0 0 / .28); }
.hero .btn-brand:active { transform: translateY(0) scale(.97); }
.hero-guide {
  position: relative;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 0;
}
.hero-guide::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(.28);
  transform-origin: left;
  transition: transform .4s var(--ease-snap);
}
.hero-guide:hover { color: #fff; }
.hero-guide:hover::after { transform: scaleX(1); }
@keyframes hero-enter {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-image-enter {
  from { opacity: 0; transform: scale(1.035); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-enter { animation: hero-enter .55s var(--spring-snappy) both; }
  .hero-enter-image { animation-name: hero-image-enter; animation-delay: 0ms; }
  .hero-enter-1 { animation-delay: 80ms; }
  .hero-enter-2 { animation-delay: 160ms; }
  .hero-enter-3 { animation-delay: 260ms; }
  .hero-enter-4 { animation-delay: 360ms; }
}
@media (max-width: 767px) {
  .hero { padding-top: 10px; }
  .hero-frame { min-height: calc(100svh - 153px); border-radius: 22px; }
  .hero-copy { padding: 28px 22px 24px; }
  .hero h1 { font-size: clamp(2.75rem, 12vw, 4.6rem); margin-bottom: 18px; }
  .hero .lede { line-height: 1.48; }
  .hero-actions { margin-top: 20px; }
  .hero-scrim { background: linear-gradient(180deg, rgb(0 0 0 / .12), rgb(0 0 0 / .86) 82%); }
}

/* cards / feature grid (12-col magazine) */
.grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 24px; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 32px; } }

.card { background: var(--bg); border: 1px solid var(--border-default); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; }
.card-media { aspect-ratio: 16 / 10; background: var(--bg-alt); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card-body { padding: 28px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 20px; line-height: 1.3; }
.card-body p { margin: 0; }
.card-body .card-foot { margin-top: auto; padding-top: 8px; }
a.card { text-decoration: none; color: inherit; transition: box-shadow .2s ease, transform .2s ease; }
a.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
a.card:hover .card-media img { transform: scale(1.04); }
.card-tag { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; color: var(--brand-strong); }

/* plain service cards (no image) */
.card-plain { background: var(--bg); border: 1px solid var(--border-default); border-radius: var(--r-base); box-shadow: var(--shadow-xs); padding: 32px; }
.card-plain h3 { font-size: 20px; margin-bottom: 8px; }
.card-plain p { margin: 0; }

/* split about band */
.split { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
.split-media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow-lg); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } .split-reverse .split-media { order: -1; } }

/* article */
.article-hero { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 9; margin: 24px 0 40px; box-shadow: var(--shadow-lg); background: var(--bg-alt); }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.prose { max-width: var(--reading); }
.prose h2 { font-size: 28px; margin: 40px 0 16px; }
.prose h3 { font-size: 22px; margin: 28px 0 12px; }
.prose p, .prose li { font-size: 17px; }
.prose ul { padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose figure { margin: 32px 0; }
.prose figure img { border-radius: var(--r-base); box-shadow: var(--shadow-md); width: 100%; }
.article-foot { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border-light); font-size: 15px; }
.note, .disclosure { background: var(--brand-softer); border: 1px solid var(--brand-medium); padding: 16px 20px; border-radius: var(--r-base); font-size: 15px; color: var(--heading); }
.note a, .disclosure a { color: var(--brand-strong); }

/* post list */
.post-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px) { .post-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-list { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

/* CTA band */
.cta-band { background: var(--dark); border-radius: var(--r-lg); padding: 48px 32px; text-align: center; color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d2d2d7; max-width: 60ch; margin-inline: auto; }
.cta-band .btn-brand { margin-top: 24px; }

/* contact form */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; } }
.contact { display: grid; gap: 16px; }
.field label { display: block; font-size: 14px; font-weight: 500; color: var(--heading); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border-default); border-radius: var(--r-default); font: inherit; font-size: 16px; background: var(--bg); color: var(--heading); transition: box-shadow .18s ease, border-color .18s ease; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-medium); }
.contact :disabled { background: var(--bg-alt); color: var(--body-subtle); cursor: not-allowed; }
.contact button[disabled] { opacity: .7; }

/* footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border-light); margin-top: 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 40px; font-size: 14px; color: var(--body); }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--heading); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }

/* staggered load reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal { transform: translateY(12px); animation: rise .6s ease forwards; }
  .reveal-1 { animation-delay: .05s; } .reveal-2 { animation-delay: .13s; } .reveal-3 { animation-delay: .21s; }
  @keyframes rise { to { transform: none; } }
}
