/* The Genesee Exchange — simple, elegant, historic */
:root {
  --ivory: #f6f1e8;
  --paper: #fffdf8;
  --ink: #2a2723;
  --ink-soft: #5a534a;
  --wainscot: #2f332f;
  --wainscot-deep: #232623;
  --brass: #b0894e;
  --brass-soft: #d4b47a;
  --terracotta: #8b4f36;
  --rule: rgba(42, 39, 35, 0.12);
  --booked: #8b4f36;
  --available: #3d5a45;
  --shadow: 0 18px 40px rgba(35, 38, 35, 0.12);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--terracotta); }
a:hover { color: var(--ink); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 241, 232, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  font-size: 0.92rem;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav a:hover { color: var(--ink); }

/* Hero + gallery */
.gallery-section { padding-bottom: 1rem; }
.hero-frame {
  position: relative;
  background: var(--wainscot-deep);
  min-height: 58vw;
  max-height: 82vh;
  overflow: hidden;
}
.hero-frame img {
  width: 100%;
  height: 58vw;
  max-height: 82vh;
  object-fit: cover;
  object-position: center;
}
.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3.5rem 1.5rem 1.25rem;
  background: linear-gradient(transparent, rgba(23, 24, 22, 0.72));
  color: #f6f1e8;
  pointer-events: none;
}
.hero-caption .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
}
.hero-caption h1 {
  margin: 0.15rem 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.hero-caption p {
  margin: 0.4rem 0 0;
  max-width: 34rem;
  font-size: 1.05rem;
  opacity: 0.92;
}
.gallery-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 50%;
  background: rgba(246, 241, 232, 0.88);
  color: var(--ink);
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 2;
}
.gallery-controls:hover { background: #fff; }
.gallery-controls.prev { left: 0.8rem; }
.gallery-controls.next { right: 0.8rem; }

.filmstrip-wrap {
  max-width: none;
  padding: 0.85rem 0 0.4rem;
  background: var(--ivory);
}
.filmstrip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 1.25rem 0.7rem;
  scrollbar-width: thin;
}
.filmstrip button {
  flex: 0 0 auto;
  border: 2px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  scroll-snap-align: start;
  border-radius: 2px;
  overflow: hidden;
  width: 118px;
  height: 86px;
}
.filmstrip button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.filmstrip button[aria-current="true"],
.filmstrip button:focus {
  border-color: var(--brass);
}
.photo-credit {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* Layout helpers */
.section, #form-card, #booking-form {
  scroll-margin-top: 5rem;
}
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.25rem 1.25rem;
}
.section-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.section h2 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.15;
}
.lede { font-size: 1.15rem; color: var(--ink); max-width: 42rem; }
.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}
.facts {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}
.facts h3 {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
}
.facts dl { margin: 0; }
.facts dt {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.75rem;
}
.facts dd { margin: 0.15rem 0 0; }

/* Event types */
.event-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
  padding: 0;
  margin: 1.25rem 0 0;
  list-style: none;
}
.event-list li {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1rem 0.9rem;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.2rem;
}

/* Calendar + form */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.calendar-card, .form-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.3rem 1.3rem 1.5rem;
  box-shadow: var(--shadow);
}
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.cal-header h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.55rem;
}
.cal-header button {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--rule);
  background: var(--ivory);
  cursor: pointer;
  font-size: 1.1rem;
}
.cal-header button:hover { border-color: var(--brass); }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.28rem;
}
.cal-dow {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.3rem 0;
}
.cal-day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  cursor: default;
  color: var(--ink);
}
.cal-day.available {
  background: #eef3ee;
  border-color: #d3e0d5;
  color: var(--available);
  cursor: pointer;
}
.cal-day.available:hover,
.cal-day.available:focus {
  background: #dce8de;
  border-color: var(--available);
}
.cal-day.booked {
  background: #f3e8e3;
  border-color: #e4d0c7;
  color: var(--booked);
  text-decoration: line-through;
  cursor: not-allowed;
}
.cal-day.past, .cal-day.empty { color: #b3ada4; }
.cal-day.selected {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}
.cal-day.today { font-weight: 700; }
.legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.3rem;
  vertical-align: -1px;
  border: 1px solid var(--rule);
}
.swatch.available { background: #eef3ee; }
.swatch.booked { background: #f3e8e3; }

.form-card.idle .form-fields { display: none; }
.form-prompt { margin: 0; color: var(--ink-soft); }
.form-card.active .form-prompt { display: none; }
.form-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.55rem;
}
.selected-date {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
label {
  display: block;
  margin: 0.7rem 0 0.2rem;
  font-size: 0.88rem;
}
input, select, textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #ddd4c7;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
textarea { min-height: 7rem; resize: vertical; }
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.field-note {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.deposit-note {
  margin: 1rem 0 0.8rem;
  padding: 0.8rem 0.9rem;
  background: var(--ivory);
  border-left: 3px solid var(--brass);
}
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.btn[hidden], [hidden] { display: none !important; }
.btn {
  display: inline-block;
  border: 0;
  padding: 0.7rem 1.15rem;
  font: inherit;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--wainscot); color: var(--ivory); }
.btn-primary:hover { background: var(--wainscot-deep); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn[aria-disabled="true"], .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.form-status {
  margin: 0.8rem 0 0;
  font-size: 0.95rem;
}
.form-status.error { color: var(--terracotta); }
.form-status.ok { color: var(--available); }
.placeholder-flag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
}

/* Visit / map / contact */
.visit-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.5rem;
  align-items: stretch;
}
.map-frame {
  position: relative;
  min-height: 420px;
  border: 1px solid var(--rule);
  background: #ddd;
}
.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.contact-block p { margin: 0.35rem 0; }
.placeholder-box {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px dashed #c9bba6;
  background: #fbf6ee;
  font-size: 0.95rem;
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 0.85rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
}
.faq details p { margin: 0.5rem 0 0.2rem; color: var(--ink-soft); }

/* Footer */
.site-footer {
  background: var(--wainscot-deep);
  color: #e8e2d6;
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.92rem;
}
.site-footer a { color: var(--brass-soft); }
.site-footer .name {
  font-family: var(--serif);
  font-size: 1.4rem;
  display: block;
  margin-bottom: 0.3rem;
}

@media (max-width: 800px) {
  .about-grid, .booking-layout, .visit-grid, .row-2 {
    grid-template-columns: 1fr;
  }
  .nav { display: none; }
  .hero-frame img, .hero-frame { height: 72vw; max-height: 70vh; min-height: 16rem; }
  .header-inner { padding: 0.7rem 1rem; }
  .gallery-controls {
    top: 0.75rem;
    transform: none;
    width: 2.3rem;
    height: 2.3rem;
  }
  .hero-caption h1 { font-size: 1.85rem; }
  .hero-caption { padding: 2.2rem 1rem 0.85rem; }
}
