:root {
  --ink: #1f2522;
  --ink-soft: #55605a;
  --paper: #f6f3ee;
  --paper-alt: #ebe6dd;
  --card: #ffffff;
  --accent: #2f4a3e;
  --accent-ink: #ffffff;
  --gold: #a88b5a;
  --line: #d8d1c4;
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; color: var(--gold); font-weight: 600; margin: 0 0 .8rem; }
.small { font-size: .85rem; color: var(--ink-soft); }
.placeholder { color: var(--ink-soft); font-style: italic; border-left: 3px solid var(--gold); padding-left: .8rem; }

.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: 999px; padding: .75rem 1.4rem;
  font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, color .2s;
}
.btn:hover { background: #24392f; }
.btn-ghost { background: rgba(255,255,255,.85); color: var(--accent); }
.btn-ghost:hover { background: #fff; }
.btn-small { padding: .45rem 1rem; font-size: .85rem; }

/* top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: .8rem clamp(16px, 3vw, 40px);
  background: linear-gradient(to bottom, rgba(246,243,238,.92), rgba(246,243,238,.75));
  backdrop-filter: blur(8px); border-bottom: 1px solid rgba(0,0,0,.05);
}
.brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; text-decoration: none; letter-spacing: .02em; }
.topbar nav { display: flex; gap: 1.4rem; align-items: center; font-size: .9rem; }
.topbar nav a:not(.btn) { text-decoration: none; color: var(--ink-soft); }
.topbar nav a:not(.btn):hover { color: var(--ink); }

/* hero + viewer */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: #dfe7ec; }
.viewer { position: absolute; inset: 0; }
#scene { width: 100%; height: 100%; display: block; touch-action: pan-y !important; cursor: grab; }
#scene:active { cursor: grabbing; }
#scene:focus { outline: none; }
#scene:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.hero-copy {
  position: absolute; left: clamp(16px, 4vw, 64px); top: 22%; max-width: 30rem; z-index: 5;
  background: rgba(246,243,238,.86); backdrop-filter: blur(6px); padding: 1.8rem 2rem; border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,.08); transition: opacity .4s;
}
.hero-copy h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-bottom: .2em; }
.lede { font-size: 1.05rem; color: var(--ink-soft); margin: 0 0 1.4rem; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.hero.touring .hero-copy, .hero.exploring .hero-copy { opacity: 0; pointer-events: none; }

.viewpoints {
  position: absolute; left: 50%; bottom: 3.2rem; transform: translateX(-50%); z-index: 6;
  display: flex; gap: .3rem; padding: .35rem; background: rgba(255,255,255,.88); border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0,0,0,.1); backdrop-filter: blur(6px); max-width: calc(100vw - 32px); overflow-x: auto;
  scroll-margin-top: 80px;
}
.viewpoints button {
  border: 0; background: transparent; padding: .5rem 1rem; border-radius: 999px; font: 500 .88rem var(--sans);
  color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.viewpoints button:hover { color: var(--ink); background: rgba(0,0,0,.04); }
.viewpoints button.active { background: var(--accent); color: #fff; }
.viewpoints .tour { color: var(--accent); font-weight: 600; }
.viewpoints .tour[aria-pressed="true"] { background: var(--gold); color: #fff; }
.hint { position: absolute; bottom: .9rem; width: 100%; text-align: center; margin: 0; font-size: .78rem; color: rgba(31,37,34,.7); z-index: 6; pointer-events: none; }

.zoom {
  position: absolute; right: clamp(16px, 2.5vw, 32px); top: 50%; transform: translateY(-50%); z-index: 6;
  display: grid; background: rgba(255,255,255,.9); border-radius: 12px; overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.12); backdrop-filter: blur(6px);
}
.zoom button {
  width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink);
  font: 500 1.4rem/1 var(--sans); cursor: pointer;
}
.zoom button + button { border-top: 1px solid var(--line); }
.zoom button:hover { background: rgba(0,0,0,.05); }
.zoom button:active { background: rgba(0,0,0,.1); }
#zoom-reset { font-size: 1.1rem; color: var(--ink-soft); }
.hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .hint-mouse { display: none; }
  .hint-touch { display: inline; }
}

.tooltip {
  position: absolute; z-index: 8; pointer-events: none; transform: translate(-50%, calc(-100% - 14px));
  background: var(--ink); color: #fff; padding: .45rem .75rem; border-radius: 8px; font-size: .85rem; white-space: nowrap;
}
.tooltip b { display: block; font-family: var(--serif); font-size: 1.05rem; }

.loader { position: absolute; inset: 0; display: grid; place-items: center; background: #e7ecef; z-index: 10; transition: opacity .6s; }
.loader.done { opacity: 0; pointer-events: none; }
.loader-inner { display: grid; gap: .8rem; justify-items: center; width: min(320px, 80vw); }
.loader-title { font-family: var(--serif); font-size: 2rem; }
.bar { width: 100%; height: 3px; background: rgba(0,0,0,.1); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.loader-text { font-size: .85rem; color: var(--ink-soft); }

/* static fallback when 3D can't run (set by js/fallback.js) */
.fallback { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: none; }
.fallback-ns, .no-3d .fallback { display: block; }
.fallback-note {
  display: none; position: absolute; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 6; margin: 0;
  padding: .45rem 1rem; background: rgba(255,255,255,.88); border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.1);
  backdrop-filter: blur(6px); font-size: .8rem; color: var(--ink-soft); white-space: nowrap; max-width: calc(100vw - 32px);
  overflow: hidden; text-overflow: ellipsis;
}
.no-3d .fallback-note { display: block; }
.no-3d #scene, .no-3d .loader, .no-3d .zoom, .no-3d .viewpoints, .no-3d .hint, .no-3d .tooltip, .no-3d .js-explore { display: none !important; }

/* sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: var(--paper-alt); }
.wrap { width: min(1160px, 100% - 32px); margin: 0 auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.6rem; margin-top: 2rem; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 20px rgba(0,0,0,.05); }
.card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.card-body { padding: 1.5rem 1.6rem 1.7rem; }
.card-body p { color: var(--ink-soft); }
.facts { list-style: none; padding: 0; margin: 1rem 0 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.facts span { color: var(--ink-soft); }
.facts b[data-tbc] { font-weight: 500; color: var(--gold); }
.schedule { margin-top: 3rem; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.features h3 { font-size: 1.35rem; }
.features p { color: var(--ink-soft); margin: 0; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; margin: 2rem 0 1rem; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; overflow: hidden; }
.gallery img { aspect-ratio: 16/9; object-fit: cover; width: 100%; transition: transform .4s; }
.gallery button:hover img { transform: scale(1.04); }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; align-items: start; }
.map-placeholder { aspect-ratio: 4/3; border-radius: var(--radius); background: repeating-linear-gradient(45deg, #ddd6c9 0 12px, #e4ddd1 12px 24px); display: grid; place-items: center; color: var(--ink-soft); font-family: var(--serif); font-size: 1.6rem; }

.form { display: grid; gap: 1rem; background: var(--card); padding: 1.8rem; border-radius: var(--radius); box-shadow: 0 2px 20px rgba(0,0,0,.05); }
.form label { display: grid; gap: .35rem; font-size: .88rem; font-weight: 500; }
.form .opt { color: var(--ink-soft); font-weight: 400; }
.form input, .form select, .form textarea { font: inherit; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-status { margin: 0; font-size: .9rem; color: var(--accent); min-height: 1.2em; }

.footer { padding: 2.4rem 0; background: var(--ink); color: #d9ddd9; }
.footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer .small { color: #a9b0ab; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(10,12,11,.88); }
.lightbox img { max-width: 96vw; max-height: 88vh; border-radius: 8px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: -52px; right: 0; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

@media (max-width: 760px) {
  .topbar nav a:not(.btn) { display: none; }
  .brand { font-size: 1.25rem; }
  .hero-copy { left: 16px; right: 16px; top: auto; bottom: 7.5rem; padding: 1.2rem 1.3rem; max-width: none; }
  .hero-copy .lede { font-size: .95rem; margin-bottom: 1rem; }
  .viewpoints {
    bottom: 1.2rem; width: calc(100vw - 32px); flex-wrap: wrap; justify-content: center;
    overflow: visible; border-radius: 22px; row-gap: .15rem;
  }
  .viewpoints button { padding: .45rem .8rem; }
  .hero-copy { bottom: 8.5rem; }
  .zoom { top: auto; bottom: 8.5rem; transform: none; }
  .hero.exploring .zoom, .hero.touring .zoom { bottom: 7.2rem; }
  .hint { display: none; }
  .no-3d .hero-copy { bottom: 4rem; }
  .fallback-note { white-space: normal; text-align: center; width: max-content; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
