/* ============================================
   Fundidora Morelia - Design System
   Style: Apple-inspired Dark Minimal
   ============================================ */

:root {
  --color-brand: #ea580c;
  --color-brand-hover: #f97316;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --bg: #0a0a0a;
  --fg: #ffffff;
  --fg-60: rgba(255,255,255,0.6);
  --fg-40: rgba(255,255,255,0.4);
  --fg-30: rgba(255,255,255,0.3);
  --fg-70: rgba(255,255,255,0.7);
  --fg-20: rgba(255,255,255,0.2);
  --surface-03: rgba(255,255,255,0.03);
  --surface-06: rgba(255,255,255,0.06);
  --surface-10: rgba(255,255,255,0.1);
  --border-06: rgba(255,255,255,0.06);
  --border-08: rgba(255,255,255,0.08);
  --border-12: rgba(255,255,255,0.12);
  --header-bg: rgba(10,10,10,0.8);
  --overlay-bg: rgba(0,0,0,0.4);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --fg: #1d1d1f;
    --fg-60: rgba(29,29,31,0.6);
    --fg-40: rgba(29,29,31,0.4);
    --fg-30: rgba(29,29,31,0.3);
    --fg-70: rgba(29,29,31,0.7);
    --fg-20: rgba(29,29,31,0.2);
    --surface-03: rgba(0,0,0,0.03);
    --surface-06: rgba(0,0,0,0.05);
    --surface-10: rgba(0,0,0,0.08);
    --border-06: rgba(0,0,0,0.08);
    --border-08: rgba(0,0,0,0.1);
    --border-12: rgba(0,0,0,0.15);
    --header-bg: rgba(255,255,255,0.8);
    --overlay-bg: rgba(255,255,255,0.4);
  }
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  overflow-x: hidden;
}

/* ---------- reCAPTCHA badge (hidden per Google TOS with text attribution) ---------- */
.grecaptcha-badge { visibility: hidden; }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="delay-1"] { transition-delay: 0.15s; }
[data-reveal="delay-2"] { transition-delay: 0.3s; }
[data-reveal="delay-3"] { transition-delay: 0.45s; }

/* ---------- Process Card ---------- */
.process-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5 / 4;
}
.process-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), opacity 0.6s ease;
  opacity: 0.7;
}
.process-card:hover img {
  transform: scale(1.05);
  opacity: 1;
}
.process-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  transition: opacity 0.4s ease;
}
.process-card:hover .process-card__overlay {
  opacity: 0.6;
}
.process-card__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  z-index: 2;
}

/* ---------- Marquee ---------- */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee__track {
  display: flex;
  gap: 5rem;
  animation: marquee 45s linear infinite;
  width: max-content;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
.marquee__item {
  flex-shrink: 0;
  height: 2rem;
  opacity: 0.25;
  filter: grayscale(1) brightness(2);
  transition: all 0.4s ease;
}
.marquee__item:hover {
  opacity: 0.7;
  filter: grayscale(0) brightness(1);
}

/* ---------- Hamburger ---------- */
.hamburger-box {
  width: 17px;
  height: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger-line {
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s ease;
  transform-origin: center;
}
.hamburger.is-active .hamburger-top {
  transform: translateY(4.25px) rotate(45deg);
}
.hamburger.is-active .hamburger-bottom {
  transform: translateY(-4.25px) rotate(-45deg);
}

/* ---------- Mobile Menu ---------- */
.mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-out);
}
.mobile-nav.is-open {
  max-height: 80vh;
  overflow-y: auto;
}

/* ---------- Dropdown ---------- */
.dropdown-panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s ease;
  pointer-events: none;
}
.dropdown:hover .dropdown-panel,
.dropdown.is-open .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---------- Stats ---------- */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.75rem 1.75rem;
  border-radius: 980px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--color-brand);
  color: white;
}
.btn-primary:hover {
  background: var(--color-brand-hover);
}
.btn-outline {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}
.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-outline-dark {
  background: transparent;
  color: #1d1d1f;
  border: 1.5px solid #d2d2d7;
}
.btn-outline-dark:hover {
  border-color: #1d1d1f;
}
.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

/* ---------- Lightbox ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox-overlay.is-active {
  opacity: 1;
  visibility: visible;
}
[data-lightbox] {
  cursor: zoom-in;
}
[data-lightbox]:hover {
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.75rem;
  transform: scale(0.95);
  transition: transform 0.3s var(--ease-out);
}
.lightbox-overlay.is-active .lightbox-img {
  transform: scale(1);
}

/* ---------- Bounce for scroll hint ---------- */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
.animate-bounce {
  animation: bounce 2s ease-in-out infinite;
}
