/* ============================================================
   Venue demos: shared mechanics (banner, header, menu, reveal,
   gallery, lightbox, form, map). Each demo sets its own look in
   rustic.css or estate.css through these variables:
     --bg --surface --ink --ink-soft --line --accent --accent-ink
     --dark --on-dark --font-display --font-body --radius
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums; /* Cormorant and Young Serif: aligned digits, not old-style */
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0 0 0.5em; font-family: var(--font-display); font-weight: 400; line-height: 1.1; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 4.5rem); }
.section { padding-block: clamp(4.5rem, 3rem + 7vw, 9rem); }
section[id] { scroll-margin-top: 5.5rem; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: absolute; left: 1rem; top: 0.5rem; z-index: 300;
  padding: 0.6rem 1rem; background: var(--dark); color: var(--on-dark); border-radius: var(--radius);
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

/* ---------- Demo banner (discreet, above the header, does not cover the hero) ---------- */
.demo-banner {
  position: relative; z-index: 120;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.25rem 0.9rem;
  padding: 0.45rem 1rem;
  background: var(--dark); color: var(--on-dark);
  font-family: var(--font-body); font-size: 0.78rem; line-height: 1.4; text-align: center;
}
.demo-banner p { margin: 0; }
.demo-banner a { color: inherit; font-weight: 600; }
.demo-banner [data-banner-owner] { opacity: 0.8; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  transition: background-color 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
}
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }
.brand { position: relative; z-index: 120; display: inline-flex; align-items: center; gap: 0.7rem; min-width: 0; text-decoration: none; }
.brand-name { min-width: 0; overflow-wrap: anywhere; line-height: 1.1; }
.nav ul { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.nav a { text-decoration: none; }
.menu-toggle { display: none; position: relative; z-index: 130; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 1.5px; margin: 6px auto; background: currentColor; transition: transform 0.3s ease; }
.menu-open .menu-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: 110;
    display: grid; place-content: center;
    background: var(--bg); color: var(--ink);
    opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0.35s ease;
  }
  .nav ul { flex-direction: column; gap: 1.4rem; text-align: center; }
  .nav a:not(.btn) { font-family: var(--font-display); font-size: 1.9rem; }
  .nav .btn { margin-top: 0.6rem; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open { overflow: hidden; }
  .menu-open .header { color: var(--ink); }
}

/* ---------- Reveal on scroll (only when JS runs) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(1.5rem);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Gallery ---------- */
.gallery a { display: block; overflow: hidden; border-radius: var(--radius); cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1); }
@media (hover: hover) { .gallery a:hover img { transform: scale(1.04); } }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(12, 10, 8, 0.94); color: #fff;
}
.lightbox::backdrop { background: rgba(12, 10, 8, 0.6); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 1rem; font-size: 0.85rem; }
.lightbox figure { display: grid; place-items: center; min-height: 0; padding: 0 0.5rem; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 9rem); object-fit: contain; border-radius: 4px; }
.lightbox-nav { display: flex; justify-content: center; gap: 1rem; padding: 1rem; }
.lightbox button {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%; background: transparent; color: #fff; cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.12); }
.lightbox .icon { width: 1.3rem; height: 1.3rem; }

/* ---------- FAQ (native details) ---------- */
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-plus { position: relative; flex: none; width: 2rem; height: 2rem; border: 1px solid var(--line); border-radius: 50%; transition: transform 0.3s ease; }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; top: 50%; left: 50%; background: currentColor; transform: translate(-50%, -50%); }
.faq-plus::before { width: 11px; height: 1.5px; }
.faq-plus::after { width: 1.5px; height: 11px; }
.faq-item[open] .faq-plus { transform: rotate(45deg); }

/* ---------- Availability form ---------- */
.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1.1rem; }
@media (min-width: 620px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #B3261E; }
.field-error { margin: 0; font-size: 0.82rem; color: #B3261E; }
.field-error:empty { display: none; }
.form-status { padding: 1rem 1.1rem; border-left: 3px solid var(--accent); background: var(--surface); font-size: 0.95rem; }
.form-status[hidden] { display: none; }
.form-honey { display: none; }

/* ---------- Map ---------- */
.map { position: relative; height: clamp(320px, 45vw, 480px); overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.map .maplibregl-ctrl-attrib { display: none; }
.map-fallback { padding: 2rem; }
.map-pin { position: relative; width: 24px; height: 32px; }
.map-drop { position: absolute; left: 1px; top: 0; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: var(--accent); transform: rotate(-45deg); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
.map-drop::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--bg); }
.map-tag {
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--dark); color: var(--on-dark);
  font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; white-space: nowrap;
}
.map-credit { margin-top: 0.5rem; font-size: 0.72rem; opacity: 0.75; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
