/**
 * The Hemp House — Home Inmersiva CSS
 * Design system: Premium Botanical Dark / Streetwear Cannabis Premium
 * Hereda principios de design/MASTER.md
 *
 * Carga solo en is_front_page() vía enqueue-home-immersive.php
 */

/* ====================================================
   1. CUSTOM PROPERTIES — Design tokens
   ==================================================== */
:root {
  /* Backgrounds */
  --thh-bg-deep:       #0A0E0A;
  --thh-bg-forest:     #0F1F15;
  --thh-bg-card:       #14241B;
  --thh-bg-overlay:    rgba(10, 14, 10, 0.85);

  /* Accents */
  --thh-gold:          #C9A961;
  --thh-gold-bright:   #E8C879;
  --thh-gold-dim:      #8F7842;
  --thh-sage:          #5C8C68;
  --thh-sage-bright:   #7AAB85;

  /* Text */
  --thh-text-primary:   #F5F0E5;
  --thh-text-secondary: #A8B5A8;
  --thh-text-muted:     #6E7B6E;
  --thh-text-dim:       #4A554A;

  /* Functional */
  --thh-border:        rgba(245, 240, 229, 0.08);
  --thh-glass-bg:      rgba(20, 36, 27, 0.4);
  --thh-glass-border:  1px solid rgba(201, 169, 97, 0.15);

  /* Typography */
  --thh-font-heading: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --thh-font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --thh-font-display: 'Impact', 'Arial Black', sans-serif;

  /* Spacing */
  --thh-space-4:  16px;
  --thh-space-6:  24px;
  --thh-space-8:  32px;
  --thh-space-12: 48px;
  --thh-space-16: 64px;
  --thh-space-24: 96px;

  /* Radii */
  --thh-radius-sm:  4px;
  --thh-radius-md:  8px;
  --thh-radius-lg:  16px;
  --thh-radius-xl:  24px;

  /* Shadows */
  --thh-shadow-sm:        0 2px 8px rgba(0, 0, 0, 0.3);
  --thh-shadow-md:        0 8px 24px rgba(0, 0, 0, 0.4);
  --thh-shadow-lg:        0 16px 48px rgba(0, 0, 0, 0.5);
  --thh-shadow-glow-gold: 0 0 24px rgba(201, 169, 97, 0.25);

  /* Easings (Emil Kowalski curves — más fuertes que built-in) */
  --thh-ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --thh-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --thh-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ====================================================
   2. RESET & BASE — solo dentro de la home inmersiva
   ==================================================== */
.thh-home-immersive {
  background: var(--thh-bg-deep);
  color: var(--thh-text-primary);
  font-family: var(--thh-font-body);
  overflow-x: hidden;
}

.thh-home-immersive * {
  box-sizing: border-box;
}

.thh-home-immersive a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms var(--thh-ease-out);
}

.thh-home-immersive img,
.thh-home-immersive video {
  max-width: 100%;
  height: auto;
  display: block;
}

.thh-home-immersive picture {
  display: block;
}

/* ====================================================
   3. HERO — sección 1 (con vídeo background)
   ==================================================== */
.thh-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh; /* viewport dinámico — mobile sin gap por barra browser */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--thh-bg-deep);
}

.thh-hero__bg-video,
.thh-hero__bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  will-change: transform;
}

.thh-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 10, 0.4) 0%,
    rgba(10, 14, 10, 0.6) 50%,
    rgba(10, 14, 10, 0.85) 100%
  );
  pointer-events: none;
}

.thh-hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: var(--thh-space-8) var(--thh-space-6);
  max-width: 1200px;
  width: 100%;
}

.thh-hero__eyebrow {
  font-family: var(--thh-font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--thh-gold);
  text-transform: uppercase;
  margin: 0 0 var(--thh-space-6) 0;
}

.thh-hero__title {
  font-family: var(--thh-font-heading);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--thh-text-primary);
  margin: 0 0 var(--thh-space-8) 0;
}

.thh-hero__title .italic {
  font-style: italic;
  color: var(--thh-gold-bright);
}

/* Cada palabra envuelta en span para reveal animado por GSAP */
.thh-hero__title span {
  display: inline-block;
  will-change: transform, opacity;
}

.thh-hero__subtitle {
  font-family: var(--thh-font-body);
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--thh-text-secondary);
  max-width: 65ch;
  margin: 0 auto var(--thh-space-12) auto;
}

.thh-hero__actions {
  display: flex;
  gap: var(--thh-space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.thh-hero__scroll-hint {
  position: absolute;
  bottom: var(--thh-space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--thh-font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--thh-text-secondary);
  text-transform: uppercase;
  opacity: 0.7;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
  50%      { transform: translate(-50%, 8px); opacity: 1; }
}

/* ====================================================
   4. BUTTONS — base (Emil principles)
   ==================================================== */
.thh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--thh-gold);
  color: var(--thh-bg-deep);
  font-family: var(--thh-font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 16px 32px;
  border: none;
  border-radius: var(--thh-radius-md);
  cursor: pointer;
  min-height: 44px;
  /* exact properties — never `transition: all` */
  transition:
    transform 160ms var(--thh-ease-out),
    background 200ms var(--thh-ease-out),
    box-shadow 200ms var(--thh-ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .thh-btn:hover {
    background: var(--thh-gold-bright);
    box-shadow: var(--thh-shadow-glow-gold);
  }
}

.thh-btn:active {
  transform: scale(0.97);
}

.thh-btn:focus-visible {
  outline: 2px solid var(--thh-gold);
  outline-offset: 4px;
}

.thh-btn--ghost {
  background: transparent;
  color: var(--thh-text-primary);
  border: 1px solid var(--thh-border);
}

@media (hover: hover) and (pointer: fine) {
  .thh-btn--ghost:hover {
    background: rgba(245, 240, 229, 0.05);
    border-color: var(--thh-gold);
    box-shadow: none;
  }
}

/* ====================================================
   5. SECCIÓN PLACEHOLDER — para secciones 2-7 (en construcción)
   ==================================================== */
.thh-section {
  padding: var(--thh-space-24) var(--thh-space-6);
  background: var(--thh-bg-deep);
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thh-section--placeholder {
  border-top: 1px solid var(--thh-border);
  text-align: center;
}

.thh-section--placeholder h2 {
  font-family: var(--thh-font-heading);
  font-size: clamp(32px, 4vw, 64px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--thh-text-primary);
  margin: 0 0 var(--thh-space-6) 0;
}

.thh-section--placeholder p {
  color: var(--thh-text-secondary);
  font-size: 18px;
  max-width: 60ch;
  margin: 0 auto;
  line-height: 1.6;
}

/* ====================================================
   6. ACCESSIBILITY — prefers-reduced-motion
   ==================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .thh-hero__bg-video {
    /* Ocultar vídeo, dejar imagen poster */
    display: none;
  }
}

/* ====================================================
   7. RESPONSIVE
   ==================================================== */
@media (max-width: 768px) {
  .thh-hero {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    height: 100dvh;
    height: 100svh;
  }
  /* Video bg mobile: técnica robusta — centrado + min-width/min-height para
     cubrir SIEMPRE el viewport en portrait sin importar aspect del video */
  .thh-hero__bg-video,
  .thh-hero__bg-image {
    top: 50% !important;
    left: 50% !important;
    width: auto !important;
    height: auto !important;
    min-width: 100% !important;
    min-height: 100% !important;
    transform: translate(-50%, -50%) !important;
    object-fit: cover;
    object-position: center center;
  }
  .thh-hero__title {
    font-size: clamp(36px, 12vw, 64px);
  }
  .thh-hero__subtitle {
    font-size: 15px;
  }
  .thh-section {
    padding: var(--thh-space-16) var(--thh-space-4);
  }
}
