/* ==========================================================================
   Marshfield Beach House: design tokens
   Palette pulled from the actual property: weathered shingle siding,
   evening marsh sky, dune grass, and the brass of an old lighthouse lamp.
   ========================================================================== */

:root {
  --ink:        #1D2B36;   /* deep evening sky / shutters */
  --shingle:    #8A99A3;   /* the house's actual siding color */
  --shingle-lt: #B7C2C9;
  --sand:       #F1ECE1;   /* background */
  --sand-dark:  #E4DCCB;
  --white:      #FDFCF9;
  --marsh:      #5C6B4F;   /* dune / marsh grass green */
  --marsh-dk:   #3E4A36;
  --brass:      #B9924A;   /* lighthouse-lamp accent */
  --brass-lt:   #D8BA82;

  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

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

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

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

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

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

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

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  display: block;
  margin-bottom: 14px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 252, 249, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(29, 43, 54, 0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand small {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--marsh);
  font-weight: 400;
  letter-spacing: 0.08em;
}

.site-nav { display: flex; gap: 32px; align-items: center; }

.site-nav a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav a:hover::after { transform: scaleX(1); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--marsh-dk); }

.btn-ghost {
  background: transparent;
  border-color: rgba(29,43,54,0.35);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

.nav-cta { display: inline-flex; }

@media (max-width: 640px) {
  .site-nav { gap: 16px; }
  .site-nav a:not(.nav-cta) { display: none; }
  .brand small { display: none; }
}

/* ---------- Marsh grass divider (signature motif) ---------- */

.grass-divider {
  width: 100%;
  height: 46px;
  display: block;
  color: var(--marsh);
}
.grass-divider.brass { color: var(--brass); }
.grass-divider.on-ink { color: var(--shingle-lt); }

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

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(29,43,54,0.15) 0%, rgba(29,43,54,0.15) 40%, rgba(20,28,34,0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: 72px;
  width: 100%;
}

.hero-content .eyebrow { color: var(--brass-lt); }

.hero h1 {
  font-size: clamp(40px, 6.5vw, 84px);
  color: var(--white);
  max-width: 16ch;
}

.hero-sub {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--sand);
  margin-top: 20px;
  max-width: 46ch;
}

.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-actions .btn-ghost { border-color: rgba(253,252,249,0.5); color: var(--white); }
.hero-actions .btn-ghost:hover { border-color: var(--white); background: rgba(253,252,249,0.08); }

/* ---------- Sections ---------- */

section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { margin-top: 16px; color: var(--marsh-dk); font-size: 17px; }

/* Intro / two column */
.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; gap: 36px; } }

.intro-copy p { font-size: 17.5px; color: var(--ink); margin: 0 0 18px; }
.intro-copy p:last-child { margin-bottom: 0; }

.stat-card {
  background: var(--white);
  border: 1px solid var(--sand-dark);
  border-radius: var(--radius);
  padding: 28px;
}
.stat-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--sand-dark); }
.stat-row:last-child { border-bottom: none; }
.stat-label { font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--marsh); }
.stat-value { font-family: var(--font-display); font-size: 17px; font-weight: 600; }

/* ---------- Property cards (index) ---------- */

.property-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }
.property-grid-single { grid-template-columns: minmax(320px, 560px); justify-content: center; }

.property-card {
  background: var(--white);
  border: 1px solid var(--sand-dark);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.property-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(29,43,54,0.12); }

.property-card .img-wrap { aspect-ratio: 4/3; overflow: hidden; }
.property-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.property-card:hover img { transform: scale(1.05); }

.property-card-body { padding: 26px 26px 30px; }
.property-card-body .eyebrow { margin-bottom: 8px; }
.property-card-body h3 { font-size: 24px; margin-bottom: 8px; }
.property-card-body p { margin: 0; color: var(--marsh-dk); font-size: 15px; }

.property-card-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--brass);
  text-transform: uppercase;
}

.property-card.coming-soon { opacity: 0.55; cursor: default; }
.property-card.coming-soon:hover { transform: none; box-shadow: none; }

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 160px;
  grid-auto-flow: dense;
  gap: 10px;
}
.gallery button {
  border: none; padding: 0; margin: 0; background: none; cursor: pointer;
  overflow: hidden; border-radius: var(--radius); position: relative;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery button:hover img { transform: scale(1.06); }
.gallery button:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.g-wide { grid-column: span 3; grid-row: span 2; }
.g-tall { grid-column: span 2; grid-row: span 2; }
.g-std { grid-column: span 2; grid-row: span 1; }

@media (max-width: 860px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; }
  .g-wide, .g-tall, .g-std { grid-column: span 1; grid-row: span 1; }
  .g-wide, .g-tall { grid-row: span 2; }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(20,28,34,0.94);
  display: none; align-items: center; justify-content: center; z-index: 200;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: 2px; }
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  background: none; border: none; color: var(--white);
  font-size: 32px; line-height: 1; cursor: pointer; font-family: var(--font-body);
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--white);
  font-size: 40px; cursor: pointer; padding: 12px 18px; font-family: var(--font-body);
}
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

/* ---------- Amenities ---------- */

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--sand-dark);
  border: 1px solid var(--sand-dark);
}

.amenity {
  background: var(--white);
  padding: 30px 26px;
}
.amenity-icon { width: 26px; height: 26px; margin-bottom: 16px; color: var(--brass); }
.amenity h4 { font-family: var(--font-body); font-weight: 600; font-size: 15.5px; margin: 0 0 6px; }
.amenity p { margin: 0; font-size: 13.5px; color: var(--marsh-dk); }

/* ---------- Location ---------- */

.location-section { background: var(--ink); color: var(--sand); }
.location-section .eyebrow { color: var(--brass-lt); }
.location-section h2 { color: var(--white); }
.location-section .section-head p { color: var(--shingle-lt); }

.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .location-grid { grid-template-columns: 1fr; gap: 36px; } }

.location-map { border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(253,252,249,0.15); }

.landmark-list { display: flex; flex-direction: column; }
.landmark {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid rgba(253,252,249,0.15);
}
.landmark:first-child { padding-top: 0; }
.landmark-name { font-size: 16.5px; }
.landmark-name span { display: block; font-family: var(--font-mono); font-size: 11.5px; color: var(--shingle-lt); margin-top: 3px; letter-spacing: 0.05em; }
.landmark-dist { font-family: var(--font-mono); color: var(--brass-lt); font-size: 14px; white-space: nowrap; padding-left: 20px; }

/* ---------- Inquiry form ---------- */

.inquiry-section { background: var(--sand-dark); }

.inquiry-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 60px; }
@media (max-width: 860px) { .inquiry-grid { grid-template-columns: 1fr; gap: 40px; } }

.inquiry-form {
  background: var(--white);
  border: 1px solid rgba(29,43,54,0.1);
  border-radius: var(--radius);
  padding: 40px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; margin-bottom: 18px; }
.field label {
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--marsh); margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--sand); border: 1px solid var(--sand-dark);
  border-radius: var(--radius); padding: 13px 14px; resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brass); background: var(--white);
}
.field textarea { min-height: 110px; }

.form-note { font-size: 13px; color: var(--marsh-dk); margin-top: 4px; }
.form-status { margin-top: 16px; font-size: 14.5px; display: none; }
.form-status.show { display: block; }
.form-status.ok { color: var(--marsh-dk); }
.form-status.err { color: #8a4a3a; }

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

footer { background: var(--ink); color: var(--shingle-lt); padding: 56px 0 36px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; }
.footer-brand { font-family: var(--font-display); font-size: 19px; color: var(--white); }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; font-size: 14px; color: var(--shingle-lt); }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(253,252,249,0.12);
  font-family: var(--font-mono); font-size: 12px; color: var(--shingle); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ---------- Utility ---------- */

.reveal { opacity: 1; }
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }


