/* ==========================================================================
   Home page.

   Structure and treatment follow carolinesweezeyrealestate.com, at John's
   request: a light page, a split navigation around a centred mark, a name and
   a search bar over the opening, then a run of alternating white, grey, slate
   and black panels. Quicksand for labels and body, a garamond for headings.
   Everything is set with generous space and small tracked capitals; nothing
   is decorated.

   Every colour, face and measure is a brand token from brand_css_vars(), so a
   second agent's site is a config change and not a rewrite of this file.
   ========================================================================== */

/* --- Page ------------------------------------------------------------------ */

.page-home {
  background: var(--c-paper);
  color: var(--c-ink);
  padding-top: 0;
  font-weight: 400;
}

.page-home .wrap { width: min(1280px, 100% - (var(--s-gutter) * 2)); margin-inline: auto; }

/* .center, .eyebrow-l and the light button variants live in site.css now,
   because the valuation page uses them too. */

/* --- Type helpers ---------------------------------------------------------- */

.h-serif {
  margin: 0 0 1.5rem;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  color: var(--c-ink);
}
.h-serif--light { color: var(--c-white); }

/* --- Opening --------------------------------------------------------------- */

.open {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  color: var(--c-white);
  overflow: hidden;
  background: var(--c-slate);
}

.open__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.open__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.18) 35%, rgba(0, 0, 0, 0.28) 100%);
}

.open__body {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(880px, 100% - (var(--s-gutter) * 2));
  margin: 0 auto;
  padding: 9rem 0 4rem;
  text-align: center;
}

.open__kicker {
  margin: 0 0 1.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.open__name {
  margin: 0 0 2.4rem;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-white);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
}

.open__search {
  display: flex;
  align-items: center;
  width: min(640px, 100%);
  margin: 0 auto;
  background: var(--c-white);
  border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 1.6rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}
.open__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-ink);
  padding: 0.7rem 0;
  outline: none;
}
.open__search input::placeholder { color: var(--c-muted); font-weight: 400; }
.open__search input::-webkit-search-decoration,
.open__search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.open__search button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--c-ink);
  color: var(--c-white);
  cursor: pointer;
  transition: background-color .18s ease;
}
.open__search button:hover { background: var(--c-slate); }

.open__fair {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
  padding: 1.05rem var(--s-gutter);
  background: rgba(20, 20, 20, 0.72);
  backdrop-filter: blur(6px);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}
.open__fair a { color: var(--c-white); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.6); }
.open__fair svg { flex: none; }

/* --- Intro ----------------------------------------------------------------- */

.intro {
  padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  text-align: center;
}
.intro__inner { max-width: 820px; }
.intro__tag {
  margin: 0 0 1.4rem;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--c-ink);
}
.intro__text {
  margin: 0 auto;
  max-width: 62ch;
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--c-body);
}

/* --- Guide tiles ----------------------------------------------------------- */

.guides {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background-color: var(--c-slate);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

/*
 * One photograph, three windows onto it.
 *
 * The image belongs to the row, not to each tile, and background-attachment
 * fixed sizes and positions it against the viewport rather than the element.
 * So the three tiles show three parts of one house, the joins between them
 * disappear, and scrolling moves the tiles across a still image instead of
 * moving the image.
 *
 * Two places it is turned off. iOS Safari does not implement fixed attachment
 * and falls back to something that judders, and a narrow screen stacks the
 * tiles into a column. In both the photograph simply sits behind the row,
 * which is the same picture without the trick.
 */
.guide {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 2.6;
  color: var(--c-white);
  text-decoration: none;
}

/* Hairlines so three links still read as three, on one continuous image.
   On the veil rather than the tile, so they paint above the photograph. */
.guide + .guide .guide__veil { box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.28); }

.guide__veil {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.36);
  transition: background-color .3s ease;
}
.guide:hover .guide__veil { background: rgba(0, 0, 0, 0.5); }
.guide__label {
  position: relative;
  z-index: 1;
  padding: 0.85rem 1.7rem;
  border: 1px solid rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.12);
  transition: background-color .2s ease, color .2s ease;
}
.guide:hover .guide__label { background: var(--c-white); color: var(--c-ink); }

@media (max-width: 760px) {
  .guides { grid-template-columns: 1fr; }
  .guide { aspect-ratio: 16 / 9; }
  .guide + .guide .guide__veil { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28); }
}

/* Touch browsers either ignore fixed attachment or judder on it. */
@media (hover: none) {
  .guides { background-attachment: scroll; }
}

@media (prefers-reduced-motion: reduce) {
  .guides { background-attachment: scroll; }
}

/* --- Meet ------------------------------------------------------------------ */

.meet {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--c-slate);
}
.meet__photo {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
}
.meet__photo img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  object-position: center top;
}
.meet__panel {
  display: flex;
  align-items: center;
  color: var(--c-white);
  padding: clamp(3.5rem, 7vw, 6.5rem) clamp(2rem, 6vw, 6rem);
}
.meet__inner { max-width: 560px; }
.meet__bio {
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.86);
}
.meet__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 2.2rem 0 0;
}

@media (max-width: 860px) {
  .meet { grid-template-columns: 1fr; }
  .meet__photo img { min-height: 0; aspect-ratio: 4 / 3; object-position: center 20%; }
}

/* --- Results --------------------------------------------------------------- */

.results {
  background: #000;
  color: var(--c-white);
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  text-align: center;
}
.results .h-serif { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.results__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1080px;
  margin: 0 auto;
}
.result { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.result__n {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 0.02em;
}
.result__l {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  max-width: 22ch;
  line-height: 1.6;
}
.results .source-note {
  margin: 3rem auto 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
}

@media (max-width: 760px) {
  .results__row { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* --- Portfolio ------------------------------------------------------------- */

.portfolio {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  text-align: center;
  background: var(--c-paper);
}
.portfolio .h-serif { margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }

.portfolio__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3rem) / 3);
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
  text-align: left;
}
.portfolio__track::-webkit-scrollbar { display: none; }

.pcard {
  scroll-snap-align: start;
  display: block;
  color: var(--c-ink);
  text-decoration: none;
  background: var(--c-white);
}
.pcard__media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--c-paper-alt);
}
.pcard__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.pcard:hover .pcard__media img { transform: scale(1.04); }
.pcard__tag {
  position: absolute;
  top: 0.9rem; left: 0.9rem;
  padding: 0.4rem 0.75rem;
  background: var(--c-white);
  color: var(--c-ink);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.pcard__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.2rem 0.25rem 0;
}
.pcard__addr {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--c-ink);
}
.pcard__specs {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.pcard__price {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--c-ink);
}
.pcard__attr {
  font-size: 0.68rem;
  color: var(--c-muted);
  line-height: 1.5;
}

.portfolio__nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0 1.75rem;
}
.pbtn {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border: 1px solid var(--c-ink);
  border-radius: 50%;
  background: transparent;
  color: var(--c-ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.pbtn:hover { background: var(--c-ink); color: var(--c-white); }
.pbtn:disabled { opacity: 0.3; cursor: default; }

@media (max-width: 960px) {
  .portfolio__track { grid-auto-columns: calc((100% - 1.5rem) / 2); }
}
@media (max-width: 620px) {
  .portfolio__track { grid-auto-columns: 86%; }
}

/* --- The record (testimonials slot) ---------------------------------------- */

.stories {
  background: var(--c-paper-alt);
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  text-align: center;
}
.stories .h-serif--light { color: var(--c-ink); }
.stories__inner { max-width: 760px; }
.stories__lede {
  margin: 0 auto 2.2rem;
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--c-ink);
}
.stories .source-note { margin: 2.5rem auto 0; font-size: 0.72rem; color: var(--c-muted); }

/* --- Neighbourhood guides -------------------------------------------------- */

.hoods {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  text-align: center;
  background: var(--c-paper);
}
.hoods .h-serif { margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }
.hoods__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}
.hood {
  display: block;
  color: var(--c-ink);
  text-decoration: none;
}
.hood__media {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--c-slate);
}
.hood__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.hood:hover .hood__media img { transform: scale(1.05); }
.hood__name {
  display: block;
  padding-top: 1rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

@media (max-width: 960px) { .hoods__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .hoods__grid { grid-template-columns: repeat(2, 1fr); } }

/* --- Valuation ------------------------------------------------------------- */

.value {
  background: var(--c-paper-alt);
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  text-align: center;
}
.value .h-serif--light { color: var(--c-ink); }
.value__inner { max-width: 820px; }
.value__points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2.6rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2.4rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-body);
}
.value__points li::before { content: "\2713\00a0\00a0"; color: var(--c-ink); }
.value__form {
  display: flex;
  gap: 0.75rem;
  max-width: 720px;
  margin: 0 auto;
}
.value__form input {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--c-line);
  background: var(--c-white);
  font-family: var(--f-body);
  font-size: 0.95rem;
  color: var(--c-ink);
}
.value__form .btn--white { background: var(--c-ink); color: var(--c-white); border-color: var(--c-ink); white-space: nowrap; }
.value__form .btn--white:hover { background: var(--c-slate); border-color: var(--c-slate); }

@media (max-width: 620px) {
  .value__form { flex-direction: column; }
}

/* --- Newsletter ------------------------------------------------------------ */

.letter {
  background: var(--c-slate);
  color: var(--c-white);
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  text-align: center;
}
.letter__inner { max-width: 820px; }
.letter__lede {
  margin: 0 auto 2.2rem;
  max-width: 56ch;
  font-size: 0.98rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.86);
}
.letter__form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  max-width: 760px;
  margin: 0 auto 1.4rem;
}
.letter__form input {
  min-width: 0;
  padding: 1rem 1.2rem;
  border: 1px solid transparent;
  background: var(--c-white);
  font-family: var(--f-body);
  font-size: 0.95rem;
  color: var(--c-ink);
}
.letter__fine {
  margin: 0 auto;
  max-width: 60ch;
  font-size: 0.72rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 620px) {
  .letter__form { grid-template-columns: 1fr; }
}

/* --- Work with ------------------------------------------------------------- */

.work {
  background: var(--c-paper-alt);
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  text-align: center;
}
.work .h-serif--light { color: var(--c-ink); }
.work__inner { max-width: 720px; }
.work__lede {
  margin: 0 auto 2.2rem;
  max-width: 54ch;
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--c-body);
}

/* --- Contact strip --------------------------------------------------------- */

.cstrip {
  background: var(--c-paper);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
  text-align: center;
  border-bottom: 1px solid var(--c-line);
}
.cstrip__name {
  margin: 0 0 0.4rem;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cstrip__role {
  margin: 0 0 2.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.cstrip__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 980px;
  margin: 0 auto 2.2rem;
}
.cstrip__list dt {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 0.4rem;
}
.cstrip__list dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-ink);
}
.cstrip__list dd a { color: inherit; text-decoration: none; }
.cstrip__list dd a:hover { text-decoration: underline; }
.cstrip__broker {
  margin: 0;
  font-size: 0.8rem;
  color: var(--c-body);
}

@media (max-width: 760px) {
  .cstrip__list { grid-template-columns: 1fr; }
}

/* --- Motion ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .pcard__media img, .hood__media img { transition: none; }
}
