/* NT Solutions — hoja de estilos principal */

:root {
  --bg: #0d1117;
  --bg-elevated: #10151c;
  --surface: #161b22;
  --surface-hover: #1c232c;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-soft: rgba(88, 166, 255, 0.12);
  --accent-strong: #82c0ff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --container: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.skip-link {
  position: fixed;
  top: -50px;
  left: 1rem;
  z-index: 1000;
  background: var(--accent);
  color: #04101f;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(13, 17, 23, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(88, 166, 255, 0.35);
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.primary-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.primary-nav a:hover {
  color: var(--text);
}

.primary-nav a.nav-cta {
  color: var(--bg);
  background: var(--accent);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.primary-nav a.nav-cta:hover {
  background: var(--accent-strong);
  color: var(--bg);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 25px; }

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 6.5rem 0 5.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 130%;
  background:
    radial-gradient(50% 45% at 18% 15%, rgba(88, 166, 255, 0.16), transparent 60%),
    radial-gradient(45% 40% at 85% 25%, rgba(88, 166, 255, 0.10), transparent 65%),
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
  background-position: 0 0, 0 0, center, center;
  mask-image: radial-gradient(65% 65% at 50% 30%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(65% 65% at 50% 30%, black 40%, transparent 85%);
  opacity: 0.7;
  animation: drift 22s linear infinite;
  z-index: 0;
}

@keyframes drift {
  0% { background-position: 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 0 0, 0 0, 56px 56px, 56px 56px; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 0.6rem;
}

.hero-tagline {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 500;
  margin-bottom: 1.4rem;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin-bottom: 2.4rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  border: 1px solid transparent;
}

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

.btn-primary {
  background: var(--accent);
  color: #04101f;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

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

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

/* ---------- Sections ---------- */

.section {
  padding: 5.5rem 0;
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-elevated);
}

.section-kicker {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  max-width: 720px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin-top: 0.75rem;
}

.section-heading-center {
  text-align: center;
  margin-inline: auto;
  margin-bottom: 3rem;
}

.section-heading-center h2,
.section-heading-center .section-subtitle {
  margin-inline: auto;
}

/* Nosotros */

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 3.5rem;
  align-items: start;
}

.section-body p {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.section-body p:last-child {
  margin-bottom: 0;
}

/* Servicios */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

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

.card:hover {
  border-color: rgba(88, 166, 255, 0.4);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 1.08rem;
  margin-bottom: 0.55rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Soluciones */

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.solutions-grid li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  font-weight: 500;
  font-size: 0.96rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.solutions-grid li:hover {
  border-color: rgba(88, 166, 255, 0.4);
}

.solutions-grid svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Por qué NT Solutions */

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem 1.75rem;
}

.why-item h3 {
  font-size: 1.02rem;
  margin: 0.9rem 0 0.45rem;
}

.why-item p {
  color: var(--text-muted);
  font-size: 0.93rem;
}

.why-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.why-icon svg {
  width: 22px;
  height: 22px;
}

/* Contacto */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3.5rem;
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 1.25rem;
}

.contact-item {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.35rem;
}

.contact-item dt {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.contact-item dd {
  font-size: 1rem;
  font-weight: 500;
}

.contact-note {
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .section-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 760px) {
  .primary-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    background: rgba(13, 17, 23, 0.98);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .primary-nav.is-open {
    max-height: 420px;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.5rem 1.5rem;
  }

  .primary-nav li {
    border-bottom: 1px solid var(--border);
  }

  .primary-nav li:last-child {
    border-bottom: none;
    padding-top: 0.75rem;
  }

  .primary-nav a {
    display: block;
    padding: 0.9rem 0.25rem;
  }

  .primary-nav a.nav-cta {
    text-align: center;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 4rem 0 3.5rem;
  }

  .section {
    padding: 3.75rem 0;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .card-grid,
  .solutions-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }
}
