:root {
  --color-bg: #020712;
  --color-bg-alt: #050b18;
  --color-accent: #27e1ff;
  --color-accent-soft: rgba(39, 225, 255, 0.1);
  --color-text: #f5f7ff;
  --color-muted: #9aa3c2;
  --color-border: #151e33;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.65);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --container-width: 1120px;
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.3s ease-out;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* RESET BÁSICO */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

button {
  font: inherit;
}

/* ACCESIBILIDAD */

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  background: #000;
  color: #fff;
  z-index: 1000;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* LAYOUT */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(2, 7, 18, 0.96), rgba(2, 7, 18, 0.92));
  border-bottom: 1px solid rgba(24, 36, 66, 0.8);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: radial-gradient(circle at 0 0, #27e1ff, #0a1225);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.logo-text {
  font-size: 1.1rem;
}

/* NAV */

.site-nav {
  display: none;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.site-nav a {
  font-size: 0.95rem;
  color: var(--color-muted);
  padding: 0.3rem 0;
  position: relative;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--color-text);
}

.site-nav a.active::after,
.site-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15rem;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #27e1ff, #7ef6ff);
  border-radius: 999px;
}

/* NAV TOGGLE */

.nav-toggle {
  border: 1px solid rgba(63, 80, 116, 0.9);
  background: rgba(9, 14, 31, 0.9);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.16rem;
  cursor: pointer;
}

.nav-toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--color-text);
}

/* MOBILE NAV */

.site-nav.open {
  display: block;
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: rgba(2, 7, 18, 0.98);
  border-bottom: 1px solid rgba(24, 36, 66, 0.8);
}

.site-nav.open ul {
  flex-direction: column;
  padding: 0.75rem 1.25rem 1rem;
}

/* HERO */

.hero {
  padding: 3.5rem 0 3.5rem;
  background: radial-gradient(circle at top right, rgba(39, 225, 255, 0.18), transparent 55%);
}

.hero-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

.hero-content p {
  color: var(--color-muted);
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.hero-meta {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* HERO VISUAL (torre) */

.hero-visual {
  display: none;
}

.tower {
  position: relative;
  width: 230px;
  height: 360px;
  margin-left: auto;
  border-radius: 18px;
  background: linear-gradient(180deg, #050813, #020712 55%, #050813);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.tower::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  background-image: linear-gradient(180deg, rgba(39, 225, 255, 0.06) 1px, transparent 1px);
  background-size: 100% 10px;
  opacity: 0.35;
}

.tower-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: radial-gradient(circle at 0 50%, #27e1ff, transparent 65%);
  opacity: 0.85;
}

.tower-line:nth-child(1) { top: 26%; }
.tower-line:nth-child(2) { top: 52%; }
.tower-line:nth-child(3) { top: 78%; }

.tower-logo {
  position: absolute;
  top: 14%;
  left: 8%;
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  color: #e8f8ff;
  text-shadow: 0 0 17px rgba(39, 225, 255, 0.95);
}

/* BOTONES */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.65rem 1.35rem;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #27e1ff, #7ef6ff);
  color: #020712;
  box-shadow: 0 10px 30px rgba(39, 225, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(39, 225, 255, 0.45);
}

.btn-outline {
  border-color: rgba(63, 80, 116, 0.9);
  background: rgba(5, 10, 24, 0.85);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-accent);
}

/* SECCIONES GENERALES */

.section {
  padding: 3.25rem 0;
}

.section-alt {
  background: radial-gradient(circle at top left, rgba(39, 225, 255, 0.08), transparent 60%);
}

.section-cta {
  padding: 3rem 0 3.5rem;
  background: radial-gradient(circle at center, rgba(39, 225, 255, 0.1), rgba(2, 7, 18, 0.98));
}

.section-header {
  text-align: left;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--color-muted);
  max-width: 34rem;
}

/* PAGE HEADERS */

.page-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid rgba(24, 36, 66, 0.8);
  background: radial-gradient(circle at top right, rgba(39, 225, 255, 0.15), transparent 50%);
}

.page-header h1 {
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--color-muted);
  max-width: 34rem;
}

/* GRID */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: minmax(0, 1fr);
}

.grid-3 {
  grid-template-columns: minmax(0, 1fr);
}

/* CARDS */

.card,
.service-card,
.case-card {
  background: linear-gradient(145deg, rgba(8, 15, 32, 0.98), rgba(6, 11, 26, 0.96));
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.4rem 1.45rem;
  border: 1px solid rgba(32, 46, 78, 0.85);
  box-shadow: 0 16px 40px rgba(1, 3, 12, 0.8);
  position: relative;
  overflow: hidden;
}

.card::before,
.service-card::before,
.case-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid transparent;
  background: radial-gradient(circle at top left, rgba(39, 225, 255, 0.3), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-med);
  pointer-events: none;
}

.card:hover::before,
.service-card:hover::before,
.case-card:hover::before {
  opacity: 1;
}

.card h3,
.service-card h3,
.case-card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
}

.card p,
.case-card p {
  margin: 0;
  color: var(--color-muted);
}

.service-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--color-muted);
}

.service-card li + li {
  margin-top: 0.35rem;
}

/* CTA SECTION */

.section-cta-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
  justify-content: space-between;
  background: radial-gradient(circle at top left, rgba(39, 225, 255, 0.25), rgba(2, 7, 18, 0.95));
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  border: 1px solid rgba(81, 214, 255, 0.7);
  box-shadow: var(--shadow-soft);
}

.section-cta-inner h2 {
  margin: 0 0 0.4rem;
}

.section-cta-inner p {
  margin: 0;
  color: var(--color-muted);
}

/* CONTACTO */

.contact-grid {
  align-items: flex-start;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.35rem;
}

label {
  font-size: 0.9rem;
}

input,
select,
textarea {
  border-radius: var(--radius-md);
  border: 1px solid rgba(47, 64, 105, 0.9);
  background: rgba(5, 10, 24, 0.95);
  color: var(--color-text);
  padding: 0.6rem 0.75rem;
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: rgba(154, 163, 194, 0.7);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-info {
  position: sticky;
  top: 5.5rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.8rem;
}

.contact-list li + li {
  margin-top: 0.4rem;
}

/* FOOTER */

.site-footer {
  border-top: 1px solid rgba(24, 36, 66, 0.8);
  background: #020611;
  padding: 1.4rem 0 1.8rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* ANIMACIONES (scroll reveal) */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition-med), transform var(--transition-med);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* BREAKPOINTS */

@media (min-width: 720px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }

  .hero-visual {
    display: block;
  }

  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-cta-inner {
    flex-direction: row;
    align-items: center;
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 880px) {
  .site-nav {
    display: block;
  }
  .site-nav.open {
    position: static;
    background: none;
    border: 0;
  }
  .site-nav.open ul {
    flex-direction: row;
    padding: 0;
  }
  .nav-toggle {
    display: none;
  }
}
/* TRANSICIÓN DE PÁGINA (para el router ligero) */

.page-transition-out {
  opacity: 0;
  transition: opacity 0.18s ease-out;
}

.page-transition-in {
  opacity: 1;
  transition: opacity 0.18s ease-out;
}
