/* ==========================================================================
   HummelRPA — Cyber-Bee Design System
   Mobile-first · CSS puro
   ========================================================================== */

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

:root {
  --bg-deep: #0a0e14;
  --bg-surface: #0d1117;
  --bg-elevated: #161b22;
  --accent-violet: #d2a8ff;
  --accent-cyan: #79c0ff;
  --accent-amber: #ffa23e;
  --accent-amber-glow: rgba(255, 162, 62, 0.45);
  --accent-danger: rgba(248, 81, 73, 0.35);
  --accent-success: rgba(63, 185, 80, 0.35);
  --text-primary: #e6edf3;
  --text-muted: #8b949e;
  --border-subtle: rgba(210, 168, 255, 0.15);
  --border-active: rgba(121, 192, 255, 0.4);
  --font-base: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --transition: 0.25s ease;
  --container-max: 1120px;
  --header-height: 64px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-violet);
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--accent-amber);
  color: var(--bg-deep);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 1rem;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow var(--transition);
}

.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo-accent {
  color: var(--accent-violet);
}

/* --- Mobile Menu Button --- */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 200;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 24px;
  height: 24px;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Mobile Navigation --- */
.main-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-deep);
  padding: 1.5rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 180;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  visibility: hidden;
}

.main-nav.is-open {
  display: flex;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.is-visible {
  display: block;
  opacity: 1;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .site-header {
  z-index: 200;
}

.main-nav.is-open .nav-link {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  cursor: pointer;
}

.nav-link {
  font-size: 1.125rem;
  color: var(--text-muted);
  padding: 1rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-link:hover,
.nav-link:active {
  color: var(--text-primary);
  background: rgba(210, 168, 255, 0.08);
}

.nav-link--cta {
  color: var(--accent-amber);
  border: 1px solid rgba(255, 162, 62, 0.35);
  border-bottom: 1px solid rgba(255, 162, 62, 0.35);
  text-align: center;
  margin-top: 1rem;
}

.nav-link--cta:hover,
.nav-link--cta:active {
  background: rgba(255, 162, 62, 0.12);
  color: var(--accent-amber);
}

/* --- Buttons --- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg-deep);
  background: linear-gradient(135deg, #ffb347 0%, var(--accent-amber) 50%, #e8912e 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px var(--accent-amber-glow), 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: pulse-shine 2.5s ease-in-out infinite;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  animation: btn-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-amber-glow), 0 6px 20px rgba(0, 0, 0, 0.4);
  color: var(--bg-deep);
}

.btn-cta:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

.btn-cta--full {
  width: 100%;
}

.btn-cta--calc {
  margin-top: 1rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-cyan);
  background: transparent;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(121, 192, 255, 0.08);
  color: var(--accent-violet);
  border-color: var(--accent-violet);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: 3rem 0 4rem;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
  transform: translate(-50%, -50%) scale(1.35);
  min-width: 100%;
  min-height: 100%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(10, 14, 20, 0.95) 0%,
      rgba(10, 14, 20, 0.72) 12%,
      rgba(10, 14, 20, 0.45) 28%,
      rgba(10, 14, 20, 0.35) 50%,
      rgba(10, 14, 20, 0.45) 72%,
      rgba(10, 14, 20, 0.72) 88%,
      rgba(13, 17, 23, 0.97) 100%
    );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.hero-brand {
  margin-bottom: 2rem;
}

.hero-brand-name {
  display: block;
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
  text-shadow:
    0 2px 16px rgba(10, 14, 20, 0.9),
    0 0 40px rgba(210, 168, 255, 0.4),
    0 0 80px rgba(255, 162, 62, 0.2);
  animation: brand-glow 3s ease-in-out infinite;
}

.hero-brand-name .logo-accent {
  color: var(--accent-violet);
  text-shadow: 
    0 0 30px rgba(210, 168, 255, 0.6),
    0 0 60px rgba(210, 168, 255, 0.3);
}

@keyframes brand-glow {
  0%, 100% {
    text-shadow: 
      0 0 40px rgba(210, 168, 255, 0.4),
      0 0 80px rgba(255, 162, 62, 0.2);
  }
  50% {
    text-shadow: 
      0 0 60px rgba(210, 168, 255, 0.6),
      0 0 100px rgba(255, 162, 62, 0.3);
  }
}

.hero-badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-violet);
  background: rgba(210, 168, 255, 0.1);
  border: 1px solid var(--border-subtle);
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  margin-top: 1rem;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  max-width: 28ch;
  margin-inline: auto;
  text-shadow: 0 2px 12px rgba(10, 14, 20, 0.85);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: var(--text-primary);
  max-width: 48ch;
  margin-inline: auto;
  margin-bottom: 2rem;
  line-height: 1.65;
  text-shadow: 0 1px 8px rgba(10, 14, 20, 0.8);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: center;
  justify-content: center;
}

/* --- Sections --- */
.section {
  padding: 4rem 0;
  position: relative;
}

.section--espejo {
  background: var(--bg-surface);
}

.section--flow {
  background: var(--bg-deep);
}

.section--calculadora {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-deep) 100%);
}

.section--beneficios {
  background: var(--bg-surface);
}

.section--contacto {
  background: var(--bg-deep);
  padding-bottom: 5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header--left {
  text-align: left;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.875rem;
  line-height: 1.25;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 52ch;
  margin-inline: auto;
  line-height: 1.65;
}

.section-header--left .section-desc {
  margin-inline: 0;
}

/* --- Cards (El Espejo) --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-card);
}

.card h3 {
  font-size: 1.125rem;
  color: var(--accent-violet);
  margin-bottom: 0.625rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 1.125rem;
  border-radius: var(--radius-sm);
  background: rgba(210, 168, 255, 0.1);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.card-icon--chart::before,
.card-icon--chart::after {
  content: "";
  position: absolute;
  background: var(--accent-violet);
  border-radius: 2px;
}

.card-icon--chart::before {
  width: 4px;
  height: 16px;
  bottom: 10px;
  left: 12px;
}

.card-icon--chart::after {
  width: 4px;
  height: 10px;
  bottom: 10px;
  left: 22px;
  background: var(--accent-cyan);
  box-shadow: 8px 4px 0 var(--accent-amber);
}

.card-icon--clock::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
}

.card-icon--clock::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 21px;
  width: 2px;
  height: 10px;
  background: var(--accent-amber);
  transform-origin: bottom center;
  transform: rotate(30deg);
}

.card-icon--alert::before {
  content: "!";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-amber);
}

/* --- Timeline --- */
.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 640px;
  margin-inline: auto;
}

.timeline-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.timeline-marker {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--accent-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  box-shadow: 0 0 16px var(--accent-amber-glow);
}

.timeline-marker span {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent-amber);
}

.timeline-body {
  padding-bottom: 0.5rem;
  flex: 1;
}

.timeline-body h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-body p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.timeline-connector {
  width: 2px;
  height: 32px;
  margin-left: 23px;
  background: linear-gradient(
    180deg,
    var(--accent-amber),
    var(--accent-violet),
    var(--accent-cyan)
  );
  background-size: 100% 200%;
  animation: circuit-flow 2s linear infinite;
  border-radius: 1px;
  opacity: 0.7;
}

/* --- Calculator --- */
.calculator {
  max-width: 800px;
  margin-inline: auto;
}

.calculator-form {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.calculator-inputs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.calc-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.calc-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}

.calc-input-wrap:focus-within {
  border-color: var(--accent-cyan);
}

.calc-currency {
  padding: 0 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.calc-unit {
  padding: 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.calc-group input {
  flex: 1;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
  -moz-appearance: textfield;
}

.calc-group input::-webkit-outer-spin-button,
.calc-group input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calculator-results {
  margin-top: 2rem;
  animation: fadeIn 0.5s ease;
}

.calculator-results[hidden] {
  display: none !important;
}

.calculator-results:not([hidden]) {
  display: block;
}

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

.calculator-results h3 {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.result-card {
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.result-card--total {
  background: linear-gradient(135deg, rgba(248, 81, 73, 0.15) 0%, rgba(255, 162, 62, 0.15) 100%);
  border: 1px solid rgba(248, 81, 73, 0.3);
}

.result-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.result-value {
  display: block;
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  color: #f85149;
  line-height: 1;
}

.result-sublabel {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.results-breakdown {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.result-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.result-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.result-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.result-item-icon--operativo {
  background: rgba(248, 81, 73, 0.15);
}

.result-item-icon--operativo::before {
  content: "💸";
}

.result-item-icon--capacidad {
  background: rgba(255, 162, 62, 0.15);
}

.result-item-icon--capacidad::before {
  content: "⏱️";
}

.result-item-icon--estrategico {
  background: rgba(210, 168, 255, 0.15);
}

.result-item-icon--estrategico::before {
  content: "🎯";
}

.result-item-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.result-item-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.result-item-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-amber);
}

.result-cta {
  margin-top: 2rem;
  text-align: center;
  padding: 1.5rem;
  background: rgba(63, 185, 80, 0.08);
  border: 1px solid var(--accent-success);
  border-radius: var(--radius-md);
}

.result-cta-text {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.result-cta-text strong {
  color: #f85149;
  font-weight: 700;
}

/* --- Comparison --- */
.comparison {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.comparison-col {
  border-radius: var(--radius-md);
  padding: 1.75rem;
  border: 1px solid var(--border-subtle);
}

.comparison-col--before {
  background: rgba(248, 81, 73, 0.04);
  border-color: var(--accent-danger);
}

.comparison-col--after {
  background: rgba(63, 185, 80, 0.04);
  border-color: var(--accent-success);
}

.comparison-col h3 {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.comparison-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
}

.comparison-tag--success {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
}

.comparison-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.comparison-list li {
  font-size: 0.9375rem;
  color: var(--text-muted);
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.5;
}

.comparison-col--before .comparison-list li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: #f85149;
  font-weight: 700;
}

.comparison-list--check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #3fb950;
  font-weight: 700;
}

.comparison-col--after .comparison-list li {
  color: var(--text-primary);
}

/* --- Contact & Form --- */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input {
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(121, 192, 255, 0.15);
}

.form-group input[aria-invalid="true"] {
  border-color: #f85149;
  box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.15);
}

.form-error {
  font-size: 0.8125rem;
  color: #f85149;
  min-height: 1.25rem;
}

.form-status {
  text-align: center;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.form-status.is-sending {
  background: rgba(121, 192, 255, 0.1);
  color: var(--accent-cyan);
}

.form-status.is-error {
  background: rgba(248, 81, 73, 0.1);
  color: #f85149;
}

.form-success {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-success);
  border-radius: var(--radius-md);
}

.form-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(63, 185, 80, 0.15);
  border: 2px solid #3fb950;
  position: relative;
}

.form-success-icon::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #3fb950;
}

.form-success h3 {
  font-size: 1.375rem;
  color: var(--text-primary);
  margin-bottom: 0.625rem;
}

.form-success p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
  max-width: 36ch;
  margin-inline: auto;
}

/* --- FAQ --- */
.faq-title {
  font-size: 1.375rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item[open] {
  border-color: var(--border-active);
}

.faq-item summary {
  padding: 1rem 2.5rem 1rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  position: relative;
  user-select: none;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 1.125rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent-violet);
  border-bottom: 2px solid var(--accent-violet);
  transform: translateY(-60%) rotate(45deg);
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: -2px;
}

.faq-item p {
  padding: 0 1.125rem 1.125rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-amber);
  margin-top: 0.5rem;
}

.footer-cta:hover {
  color: var(--accent-violet);
}

.footer-copy {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* --- Heatmap Panel --- */
.heatmap-panel {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1000;
}

.heatmap-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: border-color var(--transition), transform var(--transition);
}

.heatmap-toggle:hover {
  border-color: var(--accent-cyan);
  transform: scale(1.05);
}

.heatmap-icon::before {
  content: "📊";
  font-size: 1.25rem;
}

.heatmap-content {
  position: absolute;
  bottom: 56px;
  right: 0;
  width: 280px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.heatmap-content h4 {
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.heatmap-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.heatmap-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  padding: 0.375rem 0.5rem;
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
}

.heatmap-list li span:first-child {
  color: var(--text-muted);
}

.heatmap-list li span:last-child {
  color: var(--accent-amber);
  font-weight: 600;
}

.heatmap-export,
.heatmap-clear {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  margin-bottom: 0.5rem;
}

.heatmap-export {
  background: var(--accent-cyan);
  color: var(--bg-deep);
  border: none;
}

.heatmap-export:hover {
  background: var(--accent-violet);
}

.heatmap-clear {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.heatmap-clear:hover {
  background: rgba(248, 81, 73, 0.1);
  color: #f85149;
  border-color: #f85149;
}

/* --- Animations --- */
@keyframes pulse-shine {
  0%, 100% {
    box-shadow: 0 0 20px var(--accent-amber-glow), 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 32px rgba(255, 162, 62, 0.6), 0 4px 16px rgba(0, 0, 0, 0.35);
  }
}

@keyframes btn-shimmer {
  0% { transform: translateX(-100%); }
  40%, 100% { transform: translateX(100%); }
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 12px var(--accent-amber), 0 0 24px var(--accent-amber-glow);
  }
  50% {
    opacity: 0.6;
    box-shadow: 0 0 6px var(--accent-amber), 0 0 12px var(--accent-amber-glow);
  }
}

@keyframes circuit-flow {
  0% { background-position: 0 0; }
  100% { background-position: 0 200%; }
}

@keyframes circuit-drift {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-10px, 10px); }
  100% { transform: translate(0, 0); }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
  transform: rotate(45deg);
  opacity: 0.6;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* --- Floating CTA (Mobile) --- */
.floating-cta {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 90;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.btn-cta--floating {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 30px var(--accent-amber-glow);
}

.floating-cta-icon {
  font-size: 1.25rem;
}

.floating-cta-text {
  font-weight: 600;
}

/* --- Optional Label --- */
.optional-label {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* --- Safe Area for notched phones --- */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-footer {
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
  }
  
  .floating-cta {
    bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

/* --- Mobile Only (< 768px) --- */
@media (max-width: 767px) {
  /* backdrop-filter rompe position:fixed del menú en iOS/Safari */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 14, 20, 0.97);
  }

  .mobile-menu-btn {
    display: flex;
  }
  
  .main-nav {
    display: none;
  }
  
  .main-nav.is-open {
    display: flex;
  }
  
  .floating-cta {
    display: block;
  }
  
  .floating-cta.is-hidden {
    display: none;
  }
  
  .hero {
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100dvh - var(--header-height));
  }

  .hero-bg-img {
    object-position: center 46%;
    transform: translate(-50%, -50%) scale(1.55);
  }

  .hero-brand-name {
    font-size: clamp(2.5rem, 15vw, 4rem);
  }
  
  .hero h1 {
    font-size: 1.375rem;
    line-height: 1.3;
  }
  
  .hero-subtitle {
    font-size: 0.9375rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  .section-desc {
    font-size: 0.9375rem;
  }
  
  .card {
    padding: 1.25rem;
  }
  
  .card h3 {
    font-size: 1rem;
  }
  
  .card p {
    font-size: 0.875rem;
  }
  
  .timeline-body h3 {
    font-size: 1rem;
  }
  
  .timeline-body p {
    font-size: 0.875rem;
  }
  
  .calculator-form {
    padding: 1.25rem;
  }
  
  .calc-group label {
    font-size: 0.8125rem;
  }
  
  .result-value {
    font-size: 2.5rem;
  }
  
  .results-breakdown {
    gap: 0.75rem;
  }
  
  .result-item {
    padding: 1rem;
  }
  
  .result-item-title {
    font-size: 0.875rem;
  }
  
  .result-item-desc {
    font-size: 0.75rem;
  }
  
  .result-item-value {
    font-size: 1.25rem;
  }
  
  .comparison-col {
    padding: 1.25rem;
  }
  
  .comparison-list li {
    font-size: 0.875rem;
  }
  
  .faq-item summary {
    font-size: 0.875rem;
    padding: 0.875rem 2.25rem 0.875rem 1rem;
  }
  
  .faq-item p {
    font-size: 0.8125rem;
    padding: 0 1rem 1rem;
  }
  
  .form-group input {
    font-size: 16px;
  }
  
  .contacto-grid {
    gap: 2.5rem;
  }
  
  .heatmap-panel {
    bottom: 5rem;
  }
}

/* --- Breakpoint: 480px --- */
@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .container {
    padding-inline: 1.5rem;
  }
}

/* --- Breakpoint: 768px (Tablet+) --- */
@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
  
  .main-nav {
    display: flex;
    position: static;
    flex-direction: row;
    background: transparent;
    padding: 0;
    transform: none;
    gap: 0.5rem;
  }
  
  .mobile-menu-overlay {
    display: none !important;
  }
  
  .floating-cta {
    display: none !important;
  }
  
  .scroll-indicator {
    display: none;
  }
  
  .nav-link {
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem;
    border-bottom: none;
  }
  
  .nav-link--cta {
    margin-top: 0;
    border-bottom: 1px solid rgba(255, 162, 62, 0.35);
  }

  .hero {
    padding: 4rem 0 5rem;
  }

  .hero h1 {
    max-width: 32ch;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
  }
  
  .hero-brand-name {
    font-size: clamp(4rem, 10vw, 6rem);
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .card {
    backdrop-filter: blur(8px);
  }

  .timeline {
    flex-direction: row;
    max-width: 100%;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
  }

  .timeline-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    max-width: 280px;
  }

  .timeline-connector {
    width: 48px;
    height: 2px;
    margin: 23px 0 0;
    background: linear-gradient(
      90deg,
      var(--accent-amber),
      var(--accent-violet),
      var(--accent-cyan)
    );
    background-size: 200% 100%;
    animation: circuit-flow-h 2s linear infinite;
  }

  @keyframes circuit-flow-h {
    0% { background-position: 0 0; }
    100% { background-position: 200% 0; }
  }

  .timeline-body {
    padding-bottom: 0;
    padding-top: 0.75rem;
  }

  .calculator-inputs {
    grid-template-columns: 1fr 1fr;
  }

  .results-breakdown {
    grid-template-columns: repeat(3, 1fr);
  }

  .comparison {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .contacto-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
  }

  .section {
    padding: 5rem 0;
  }
}

/* --- Breakpoint: 1024px --- */
@media (min-width: 1024px) {
  .container {
    padding-inline: 2rem;
  }

  .section-header h2 {
    max-width: 20ch;
    margin-inline: auto;
  }

  .section-header--left h2 {
    margin-inline: 0;
    max-width: none;
  }
}
