/* Blue Vista Farm
   Quiet, editorial, cream and ink, one muted blueberry accent. */

:root {
  --cream: #f5f0e6;
  --cream-deep: #ebe4d4;
  --ink: #1e1c19;
  --ink-soft: #625c51;
  --rule: #d7cfbf;
  --accent: #5b6a86;       /* dusty blueberry */
  --accent-deep: #444f66;
  --head: "Cormorant Garamond", "Cormorant", Garamond, Georgia, "Times New Roman", serif;
  --body: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --measure: 36rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.075rem, 0.95rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  font-feature-settings: "liga", "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

figure { margin: 0; }

a { color: inherit; }

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

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 500;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.005em;
}

p { margin: 0 0 1.25em; }

/* Skip link */
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--cream);
  padding: .5rem .9rem;
  z-index: 200;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Header */
.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  color: #fff;
  transition: background-color .5s ease, color .5s ease, box-shadow .5s ease;
}
.site-head a {
  text-decoration: none;
  font-family: var(--body);
  font-size: .82rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-head .wordmark {
  font-family: var(--head);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: .18em;
}
.site-head .head-link {
  border-bottom: 1px solid currentColor;
  padding-bottom: .15rem;
  opacity: .9;
}
.site-head .head-link .short { display: none; }
.site-head .head-link:hover { opacity: 1; }
.site-head:not(.solid) a { text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 0 14px rgba(0, 0, 0, .35); }
.site-head:not(.solid) .head-link { opacity: 1; }
.site-head.solid {
  background: rgba(245, 240, 230, .94);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--rule);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.site-head.solid .head-link { color: var(--accent-deep); border-color: var(--accent-deep); }
@media (max-width: 640px) {
  .site-head { padding-top: .9rem; padding-bottom: .9rem; }
  .site-head .wordmark { font-size: 1rem; letter-spacing: .14em; }
  .site-head .head-link { font-size: .72rem; letter-spacing: .16em; }
  .site-head .head-link .long { display: none; }
  .site-head .head-link .short { display: inline; }
}

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 34rem;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18, 16, 13, .94) 0%, rgba(18, 16, 13, .82) 18%, rgba(18, 16, 13, .5) 34%, rgba(18, 16, 13, .12) 50%, rgba(18, 16, 13, 0) 62%),
              linear-gradient(to right, rgba(18, 16, 13, .62) 0%, rgba(18, 16, 13, .3) 30%, rgba(18, 16, 13, 0) 62%),
              linear-gradient(to bottom, rgba(18, 16, 13, .66) 0%, rgba(18, 16, 13, .38) 10%, rgba(18, 16, 13, .12) 20%, rgba(18, 16, 13, 0) 30%);
  pointer-events: none;
}
.hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0 var(--gutter) clamp(1.75rem, 5vh, 3.25rem);
  max-width: 70rem;
  text-shadow: 0 1px 24px rgba(0, 0, 0, .35);
}
.hero h1 {
  font-size: clamp(2.8rem, 2.2rem + 5vw, 6.5rem);
  font-weight: 400;
  line-height: .95;
  margin: .35rem 0 1rem;
}
.hero-line {
  font-family: var(--head);
  font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.9rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  max-width: 34rem;
  margin-bottom: 1.4rem;
}
.hero-price {
  font-size: clamp(1rem, .9rem + .4vw, 1.2rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}
.hero-cta {
  display: inline-block;
  font-size: .85rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .7);
  padding-bottom: .25rem;
  transition: border-color .3s ease, opacity .3s ease;
}
.hero-cta:hover { border-color: #fff; }

@media (max-width: 759px) {
  .hero-img { object-position: 42% 40%; }
  .hero::after {
    background: linear-gradient(to top, rgba(18, 16, 13, .95) 0%, rgba(18, 16, 13, .86) 24%, rgba(18, 16, 13, .62) 44%, rgba(18, 16, 13, .22) 62%, rgba(18, 16, 13, 0) 76%),
                linear-gradient(to right, rgba(18, 16, 13, .5) 0%, rgba(18, 16, 13, 0) 70%),
                linear-gradient(to bottom, rgba(18, 16, 13, .3) 0%, rgba(18, 16, 13, 0) 22%);
  }
}

/* Subpage (details.html) */
.subpage { padding-top: 3.6rem; }
.page-intro { padding-top: clamp(3rem, 7vw, 6rem); }
.page-title {
  font-size: clamp(2.6rem, 2rem + 3vw, 4.4rem);
  font-weight: 400;
  margin-bottom: 1.2rem;
}
.info { padding-top: clamp(3rem, 7vw, 6rem); }
.info .facts { margin-top: clamp(1.2rem, 2.5vw, 2rem); }
.text-link {
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.text-link:hover { border-color: var(--accent-deep); }
.plain {
  list-style: none;
  margin: clamp(1.2rem, 2.5vw, 2rem) 0 0;
  padding: 0;
  max-width: var(--measure);
}
.plain li {
  padding: .6rem 0;
  border-bottom: 1px solid var(--rule);
}
.plain li:first-child { border-top: 1px solid var(--rule); }

/* Eyebrow labels */
.eyebrow {
  font-family: var(--body);
  font-size: .8rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}
.eyebrow.light { color: rgba(255, 255, 255, .85); margin-bottom: 0; }

/* Layout */
.section {
  padding: clamp(4.5rem, 11vw, 10rem) 0 0;
}
.section:last-of-type { padding-bottom: clamp(4.5rem, 11vw, 10rem); }
.container {
  width: min(100% - 2 * var(--gutter), 78rem);
  margin-inline: auto;
}
.container.narrow { width: min(100% - 2 * var(--gutter), 46rem); }

.prose { max-width: var(--measure); }
.prose h2 {
  font-size: clamp(2.3rem, 1.8rem + 2.6vw, 3.9rem);
  margin-bottom: 1.4rem;
}
.prose p { margin-bottom: 1.2em; }
.prose p:last-child { margin-bottom: 0; }

/* Full-bleed photos */
.bleed {
  margin-top: clamp(2.75rem, 6vw, 5rem);
}
.bleed img {
  width: 100%;
  height: clamp(20rem, 78vh, 56rem);
  object-fit: cover;
}
@media (max-width: 759px) {
  .bleed img { height: auto; aspect-ratio: 3 / 2; }
}
.bleed.captioned figcaption {
  width: min(100% - 2 * var(--gutter), 78rem);
  margin: .9rem auto 0;
  font-size: .95rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* Paired photos */
.pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: clamp(1rem, 2.5vw, 2rem);
}
.pair figure {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.pair figure.sq { aspect-ratio: 1 / 1; }
.pair figure.r43 { aspect-ratio: 4 / 3; }
.pair figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (min-width: 760px) {
  .pair { grid-template-columns: 1fr 1fr; }
  .pair.offset figure:last-child { margin-top: clamp(2rem, 6vw, 5rem); }
  .pair.offset figure:first-child { margin-bottom: clamp(2rem, 6vw, 5rem); }
}
.bleed + .container .pair { margin-top: clamp(1rem, 2.5vw, 2rem); }
.prose + .pair, .container:has(.prose) + .container .pair { margin-top: clamp(2.75rem, 6vw, 5rem); }

/* The location: map and drive times */
.location {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  align-items: start;
}
@media (min-width: 860px) {
  .location { grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); }
}
.map { max-width: 40rem; }
.map-svg {
  display: block;
  width: 100%;
  height: auto;
  --paper: #efe7d5;
  --wash: #e2e7eb;
  --shore: #2a2724;
}
.map figcaption {
  margin-top: .8rem;
  font-size: .9rem;
  font-style: italic;
  color: var(--ink-soft);
}
.map-svg .land-bg { fill: var(--paper); }
.map-svg .water {
  fill: var(--wash);
  stroke: var(--shore);
  stroke-width: .8;
  stroke-opacity: .85;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.map-svg .island {
  fill: var(--paper);
  stroke: var(--shore);
  stroke-width: .8;
  stroke-opacity: .85;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.map-svg .road {
  fill: none;
  stroke: #6f6a60;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.map-svg .road-13 { stroke-width: 1.1; }
.map-svg .road-j { stroke-width: .9; stroke-dasharray: 3 2; }
.map-svg .dot { fill: var(--ink); }
.map-svg .farm-halo { fill: none; stroke: var(--paper); stroke-width: 3.5; }
.map-svg .farm { fill: var(--accent); stroke: #fff; stroke-width: 1.6; }
.map-svg text {
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.map-svg .town, .map-svg .small, .map-svg .inset-label {
  font-family: var(--body);
  font-size: 13px;
  font-variant: small-caps;
  letter-spacing: .06em;
}
.map-svg .small { font-size: 11px; }
.map-svg .inset-label { font-size: 9.5px; letter-spacing: .04em; stroke-width: 2.5px; }
.map-svg .farm-label {
  font-family: var(--head);
  font-style: italic;
  font-weight: 500;
  font-size: 16px;
  fill: var(--ink);
}
.map-svg .water-label {
  font-family: var(--head);
  font-style: italic;
  font-size: 21px;
  letter-spacing: .05em;
  fill: #4d5761;
  stroke: var(--wash);
}
.map-svg .water-label.small { font-size: 15px; }
.map-svg .scale line, .map-svg .north line { stroke: var(--ink); stroke-width: 1; }
.map-svg .north path { fill: var(--ink); }
.map-svg .inset-bg { fill: var(--paper); }
.map-svg .inset-lake { fill: var(--wash); stroke: var(--shore); stroke-width: .6; stroke-opacity: .8; vector-effect: non-scaling-stroke; }
.map-svg .inset-frame { fill: none; stroke: var(--ink); stroke-width: .8; stroke-opacity: .7; }
.map-svg .inset-box { fill: var(--accent); fill-opacity: .18; stroke: var(--accent-deep); stroke-width: 1; }
.map-svg .inset-dot { fill: var(--ink); }
@media (max-width: 599px) {
  .map-svg .inset, .map-svg .inset-frame { display: none; }
}
@media (max-width: 480px) {
  .map-svg .town { font-size: 17px; }
  .map-svg .town.island { font-size: 13px; }
  .map-svg .farm-label { font-size: 21px; }
  .map-svg .water-label { font-size: 27px; }
  .map-svg .water-label.small { font-size: 19px; }
  .map-svg .inset-label { font-size: 13px; }
  .map-svg .small { font-size: 14px; }
  .map-svg .farm { r: 6; }
  .map-svg .farm-halo { r: 9.5; }
  .map-svg .dot { r: 3.4; }
}
.location-text { max-width: var(--measure); }
.drive {
  margin: 1.8rem 0 0;
  padding: 0;
}
.drive > div {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .45rem 0;
  border: 0;
}
.drive dt {
  font-variant: small-caps;
  letter-spacing: .05em;
  flex: 0 1 auto;
}
.drive dd {
  margin: 0;
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-variant-numeric: lining-nums;
}
.drive > div::after {
  content: "";
  order: 1;
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  border-bottom: 1px dotted var(--ink-soft);
  transform: translateY(-.35em);
}
.drive dd { order: 2; }
.more {
  margin-top: 1.6rem;
  font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.more a {
  text-decoration: none;
  color: var(--accent-deep);
  border-bottom: 1px solid var(--accent-deep);
  padding-bottom: .15rem;
}

/* Gallery */
.gallery {
  list-style: none;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-flow: dense;
  gap: clamp(.6rem, 1.4vw, 1.1rem);
}
.gallery li { grid-column: span 3; }
/* A photo left alone on the last row stretches across it */
.gallery li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.gallery li.w3 { grid-column: span 3; }
.gallery li.w6 { grid-column: span 6; }
@media (min-width: 760px) {
  .gallery li { grid-column: span 2; }
  .gallery li.w3 { grid-column: span 3; }
  .gallery li.w6 { grid-column: span 6; }
}
.gallery a {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--cream-deep);
  outline-offset: 3px;
}
.gallery li.w6 a { aspect-ratio: 21 / 10; }
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2, .6, .2, 1), opacity .6s ease;
}
@media (hover: hover) {
  .gallery a:hover img { transform: scale(1.03); }
}

/* Facts table */
.facts {
  width: 100%;
  border-collapse: collapse;
  margin-top: clamp(2rem, 4vw, 3rem);
  font-size: 1.02em;
}
.facts th, .facts td {
  text-align: left;
  vertical-align: top;
  padding: .85rem 0;
  border-bottom: 1px solid var(--rule);
}
.facts tr:first-child th, .facts tr:first-child td { border-top: 1px solid var(--rule); }
.facts th {
  font-weight: 400;
  color: var(--ink-soft);
  width: 38%;
  padding-right: 1.5rem;
  font-variant-numeric: lining-nums;
}
.facts td { font-variant-numeric: lining-nums; }
.footnote {
  margin-top: 1.4rem;
  font-size: .95rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* Contact */
.contact { padding-bottom: clamp(4.5rem, 11vw, 10rem); }
.agent {
  font-style: normal;
  display: grid;
  gap: .2rem;
  margin: 1.8rem 0 2.2rem;
  padding-left: 1.2rem;
  border-left: 1px solid var(--accent);
}
.agent a { text-decoration: none; color: var(--accent-deep); border-bottom: 1px solid var(--rule); width: max-content; max-width: 100%; }
.agent a:hover { border-color: var(--accent-deep); }
.agent-name { font-family: var(--head); font-size: 1.5rem; font-weight: 500; line-height: 1.15; }
.agent-role, .agent-office { color: var(--ink-soft); }
.agent-office { margin-top: .3rem; }

.btn {
  display: inline-block;
  padding: .95rem 1.9rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-size: .85rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}
.btn:hover, .btn:focus-visible {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--cream);
}
@media (max-width: 480px) {
  .btn {
    display: block;
    text-align: center;
    padding: .9rem 1rem;
    font-size: .8rem;
    letter-spacing: .14em;
  }
}

/* Agent card with brokerage logo */
.agent-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem 2.4rem;
  align-items: center;
  margin: 1.8rem 0 2.2rem;
}
.agent-card .agent { margin: 0; }
.agent-logo {
  width: min(100%, 15rem);
  height: auto;
}
@media (min-width: 640px) {
  .agent-card { grid-template-columns: auto 1fr; }
  .agent-logo { width: 14rem; }
}
.agent .agent-role { color: var(--ink-soft); }

/* Footer */
.site-foot {
  border-top: 1px solid var(--rule);
  padding: 2.6rem var(--gutter) 3rem;
  text-align: center;
  font-size: .9rem;
  color: var(--ink-soft);
}
.site-foot p { margin: 0 0 .35rem; }
.site-foot a { color: var(--accent-deep); text-decoration: none; border-bottom: 1px solid var(--rule); }
.site-foot a:hover { border-color: var(--accent-deep); }
.foot-brand { margin-bottom: 1.4rem; }
.foot-logo {
  width: 10rem;
  height: auto;
  margin: 0 auto 1rem;
}
.eho {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  justify-content: center;
  width: min(100%, 44rem);
  margin: 1.6rem auto 1.4rem;
  text-align: left;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ink);
}
.eho-logo {
  flex: 0 0 auto;
  width: 3.8rem;
  height: auto;
  color: var(--ink);
}
.eho p { margin: 0; }
@media (max-width: 480px) {
  .eho { flex-direction: column; text-align: center; }
  .eho-logo { width: 4.6rem; }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(1.2rem);
  transition: opacity 1s cubic-bezier(.2, .6, .2, 1), transform 1s cubic-bezier(.2, .6, .2, 1);
}
.reveal.in { opacity: 1; transform: none; }
.no-observer .reveal { opacity: 1; transform: none; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(17, 15, 13, .96);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  padding: 3.5rem .5rem 3rem;
  touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lb-figure {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  gap: .75rem;
  min-height: 0;
}
.lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  user-select: none;
  -webkit-user-drag: none;
}
.lb-caption {
  display: flex;
  gap: 1.2rem;
  justify-content: space-between;
  width: min(100%, 60rem);
  font-size: .95rem;
  color: rgba(255, 255, 255, .78);
  padding: 0 .5rem;
}
.lb-count { flex-shrink: 0; letter-spacing: .1em; }
.lightbox button {
  position: absolute;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, .85);
  font-family: var(--head);
  cursor: pointer;
  padding: .5rem .9rem;
  line-height: 1;
  transition: color .2s ease;
}
.lightbox button:hover, .lightbox button:focus-visible { color: #fff; }
.lb-close { top: .6rem; right: .8rem; font-size: 2.4rem; }
.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3.6rem;
  padding: 1rem;
}
.lb-prev { left: .2rem; }
.lb-next { right: .2rem; }
@media (max-width: 760px) {
  .lightbox { padding: 3rem 0 2.5rem; }
  .lb-prev, .lb-next { top: auto; bottom: .1rem; transform: none; font-size: 2.6rem; }
  .lb-prev { left: 1.5rem; }
  .lb-next { right: 1.5rem; }
  .lb-caption { padding: 0 6rem; flex-direction: column; gap: .2rem; align-items: center; text-align: center; font-size: .85rem; }
}
body.lb-open { overflow: hidden; }

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gallery img { transition: none; }
  .site-head { transition: none; }
}

/* Print: keep it readable */
@media print {
  .site-head, .lightbox, .hero-cta, .btn { display: none !important; }
  .hero { height: auto; }
  .hero-img { position: static; height: auto; }
  .hero-text { position: static; color: var(--ink); text-shadow: none; }
  .reveal { opacity: 1; transform: none; }
}
