/* ===== ITS Services Support — estilos globales ===== */

:root {
  --bg: #0B1220;
  --surface: #131B2E;
  --border: #1E2A44;
  --accent: #4FD1C5;
  --accent-2: #F5A623;
  --text: #E8EEF7;
  --text-secondary: #9AA9C4;
  --text-muted: #8895AF;

  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1180px;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--font-mono);
}

section {
  padding: 96px 0;
}

/* ===== Botones ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #08131A;
}

.btn-primary:hover {
  background: #6fe0d5;
}

.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-small {
  padding: 9px 18px;
  font-size: 13px;
}

/* ===== Header ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 124px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  height: 92px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav a:not(.btn) {
  font-size: 15px;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.main-nav a:not(.btn):hover {
  color: var(--text);
}

.main-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transition: right 0.2s ease;
}

.main-nav a:not(.btn):hover::after {
  right: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

/* ===== Hero ===== */

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 64px;
  padding-top: 72px;
  padding-bottom: 40px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(79, 209, 197, 0.6);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 209, 197, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(79, 209, 197, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 209, 197, 0);
  }
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--text);
  max-width: 620px;
}

.hero-subtitle {
  margin-top: 22px;
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 520px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-diagram {
  width: 100%;
  height: auto;
  overflow: visible;
}

.diagram-line {
  stroke-dasharray: 6 6;
  animation: dashFlow 4.5s linear infinite;
}

@keyframes dashFlow {
  to {
    stroke-dashoffset: -48;
  }
}

.diagram-ring-group {
  transform: translate(150px, 210px) rotate(0deg);
  transform-origin: 0 0;
  animation: radarSpin 30s linear infinite;
}

@keyframes radarSpin {
  to {
    transform: translate(150px, 210px) rotate(360deg);
  }
}

.diagram-hub {
  transform-box: fill-box;
  transform-origin: center;
  animation: hubBreathe 4s ease-in-out infinite;
}

@keyframes hubBreathe {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

.diagram-pulse {
  transform-box: fill-box;
  transform-origin: center;
  fill: none;
  animation: pulseRing 2.8s ease-out infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.85);
    opacity: 0.55;
  }
  80%, 100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.diagram-packet {
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-name: packetMove;
}

@keyframes packetMove {
  from {
    offset-distance: 0%;
  }
  to {
    offset-distance: 100%;
  }
}

.diagram-node-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
}

/* ===== Servicios ===== */

.section-head {
  max-width: 620px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head .eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.section-head p {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 16px;
}

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

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.service-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
}

.service-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ===== SAP Business One (destacado) ===== */

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

.sap-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}

.sap-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 9px 24px 9px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 26px;
}

.sap-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sap-badge-icon img {
  height: 24px;
  width: auto;
  display: block;
}

.sap-badge span {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 1.7px;
  color: var(--accent-2);
}

.sap-content h2 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  margin-bottom: 20px;
}

.sap-lead {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
  max-width: 540px;
  margin-bottom: 32px;
}

.sap-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 40px;
  max-width: 540px;
}

.sap-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.sap-check-item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  stroke: var(--accent-2);
  margin-top: 2px;
}

.btn-accent2 {
  background: var(--accent-2);
  color: #241503;
}

.btn-accent2:hover {
  background: #ffbf52;
}

.sap-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.sap-panel-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.sap-modules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.sap-module {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.sap-module:hover {
  border-color: var(--accent-2);
  color: var(--text);
}

.sap-module svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent-2);
  flex-shrink: 0;
}

/* ===== Partners ===== */

.partners {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.partners-label {
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.partners-carousel {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.partners-track {
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  padding: 0 12px;
  animation: partnersScroll 36s linear infinite;
}

.partners-carousel:hover .partners-track {
  animation-play-state: paused;
}

@keyframes partnersScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .partners-track {
    animation: none;
  }
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 96px;
  padding: 16px 32px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.partner-logo:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.partner-logo img {
  max-height: 44px;
  max-width: 190px;
  width: auto;
  height: auto;
  display: block;
}

/* ===== Footer / Contacto ===== */

.site-footer {
  padding: 80px 0 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}

.footer-brand img {
  height: 116px;
  margin-bottom: 18px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 280px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.footer-col li {
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== Cookie banner ===== */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 22px 24px;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cookie-text {
  max-width: 620px;
  font-size: 14px;
  color: var(--text-secondary);
}

.cookie-text a {
  color: var(--accent);
}

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

.cookie-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-actions .btn {
  padding: 11px 20px;
  font-size: 14px;
}

.cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.65);
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cookie-overlay.visible {
  display: flex;
}

.cookie-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 32px;
}

.cookie-panel h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.cookie-panel > p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.cookie-option:last-of-type {
  border-bottom: 1px solid var(--border);
}

.cookie-option-label strong {
  display: block;
  font-size: 14.5px;
  margin-bottom: 4px;
}

.cookie-option-label span {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background 0.15s ease;
}

.switch-track::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  background: var(--text-muted);
  transition: transform 0.15s ease, background 0.15s ease;
}

.switch input:checked + .switch-track {
  background: rgba(79, 209, 197, 0.25);
}

.switch input:checked + .switch-track::before {
  transform: translateX(18px);
  background: var(--accent);
}

.switch input:disabled + .switch-track {
  opacity: 0.6;
}

.cookie-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
}

/* ===== Páginas legales ===== */

.legal-main {
  padding: 72px 0 100px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 40px;
}

.legal-back:hover {
  color: var(--accent);
}

.legal-content {
  max-width: 760px;
  margin: 0 auto;
}

.legal-content .updated {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}

.legal-content h1 {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  margin-bottom: 8px;
}

.legal-content .lead {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 28px 0 44px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: 6px;
  line-height: 1.75;
}

.legal-content h2 {
  font-size: 20px;
  margin: 44px 0 16px;
}

.legal-content h3 {
  font-size: 16.5px;
  margin: 28px 0 12px;
  color: var(--text);
}

.legal-content p {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.9;
  margin-bottom: 18px;
}

.legal-content ul {
  margin: 0 0 18px;
  padding-left: 20px;
  list-style: disc;
}

.legal-content ul li {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.9;
  margin-bottom: 8px;
}

.legal-content strong {
  color: var(--text);
}

.legal-content a {
  color: var(--accent);
}

.legal-content a:hover {
  text-decoration: underline;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 28px;
  font-size: 14.5px;
}

.legal-table th, .legal-table td {
  border: 1px solid var(--border);
  padding: 12px 16px;
  text-align: left;
  color: var(--text-secondary);
}

.legal-table th {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
}

/* ===== Responsive ===== */

@media (max-width: 980px) {
  .hero .container {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .hero-diagram {
    max-width: 460px;
    margin: 0 auto;
  }

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

  .sap-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sap-lead, .sap-checklist {
    max-width: none;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  section {
    padding: 64px 0;
  }

  .nav-links {
    position: absolute;
    top: 124px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 24px 24px;
    display: none;
  }

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

  .nav-links a:not(.btn) {
    padding: 10px 0;
    width: 100%;
  }

  .nav-links .btn {
    margin-top: 10px;
  }

  .nav-toggle {
    display: flex;
  }

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

  .sap-checklist {
    grid-template-columns: 1fr;
  }

  .sap-modules {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-actions {
    justify-content: stretch;
  }

  .cookie-actions .btn {
    flex: 1;
  }
}
