/* =========================================================
   Agent site | Laffey Real Estate
   Design tokens
   ========================================================= */
:root {
  --ink: #1C2430;
  --paper: #F7F5F0;
  --paper-alt: #EFEBE3;
  --brass: #B08D57;
  --brass-dark: #93713F;
  --brick: #8C4A3B;
  --slate: #4A5058;
  --line: rgba(28, 36, 48, 0.14);
  --white: #FFFFFF;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1120px;
  --radius: 3px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--slate);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 62ch; }

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--paper-alt);
}

.section-head {
  margin-bottom: 40px;
  max-width: 640px;
}

.section-head p {
  margin-top: 12px;
  color: var(--slate);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: var(--ink);
  color: var(--white);
}
.btn-primary:hover { background: #2B3646; }

.btn-brass {
  background: var(--brass);
  color: var(--white);
}
.btn-brass:hover { background: var(--brass-dark); }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding-left: 0;
  padding-right: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.brand-name {
  display: block;
}

.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--brick);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.nav-desktop {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-bottom-color: var(--brass);
}

.nav-contact {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-socials a {
  color: var(--ink);
  display: flex;
}

.nav-socials svg {
  width: 18px;
  height: 18px;
}

.nav-socials a:hover { color: var(--brass-dark); }

.nav-cta {
  padding: 9px 20px;
  font-size: 0.88rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle svg { width: 26px; height: 26px; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 620px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px clamp(24px, 5vw, 88px) 64px clamp(24px, 6vw, 96px);
}

.hero-eyebrow {
  color: var(--brick);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.hero p.lede {
  font-size: 1.1rem;
  margin-top: 20px;
  max-width: 46ch;
}

.hero-photo {
  position: relative;
  margin: 0;
  min-height: 340px;
  height: 100%;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.hero-photo figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 26px clamp(20px, 4vw, 48px);
  font-size: 0.85rem;
  color: var(--white);
  background: linear-gradient(to top, rgba(16, 21, 29, 0.78), rgba(16, 21, 29, 0));
}

/* Quick contact strip */
.quick-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.quick-contact a {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.quick-contact svg { width: 19px; height: 19px; color: var(--brass); }

/* =========================================================
   Value props row (hairline divided, not cards)
   ========================================================= */
.value-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.value-item {
  padding: 28px 26px;
  border-left: 1px solid var(--line);
}

.value-item:first-child { border-left: none; }

.value-item h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.value-item p { font-size: 0.92rem; margin-bottom: 0; }

/* =========================================================
   Listings
   ========================================================= */
.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--slate);
  border-radius: 999px;
  cursor: pointer;
}

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.listing-list {
  border-top: 1px solid var(--line);
}

.featured-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--ink);
}

.featured-label + .listing-list {
  margin-bottom: 36px;
}

.listing-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.listing-thumb {
  width: 220px;
  height: 150px;
  flex-shrink: 0;
}

.listing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.listing-thumb--empty {
  background: var(--paper-alt);
  border: 1px solid var(--line);
}

.listing-info .status {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brick);
  border: 1px solid var(--brick);
  border-radius: 999px;
  padding: 3px 11px;
  margin-bottom: 10px;
}

.listing-info .status.status-pending { color: var(--brass-dark); border-color: var(--brass-dark); }
.listing-info .status.status-sold { color: var(--slate); border-color: var(--line); }
.listing-info .status.status-past-listing { color: var(--ink); border-color: var(--ink); }

.listing-info .listing-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 4px;
  white-space: nowrap;
}

.listing-address {
  font-size: 0.92rem;
  color: var(--slate);
  margin-bottom: 10px;
}

.listing-meta {
  display: flex;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--slate);
  flex-wrap: wrap;
}

.listing-extra {
  margin-top: 8px;
}

.listing-extra summary {
  cursor: pointer;
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 2px 0;
  list-style: none;
}

.listing-extra summary::-webkit-details-marker,
.listing-extra summary::marker {
  display: none;
  content: "";
}

.listing-extra summary:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.listing-extra-body {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--slate);
}

.listing-extra-body .btn {
  font-size: 0.85rem;
  padding: 10px 0;
}

.listing-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.listing-actions .btn { font-size: 0.85rem; padding: 10px 18px; }

.empty-state {
  padding: 48px 0;
  color: var(--slate);
  text-align: center;
}

/* =========================================================
   About
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.about-portrait {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.headshot-placeholder {
  aspect-ratio: 4 / 5;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
}

.about-headshot {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.portrait-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0;
}

.portrait-role {
  margin: 0;
  font-size: 0.92rem;
  color: var(--brick);
  font-weight: 600;
}

.credentials {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  border-top: 1px solid var(--line);
}

.credentials li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
}

.credentials li span:first-child { color: var(--ink); font-weight: 600; }
.credentials li span:last-child { color: var(--slate); }

/* =========================================================
   Contact
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.contact-method .icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--paper-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-method .icon svg { width: 20px; height: 20px; color: var(--brass-dark); }

.contact-method .label {
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 2px;
}

.contact-method .value {
  font-weight: 600;
  color: var(--ink);
  font-size: 1.02rem;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}

.form-note {
  font-size: 0.82rem;
  color: var(--slate);
  margin-top: 10px;
}

.form-status {
  font-size: 0.88rem;
  color: var(--ink);
  margin-top: 10px;
}

.form-status[hidden] {
  display: none;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: #C9CDD3;
  padding: 56px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-grid h4 {
  color: var(--white);
  font-size: 0.95rem;
  font-family: var(--font-body);
  margin-bottom: 16px;
}

.footer-grid a, .footer-grid p {
  color: #C9CDD3;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 10px;
}

.footer-grid a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 22px;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
  color: #8E93A0;
}

.footer-portal {
  color: inherit;
  text-decoration: none;
  opacity: 0.65;
}

.footer-copy-brand {
  text-transform: uppercase;
}

.footer-legal {
  padding-top: 16px;
  padding-bottom: 8px;
}

.footer-legal p {
  max-width: none;
  margin: 0;
  font-size: 0.78rem;
  color: #8E93A0;
}

/* =========================================================
   Sticky mobile contact bar
   ========================================================= */
.mobile-contact-bar {
  display: none;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 880px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid { min-height: 0; }
  .hero-copy { padding: 48px 24px 40px; order: 2; }
  .hero-photo { order: 1; height: 300px; min-height: 300px; }

  .value-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .value-item {
    border-top: 1px solid var(--line);
    border-left: none;
  }
  .value-item:first-child,
  .value-item:nth-child(2) { border-top: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  .nav-desktop, .nav-socials, .nav-cta { display: none; }
  .nav-toggle { display: block; }

  .listing-row {
    grid-template-columns: 1fr;
  }
  .listing-thumb { width: 100%; height: 200px; }
  .listing-thumb--empty { height: 72px; }
  .listing-actions { align-items: flex-start; flex-direction: row; }

  body { padding-bottom: 62px; }

  .mobile-contact-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ink);
    z-index: 60;
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  .mobile-contact-bar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 0 8px;
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 600;
  }

  .mobile-contact-bar svg { width: 20px; height: 20px; color: var(--brass); }
}

@media (max-width: 600px) {
  .section { padding: 52px 0; }
  .nav-contact { gap: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Mobile nav panel */
.nav-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0 20px;
  border-top: 1px solid var(--line);
}

.nav-panel.open { display: flex; }

.nav-panel a {
  padding: 12px 4px;
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
}

.nav-panel .nav-phone-mobile {
  padding-top: 14px;
  font-weight: 600;
}

/* =========================================================
   Motion: nav hide/reveal, page-load sequence, scroll reveal, hover feedback
   ========================================================= */

.site-header {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.site-header.nav-scrolled {
  box-shadow: 0 1px 0 var(--line), 0 10px 24px rgba(17, 22, 30, 0.06);
}

.site-header.nav-hidden {
  transform: translateY(-100%);
}

/* Hero: one orchestrated load-in sequence, not scattered fades */
.hero-copy > * {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-in 0.7s ease forwards;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.16s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.30s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.44s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.58s; }

@keyframes hero-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal: single elements */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll reveal: staggered groups (e.g. the four value props) */
.reveal-group > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-group.revealed > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-group.revealed > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-group.revealed > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-group.revealed > *:nth-child(4) { transition-delay: 0.24s; }

/* Hover feedback */
.nav-links a { transition: border-color 0.25s ease; }

.value-item { transition: background 0.25s ease; }
.value-item:hover { background: var(--paper-alt); }
.section-alt .value-item:hover { background: var(--paper); }

.listing-row { transition: background 0.25s ease; }
.listing-row:hover { background: var(--paper-alt); }

.listing-thumb {
  overflow: hidden;
  border-radius: var(--radius);
}
.listing-thumb img {
  transition: transform 0.5s ease;
}
.listing-row:hover .listing-thumb img {
  transform: scale(1.05);
}

.contact-method {
  transition: border-color 0.25s ease, transform 0.2s ease;
}
.contact-method:hover {
  border-color: var(--brass);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy > *,
  .reveal,
  .reveal-group > * {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
  .site-header { transition: none; }
  .listing-thumb img { transition: none; }
}
