:root {
  /* Paleta unificada Grafito & Ámbar (coherente con GS3 y GS4) */
  --graphite-950: #1b1d20;
  --graphite-900: #232528;
  --graphite-800: #2d3036;
  --indigo-900: #2A2A72;
  --indigo-800: #34348a;
  --amber-500: #FFA400;
  --amber-600: #FD6500;

  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-400: #9ca3af;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;

  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-sm: 0 2px 10px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 12px 30px rgba(17, 24, 39, 0.10);
  --shadow-lg: 0 20px 44px rgba(17, 24, 39, 0.16);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Navbar — Grafito */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(35, 37, 40, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--white);
  letter-spacing: -0.01em;
}

.brand img {
  height: 32px;
  width: auto;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: #D4D7DD;
}

.nav-links a {
  padding: 7px 14px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-links a:hover {
  background: rgba(255, 164, 0, 0.14);
  color: var(--amber-500);
}

.menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 1.15rem;
  color: var(--white);
  cursor: pointer;
}

/* Hero — Compacto Grafito & Índigo */
.hero {
  background: linear-gradient(115deg, #2A2A72 0%, #232528 62%, #1a1c20 100%);
  color: var(--white);
  padding: 18px 0 20px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(1.38rem, 2.3vw, 1.92rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.hero h1 span {
  color: var(--amber-500);
}

.hero p {
  font-size: 0.94rem;
  line-height: 1.42;
  color: #D4D7DD;
  margin: 0 auto;
  max-width: 760px;
}

.hero p strong {
  color: var(--white);
}

/* Botones 100% uniformes en toda la página */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--amber-500);
  color: var(--graphite-900);
  box-shadow: 0 4px 12px rgba(255, 164, 0, 0.22);
}

.btn-primary:hover {
  background: var(--amber-600);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(253, 101, 0, 0.28);
}

/* Secciones con ritmo limpio y uniforme */
section[id] {
  scroll-margin-top: 64px;
}

.section {
  padding: 36px 0 44px;
}

#equipos {
  padding-top: 18px;
  padding-bottom: 40px;
}

.section-surface {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.section-tint {
  background: linear-gradient(180deg, #f3f5f9 0%, #f8fafc 100%);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 22px;
}

#equipos .section-header {
  margin: 0 auto 14px;
}

.section-title-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  background: var(--indigo-900);
  border: 1px solid rgba(255, 164, 0, 0.48);
  color: var(--white);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 11px;
  border-radius: 999px;
}

.section-header h2 {
  font-size: clamp(1.38rem, 2.2vw, 1.72rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  margin: 0;
}

.section-header p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin: 0;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 820px;
  margin: 0 auto;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

/* Tarjetas */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 164, 0, 0.7);
}

.card-featured {
  border: 2px solid var(--amber-500);
  box-shadow: 0 10px 28px rgba(42, 42, 114, 0.10);
}

.card-featured:hover {
  border-color: var(--amber-600);
}

.badge-corner {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--indigo-900);
  border: 1px solid rgba(255, 164, 0, 0.65);
  color: var(--amber-500);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  z-index: 2;
}

/* Contenedores de imagen — sin recortes indeseados */
.card-media {
  height: 152px;
  background: radial-gradient(circle at 50% 45%, #ffffff 0%, #edeef1 100%);
  border-bottom: 1px solid #eef2f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px 16px;
  cursor: pointer;
  position: relative;
}

.card-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(17, 24, 39, 0.13));
  transition: transform 0.28s ease;
}

.card-media:hover img {
  transform: scale(1.04);
}

/* Banners de Software con proporción completa (16:9 / 2:1) sin recortar encabezados */
.card-media-banner {
  height: 184px;
  background: var(--white);
  padding: 0;
}

.card-media-banner img,
.card-media-cover img {
  filter: none;
}

.card-media-cover {
  height: 184px;
  padding: 0;
  background: var(--graphite-900);
}

.card-media-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 14px 18px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-subtitle {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--indigo-900);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.card-body h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 5px;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

.card-body h3 a {
  transition: color 0.16s ease;
}

.card-body h3 a:hover {
  color: var(--indigo-900);
}

.card-body p {
  color: var(--gray-600);
  font-size: 0.84rem;
  line-height: 1.42;
  margin-bottom: 10px;
}

.feature-list {
  list-style: none;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--gray-700);
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.feature-list li::before {
  content: "✓";
  color: var(--amber-600);
  font-weight: 900;
  flex-shrink: 0;
}

.card-footer {
  margin-top: auto;
}

.card-footer .btn {
  width: 100%;
}

/* Tarjetas de Compatibilidad (Máquinas) */
.machine-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.machine-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 164, 0, 0.7);
  box-shadow: var(--shadow-md);
}

.machine-card img {
  width: 100%;
  height: 152px;
  object-fit: cover;
  background: var(--gray-100);
}

.machine-card h4 {
  padding: 12px 10px 3px;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--gray-900);
}

.machine-card p {
  padding: 0 12px 14px;
  font-size: 0.82rem;
  color: var(--gray-600);
}

/* Footer minimalista de 1 línea */
.footer {
  background: var(--graphite-950);
  color: #cbd5e1;
  padding: 22px 0;
  font-size: 0.86rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.footer strong {
  color: var(--white);
}

.footer a {
  color: var(--amber-500);
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 960px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--graphite-900);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: var(--shadow-md);
  }

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

  .grid-4 {
    grid-template-columns: 1fr;
  }
}
