/* The Third Space: shared styles */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,400&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --bg: #f5f2ec;
  --bg-raised: #ebe5d9;
  --bg-raised-2: #ded5c1;
  --input-bg: #fffefb;
  --line: rgba(35, 30, 22, 0.14);
  --ink: #262219;
  --ink-dim: #5c5546;
  --ink-faint: #8a8271;
  --gold: #a1793a;
  --gold-soft: rgba(161, 121, 58, 0.35);
  --max: 1180px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(3.12rem, 7.2vw, 5.52rem); line-height: 1.05; font-weight: 300; }
h2 { font-size: clamp(2.28rem, 4.08vw, 3.24rem); }
h3 { font-size: 1.3rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold); font-family: var(--sans); font-weight: 500; }

p { margin: 0 0 1em; color: var(--ink-dim); }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9em;
}

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

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 242, 236, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: var(--max);
  margin: 0 auto;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.wordmark span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.85rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--gold); border-color: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--gold); color: #0e0c0a; }
.btn-solid { background: var(--gold); color: #0e0c0a; }
.btn-solid:hover { background: transparent; color: var(--ink); }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Hero (video) ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.03) brightness(1.25);
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) contrast(1.03);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,8,5,0.48) 0%, rgba(10,8,5,0.08) 28%, rgba(10,8,5,0.22) 50%, rgba(10,8,5,0.82) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 28px 64px;
  max-width: var(--max);
  margin: 0 auto;
}
.hero-content h1 { color: #fbf3e4; text-shadow: 0 2px 16px rgba(0,0,0,0.55), 0 1px 3px rgba(0,0,0,0.5); }
.hero-content .eyebrow { color: #e8c483; text-shadow: 0 1px 8px rgba(0,0,0,0.55); }
.hero-content p.lede {
  max-width: 46ch;
  color: rgba(251, 243, 228, 0.92);
  font-size: 1.26rem;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}
.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(251, 243, 228, 0.75);
  writing-mode: vertical-rl;
}

/* Simple page hero (no video, for subpages) */
.page-hero {
  padding: 150px 0 70px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at top, var(--bg-raised) 0%, var(--bg) 60%);
}
.page-hero p { max-width: 56ch; }

/* ---------- Split CTA ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}
.split-card {
  position: relative;
  padding: 70px 48px;
  border-top: 1px solid var(--line);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.split-card .btn { margin-top: auto; }
.split-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,8,5,0) 0%, rgba(10,8,5,0.28) 45%, rgba(10,8,5,0.84) 100%);
  z-index: 0;
}
.split-card > * { position: relative; z-index: 1; }
.split-card:not(:last-child) { border-right: 1px solid var(--line); }
.split-card h3 { color: var(--gold); }
.split-card h2 { color: #f7f0e2; }
.split-card p { max-width: 40ch; color: rgba(247, 240, 226, 0.85); }
.split-card .btn { color: #f7f0e2; border-color: var(--gold); }
.split-card .btn:hover { color: #0e0c0a; }

/* ---------- Teasers ---------- */
.teasers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.teaser {
  background: var(--bg);
  padding: 44px 34px 50px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.teaser .thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-raised) center/cover no-repeat;
  border: 1px solid var(--line);
}
.teaser h4 { font-family: var(--serif); font-size: 1.3rem; margin: 0; }
.teaser a.more { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Generic section ---------- */
section.block { padding: 96px 0; }
section.block.tight { padding: 64px 0; }
.block-alt { background: var(--bg-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.photo-block {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--bg-raised) center/cover no-repeat;
  border: 1px solid var(--line);
}
.photo-block.wide { aspect-ratio: 16/10; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--ink-dim);
}
.list-plain li strong { color: var(--ink); font-family: var(--serif); font-size: 1.1rem; font-weight: 400; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 36px 0;
}
.stat {
  background: var(--bg-raised);
  padding: 30px 26px;
}
.stat .num { font-family: var(--serif); font-size: 2.6rem; color: var(--gold); line-height: 1; }
.stat .label { margin-top: 8px; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  padding: 44px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 13px 14px;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.field textarea { min-height: 110px; resize: vertical; }
.field-note { font-size: 0.75rem; color: var(--ink-faint, #7d715f); margin-top: 6px; }

.type-toggle {
  display: flex;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 30px;
}
.type-toggle button {
  flex: 1;
  background: var(--bg);
  color: var(--ink-dim);
  border: none;
  padding: 14px;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.type-toggle button.active { background: var(--gold); color: #0e0c0a; }

.form-msg {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--gold-soft);
  font-size: 0.88rem;
  display: none;
}
.form-msg.show { display: block; }
.form-msg.error { border-color: #a5473c; color: #e2a99f; }

/* ---------- Confirmation modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 5, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-card {
  position: relative;
  max-width: 440px;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 44px 38px;
  text-align: center;
  transform: translateY(12px);
  transition: transform 0.25s ease;
}
.modal-overlay.show .modal-card { transform: translateY(0); }
.modal-card .eyebrow { display: block; }
.modal-card h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 14px;
}
.modal-card p { color: var(--ink-dim); margin-bottom: 0; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 4px 8px;
}
.modal-close:hover { color: var(--ink); }

/* ---------- Gallery ---------- */
.gallery-grid {
  column-count: 3;
  column-gap: 18px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px 40px;
}
.gallery-grid figure {
  margin: 0 0 18px;
  break-inside: avoid;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-raised);
}
.gallery-grid img {
  width: 100%;
  display: block;
  transition: transform .4s ease;
}
.gallery-grid figure:hover img {
  transform: scale(1.03);
}

/* ---------- Map ---------- */
.map-frame {
  width: 100%;
  height: 480px;
  border: 1px solid var(--line);
  filter: sepia(0.2) saturate(0.85) contrast(0.95);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 34px;
  background: var(--bg-raised);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-grid h4 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--sans);
  margin-bottom: 16px;
}
.footer-grid p, .footer-grid a { color: var(--ink-dim); font-size: 0.92rem; }
.footer-grid a { display: block; margin-bottom: 10px; }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-faint, #7d715f);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { min-height: 68vh; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 10px 28px 24px;
    gap: 18px;
  }
  .split { grid-template-columns: 1fr; }
  .split-card:not(:last-child) { border-right: none; }
  .teasers { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .stat-row { grid-template-columns: 1fr; }
  .gallery-grid { column-count: 3; column-gap: 6px; padding: 0 6px 30px; }
  .gallery-grid figure { margin-bottom: 6px; }
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  z-index: 200;
  pointer-events: none;
  background: transparent;
}
.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gold);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.25,.7,.4,1), transform .7s cubic-bezier(.25,.7,.4,1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
