/* Bear Tracts–aligned palette sampled from beartracts.com */
:root {
  --bt-forest: #264f38;
  --bt-forest-dark: #1e3d2c;
  --bt-cream: #eae3df;
  --bt-cta: #ee5f27;
  --bt-cta-hover: #b23a1d;
  --bt-text: #1e1e1e;
  --bt-text-light: #ffffff;
  --bt-overlay: rgba(30, 30, 30, 0.45);
}

body.home-visual {
  /* Flex column: hero fills remaining space; feedback strip stays on-screen. */
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--bt-text-light);
  background: var(--bt-forest-dark);
  overflow: hidden;
}

body.home-visual .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1rem 1.5rem;
  background: linear-gradient(180deg, rgba(30, 61, 44, 0.85) 0%, transparent 100%);
  pointer-events: none;
}

body.home-visual .site-header > * {
  pointer-events: auto;
}

body.home-visual .site-brand {
  margin: 0;
  flex-shrink: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bt-text-light);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

body.home-visual .site-tagline {
  margin: 0;
  font-size: 0.8rem;
  flex-shrink: 0;
  color: var(--bt-cream);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

body.home-visual .env-badge {
  display: inline-block;
  background: var(--bt-cta);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  vertical-align: middle;
  font-weight: 700;
}

body.home-visual main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  max-width: none;
}

body.home-visual .hero-title {
  color: #ffffff;
}

.hero {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  /* Fill space above the feedback footer (not a full second viewport below). */
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: var(--bt-forest-dark);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-fallback {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(238, 95, 39, 0.18) 0%, transparent 55%),
    linear-gradient(160deg, var(--bt-forest) 0%, var(--bt-forest-dark) 100%);
}

.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Prev / next photo controls (mobile + desktop carousel). */
.hero-nav {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.55rem;
  pointer-events: none;
  box-sizing: border-box;
}

.hero-nav__btn {
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 248, 238, 0.45);
  border-radius: 999px;
  background: rgba(12, 24, 18, 0.48);
  color: #fff8ee;
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(3px);
  touch-action: manipulation;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.hero-nav__btn span {
  display: block;
  transform: translateY(-0.06em);
}

.hero-nav__btn:hover,
.hero-nav__btn:focus-visible {
  background: rgba(12, 24, 18, 0.72);
  border-color: rgba(255, 248, 238, 0.85);
  outline: none;
}

.hero-nav__btn:active {
  transform: scale(0.96);
}

.hero-slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-video {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Layer order (bottom → top): slideshow → ticket → smoke → copy → CTA */
.hero-ticket-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: translateZ(0);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease;
}

.hero-ticket-overlay.is-ready {
  opacity: 1;
  visibility: visible;
}

.hero-ticket-overlay.is-dismissed {
  opacity: 0;
  visibility: hidden;
}

.hero-ticket-overlay__image,
.hero-ticket-overlay__canvas {
  display: block;
  width: min(72vw, 36rem);
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  content-visibility: auto;
}

/* WebM stacked-alpha overlay: scale to the hero viewport (browser window). */
.hero-ticket-overlay--viewport {
  container-type: size;
}

.hero-ticket-overlay--viewport .hero-ticket-overlay__canvas {
  width: min(100cqw, calc(100cqh * var(--overlay-aspect, 16 / 9)));
  height: min(100cqh, calc(100cqw / var(--overlay-aspect, 16 / 9)));
  max-width: 100%;
  max-height: 100%;
}

.hero-ticket-overlay__video--stacked {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero.is-media-paused .hero-slide {
  transition: none;
}

/* Override base.html footer rules (max-width / opacity / padding) so the strip is visible. */
body.home-visual .home-feedback-footer,
.home-feedback-footer {
  flex: 0 0 auto;
  position: relative;
  z-index: 15;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
  opacity: 1;
  padding: 0.85rem 1rem max(0.85rem, env(safe-area-inset-bottom, 0px));
  text-align: center;
  background: rgba(30, 61, 44, 0.92);
  box-sizing: border-box;
}

.home-feedback-footer p {
  margin: 0;
  font-size: 0.95rem;
}

.home-feedback-footer a:not(.home-feedback-btn) {
  color: #f6d9b8;
  font-weight: bold;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Centered feedback CTA — real <button>, not a text link. */
.home-feedback-form {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

button.home-feedback-btn,
.home-feedback-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  border: 2px solid rgba(255, 248, 238, 0.75);
  border-radius: 999px;
  background: linear-gradient(180deg, #f0d9b0 0%, #d4b07a 55%, #b8894a 100%);
  color: #14261c;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32);
  touch-action: manipulation;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

button.home-feedback-btn:hover,
button.home-feedback-btn:focus-visible,
.home-feedback-btn:hover,
.home-feedback-btn:focus-visible {
  color: #0c1812;
  filter: brightness(1.06);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  outline: 2px solid #fff8ee;
  outline-offset: 2px;
}

button.home-feedback-btn:active,
.home-feedback-btn:active {
  transform: scale(0.98);
}

/* Cookie bar is fixed over the bottom; lift footer content so the link stays tappable. */
body.home-visual:has(#cookie-banner.show) .home-feedback-footer {
  padding-bottom: calc(max(0.85rem, env(safe-area-inset-bottom, 0px)) + 4.75rem);
}

/* Hero overlay: smoke backdrop via ::before; title + CTA stay in document flow */
.hero-footer {
  --hero-footer-pad-x: clamp(1rem, 4vw, 2rem);
  --hero-footer-pad-bottom: max(clamp(1.25rem, 5vh, 3.5rem), env(safe-area-inset-bottom, 0px));
  --hero-footer-pad-top: clamp(4.5rem, 11vh, 6.5rem);
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  padding:
    var(--hero-footer-pad-top)
    var(--hero-footer-pad-x)
    var(--hero-footer-pad-bottom);
  pointer-events: none;
}

body.home-visual:has(#cookie-banner.show) .hero-footer {
  --hero-footer-pad-bottom: calc(max(clamp(1.25rem, 5vh, 3.5rem), env(safe-area-inset-bottom, 0px)) + 4.75rem);
}

.hero-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(68%, 36rem);
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 130% 90% at 50% 108%, rgba(28, 28, 28, 0.55) 0%, transparent 68%),
    radial-gradient(ellipse 70% 55% at 22% 88%, rgba(36, 36, 36, 0.45) 0%, transparent 62%),
    radial-gradient(ellipse 65% 50% at 78% 85%, rgba(32, 32, 32, 0.42) 0%, transparent 58%),
    radial-gradient(ellipse 90% 70% at 50% 95%, rgba(24, 24, 24, 0.35) 0%, transparent 72%),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(20, 20, 20, 0.18) 38%,
      rgba(18, 18, 18, 0.42) 72%,
      rgba(12, 12, 12, 0.55) 100%
    );
}

.hero-footer__content {
  position: relative;
  z-index: 2;
  width: min(100%, 40rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.75rem, 2.5vh, 1.25rem);
  text-align: center;
  pointer-events: auto;
}

.hero-title {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.35rem, 2.8vw + 0.85rem, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
  text-wrap: balance;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.65),
    0 4px 20px rgba(0, 0, 0, 0.45);
}

.hero-cta {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 22rem);
  min-height: 3rem;
  padding: clamp(0.85rem, 2vh, 1rem) clamp(1.25rem, 4vw, 2rem);
  background: var(--bt-cta);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-size: clamp(0.95rem, 1.6vw + 0.55rem, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, transform 0.15s ease;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  background: var(--bt-cta-hover);
  transform: translateY(-1px);
}

.hero-cta:focus-visible {
  outline: 3px solid var(--bt-cream);
  outline-offset: 3px;
}

.hero-trust {
  width: min(100%, 36rem);
  margin-top: clamp(0.5rem, 1.5vh, 0.85rem);
  color: var(--bt-cream);
  font-size: clamp(0.78rem, 1.4vw + 0.45rem, 0.92rem);
  line-height: 1.45;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.hero-trust__points {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin: 0 0 0.65rem;
  text-align: center;
}

.hero-trust__points p {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-trust__policy {
  margin: 0.35rem 0 0;
}

.hero-trust a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.hero-trust a:hover,
.hero-trust a:focus-visible {
  color: var(--bt-cream);
}

body.home-visual #cookie-banner {
  background: var(--bt-forest-dark);
}

body.home-visual #cookie-banner button {
  background: var(--bt-cta);
}

@media (max-width: 600px) {
  body.home-visual .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
  }

  .hero-footer {
    --hero-footer-pad-top: clamp(5.5rem, 16vh, 7rem);
    --hero-footer-pad-bottom: max(clamp(1rem, 4vh, 2.5rem), env(safe-area-inset-bottom, 0px));
  }

  body.home-visual:has(#cookie-banner.show) .hero-footer {
    --hero-footer-pad-bottom: calc(max(clamp(1rem, 4vh, 2.5rem), env(safe-area-inset-bottom, 0px)) + 5.25rem);
  }

  .hero-footer::before {
    height: min(72%, 28rem);
  }

  .hero-cta {
    width: 100%;
    max-width: none;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hero-footer {
    --hero-footer-pad-top: clamp(3.5rem, 10vh, 4.5rem);
    --hero-footer-pad-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  }

  .hero-footer::before {
    height: min(85%, 14rem);
  }

  .hero-title {
    font-size: clamp(1.1rem, 3.5vh, 1.5rem);
  }

  .hero-cta {
    min-height: 2.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }

  .hero-carousel .hero-slide:not(:first-child) {
    display: none;
  }

  .hero-carousel .hero-slide:first-child {
    opacity: 1;
  }

  .hero-video,
  .hero-ticket-overlay,
  .hero-ticket-overlay__image,
  .hero-ticket-overlay__canvas,
  .hero-ticket-overlay__video {
    display: none;
  }

  .hero-cta {
    transition: none;
  }
}