* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brand-navy: #032B4B;
  --brand-navy-deep: #001F36;
  --brand-blue: #2D4A73;
  --brand-orange: #F69020;
  --brand-orange-dark: #E67E00;
  --brand-orange-light: #FFB84D;
  --brand-gold: #FDB613;
  --energy-green: #00D084;
  --energy-green-dark: #00A86B;
  --energy-blue: #0052CC;
  --energy-blue-dark: #003B8F;
  --energy-cyan: #22D3EE;
  --tarifas-blue: #70A3CC;
  --tarifas-blue-dark: #4F83AD;
  --tarifas-blue-soft: rgba(112, 163, 204, 0.14);
  --tarifas-blue-border: rgba(112, 163, 204, 0.34);
  --tariff-amber: var(--tarifas-blue);
  --tarifas-amber: var(--tarifas-blue);
  --text-main: #1F2937;
  --text-muted: #6B7280;
  --text-soft: #9CA3AF;
  --border: #E5E7EB;
  --bg-page: #F8FAFC;
  --bg-soft: #F9FAFB;
  --bg-warm: #FFF8F0;
  --bg-energy-soft: #F0FDF4;
  --bg-blue-soft: #F0F9FF;
  --surface: #FFFFFF;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --site-radius-sm: 6px;
  --site-radius-md: 8px;
  --site-shadow-soft: 0 14px 34px rgba(3, 43, 75, 0.08);
  --site-shadow-lift: 0 18px 42px rgba(3, 43, 75, 0.12);
  --page-accent: #f69020;
  --page-accent-dark: #e67e00;
  --page-accent-soft: rgba(246, 144, 32, 0.1);
  --page-accent-border: rgba(246, 144, 32, 0.26);
}

html {
  scroll-behavior: smooth;
}

body.site-page {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
  line-height: 1.6;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

body.theme-illuminatio,
body.theme-illumiq {
  --page-accent: #f69020;
  --page-accent-dark: #e67e00;
  --page-accent-soft: rgba(246, 144, 32, 0.1);
  --page-accent-border: rgba(246, 144, 32, 0.26);
  --page-link-accent: #f69020;
  --page-button-bg: #f69020;
  --page-button-hover: #e67e00;
  --page-button-shadow: rgba(246, 144, 32, 0.22);
  --page-hero-bg: linear-gradient(135deg, #ffffff 0%, #fff8f0 45%, #f0f4ff 100%);
}

body.theme-tarifas {
  --page-accent: var(--tarifas-blue);
  --page-accent-dark: var(--tarifas-blue-dark);
  --page-accent-soft: var(--tarifas-blue-soft);
  --page-accent-border: var(--tarifas-blue-border);
  --page-link-accent: var(--tarifas-blue-dark);
  --page-button-bg: var(--tarifas-blue);
  --page-button-hover: var(--tarifas-blue-dark);
  --page-button-shadow: rgba(112, 163, 204, 0.28);
  --page-hero-bg: linear-gradient(135deg, #ffffff 0%, #f5f9fc 48%, #eaf3fa 100%);
}

body.theme-energy {
  --page-accent: #00d084;
  --page-accent-dark: #00a86b;
  --page-accent-soft: rgba(0, 208, 132, 0.1);
  --page-accent-border: rgba(0, 208, 132, 0.26);
  --page-link-accent: #0052cc;
  --page-button-bg: linear-gradient(135deg, #00d084 0%, #00a86b 100%);
  --page-button-hover: linear-gradient(135deg, #00d084 0%, #00a86b 100%);
  --page-button-shadow: rgba(0, 208, 132, 0.3);
  --page-hero-bg: linear-gradient(135deg, #f0fdf4 0%, #f0f9ff 100%);
}

body.site-page img {
  max-width: 100%;
}

body.site-page .svg-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

body.site-page .svg-icon.icon-lg {
  width: 32px;
  height: 32px;
}

body.site-page .container,
body.site-page .header-content,
body.site-page .section-header,
body.site-page .hero-inner,
body.site-page .services-grid,
body.site-page .products-grid,
body.site-page .diff-grid,
body.site-page .numbers-grid {
  width: min(100%, 1200px);
}

body.site-page header {
  position: sticky;
  top: 0;
  z-index: 2000;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

body.site-page header .header-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

body.page-home .header-content {
  margin: 0 auto;
  padding: 0.9rem 2rem;
}

body.product-page .header-content {
  padding: 1rem 0;
}

body.site-page .logo {
  display: flex;
  flex-shrink: 0;
  text-decoration: none;
}

body.page-home .logo {
  align-items: center;
  gap: 0.75rem;
}

body.product-page .logo {
  flex-direction: column;
}

body.page-home .logo-img-institutional {
  max-width: 190px;
  max-height: 44px;
}

body.page-home .logo-mark {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

body.page-home .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

body.page-home .logo-product {
  color: var(--brand-navy);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0;
}

body.page-home .logo-product span {
  color: var(--brand-orange);
}

body.page-home .logo-company,
body.product-page .logo-sub {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
}

body.page-home .logo-company {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.product-page .logo-sub {
  margin-top: -2px;
}

body.site-page .logo-img {
  display: block;
  width: auto;
  max-width: 210px;
  max-height: 42px;
  object-fit: contain;
}

body.site-page nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

body.site-page nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--header-link-color, var(--brand-navy));
  font-size: var(--header-link-size, 0.95rem);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.25s;
}

body.page-home {
  --header-link-color: var(--text-main);
  --header-link-size: 0.95rem;
}

body.site-page nav a:hover {
  color: var(--page-link-accent);
}

body.site-page .btn-primary,
body.site-page .btn-secondary,
body.site-page .btn-ghost {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--site-radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, color 0.25s, transform 0.25s;
}

body.site-page .btn-primary {
  border: 0;
  background: var(--page-button-bg);
  color: #fff;
  white-space: nowrap;
}

body.site-page .btn-primary:hover {
  background: var(--page-button-hover);
  box-shadow: 0 8px 20px var(--page-button-shadow);
  transform: translateY(-2px);
}

body.site-page .btn-secondary {
  border: 1px solid var(--page-link-accent);
  background: transparent;
  color: var(--page-link-accent);
}

body.page-home .btn-secondary {
  border-width: 2px;
}

body.site-page .btn-secondary:hover {
  background: var(--page-accent-soft);
  transform: translateY(-2px);
}

body.theme-illuminatio .btn-secondary:hover,
body.theme-illumiq .btn-secondary:hover,
body.theme-tarifas .btn-secondary:hover {
  background: var(--page-accent);
  color: #fff;
  box-shadow: 0 4px 12px var(--page-button-shadow);
}

body.site-page .btn-ghost {
  border: 2px solid var(--border);
  background: transparent;
  color: var(--brand-navy);
}

body.site-page .btn-ghost:hover {
  border-color: var(--brand-navy);
  background: rgba(27, 46, 75, 0.04);
}

body.site-page .btn-block {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  text-align: center;
}

body.site-page .product-link {
  border-radius: var(--site-radius-md);
}

body.site-page .hero h1,
body.site-page .hero-text h1 {
  text-wrap: balance;
}

body.site-page .hero-sub,
body.site-page .hero-text p,
body.site-page .section-header p {
  text-wrap: pretty;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--site-radius-md);
  color: var(--brand-navy, #032b4b);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.mobile-menu-toggle:hover {
  border-color: var(--page-accent);
  color: var(--page-accent-dark);
  box-shadow: 0 8px 18px rgba(3, 43, 75, 0.08);
}

.mobile-menu-toggle span,
.mobile-menu-toggle::before,
.mobile-menu-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}

body.nav-open .mobile-menu-toggle span {
  opacity: 0;
}

body.nav-open .mobile-menu-toggle::before {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .mobile-menu-toggle::after {
  transform: translateY(-6px) rotate(-45deg);
}

body.site-page header nav .mobile-nav-cta {
  display: none !important;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

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

  body.site-page *,
  body.site-page *::before,
  body.site-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 768px) {
  body.site-page header .header-content {
    min-height: 64px;
    padding: 0.75rem 1rem !important;
    gap: 0.75rem;
  }

  body.site-page header .logo {
    min-width: 0;
  }

  body.site-page .logo-img {
    max-width: 180px;
    max-height: 42px;
  }

  body.page-home .logo-img-institutional {
    max-width: 170px;
    max-height: 38px;
  }

  body.site-page header .logo-sub {
    font-size: 0.58rem;
    line-height: 1.2;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  body.site-page header .header-content > .btn-primary {
    display: none;
  }

  body.site-page header nav {
    display: none !important;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--site-shadow-lift);
    backdrop-filter: blur(12px);
  }

  body.nav-open header nav {
    display: flex !important;
  }

  body.site-page header nav a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0.7rem 0.8rem;
    border-radius: var(--site-radius-md);
  }

  body.site-page header nav a:hover {
    background: var(--page-accent-soft);
  }

  body.site-page header nav .mobile-nav-cta {
    display: flex !important;
    justify-content: center;
    margin-top: 0.45rem;
    color: #fff !important;
    background: var(--page-accent);
    font-weight: 700;
  }

  body.site-page .hero {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  body.site-page .container {
    padding-left: clamp(1rem, 5vw, 2rem);
    padding-right: clamp(1rem, 5vw, 2rem);
  }

  body.product-page .hero-text h1,
  body.page-home .hero h1 {
    font-size: clamp(1.72rem, 7.1vw, 2.18rem) !important;
    letter-spacing: 0 !important;
    line-height: 1.14 !important;
    overflow-wrap: break-word;
  }

  body.product-page .hero-text p,
  body.page-home .hero-sub {
    font-size: 1rem !important;
    line-height: 1.72 !important;
  }

  body.site-page .section-header {
    margin-bottom: 2.25rem;
  }

  body.site-page .section-header h2 {
    font-size: clamp(1.55rem, 6.4vw, 2rem) !important;
    letter-spacing: 0 !important;
    line-height: 1.2 !important;
  }

  body.site-page .hero-mockup {
    margin-top: 0.5rem;
  }
}

@media (max-width: 520px) {
  body.site-page .hero h1,
  body.site-page .hero-text h1,
  body.site-page .section-header h2 {
    max-width: 100%;
    white-space: normal !important;
    text-wrap: wrap;
    overflow-wrap: break-word;
  }

  body.site-page .hero-inner,
  body.site-page .hero-content,
  body.site-page .hero-text {
    min-width: 0;
    max-width: 100%;
  }

  body.site-page header .header-content {
    min-height: 60px;
  }

  body.page-home .logo-mark {
    width: 34px;
    height: 34px;
  }

  body.page-home .logo-img-institutional {
    max-width: 150px;
  }

  body.page-home .logo-product {
    font-size: 1.05rem;
  }

  body.page-home .logo-company,
  body.product-page .logo-sub {
    font-size: 0.55rem;
  }

  body.site-page .mobile-menu-toggle {
    width: 40px;
    height: 40px;
  }

  body.site-page .hero {
    padding-top: 3.3rem !important;
    padding-bottom: 3.3rem !important;
  }

  body.site-page .hero-ctas {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  body.site-page .hero-ctas a,
  body.site-page .hero-ctas button {
    width: 100%;
    min-height: 44px;
    padding: 0.8rem 1rem;
    text-align: center;
  }

  body.site-page .hero-badges {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  body.site-page .hero-badge {
    justify-content: flex-start;
    min-height: 38px;
    padding: 0.42rem 0.7rem;
    line-height: 1.35;
  }
}

@media (max-width: 380px) {
  body.site-page .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body.product-page .hero-text h1,
  body.page-home .hero h1 {
    font-size: clamp(1.5rem, 7.4vw, 1.72rem) !important;
    line-height: 1.16 !important;
    overflow-wrap: anywhere;
  }

  body.product-page .hero-text p,
  body.page-home .hero-sub {
    font-size: 0.95rem !important;
    line-height: 1.62 !important;
  }

  body.site-page .section-eyebrow,
  body.page-home .eyebrow {
    font-size: 0.68rem !important;
    letter-spacing: 0.08em !important;
    line-height: 1.45 !important;
  }

  body.product-page .section-eyebrow {
    display: block;
    max-width: 100%;
  }
}
