/* Treflyn Barn — elevate v1.8 */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Page loader —— */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1c16;
  color: #e0c49a;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.page-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader-inner {
  text-align: center;
}

.page-loader-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid rgba(201, 166, 107, 0.25);
  border-top-color: #c9a66b;
  animation: loadSpin 0.8s linear infinite;
}

.page-loader p {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes loadSpin {
  to {
    transform: rotate(360deg);
  }
}

/* —— Hero rotator —— */
.hero-rotator {
  position: relative;
  min-height: 1.5em;
  margin: 0 0 1rem;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(224, 196, 154, 0.92);
}

.hero-rotator-line {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.hero-rotator-line.is-active {
  position: relative;
  opacity: 1;
  transform: none;
}

/* —— Stay checklist —— */
.stay-checklist {
  padding: 0.5rem 0 3.5rem;
}

.stay-checklist-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.25rem;
  border-radius: var(--radius-lg, 22px);
  background:
    linear-gradient(145deg, #fffcf8, #f3eee5);
  border: 1px solid rgba(201, 166, 107, 0.22);
  box-shadow: 0 24px 56px rgba(15, 20, 16, 0.07);
}

.stay-checklist-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 500;
  color: var(--forest);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.stay-checklist-copy p:last-child {
  color: var(--ink-soft);
  max-width: 36ch;
}

.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(255, 252, 248, 0.85);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.3s;
}

.check-item:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 166, 107, 0.4);
  box-shadow: 0 12px 28px rgba(15, 20, 16, 0.07);
}

.check-mark {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--forest);
  background: rgba(201, 166, 107, 0.22);
  border: 1px solid rgba(201, 166, 107, 0.4);
}

.check-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--forest);
  margin-bottom: 0.1rem;
}

.check-item span:not(.check-mark) {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.check-item.is-pop .check-mark {
  animation: checkPop 0.5s var(--ease);
  background: var(--forest);
  color: var(--champagne-soft);
  border-color: var(--forest);
}

@media (max-width: 900px) {
  .stay-checklist-inner {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
  .check-grid {
    grid-template-columns: 1fr;
  }
}

/* —— FAQ search —— */
.faq-search {
  max-width: 520px;
  margin: 0 auto 1.75rem;
}

.faq-search input {
  width: 100%;
  padding: 0.9rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(15, 20, 16, 0.05);
  transition: border-color 0.2s, box-shadow 0.25s;
}

.faq-search input:focus {
  outline: none;
  border-color: rgba(201, 166, 107, 0.55);
  box-shadow: 0 0 0 4px rgba(201, 166, 107, 0.15);
}

.faq-filter-empty {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.faq-item.is-filtered-out {
  display: none;
}

/* —— Booking wizard —— */
.book-steps {
  display: flex;
  gap: 0.45rem;
  margin: 0 0 1.35rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(15, 28, 22, 0.04);
  border: 1px solid var(--line);
}

.book-step {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0.65rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, box-shadow 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.book-step span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  background: rgba(15, 28, 22, 0.08);
}

.book-step.is-active {
  background: var(--forest);
  color: var(--champagne-soft);
  box-shadow: 0 8px 20px rgba(15, 28, 22, 0.16);
}

.book-step.is-active span {
  background: rgba(201, 166, 107, 0.25);
  color: var(--champagne-soft);
}

.book-step.is-done {
  color: var(--forest-soft);
}

.book-step.is-done span {
  background: rgba(201, 166, 107, 0.3);
  color: var(--forest);
}

.book-panel-title {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--forest);
  margin: 0 0 0.25rem;
}

.book-panel {
  display: contents;
}

.book-panel[hidden] {
  display: none !important;
}

/* When panel is shown, children participate in grid via display:contents —
   but [hidden] needs the panel wrapper to hide all children.
   Switch to block layout for wizard panels. */
.book-wizard {
  display: block !important;
}

.book-wizard .book-panel:not([hidden]) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.15rem;
  animation: panelIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.book-wizard .field.full,
.book-wizard .wizard-nav.full,
.book-wizard .form-note.full,
.book-wizard .book-panel-title {
  grid-column: 1 / -1;
}

.wizard-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.35rem;
  align-items: center;
}

.wizard-nav .btn {
  flex: 1;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 560px) {
  .book-wizard .book-panel:not([hidden]) {
    grid-template-columns: 1fr;
  }
  .book-step {
    font-size: 0.68rem;
    padding: 0.55rem 0.25rem;
  }
}

/* —— Desktop sticky book bar —— */
.desk-book-bar {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 95;
  width: min(920px, calc(100% - 2.5rem));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.desk-book-bar.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.desk-book-bar-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1.1rem 0.85rem 1.35rem;
  border-radius: 999px;
  background: rgba(15, 28, 22, 0.92);
  color: #fffcf8;
  border: 1px solid rgba(201, 166, 107, 0.28);
  box-shadow: 0 20px 50px rgba(8, 14, 11, 0.35);
  backdrop-filter: blur(14px);
}

.db-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--champagne-soft);
}

.db-brand span {
  font-size: 0.72rem;
  opacity: 0.7;
  letter-spacing: 0.04em;
}

.db-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
}

.db-pills span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.08);
  border: 1px solid rgba(255, 252, 248, 0.1);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .desk-book-bar {
    display: none;
  }
}

/* —— Lightbox thumbs —— */
.lightbox-thumbs {
  position: absolute;
  left: 50%;
  bottom: 4.5rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  max-width: min(92vw, 640px);
  overflow-x: auto;
  padding: 0.35rem;
  scrollbar-width: none;
  z-index: 6;
}

.lightbox-thumbs::-webkit-scrollbar {
  display: none;
}

.lightbox-thumbs button {
  flex: 0 0 56px;
  width: 56px;
  height: 40px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.25s, border-color 0.25s, transform 0.25s;
  background: #111;
}

.lightbox-thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox-thumbs button.is-active,
.lightbox-thumbs button:hover {
  opacity: 1;
  border-color: var(--champagne-soft);
  transform: translateY(-2px);
}

.lightbox.open .lightbox-meta {
  bottom: 6.2rem;
}

/* —— Section in-view glow —— */
.section.is-inview .section-head h2 {
  background: linear-gradient(120deg, var(--forest) 0%, var(--forest) 40%, var(--champagne-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* —— Ornament dividers —— */
.pull-quote,
.filmstrip-section,
.stay-checklist {
  position: relative;
}

.ornament-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto 1.5rem;
  max-width: 200px;
}

.ornament-line::before,
.ornament-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 166, 107, 0.55), transparent);
}

.ornament-line i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--champagne);
  box-shadow: 0 0 0 3px rgba(201, 166, 107, 0.15);
}

/* —— Gallery denser hover spotlight —— */
.gallery-item {
  position: relative;
}

.gallery-item .gal-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    200px 160px at var(--mx, 50%) var(--my, 50%),
    rgba(255, 252, 248, 0.22),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: soft-light;
}

.gallery-item:hover .gal-shine {
  opacity: 1;
}

/* —— Stronger final CTA —— */
.final-cta-inner {
  position: relative;
  z-index: 2;
}

.final-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 50% 50%,
    rgba(201, 166, 107, 0.12),
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
}

/* —— Map pin pulse overlay —— */
.location-map {
  position: relative;
}

.location-map .map-pulse {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: rgba(201, 166, 107, 0.9);
  box-shadow: 0 0 0 0 rgba(201, 166, 107, 0.5);
  animation: mapPulse 2s ease-out infinite;
  z-index: 2;
  pointer-events: none;
}

.location-map .map-pulse::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #0f1c16;
}

@keyframes mapPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(201, 166, 107, 0.55);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(201, 166, 107, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(201, 166, 107, 0);
  }
}

/* —— Hero trust glass upgrade —— */
.hero-trust {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.hero-card {
  backdrop-filter: blur(16px) saturate(1.15);
  background: rgba(15, 28, 22, 0.55) !important;
  border: 1px solid rgba(224, 196, 154, 0.22) !important;
}

/* —— Smooth image focus ring on sleep —— */
.sleep-card:focus-within,
.sleep-card:hover {
  outline: none;
}

/* —— Reduced motion —— */
@media (prefers-reduced-motion: reduce) {
  .page-loader-mark,
  .map-pulse,
  .hero-rotator-line {
    animation: none !important;
    transition: none !important;
  }
  .page-loader {
    display: none;
  }
}
