/* ==========================================================================
   Troy Massey Realty — Modern Luxury Design System
   Brokered by W & Partners · Part of Elevated Home Real Estate Group
   ========================================================================== */

/* ----- Design tokens ----- */
:root {
  /* Palette */
  --navy:        #0B1A2D;   /* matches headshot backdrop */
  --navy-deep:   #07111E;
  --charcoal:    #1A1F26;
  --gold:        #B89968;
  --gold-light:  #D4B98A;
  --gold-deep:   #97774A;
  --ivory:       #F5F1EA;
  --cream:       #E6DEC9;
  --off-white:   #EFE8D6;
  --line:        #CFC4A8;
  --muted:       #6B7280;
  --muted-dark:  #3E4651;
  --shadow-sm:   0 1px 2px rgba(11, 26, 45, 0.06);
  --shadow-md:   0 8px 24px rgba(11, 26, 45, 0.08);
  --shadow-lg:   0 24px 60px rgba(11, 26, 45, 0.18);

  /* Type */
  --serif:  'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 16px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t-fast: 180ms;
  --t-med:  320ms;
  --t-slow: 600ms;
}

/* ----- Reset / Base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
ul, ol { padding-left: 1.25rem; }

/* ----- Typography ----- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
h4 { font-size: 1.15rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--gold-deep); }
p  { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 1.1em;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 12px;
  transform: translateY(-2px);
}

.lede {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted-dark);
  max-width: 60ch;
}

/* ----- Layout helpers ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--tight { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.section--dark { background: var(--navy); color: var(--ivory); }
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--ivory); }
.section--dark .eyebrow { color: var(--gold-light); }
.section--dark .lede { color: rgba(245, 241, 234, 0.78); }

.section--cream { background: var(--cream); }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.75rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all var(--t-fast) var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary {
  background: var(--navy);
  color: var(--ivory);
  border-color: var(--navy);
}
.btn--primary:hover {
  background: var(--charcoal);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn--gold:hover {
  background: var(--gold-deep);
  color: var(--ivory);
  border-color: var(--gold-deep);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--ghost:hover {
  background: var(--navy);
  color: var(--ivory);
}
.btn--ghost-light {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(245, 241, 234, 0.5);
}
.btn--ghost-light:hover {
  background: var(--ivory);
  color: var(--navy);
  border-color: var(--ivory);
}
.btn--link {
  background: transparent;
  color: var(--navy);
  padding: 0.5rem 0;
  border: 0;
  border-bottom: 1px solid var(--gold);
  border-radius: 0;
}
.btn--link:hover { color: var(--gold-deep); }

/* ----- Header / Nav ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 251, 248, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}
.nav__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.nav__brand-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.01em;
}
.nav__brand-tag {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: 4px;
}
.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.6vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--charcoal);
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--t-fast) var(--ease);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--t-med) var(--ease);
}
.nav__link:hover { color: var(--navy); }
.nav__link:hover::after,
.nav__link.is-active::after { width: 100%; }
.nav__link.is-active { color: var(--navy); }

.nav__cta { margin-left: 0.5rem; }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}
.nav__toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--navy);
  position: relative;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 1.5px;
  background: var(--navy);
}
.nav__toggle span::before { top: -7px; }
.nav__toggle span::after  { top:  7px; }

@media (max-width: 920px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--off-white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem var(--gutter);
    gap: 1.1rem;
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__cta { margin-left: 0; }
}

/* ----- Hero ----- */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--ivory);
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  align-items: center;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(5rem, 10vh, 8rem) 0 clamp(4rem, 8vh, 6rem);
}
.hero__copy h1 { color: var(--ivory); }
.hero__copy .eyebrow { color: var(--gold-light); }
.hero__copy .lede { color: rgba(245, 241, 234, 0.82); }
.hero__actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}
.hero__media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(184, 153, 104, 0.35);
  pointer-events: none;
}
.hero__frame {
  position: absolute;
  inset: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(245, 241, 234, 0.08);
  pointer-events: none;
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; padding-top: 3.5rem; }
  .hero__media { max-width: 360px; margin-inline: auto; }
}

/* ----- Stats strip ----- */
.stats {
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stats__item {
  text-align: center;
  padding: 2.25rem 1rem;
  border-right: 1px solid var(--line);
}
.stats__item:last-child { border-right: 0; }
.stats__num {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 3.6vw, 3rem);
  color: var(--navy);
  display: block;
  margin-bottom: 0.25rem;
}
.stats__label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 720px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__item:nth-child(2) { border-right: 0; }
  .stats__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ----- Split section ----- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }
.split__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.split__media:hover img { transform: scale(1.03); }
@media (max-width: 900px) {
  .split, .split--reverse { grid-template-columns: 1fr; direction: ltr; }
  .split__media { max-width: 460px; margin-inline: auto; }
}

/* ----- Service cards ----- */
.cards { display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem); }
.card {
  background: var(--off-white);
  border: 1px solid var(--line);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transition: all var(--t-med) var(--ease);
  border-radius: var(--radius-sm);
  position: relative;
}
.card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card__num {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--gold-deep);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--muted-dark); margin-bottom: 1.25rem; }
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 600;
  transition: gap var(--t-fast) var(--ease);
}
.card__link::after { content: '→'; transition: transform var(--t-fast) var(--ease); }
.card__link:hover { color: var(--gold-deep); }
.card__link:hover::after { transform: translateX(4px); }

/* ----- Listing cards ----- */
.listing {
  background: var(--off-white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--t-med) var(--ease);
  border: 1px solid var(--line);
}
.listing:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
}
.listing__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ivory);
}
.listing__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.listing:hover .listing__media img { transform: scale(1.06); }
.listing__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--navy);
  color: var(--ivory);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
}
.listing__badge--gold { background: var(--gold); color: var(--navy); }
.listing__body { padding: 1.5rem 1.5rem 1.75rem; }
.listing__price {
  font-family: var(--serif);
  font-size: 1.65rem;
  color: var(--navy);
  margin: 0 0 0.25rem;
  line-height: 1.1;
}
.listing__address {
  font-size: 0.92rem;
  color: var(--muted-dark);
  margin: 0 0 1rem;
}
.listing__meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.listing__meta span strong {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--navy);
  font-weight: 500;
  margin-right: 4px;
}

.listing__placeholder {
  background: linear-gradient(135deg, var(--ivory), var(--cream));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  width: 100%;
  height: 100%;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ----- Testimonial ----- */
.quote {
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}
.quote__text {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.4;
  color: var(--ivory);
  font-style: italic;
  margin: 0 0 1.75rem;
}
.quote__attribution {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.quote__mark {
  font-family: var(--serif);
  font-size: 6rem;
  line-height: 0.5;
  color: var(--gold);
  display: block;
  margin: 0 0 1rem;
}

/* ----- Forms ----- */
.form { display: grid; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: var(--off-white);
  color: var(--charcoal);
  border-radius: 2px;
  transition: border-color var(--t-fast) var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 153, 104, 0.12);
}
.field textarea { min-height: 140px; resize: vertical; }

.form-section {
  background: var(--off-white);
  border: 1px solid var(--line);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  border-radius: var(--radius);
}
.form-section h3 { margin-bottom: 0.4rem; }
.form-section p.lede { margin-bottom: 1.75rem; }

/* ----- Footer ----- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(245, 241, 234, 0.72);
  padding: 4rem 0 1.5rem;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(245, 241, 234, 0.08);
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}
.footer__brand-name {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--ivory);
  margin-bottom: 0.25rem;
}
.footer__brand-tag {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
}
.footer h4 {
  font-family: var(--sans);
  color: var(--ivory);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.footer a { color: rgba(245, 241, 234, 0.72); transition: color var(--t-fast) var(--ease); }
.footer a:hover { color: var(--gold-light); }
.footer__contact { display: grid; gap: 0.5rem; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  gap: 1rem;
  font-size: 0.78rem;
  color: rgba(245, 241, 234, 0.45);
}
.footer__legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__logo {
  background: rgba(245, 241, 234, 0.05);
  border: 1px solid rgba(245, 241, 234, 0.08);
  padding: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}
.footer__logo img { max-height: 90px; filter: invert(1) brightness(1.4); }

/* ----- Page header (sub-pages) ----- */
.page-header {
  background: var(--navy);
  color: var(--ivory);
  padding: clamp(5rem, 10vh, 8rem) 0 clamp(3.5rem, 6vh, 5rem);
  position: relative;
  overflow: hidden;
}
.page-header h1 { color: var(--ivory); margin-bottom: 0.75rem; }
.page-header .eyebrow { color: var(--gold-light); }
.page-header .lede { color: rgba(245, 241, 234, 0.78); }

/* ----- Lists ----- */
.checklist { list-style: none; padding: 0; display: grid; gap: 1rem; }
.checklist li {
  position: relative;
  padding-left: 2rem;
  color: var(--muted-dark);
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 18px;
  height: 1px;
  background: var(--gold);
}

/* ----- Process timeline ----- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}
@media (max-width: 900px) { .process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }
.process__step {
  position: relative;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.process__step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: -0.6em;
  background: var(--off-white);
  padding-right: 0.75rem;
  font-family: var(--serif);
  color: var(--gold-deep);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}
.section--dark .process__step { border-top-color: rgba(245, 241, 234, 0.15); }
.section--dark .process__step::before { background: var(--navy); color: var(--gold-light); }
.process__step h4 { color: var(--navy); margin: 0 0 0.5rem; }
.section--dark .process__step h4 { color: var(--ivory); }
.process__step p { font-size: 0.95rem; color: var(--muted-dark); }
.section--dark .process__step p { color: rgba(245, 241, 234, 0.7); }

/* ----- Utility ----- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mx-auto { margin-inline: auto; }
.maxw-prose { max-width: 65ch; }
.maxw-md { max-width: 760px; }

/* ----- Social icons ----- */
.social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}
.social a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 241, 234, 0.18);
  border-radius: 999px;
  color: rgba(245, 241, 234, 0.72);
  transition: all var(--t-fast) var(--ease);
}
.social a:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-2px);
}
.social svg { width: 18px; height: 18px; }

/* ----- Reveal on scroll ----- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ----- Skip link / a11y ----- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--navy);
  color: var(--ivory);
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }
