/* ============================================
   RST Solar · Main custom styles
   Paleta "Atardecer del Golfo"
   Cargado vía wp_enqueue_scripts() en inc/enqueue.php
   ============================================ */

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; }

body {
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Premium grain texture
   ============================================ */
.grain {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: overlay;
}

/* ============================================
   Hero
   ============================================ */
.hero-glow {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(245, 158, 11, 0.15), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 30%, rgba(6, 182, 212, 0.1), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 70%, rgba(16, 185, 129, 0.08), transparent 50%);
}

.hero-gradient-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: 0.4;
  z-index: -1;
  animation: float 16s ease-in-out infinite;
}
.hero-gradient-orb--1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #F59E0B, transparent 70%);
  top: -100px; left: -100px;
}
.hero-gradient-orb--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #06B6D4, transparent 70%);
  bottom: -100px; right: -100px;
  animation-delay: -8s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-card { perspective: 1000px; transform-style: preserve-3d; }

/* ============================================
   Marquee
   ============================================ */
.marquee {
  position: relative;
  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: inline-flex;
  gap: 2rem;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  will-change: transform;
}
.marquee-item {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  letter-spacing: 0.15em;
  font-size: 0.875rem;
  color: #78716C;
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   Stat cards
   ============================================ */
.stat-card {
  position: relative;
  padding: 2rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(38, 44, 61, 0.8);
  background: linear-gradient(180deg, rgba(17, 21, 31, 0.7) 0%, rgba(10, 14, 26, 0.5) 100%);
  backdrop-filter: blur(8px);
  transition: border-color 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
}
.stat-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-4px);
}
.stat-card__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(180deg, #F5F5F4 0%, #F59E0B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.stat-card__label { margin-top: 1rem; color: #F5F5F4; font-weight: 500; }
.stat-card__sub { margin-top: 0.5rem; font-size: 0.875rem; color: #78716C; }

/* ============================================
   Step cards
   ============================================ */
.step-card {
  background: #11151F;
  padding: 2rem 1.75rem;
  position: relative;
  transition: background 0.4s var(--ease-out-expo);
  min-height: 240px;
  display: flex;
  flex-direction: column;
}
.step-card:hover { background: #1A1F2E; }
.step-card__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: #F59E0B;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}
.step-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #F5F5F4;
  margin-bottom: 0.75rem;
}
.step-card__desc { font-size: 0.9rem; color: #A8A29E; line-height: 1.55; }

/* ============================================
   Feature cards
   ============================================ */
.feature-card {
  position: relative;
  padding: 2rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(38, 44, 61, 0.8);
  background: rgba(17, 21, 31, 0.6);
  transition: all 0.4s var(--ease-out-expo);
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.1), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.feature-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-3px);
}
.feature-card:hover::before { opacity: 1; }
.feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #F59E0B;
  margin-bottom: 1.5rem;
}
.feature-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #F5F5F4;
  margin-bottom: 0.75rem;
}
.feature-card__desc { font-size: 0.95rem; color: #A8A29E; line-height: 1.55; }

/* ============================================
   Case cards
   ============================================ */
.case-card {
  border-radius: 1.5rem;
  border: 1px solid rgba(38, 44, 61, 0.8);
  background: #11151F;
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
}
.case-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 20px 60px -20px rgba(16, 185, 129, 0.2);
}
.case-card__visual {
  aspect-ratio: 4 / 3;
  position: relative;
  border-bottom: 1px solid rgba(38, 44, 61, 0.5);
  overflow: hidden;
}
.case-card__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.05), transparent 70%);
}
.case-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #44403C;
  font-size: 0.875rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   FAQ
   ============================================ */
.faq-item {
  border-radius: 1rem;
  border: 1px solid rgba(38, 44, 61, 0.8);
  background: rgba(17, 21, 31, 0.6);
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.faq-item[open] { border-color: rgba(245, 158, 11, 0.3); }
.faq-summary {
  padding: 1.25rem 1.75rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: #F5F5F4;
  user-select: none;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #78716C;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}
.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  color: #F59E0B;
}
.faq-content {
  padding: 0 1.75rem 1.5rem;
  color: #A8A29E;
  line-height: 1.65;
  animation: faqSlide 0.4s var(--ease-out-expo);
}
@keyframes faqSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Tariff & zone pills
   ============================================ */
.tariff-pill,
.zone-pill {
  padding: 0.625rem 0.5rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(38, 44, 61, 0.8);
  background: rgba(10, 14, 26, 0.5);
  font-size: 0.875rem;
  font-weight: 500;
  color: #A8A29E;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'JetBrains Mono', monospace;
}
.tariff-pill:hover,
.zone-pill:hover {
  border-color: rgba(245, 158, 11, 0.4);
  color: #F5F5F4;
}
.tariff-pill--active,
.zone-pill--active {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.1);
  color: #FBBF24;
}

/* ============================================
   Zone tags
   ============================================ */
.zone-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(38, 44, 61, 0.8);
  background: rgba(17, 21, 31, 0.5);
  font-size: 0.875rem;
  color: #F5F5F4;
  transition: all 0.3s ease;
}
.zone-tag:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(17, 21, 31, 0.8);
}

/* ============================================
   Map pins
   ============================================ */
.map-pin {
  animation: pinPulse 3s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes pinPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ============================================
   Footer social
   ============================================ */
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(38, 44, 61, 0.8);
  background: rgba(17, 21, 31, 0.5);
  color: #A8A29E;
  transition: all 0.3s ease;
}
.footer-social:hover {
  color: #F59E0B;
  border-color: rgba(245, 158, 11, 0.4);
}

/* ============================================
   Animaciones (data-anim)
   ============================================ */
[data-anim] { opacity: 0; }
.no-js [data-anim] { opacity: 1; }

/* ============================================
   Navbar scrolled state
   ============================================ */
#navbar.scrolled {
  background: rgba(8, 9, 12, 0.85);
  border-color: rgba(38, 44, 61, 0.9);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

/* WordPress menu items adapt to navbar style */
#navbar .menu-item a,
#navbar .nav-menu-item a {
  display: inline-block;
  padding: 0.25rem 0;
}

/* ============================================
   Widget styles (footer)
   ============================================ */
.widget-title {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #78716C;
  margin-bottom: 0.75rem;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { margin-bottom: 0.5rem; }
.widget a { color: #A8A29E; transition: color 0.2s ease; }
.widget a:hover { color: #F5F5F4; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .stat-card__num { font-size: 2.5rem; }
  .step-card { min-height: auto; }
  .hero-gradient-orb { filter: blur(60px); opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; }
  .map-pin { animation: none; }
}
