/* Valley View Photo portfolio — gallery-dark, on brand */
/* Self-hosted variable fonts (SIL OFL), latin subset. Fraunces carries opsz, wght, SOFT and WONK axes. */
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/fraunces.woff2') format('woff2-variations'), url('/fonts/fraunces.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/inter.woff2') format('woff2-variations'), url('/fonts/inter.woff2') format('woff2');
}
:root {
  --ink: #1F2A2E;
  --ink-deep: #182124;
  --sand: #F2EADD;
  --sand-dim: #B9B2A6;
  --peach: #F1C79C;
  --terracotta: #C1663B;
  --terracotta-dark: #A4532D;
  --book: #A4532D;          /* button fill: white text passes AA (5.45:1); #C1663B does not */
  --book-hover: #8F4627;
  --line: rgba(242, 234, 221, 0.12);
  --line-strong: rgba(242, 234, 221, 0.28);

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --s14: 0.875rem; --s16: 1rem; --s20: 1.25rem; --s28: 1.75rem; --s44: 2.75rem; --s72: 4.5rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--sand);
  font: 400 var(--s16)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--peach); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; }
h1, h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-variation-settings: 'SOFT' 100;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px; padding: 10px 18px;
  font: 600 var(--s16)/1.2 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn-book { background: var(--book); color: #fff; }
.btn-book:hover { background: var(--book-hover); }
.btn-large { padding: 16px 28px; font-size: var(--s20); }
.btn-quiet { background: transparent; color: var(--sand); border-color: var(--line-strong); }

/* Header and footer */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
}
.wordmark {
  font-family: var(--serif); font-weight: 400; font-variation-settings: 'SOFT' 100;
  font-size: var(--s20); color: var(--sand); text-decoration: none;
}
.site-nav { display: flex; align-items: center; gap: 24px; }
.nav-link { color: var(--sand-dim); text-decoration: none; }
.nav-link:hover { color: var(--sand); }
.site-footer {
  background: var(--ink-deep); color: var(--sand-dim);
  padding: 40px var(--gutter); font-size: var(--s14);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
}
.site-footer p { margin: 0; }
.site-footer a + a { margin-left: 20px; }

/* Twilight slider */
.slider {
  position: relative; width: 100%; overflow: hidden; background: var(--ink-deep);
  touch-action: pan-y;
}
.slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slider-after { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.slider-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: var(--sand); pointer-events: none;
}
.slider-handle::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px;
  transform: translate(-50%, -50%); border-radius: 50%;
  border: 2px solid var(--sand); background: rgba(24, 33, 36, 0.55);
}
.slider-input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none;
}
.slider:has(.slider-input:focus-visible) { outline: 2px solid var(--peach); outline-offset: 3px; }

/* Index */
.hero .slider, .hero-still { max-height: 80vh; }
.hero-still img { width: 100%; max-height: 80vh; object-fit: cover; }
.hero-caption {
  margin: 0; padding: 14px var(--gutter) 0; color: var(--sand-dim); font-size: var(--s14);
}

.intro { padding: 72px var(--gutter) 48px; max-width: 1200px; }
.intro h1 {
  font-size: clamp(var(--s44), 7vw, 6.5rem); line-height: 1; letter-spacing: -0.025em;
  max-width: 13ch;
}
.intro p { color: var(--sand-dim); font-size: var(--s20); max-width: 52ch; margin: 28px 0 0; }

.filter-bar {
  position: sticky; top: 0; z-index: 5; background: var(--ink-deep);
  padding: 12px var(--gutter);
}
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.filter { display: flex; flex-direction: column; gap: 4px; }
.filter-label { font-size: var(--s14); color: var(--sand-dim); }
.filter select {
  appearance: none; -webkit-appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23B9B2A6' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--sand); font: 500 var(--s16)/1.2 var(--sans);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 36px 9px 16px; min-width: 9.5rem;
  cursor: pointer;
}
.filter select option { background: var(--ink-deep); color: var(--sand); }
.filter select.is-active { border-color: var(--peach); color: var(--peach); }
.clear-filters { font-size: var(--s14); padding: 10px 0; }
.js .filters [data-filter-submit] { display: none; }

.rows { padding: 0 0 48px; }
.row {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px;
  padding: 56px var(--gutter); border-top: 1px solid var(--line);
  color: inherit; text-decoration: none;
}
.row:first-child { border-top: 0; }
.row[hidden] { display: none; }
.row-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.row-text { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.row-name {
  font-family: var(--serif); font-weight: 300; font-variation-settings: 'SOFT' 100;
  font-size: var(--s44); line-height: 1.05; letter-spacing: -0.015em;
}
.row:hover .row-name, .row:focus-visible .row-name { color: var(--peach); }
.row-meta { color: var(--sand-dim); }
.row-deliverables { margin-top: 14px; max-width: 32ch; }
.empty { padding: 56px var(--gutter); color: var(--sand-dim); font-size: var(--s20); }

/* Property page */
.property-lead { width: 100%; max-height: 82vh; object-fit: cover; }
.property-head { padding: 40px var(--gutter) 32px; }
.property-head h1 { font-size: clamp(var(--s44), 6vw, var(--s72)); line-height: 1.02; letter-spacing: -0.02em; }
.property-place { margin: 12px 0 0; color: var(--sand-dim); font-size: var(--s20); }
.property-package { margin: 6px 0 0; color: var(--sand); font-size: var(--s16); }
.jump {
  position: sticky; top: 0; z-index: 5; background: var(--ink-deep);
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px var(--gutter);
}
.jump a {
  color: var(--sand); text-decoration: none; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 7px 14px; font-size: var(--s14);
}
.jump a:hover { border-color: var(--peach); color: var(--peach); }
.block { padding: 64px var(--gutter) 16px; scroll-margin-top: 56px; }
.block h2 { font-size: var(--s28); margin-bottom: 24px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.gallery a { display: block; background: var(--ink-deep); }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery-contain a { background: #fff; }
.gallery-contain img { object-fit: contain; }
.block .slider { max-width: 1400px; }
.facade { position: relative; max-width: 1400px; aspect-ratio: 16 / 9; background: var(--ink-deep); margin-bottom: 8px; }
.facade-poster { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.55); }
.facade-play {
  position: absolute; inset: 0; margin: auto; width: max-content; height: max-content;
  background: var(--ink-deep); color: var(--sand); border: 1px solid var(--sand);
  border-radius: 4px; padding: 14px 24px; font: 600 var(--s16)/1 var(--sans); cursor: pointer;
}
.facade-play:hover { background: var(--ink); }
.facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.closing { padding: 88px var(--gutter) 96px; }
.closing h2 { font-size: var(--s44); }
.got {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 32px; max-width: 900px;
}
.got li {
  font-family: var(--serif); font-weight: 300; font-variation-settings: 'SOFT' 100;
  font-size: var(--s28); padding: 10px 0; border-bottom: 1px solid var(--line);
}
.package { color: var(--sand-dim); margin: 28px 0 24px; }
.closing .btn-large { margin-top: 8px; }
.back { margin: 32px 0 0; }
.notfound { padding: 96px var(--gutter); min-height: 50vh; }
.notfound h1 { font-size: var(--s44); max-width: 20ch; }

/* Photo viewer */
.viewer {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(24, 33, 36, 0.97); color: var(--sand);
}
.viewer::backdrop { background: rgba(24, 33, 36, 0.8); }
.viewer[open] { display: grid; place-items: center; }
.viewer-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.viewer-figure img { max-width: 92vw; max-height: 84vh; width: auto; height: auto; object-fit: contain; }
.viewer-figure figcaption { color: var(--sand-dim); font-size: var(--s14); }
.viewer-btn {
  position: fixed; background: var(--ink-deep); color: var(--sand); border: 1px solid var(--line-strong);
  border-radius: 4px; padding: 10px 14px; font: 500 var(--s14)/1 var(--sans); cursor: pointer;
}
.viewer-close { top: 16px; right: 16px; }
.viewer-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.viewer-next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (max-width: 760px) {
  .site-header { padding-top: 14px; padding-bottom: 14px; }
  .nav-link { display: none; }
  .row { grid-template-columns: 1fr; gap: 16px; padding-top: 32px; padding-bottom: 32px; }
  .row-name { font-size: var(--s28); }
  .row-deliverables { margin-top: 6px; }
  .intro { padding-top: 48px; padding-bottom: 32px; }
  .intro p { font-size: var(--s16); }
  .filter { flex: 1 1 calc(50% - 10px); }
  .filter select { width: 100%; min-width: 0; }
  .hero .slider, .hero-still img { max-height: 62vh; }
  .block { padding-top: 48px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 4px; }
  .viewer-prev, .viewer-next { top: auto; bottom: 16px; transform: none; }
  .site-footer a + a { margin-left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
