/* ============================================================
   Big Apple Green Tours — QR Landing Page
   Mobile-first, fullscreen video, premium editorial design
   ============================================================ */

/* ── Reset & base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brand palette */
  --green-100: #d4edda;
  --green-300: #7ec896;
  --green-400: #4db870;
  --green-500: #2da05a;
  --green-600: #1e7a42;

  /* Neutrals */
  --white: #ffffff;
  --white-90: rgba(255, 255, 255, 0.90);
  --white-70: rgba(255, 255, 255, 0.70);
  --white-40: rgba(255, 255, 255, 0.40);
  --white-15: rgba(255, 255, 255, 0.15);
  --white-08: rgba(255, 255, 255, 0.08);
  --black: #000000;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Transitions */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-sine: cubic-bezier(0.37, 0, 0.63, 1);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0f0d;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  -webkit-text-size-adjust: 100%;
}

/* ============================================================
   LOADER
   ============================================================ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0f0d;
  transition: opacity 0.8s var(--ease-out-quart),
              visibility 0.8s var(--ease-out-quart);
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: loader-rise 0.6s var(--ease-out-quart) both;
}

.loader-leaf {
  width: 48px;
  height: 48px;
  color: var(--green-400);
  animation: leaf-breathe 2.4s var(--ease-in-out-sine) infinite;
}

.loader-leaf svg {
  width: 100%;
  height: 100%;
}

.loader-wordmark {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-40);
}

@keyframes loader-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes leaf-breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

/* ============================================================
   VIDEO BACKGROUND
   ============================================================ */
#video-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0a0f0d;
}

#bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center center;
  display: block;
  /* Slight desaturation for a more cinematic feel */
  filter: saturate(0.85) brightness(0.9);
}

/* ============================================================
   GRADIENT OVERLAYS
   ============================================================ */

/* Top gradient — darkens top so branding is readable */
.overlay--top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 55vh;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.30) 55%,
    transparent 100%
  );
}

/* Bottom gradient — darkens bottom for CTA legibility */
.overlay--bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55vh;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 10, 5, 0.90) 0%,
    rgba(0, 10, 5, 0.55) 45%,
    transparent 100%
  );
}

/* Vignette — subtle radial darkening of edges */
.overlay--vignette {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: radial-gradient(
    ellipse 100% 100% at 50% 50%,
    transparent 40%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

/* ============================================================
   HERO CONTENT
   ============================================================ */
.hero-content {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  /* Safe area padding */
  padding-top: max(env(safe-area-inset-top, 0px), 24px);
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 20px);
  padding-left: max(env(safe-area-inset-left, 0px), 24px);
  padding-right: max(env(safe-area-inset-right, 0px), 24px);

  /* Entry animation */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.9s var(--ease-out-quart) 0.2s,
              transform 0.9s var(--ease-out-quart) 0.2s;
}

.hero-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Hero Header (top branding block) ── */
.hero-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding-top: 12px;
}

/* Eco badge pill */
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px 6px 9px;
  border-radius: 100px;
  border: 1px solid rgba(77, 184, 112, 0.45);
  background: rgba(30, 122, 66, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--green-300);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-badge__leaf {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--green-400);
}

.brand-badge__leaf svg {
  width: 100%;
  height: 100%;
}

/* Main wordmark */
.brand-wordmark {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-name {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1;
}

.brand-name__big {
  font-family: var(--font-sans);
  font-size: clamp(28px, 8.5vw, 42px);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--white-90);
  line-height: 1.1;
}

.brand-name__green {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(34px, 10.5vw, 52px);
  font-weight: 400;
  color: var(--green-300);
  line-height: 1.05;
  /* Subtle text shadow for depth */
  text-shadow:
    0 0 40px rgba(77, 184, 112, 0.35),
    0 2px 20px rgba(0, 0, 0, 0.5);
}

.brand-tagline {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-40);
}

/* ── Hero Footer (bottom CTA block) ── */
.hero-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cta-eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-40);
  text-align: center;
}

/* ── Book Now button ── */
.book-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  padding: 18px 28px;
  overflow: hidden;
  border-radius: 16px;
  text-decoration: none;
  color: var(--white);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  user-select: none;
  -webkit-user-select: none;

  /* Layered background: green gradient base */
  background:
    linear-gradient(
      135deg,
      #2da05a 0%,
      #1e7a42 50%,
      #166035 100%
    );

  /* Elevated shadow with green tint */
  box-shadow:
    0 0 0 1px rgba(77, 184, 112, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 12px 40px rgba(30, 122, 66, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);

  /* Transition for press effect */
  transition:
    transform 0.18s var(--ease-out-quart),
    box-shadow 0.18s var(--ease-out-quart),
    filter 0.18s var(--ease-out-quart);
}

.book-btn__label {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}

.book-btn__arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform 0.2s var(--ease-out-quart);
}

.book-btn__arrow svg {
  width: 100%;
  height: 100%;
}

/* Shimmer sweep effect */
.book-btn__shimmer {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  background-position: -100% 0;
  animation: shimmer-sweep 3.2s var(--ease-in-out-sine) infinite 1.5s;
}

@keyframes shimmer-sweep {
  0%   { background-position: -100% 0; }
  40%, 100% { background-position: 200% 0; }
}

/* Press state */
.book-btn:active {
  transform: scale(0.965);
  box-shadow:
    0 0 0 1px rgba(77, 184, 112, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 6px 20px rgba(30, 122, 66, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  filter: brightness(0.92);
}

/* Arrow nudge on hover (desktop / pointer devices) */
@media (hover: hover) {
  .book-btn:hover .book-btn__arrow {
    transform: translateX(3px);
  }

  .book-btn:hover {
    box-shadow:
      0 0 0 1px rgba(77, 184, 112, 0.4),
      0 6px 24px rgba(0, 0, 0, 0.45),
      0 16px 52px rgba(30, 122, 66, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
}

.cta-sub {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--white-40);
  text-align: center;
  line-height: 1.5;
  padding-bottom: 4px;
}

/* ============================================================
   TAP-TO-PLAY PROMPT (iOS autoplay fallback)
   ============================================================ */
.tap-prompt {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.tap-prompt.visible {
  opacity: 1;
  pointer-events: auto;
}

.tap-prompt__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.tap-prompt__inner svg {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
  animation: tap-pulse 2s ease-in-out infinite;
}

.tap-prompt__inner span {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-70);
}

@keyframes tap-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50%       { transform: scale(1.06); opacity: 1; }
}

/* ============================================================
   UTILITY ANIMATIONS
   ============================================================ */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   SAFE AREA — larger phones / landscape guard
   ============================================================ */
@media (max-height: 600px) and (orientation: landscape) {
  .brand-name__big   { font-size: 22px; }
  .brand-name__green { font-size: 26px; }
  .brand-tagline     { display: none; }
  .hero-header       { gap: 10px; }
  .book-btn          { padding: 14px 24px; }
  .book-btn__label   { font-size: 15px; }
  .cta-eyebrow       { display: none; }
}
