:root {
  --bg: #0f111a;
  --surface: rgba(24, 28, 44, 0.9);
  --card: #161a29;
  --text: #f4f6ff;
  --muted: #b5b8d6;
  --accent: #20d3d3;
  --primary: #5b6cff;
  --primary-variant: #7b7dff;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --shadow-elevated: 0 20px 40px rgba(12, 16, 35, 0.45);
  --transition-base: 200ms ease;
  --max-width: 1180px;
  color-scheme: dark;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(91, 108, 255, 0.22), transparent 55%),
    radial-gradient(circle at bottom right, rgba(32, 211, 211, 0.18), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 1rem;
  background-color: var(--accent);
  color: #fff;
  border-radius: 999px;
  transform: translateY(-200%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.skip-link:focus {
  transform: translateY(0);
}

header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(12, 15, 28, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.1rem clamp(1.5rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1rem;
  text-transform: uppercase;
  text-decoration: none;
}

.brand-symbol {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  align-items: center;
  justify-content: center;
  color: #0f111a;
  font-size: 1.25rem;
  font-weight: 700;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 1rem;
  left: 1rem;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transform-origin: top right;
  transform: scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-elevated);
  z-index: 10;
}

nav ul[data-open="true"] {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  transition: color var(--transition-base), background-color var(--transition-base);
}

nav a:hover,
nav a:focus-visible {
  color: var(--text);
  background-color: rgba(32, 211, 211, 0.14);
}

.nav-cta {
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-variant));
  color: #0f111a;
  font-weight: 700;
  box-shadow: 0 16px 32px rgba(91, 108, 255, 0.35);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 20px 36px rgba(91, 108, 255, 0.45);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  background: rgba(14, 18, 32, 0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  padding: 0.55rem;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: background-color var(--transition-base), border-color var(--transition-base);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(91, 108, 255, 0.2);
  border-color: rgba(91, 108, 255, 0.4);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

section {
  padding: clamp(4rem, 10vw, 6rem) 0;
}

section + section {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
}

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

#inicio {
  padding: clamp(6rem, 18vw, 8rem) clamp(1.5rem, 6vw, 3rem);
  background: linear-gradient(135deg, rgba(91, 108, 255, 0.18), rgba(32, 211, 211, 0.18));
  border-radius: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elevated);
  margin-top: clamp(2rem, 6vw, 3rem);
  position: relative;
}

#mision-vision,
#servicios,
#casos,
#contacto {
  padding: clamp(3rem, 8vw, 4.5rem) clamp(1.5rem, 6vw, 3rem);
  background: var(--surface);
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elevated);
  position: relative;
}

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

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
}

.cta-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0 2.5rem;
  align-items: stretch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base),
    color var(--transition-base);
  text-decoration: none;
}

.btn-accent {
  background: linear-gradient(135deg, var(--primary), var(--primary-variant));
  color: #0f111a;
  box-shadow: 0 18px 30px rgba(91, 108, 255, 0.35);
}

.btn-accent:hover,
.btn-accent:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 24px 36px rgba(91, 108, 255, 0.45);
}

.btn-ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 12px 26px rgba(12, 16, 35, 0.35);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(18, 22, 36, 0.95);
}

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  position: relative;
}

.link-cta::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.link-cta:hover,
.link-cta:focus-visible {
  color: var(--accent);
}

.link-cta:hover::after,
.link-cta:focus-visible::after {
  transform: scaleX(1);
}

.hero-visual {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(91, 108, 255, 0.25), transparent 60%),
    var(--card);
  padding: 2rem;
  order: -1;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: var(--shadow-elevated);
  border: 1px solid var(--border);
}

.hero-visual svg {
  width: 100%;
  height: auto;
}

.section-header {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-header p {
  color: var(--muted);
  margin: 0.75rem 0 0;
}

.dual-column {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.content-card {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.content-card:hover,
.content-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(91, 108, 255, 0.45);
  box-shadow: 0 26px 40px rgba(12, 16, 35, 0.35);
}

.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.service-card {
  position: relative;
  padding: 2.25rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  min-height: 260px;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(91, 108, 255, 0.4);
  box-shadow: 0 30px 44px rgba(12, 16, 35, 0.45);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(91, 108, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

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

.service-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.service-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.client-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.client-logo {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.carousel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-elevated);
}

.carousel__viewport {
  position: relative;
  overflow: hidden;
  min-height: 160px;
}

.testimonial {
  margin: 0;
  display: none;
}

.testimonial[aria-hidden="false"] {
  display: block;
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.carousel-buttons {
  display: inline-flex;
  gap: 0.75rem;
}

.carousel-buttons button {
  background: rgba(32, 211, 211, 0.16);
  border: none;
  color: var(--text);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color var(--transition-base), transform var(--transition-base);
}

.carousel-buttons button:hover,
.carousel-buttons button:focus-visible {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.carousel-indicators {
  display: inline-flex;
  gap: 0.5rem;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background-color var(--transition-base), transform var(--transition-base);
}

.carousel-indicators button[aria-pressed="true"] {
  background: var(--accent);
  transform: scale(1.1);
}

form {
  display: grid;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

input,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(12, 15, 28, 0.85);
  color: var(--text);
  font: inherit;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(32, 211, 211, 0.22);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

.input-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.input-error {
  color: #dc2626;
}

.status-message {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--muted);
}

.status-message.success {
  color: var(--accent);
}

footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem 3rem;
  background: rgba(8, 10, 19, 0.95);
  color: var(--muted);
}

footer strong {
  display: block;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

footer p {
  margin: 0.5rem 0 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--muted);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(32, 211, 211, 0.16);
  transition: transform var(--transition-base), background-color var(--transition-base);
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-2px);
  background: var(--accent);
}

.social-links svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
  transition: fill 0.2s ease;
}

.social-links a:hover svg,
.social-links a:focus-visible svg {
  fill: #fff;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 600px) {
  main {
    padding: 0 2rem 4rem;
  }

  .cta-group {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

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

@media (min-width: 768px) {
  .dual-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 900px) {
  .hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 3rem;
  }

  .hero-visual {
    order: initial;
    margin: 0;
    max-width: none;
  }

  nav ul {
    position: static;
    flex-direction: row;
    gap: 1rem;
    background: transparent;
    border: none;
    padding: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    backdrop-filter: none;
  }

  .nav-toggle {
    display: none;
  }
}

@media (min-width: 1024px) {
  main {
    padding: 0 3rem 5rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
