/* ==========================================================================
   HOMEPAGE TEST — Bento Image Grid
   canaries.guide — Photo-card-based homepage
   ========================================================================== */

/* ---------- HERO SECTION ---------- */
.hero-visual {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 60%, #1a1508 100%);
}

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

.hero-visual__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
  z-index: 1;
}

/* Animated floating particles */
.hero-visual__particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.hero-visual__particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(249, 115, 22, 0.4);
  border-radius: 50%;
  animation: float-up linear infinite;
}

.hero-visual__particle:nth-child(1) { left: 10%; animation-duration: 8s; animation-delay: 0s; }
.hero-visual__particle:nth-child(2) { left: 25%; animation-duration: 12s; animation-delay: 2s; width: 3px; height: 3px; }
.hero-visual__particle:nth-child(3) { left: 40%; animation-duration: 10s; animation-delay: 4s; }
.hero-visual__particle:nth-child(4) { left: 55%; animation-duration: 14s; animation-delay: 1s; width: 1.5px; height: 1.5px; }
.hero-visual__particle:nth-child(5) { left: 70%; animation-duration: 9s; animation-delay: 3s; }
.hero-visual__particle:nth-child(6) { left: 85%; animation-duration: 11s; animation-delay: 5s; width: 2.5px; height: 2.5px; }
.hero-visual__particle:nth-child(7) { left: 15%; animation-duration: 13s; animation-delay: 6s; }
.hero-visual__particle:nth-child(8) { left: 60%; animation-duration: 7s; animation-delay: 1.5s; width: 1px; height: 1px; }

@keyframes float-up {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

.hero-visual__content {
  position: relative;
  z-index: 2;
  padding: 4rem 1.5rem;
}

.hero-visual__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Satoshi', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f97316;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.2);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out both;
}

.hero-visual__title {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.05;
  color: #fff;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.hero-visual__title .logo-guide {
  color: #f97316;
}

.hero-visual__subtitle {
  font-family: 'Satoshi', sans-serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-visual__scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Satoshi', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.3s;
  animation: fadeInUp 0.8s ease-out 0.45s both;
}

.hero-visual__scroll-cue:hover {
  color: #f97316;
}

.hero-visual__scroll-cue svg {
  animation: bounce-down 2s ease-in-out infinite;
}

@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- BENTO GRID SECTION ---------- */
.bento-section {
  padding: 4rem 0 3rem;
}

.bento-section .section-title {
  margin-bottom: 0.5rem;
}

.bento-section .section-subtitle {
  margin-bottom: 2.5rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Card base */
.bento-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: #fff;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.bento-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bento-card:hover .bento-card__image {
  transform: scale(1.06);
}

/* Gradient overlay */
.bento-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.35) 40%,
    rgba(0, 0, 0, 0.05) 70%,
    transparent 100%
  );
  z-index: 1;
  transition: background 0.35s ease;
}

.bento-card:hover .bento-card__overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.1) 70%,
    transparent 100%
  );
}

/* Card text */
.bento-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  z-index: 2;
}

.bento-card__category {
  display: inline-block;
  font-family: 'Satoshi', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f97316;
  margin-bottom: 0.35rem;
}

.bento-card__title {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #fff;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Arrow icon */
.bento-card__arrow {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.bento-card:hover .bento-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

.bento-card__arrow:hover {
  background: rgba(249, 115, 22, 0.3);
}

/* ---------- GRID LAYOUT — SPECIFIC CARDS ---------- */

/* Row 1: Three equal cards */
.bento-card--restaurant { grid-column: 1; grid-row: 1; }
.bento-card--museums { grid-column: 2; grid-row: 1; }
.bento-card--hiking-sports { grid-column: 3; grid-row: 1; }

/* Row 2: Caves (tall, double height) + Stargazing (wide, 2 cols) */
.bento-card--caves {
  grid-column: 1;
  grid-row: 2 / 4;
}

.bento-card--stargazing {
  grid-column: 2 / 4;
  grid-row: 2;
}

/* Row 3: Fish Markets + Theatre (caves continues from row 2) */
.bento-card--fish-markets { grid-column: 2; grid-row: 3; }
.bento-card--theatre { grid-column: 3; grid-row: 3; }

/* Row 4: Guachinches + Hiking Fitness + Protected Areas */
.bento-card--guachinches { grid-column: 1; grid-row: 4; }
.bento-card--hiking-fitness { grid-column: 2; grid-row: 4; }
.bento-card--protected { grid-column: 3; grid-row: 4; }

/* Larger text for featured cards */
.bento-card--stargazing .bento-card__title {
  font-size: 1.75rem;
}

.bento-card--caves .bento-card__title {
  font-size: 1.5rem;
}

/* ---------- RESPONSIVE ---------- */

/* Tablet: 2 columns */
@media (max-width: 960px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 250px;
    gap: 12px;
  }

  .bento-card--restaurant { grid-column: 1; grid-row: 1; }
  .bento-card--museums { grid-column: 2; grid-row: 1; }
  .bento-card--hiking-sports { grid-column: 1; grid-row: 2; }
  .bento-card--caves { grid-column: 2; grid-row: 2 / 4; }
  .bento-card--stargazing { grid-column: 1; grid-row: 3; }
  .bento-card--fish-markets { grid-column: 1; grid-row: 4; }
  .bento-card--theatre { grid-column: 2; grid-row: 4; }
  .bento-card--guachinches { grid-column: 1; grid-row: 5; }
  .bento-card--hiking-fitness { grid-column: 2; grid-row: 5; }
  .bento-card--protected { grid-column: 1 / 3; grid-row: 6; }

  .bento-card--stargazing .bento-card__title {
    font-size: 1.35rem;
  }
}

/* Mobile: 1 column */
@media (max-width: 600px) {
  .hero-visual {
    min-height: 60vh;
  }

  .hero-visual__content {
    padding: 3rem 1.25rem;
  }

  .bento-section {
    padding: 2.5rem 0 2rem;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
    gap: 12px;
  }

  .bento-card--restaurant { grid-column: 1; grid-row: 1; }
  .bento-card--museums { grid-column: 1; grid-row: 2; }
  .bento-card--hiking-sports { grid-column: 1; grid-row: 3; }
  .bento-card--caves { grid-column: 1; grid-row: 4; }
  .bento-card--stargazing { grid-column: 1; grid-row: 5; }
  .bento-card--fish-markets { grid-column: 1; grid-row: 6; }
  .bento-card--theatre { grid-column: 1; grid-row: 7; }
  .bento-card--guachinches { grid-column: 1; grid-row: 8; }
  .bento-card--hiking-fitness { grid-column: 1; grid-row: 9; }
  .bento-card--protected { grid-column: 1; grid-row: 10; }

  .bento-card--caves .bento-card__title,
  .bento-card--stargazing .bento-card__title {
    font-size: 1.35rem;
  }

  .bento-card__title {
    font-size: 1.15rem;
  }

  .bento-card__content {
    padding: 1.25rem;
  }
}

/* ---------- DARK MODE ADJUSTMENTS ---------- */
[data-theme="dark"] .hero-visual {
  background: linear-gradient(135deg, #0e0e0e 0%, #121212 60%, #1a0e00 100%);
}

[data-theme="dark"] .bento-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .bento-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* ---------- INTERSECTION OBSERVER REVEAL ---------- */
.bento-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s ease;
}

.bento-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.bento-card:hover.revealed {
  transform: translateY(-4px);
}

/* Stagger reveal delays */
.bento-card--restaurant.revealed  { transition-delay: 0s; }
.bento-card--museums.revealed     { transition-delay: 0.08s; }
.bento-card--hiking-sports.revealed { transition-delay: 0.16s; }
.bento-card--caves.revealed       { transition-delay: 0.06s; }
.bento-card--stargazing.revealed  { transition-delay: 0.14s; }
.bento-card--fish-markets.revealed { transition-delay: 0.08s; }
.bento-card--theatre.revealed     { transition-delay: 0.16s; }
.bento-card--guachinches.revealed { transition-delay: 0.06s; }
.bento-card--hiking-fitness.revealed { transition-delay: 0.14s; }
.bento-card--protected.revealed   { transition-delay: 0.22s; }

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .bento-card,
  .bento-card__image,
  .hero-visual__particle,
  .hero-visual__scroll-cue svg {
    animation: none !important;
    transition: opacity 0.2s ease !important;
    transform: none !important;
  }

  .bento-card {
    opacity: 1;
  }

  .bento-card__arrow {
    opacity: 0.7;
    transform: none;
  }
}
