
:root {
  --indigo-deep: #4B3F8F;
  --indigo-mid: #3B4D9B;
  --petrol-mid: #155E75;
  --petrol-deep: #0F4C5C;

  --bg-page: #FFFFFF;
  --bg-soft: #F8FAFC;
  --bg-muted: #F1F5F9;
  --header-bg: rgba(255, 255, 255, 0.94);
  --text-main: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --border-subtle: #E2E8F0;

  --brand-gradient: linear-gradient(135deg, var(--indigo-deep) 0%, var(--indigo-mid) 45%, var(--petrol-mid) 80%, var(--petrol-deep) 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(75, 63, 143, 0.09) 0%, rgba(21, 94, 117, 0.09) 100%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.09);
  --container-max: 1160px;
}

html[data-theme="dark"] {
  --bg-page: #0B1120;
  --bg-soft: #111827;
  --bg-muted: #1E293B;
  --header-bg: rgba(11, 17, 32, 0.92);
  --text-main: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --border-subtle: #1E293B;

  --brand-gradient-soft: linear-gradient(135deg, rgba(75, 63, 143, 0.24) 0%, rgba(21, 94, 117, 0.24) 100%);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 14px 30px rgba(0, 0, 0, 0.38);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2rem, var(--container-max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  color: var(--text-main);
}

.brand-logo img {
  height: 42px;
  width: auto;
}

html[data-theme="dark"] .brand-logo img {
  background: rgba(255, 255, 255, 0.92);
  padding: 4px 8px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--indigo-mid);
}

html[data-theme="dark"] .nav-links a:hover,
html[data-theme="dark"] .nav-links a.active {
  color: #93C5FD;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle {
  display: none;
  background: var(--bg-soft);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  background: var(--brand-gradient);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(59, 77, 155, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(59, 77, 155, 0.32);
}

.btn-primary,
.btn-secondary,
.btn-light-outline {
  background: var(--brand-gradient);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.18);
}

.theme-btn {
  background: var(--bg-soft);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

/* Cuando el sitio está en modo claro, el botón resalta oscuro */
html:not([data-theme="dark"]) .theme-btn {
  background: #0F172A;
  color: #F8FAFC;
  border-color: #0F172A;
}

/* Cuando el sitio está en modo oscuro, el botón resalta claro */
html[data-theme="dark"] .theme-btn {
  background: #F8FAFC;
  color: #0F172A;
  border-color: #F8FAFC;
}

/* Evita transiciones lentas al cambiar de tema */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: none !important;
}

/* Hero */
.hero {
  background: var(--brand-gradient);
  color: #FFFFFF;
  padding: 4.5rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.26);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.84rem;
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.hero p {
  margin: 0 0 1.75rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(6px);
}

.hero-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.hero-panel p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

/* Secciones */
.section {
  padding: 4rem 0;
}

.section-soft {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  max-width: 680px;
  margin-bottom: 2.25rem;
}

.section-kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--petrol-mid);
  margin-bottom: 0.4rem;
}

html[data-theme="dark"] .section-kicker {
  color: #5EEAD4;
}

.section-header h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.2;
}

.section-header p {
  margin: 0;
  color: var(--text-secondary);
}

/* Grids y tarjetas */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(59, 77, 155, 0.35);
}

.card-photo {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  border: 1px solid var(--border-subtle);
}

.card-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--brand-gradient-soft);
  color: var(--indigo-mid);
  margin-bottom: 0.85rem;
}

html[data-theme="dark"] .card-tag {
  color: #A5B4FC;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.card p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.card-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Marcas con logo */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.brand-card {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.brand-card img {
  max-height: 36px;
  width: auto;
  object-fit: contain;
}

html[data-theme="dark"] .brand-card img {
  background: rgba(255, 255, 255, 0.92);
  padding: 4px 8px;
  border-radius: 6px;
}

.brand-fallback {
  font-weight: 700;
  color: var(--text-main);
}

/* Franja CTA */
.cta-box {
  background: var(--brand-gradient-soft);
  border: 1px solid rgba(59, 77, 155, 0.22);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-box h2 {
  margin: 0 0 0.4rem;
  font-size: 1.65rem;
}

.cta-box p {
  margin: 0;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 1.5rem;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-title {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.92rem;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .grid-4,
  .brands-grid,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--bg-page);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    gap: 0.9rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero-grid,
  .grid-2,
  .grid-4,
  .brands-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}