/* ==========================================================================
   Y Realty — Base Styles
   ========================================================================== */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-on-paper);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; border-radius: var(--radius-none); }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0 0 1.2em; max-width: var(--prose-measure); }

.on-ink p, .on-ink { color: var(--text-on-ink); }

/* ---- Layout ---------------------------------------------------------- */

.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter-page);
}
@media (max-width: 720px) {
  .wrap { padding: 0 var(--gutter-page-narrow); }
}

.band {
  border-top: 1px solid var(--border-hairline);
}
.band.on-ink { border-top: 1px solid var(--border-hairline-on-ink); }

section { padding: var(--space-9) 0; }
@media (max-width: 720px) {
  section { padding: var(--space-8) 0; }
}

.ground-ink { background: var(--ink-900); color: var(--text-on-ink); }
.ground-paper { background: var(--paper); color: var(--text-on-paper); }

/* ---- Eyebrow / tracked caps -------------------------------------------- */

.eyebrow {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-accent);
}
.on-ink .eyebrow { color: var(--text-accent-on-dark); }

.meta {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone-400);
}
.on-ink .meta { color: var(--stone-300); }

/* ---- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 16px 28px;
  border: 1px solid currentColor;
  border-radius: var(--radius-none);
  background: transparent;
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-standard),
              color var(--duration-base) var(--ease-standard);
}
.btn svg { width: 14px; height: 14px; stroke-width: 1.5; }

.btn-fill {
  background: var(--ink-900);
  color: var(--paper);
  border-color: var(--ink-900);
}
.btn-fill:hover { background: var(--paper); color: var(--ink-900); }

.on-ink .btn-fill {
  background: var(--paper);
  color: var(--ink-900);
  border-color: var(--paper);
}
.on-ink .btn-fill:hover { background: var(--ink-900); color: var(--paper); }

.btn-outline { color: var(--text-on-paper); }
.btn-outline:hover { background: var(--ink-900); color: var(--paper); border-color: var(--ink-900); }
.on-ink .btn-outline { color: var(--paper); }
.on-ink .btn-outline:hover { background: var(--paper); color: var(--ink-900); border-color: var(--paper); }

.btn-pill {
  border-radius: var(--radius-pill);
  padding: 18px 30px;
}

/* Floating connect pill */
.connect-pill {
  position: fixed;
  left: var(--space-5);
  bottom: var(--space-5);
  z-index: 40;
  background: var(--paper);
  color: var(--ink-900);
  border-radius: var(--radius-pill);
  padding: 16px 24px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-base) var(--ease-standard);
}
.connect-pill:hover { transform: translateY(-2px); }
.connect-pill svg { width: 13px; height: 13px; stroke-width: 1.5; }
@media (max-width: 720px) {
  .connect-pill { left: var(--space-4); bottom: var(--space-4); padding: 14px 20px; }
}

/* ---- Nav ------------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink-900);
  border-bottom: 1px solid var(--border-hairline-on-ink);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
}
.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}
@media (max-width: 720px) {
  .brand-logo { height: 30px; }
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-on-ink);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 1px;
  background: var(--sage-300);
  transition: width var(--duration-base) var(--ease-standard);
}
.nav-links a:hover { color: var(--sage-300); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.current { color: var(--paper); }

.nav-phone {
  border: 1px solid var(--border-hairline-on-ink);
  padding: 12px 20px;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--paper);
  white-space: nowrap;
}

.nav-toggle { display: none; }

.mobile-menu {
  display: none;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-phone { display: none; }
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--paper);
    cursor: pointer;
    padding: 8px;
  }
  .mobile-menu {
    display: block;
    max-height: 0;
    overflow: hidden;
    background: var(--ink-900);
    border-bottom: 1px solid var(--border-hairline-on-ink);
    transition: max-height var(--duration-base) var(--ease-standard);
  }
  .mobile-menu.is-open { max-height: 420px; }
  .mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: var(--space-5) var(--gutter-page-narrow) var(--space-6);
  }
  .mobile-menu li { margin-bottom: var(--space-5); }
  .mobile-menu a {
    font-family: var(--font-sans);
    font-size: 13px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--paper);
  }
}

/* ---- Hero -------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  background: var(--ink-900);
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  inset: 0;
  background: url("/assets/hero-conejo-valley.jpg") center 38% / cover no-repeat, radial-gradient(120% 90% at 30% 20%, #1c1c1a 0%, #0e0e0d 55%, #000 100%);
}
.hero-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.15) 0%, rgba(10,10,10,0.55) 78%, rgba(10,10,10,0.85) 100%);
}
.hero-photo .placeholder-label {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(250,248,245,0.28);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: var(--space-9);
  width: 100%;
}
.hero-content .eyebrow { margin-bottom: var(--space-5); }
.hero-content h1 {
  color: var(--paper);
  font-size: clamp(48px, 8vw, 104px);
  max-width: 14ch;
}
.hero-actions {
  margin-top: var(--space-7);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

/* ---- Stat row ------------------------------------------------------------ */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.stat-row .stat {
  border-left: 1px solid var(--border-hairline-on-ink);
  padding-left: var(--space-4);
}
.ground-paper .stat-row .stat { border-left: 1px solid var(--border-hairline); }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  display: block;
}
.stat .label { margin-top: var(--space-2); }
@media (max-width: 720px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); row-gap: var(--space-6); }
}

/* ---- Section headers ------------------------------------------------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-7);
}
.section-head h2 { font-size: clamp(30px, 4vw, 48px); max-width: 16ch; }
.section-head .lede { margin-top: var(--space-3); color: var(--stone-400); max-width: 42ch; }
@media (max-width: 720px) {
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* ---- Listing cards -------------------------------------------------- */

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
@media (max-width: 980px) { .listing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .listing-grid { grid-template-columns: 1fr; } }

.listing-card { display: block; }
.listing-card .frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(160deg, #EDEAE3 0%, #E2DDD2 100%);
  margin-bottom: var(--space-4);
}
.listing-card .frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--duration-reveal) var(--ease-standard);
}
.listing-card:hover .frame img { transform: scale(var(--image-zoom)); }
.listing-card .frame .placeholder-label {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: var(--stone-400);
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
}
.listing-card .flag {
  position: absolute; top: var(--space-4); left: var(--space-4);
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  padding: 8px 14px;
  background: var(--paper); color: var(--ink-900);
}
.listing-card .flag.new { background: var(--moss-700); color: var(--paper); }
.listing-card .flag.pending { background: var(--earth-400); color: var(--paper); }
.listing-card .flag.sold { background: var(--ink-900); color: var(--paper); }
.listing-card .loc { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone-400); margin-bottom: var(--space-2); }
.listing-card .addr { font-family: var(--font-display); font-size: 26px; margin-bottom: var(--space-1); }
.listing-card .price { font-family: var(--font-sans); font-size: 17px; margin-bottom: var(--space-2); }
.listing-card .stats { font-size: 13px; color: var(--stone-400); letter-spacing: 0.02em; }
.listing-card .stats .dot { margin: 0 8px; color: var(--stone-300); }

/* ---- Quote block ------------------------------------------------------ */

.quote-block { max-width: 820px; }
.quote-block blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.3;
  margin: 0 0 var(--space-4);
}
.quote-block cite {
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone-400);
}

/* ---- Editorial "more presence" register -------------------------------- */

.ingress-band {
  background: var(--ink-900);
  color: var(--paper);
  padding: var(--space-8) 0 var(--space-7);
}
.ingress-band .top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-7);
}
.ingress-band h1 {
  color: var(--paper);
  font-size: clamp(44px, 7vw, 76px);
}
.ingress-band .rule {
  width: 2.4in;
  max-width: 60%;
  height: 1px;
  background: var(--moss-700);
  margin: var(--space-5) 0;
}
.ingress-band .meta-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.lead-line {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  color: var(--moss-900);
  max-width: 5.9in;
  line-height: 1.35;
  padding: var(--space-7) 0 0;
}

.drop-cap::first-letter {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 3.4em;
  line-height: 0.72;
  float: left;
  padding-right: 10px;
  padding-top: 6px;
  color: var(--moss-700);
}

.accent-quote {
  background: var(--moss-900);
  color: var(--paper);
  padding: var(--space-7);
}
.accent-quote p {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.4;
  margin: 0;
  max-width: 34ch;
}
.accent-quote cite {
  display: block;
  margin-top: var(--space-4);
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sage-300);
}

/* ---- About page two-column bio grid ------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-9);
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: var(--space-7); }
  .about-grid > div:last-child { max-width: 320px; }
}

/* ---- Sold page testimonial pair ------------------------------------------ */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-7);
}
@media (max-width: 720px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}

/* ---- Contact page two-column layout -------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-9);
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-7); }
}

/* ---- Prose / article --------------------------------------------------- */

.prose {
  max-width: var(--prose-measure);
  font-size: 16px;
  line-height: 1.58;
}
.prose.cols {
  column-count: 2;
  column-gap: var(--print-column-gap);
  max-width: none;
}
@media (max-width: 780px) { .prose.cols { column-count: 1; } }

/* ---- Forms -------------------------------------------------------------- */

.field { margin-bottom: var(--space-5); }
.field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: var(--space-2);
}
.field input, .field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border-hairline);
  background: transparent;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  padding: var(--space-3) 0;
  color: var(--text-on-paper);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-bottom: 1px solid var(--focus-ring);
}
.field textarea { resize: vertical; min-height: 120px; }

/* ---- Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--ink-900);
  color: var(--text-on-ink);
  padding: var(--space-8) 0 var(--space-6);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
  padding-bottom: var(--space-8);
}
.footer-logo {
  height: 48px;
  width: auto;
  display: block;
}
.footer-cols {
  display: flex;
  gap: var(--space-9);
  flex-wrap: wrap;
}
.footer-col h4 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone-300);
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: var(--space-3); }
.footer-col ul.inline-list { display: flex; flex-wrap: wrap; }
.footer-col ul.inline-list li { margin-bottom: 0; }
.footer-col ul.inline-list li:not(:last-child)::after { content: "·"; margin: 0 8px; color: var(--stone-500); }
.footer-col a:hover { color: var(--sage-300); }
.footer-social { display: flex; gap: var(--space-4); }
.footer-social a svg { width: 18px; height: 18px; stroke-width: 1.25; }
.footer-bottom {
  border-top: 1px solid var(--border-hairline-on-ink);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 12px;
  color: var(--stone-400);
}
@media (max-width: 720px) {
  .footer-top { flex-direction: column; gap: var(--space-7); }
  .footer-cols { gap: var(--space-7); }
}

/* ---- Reveal-on-scroll (progressive enhancement) -------------------------- */

/* Visible by default — JS opts elements INTO the hidden starting state so a
   failed/blocked script never leaves content permanently invisible. */
.reveal.reveal-armed {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-reveal) var(--ease-standard),
              transform var(--duration-reveal) var(--ease-standard);
}
.reveal.reveal-armed.is-visible { opacity: 1; transform: translateY(0); }
