/* ==========================================================================
   60 CASA — Design System
   Direction: Spanish-revival architecture meets modern drafting studio.
   Hairline rules, corner brackets, and unit-label typography lifted from
   the property's own floor plans. Olive and sage pulled straight from
   Cal Poly's colors and the hillside behind the building — used sparingly.
   ========================================================================== */

:root {
  --ink:        #1B1815;
  --paper:      #FAF8F3;
  --paper-dim:  #F1EDE4;
  --line:       #1B1815;
  --line-soft:  rgba(27,24,21,0.14);
  --olive: #66702E;
  --sage:       #7C8158;
  --sky:        #6E93A8;
  --white:      #FFFFFF;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Archivo', -apple-system, sans-serif;

  --container: 1280px;
  --gutter: clamp(20px, 4vw, 64px);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

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

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

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

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

p { margin: 0; }

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

/* ---------- Corner-bracket motif (drawn from floor-plan corner marks) --- */
.bracket {
  position: relative;
}
.bracket::before,
.bracket::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  opacity: 0.55;
}
.bracket::before {
  top: -1px; left: -1px;
  border-right: none; border-bottom: none;
}
.bracket::after {
  bottom: -1px; right: -1px;
  border-left: none; border-top: none;
}

/* ---------- Header ------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.brand .brand-mark {
  color: var(--olive);
  font-size: 0.7em;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(20px, 2.4vw, 40px);
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-size: 0.92rem;
  padding: 6px 0;
  position: relative;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid var(--ink);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn span.hide-mobile {
  display: contents;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--olive); border-color: var(--olive); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-accent {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--white);
}
.btn-accent:hover { background: #4E5824; border-color: #4E5824; }

/* ---------- Hero ---------------------------------------------------------- */
.hero {
  position: relative;
  height: 92vh;
  min-height: 680px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--white);
}
.hero video,
.hero .hero-fallback-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(27,24,21,0.15) 0%, rgba(27,24,21,0.05) 35%, rgba(27,24,21,0.72) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(40px, 6vw, 76px);
}
.hero-eyebrow {
  font-size: 0.9rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow .rule {
  width: 40px;
  height: 1px;
  background: var(--white);
  opacity: 0.7;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  max-width: 19ch;
}
.hero-sub {
  margin-top: 22px;
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: rgba(255,255,255,0.88);
}
.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero .btn-ghost {
  border-color: rgba(255,255,255,0.6);
  color: var(--white);
}
.hero .btn-ghost:hover { background: var(--white); color: var(--ink); }

/* ---------- Section scaffolding ------------------------------------------ */
section { padding: clamp(64px, 9vw, 128px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}
.section-head .label {
  font-size: 0.88rem;
  color: var(--olive);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  max-width: 20ch;
}
.section-head .desc {
  max-width: 34ch;
  font-size: 0.98rem;
  color: rgba(27,24,21,0.72);
}

/* ---------- Stat strip ---------------------------------------------------- */
.stat-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-strip .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 34px 28px;
  border-left: 1px solid var(--line-soft);
}
.stat:first-child { border-left: none; }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--olive);
}
.stat .lbl {
  margin-top: 6px;
  font-size: 0.86rem;
  color: rgba(27,24,21,0.68);
}

/* ---------- Intro / editorial block --------------------------------------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.intro-grid h2 {
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
}
.intro-copy {
  font-size: 1.05rem;
  color: rgba(27,24,21,0.78);
  max-width: 52ch;
}
.intro-copy + .intro-copy { margin-top: 16px; }

/* ---------- Feature / floorplan cards -------------------------------------- */
.unit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.unit-card {
  background: var(--paper);
  padding: clamp(28px, 3.4vw, 44px);
  display: flex;
  flex-direction: column;
}
.unit-card .unit-tag {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  padding: 4px 10px;
  margin-bottom: 18px;
}
.unit-card h3 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  margin-bottom: 10px;
}
.unit-meta {
  display: flex;
  gap: 22px;
  margin: 18px 0 22px;
  font-size: 0.92rem;
  flex-wrap: wrap;
}
.unit-meta div span {
  display: block;
  color: rgba(27,24,21,0.55);
  font-size: 0.78rem;
  margin-bottom: 2px;
}
.unit-meta div strong { font-weight: 600; font-size: 1.05rem; }
.unit-card img { border: 1px solid var(--line-soft); margin-top: auto; padding-top: 0; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.unit-card p.intro-copy { margin-bottom: 18px; }

/* ---------- Amenity list ---------------------------------------------------- */
.amenity-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.amenity-group {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(24px, 3vw, 36px);
}
.amenity-group h3 {
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.amenity-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.amenity-group li {
  padding: 9px 0;
  font-size: 0.95rem;
  border-bottom: 1px dotted var(--line-soft);
  display: flex;
  gap: 10px;
}
.amenity-group li:last-child { border-bottom: none; }
.amenity-group li::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: 8px;
  background: var(--olive);
  flex-shrink: 0;
}

/* ---------- Photo grid (gallery) -------------------------------------------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 6px;
}
.photo-grid button {
  border: none;
  padding: 0;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
}
.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.photo-grid button:hover img { transform: scale(1.045); }
.photo-grid .tall { grid-row: span 2; aspect-ratio: 4/6.2; }
.photo-grid .wide { grid-column: span 2; aspect-ratio: 8.3/3; }

/* Home-page "finishes" teaser: plain, non-interactive divs — same uniform
   cell treatment as the gallery's buttons, in a clean 3x2 rhythm. */
.photo-grid.home-finishes > div {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.photo-grid.home-finishes img { width: 100%; height: 100%; object-fit: cover; }

.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-btn {
  border: 1px solid var(--line);
  background: transparent;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
}
.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20,18,15,0.94);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none;
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--white);
  width: 46px;
  height: 46px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.15); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem;
}

/* ---------- Map / location block -------------------------------------------- */
.location-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}
.walk-badge {
  border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 40px);
  display: inline-flex;
  align-items: center;
  gap: 22px;
}
.walk-badge .big {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  color: var(--olive);
  line-height: 1;
}
.walk-badge .cap { font-size: 0.92rem; max-width: 20ch; }

/* ---------- CTA band ------------------------------------------------------- */
.cta-band {
  background: var(--ink);
  color: var(--paper);
}
.cta-band h2 { color: var(--paper); font-size: clamp(2rem, 4vw, 3.2rem); max-width: 18ch; }
.cta-band .desc { color: rgba(250,248,243,0.7); max-width: 40ch; margin-top: 16px; }
.cta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-band .btn-ghost { border-color: rgba(250,248,243,0.5); color: var(--paper); }
.cta-band .btn-ghost:hover { background: var(--paper); color: var(--ink); }

/* ---------- Footer ----------------------------------------------------------- */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}
.footer-grid h4 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0.02em;
  color: rgba(27,24,21,0.5);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-grid li a:hover { color: var(--olive); }
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 10px;
}
.footer-address { font-size: 0.92rem; color: rgba(27,24,21,0.7); max-width: 26ch; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8rem;
  color: rgba(27,24,21,0.5);
  flex-wrap: wrap;
  gap: 10px 20px;
}
.footer-legal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-legal a {
  color: rgba(27,24,21,0.5);
}
.footer-legal a:hover {
  color: var(--olive);
}
.footer-eho {
  display: inline-flex;
  margin-left: 10px;
  opacity: 0.85;
  transition: opacity 0.18s ease;
}
.footer-eho:hover { opacity: 1; }
.footer-eho img { display: block; border-radius: 3px; }

/* ---------- Page header (non-home pages) ------------------------------------- */
.page-hero {
  padding: clamp(64px, 9vw, 110px) 0 clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
.page-hero .label {
  color: var(--olive);
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
  margin-bottom: 14px;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  max-width: 22ch;
}
.page-hero .desc {
  margin-top: 18px;
  max-width: 52ch;
  font-size: 1.05rem;
  color: rgba(27,24,21,0.72);
}

/* ---------- Availability page ------------------------------------------------- */
.availability-panel {
  border: 1px solid var(--line);
  padding: clamp(28px, 4vw, 48px);
}
.availability-panel .appfolio-embed {
  min-height: 420px;
}

/* ---------- Contact page ------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
}
.contact-card {
  border: 1px solid var(--line);
  padding: clamp(28px, 3.6vw, 44px);
}
.contact-row {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  gap: 20px;
}
.contact-row:last-child { border-bottom: none; }
.contact-row span:first-child { color: rgba(27,24,21,0.55); font-size: 0.9rem; }
.contact-row a, .contact-row strong { font-weight: 600; text-align: right; }

.form-field {
  margin-bottom: 20px;
}
.form-field label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: rgba(27,24,21,0.7);
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--ink);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: 2px solid var(--olive);
  outline-offset: 1px;
}

/* ---------- Scroll cue (hero) ------------------------------------------------- */
.scroll-cue {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.scroll-cue .chevron {
  width: 1px;
  height: 30px;
  background: rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
}
.scroll-cue .chevron::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  animation: scrollDrip 1.8s ease-in-out infinite;
}
@keyframes scrollDrip {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

/* ---------- FAQ ----------------------------------------------------------------- */
.faq-list {
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: none;
  border: none;
  text-align: left;
  padding: 26px 4px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: var(--ink);
}
.faq-q .idx {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--olive);
  font-weight: 700;
  margin-right: 16px;
}
.faq-q .plus {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  position: relative;
  transition: transform 0.25s ease, background 0.2s ease;
}
.faq-q .plus::before, .faq-q .plus::after {
  content: "";
  position: absolute;
  background: var(--ink);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.faq-q .plus::before { width: 12px; height: 1.5px; }
.faq-q .plus::after { width: 1.5px; height: 12px; transition: opacity 0.2s ease; }
.faq-item.open .faq-q .plus { background: var(--ink); }
.faq-item.open .faq-q .plus::before, .faq-item.open .faq-q .plus::after { background: var(--paper); }
.faq-item.open .faq-q .plus::after { opacity: 0; }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-a-inner {
  padding: 0 4px 30px 44px;
  max-width: 62ch;
  color: rgba(27,24,21,0.75);
  font-size: 1rem;
  line-height: 1.65;
}
.faq-a-inner img {
  margin-top: 18px;
  border: 1px solid var(--line-soft);
  max-width: 420px;
  background: #fff;
}
.faq-jump {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

/* ---------- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-nav.open {
    display: block;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
  }
  .site-nav.open ul { flex-direction: column; gap: 4px; }
  .site-nav.open li { border-bottom: 1px solid var(--line-soft); }
  .site-nav.open a { display: block; padding: 14px 0; }
  .header-actions .btn span.hide-mobile { display: none; }
  .header-actions .btn-resident { display: none; }

  .stat-strip .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(1), .stat:nth-child(3) { border-left: none; }
  .stat { border-left: 1px solid var(--line-soft); }
  .stat:nth-child(odd) { border-left: none; }

  .intro-grid { grid-template-columns: 1fr; }
  .unit-grid { grid-template-columns: 1fr; }
  .amenity-columns { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid .wide { grid-column: span 2; }
  .photo-grid .tall { grid-row: span 1; aspect-ratio: 4/3; }
  .location-block { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-row { flex-direction: column; align-items: flex-start; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (min-width: 901px) {
  .site-nav .mobile-only { display: none; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { height: 100vh; }
  .scroll-cue { display: none; }
}
