/* ============================================
   Tecnolab — Landing Page
   ============================================ */

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

:root {
  --accent: #2DD4BF;
  --accent-strong: #22B8A6;

  /* dark theme (default) */
  --bg: #070d13;
  --bg-alt: #0a141e;
  --surface: rgba(255,255,255,0.05);
  --surface-strong: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.12);
  --text: #F5F7FA;
  --text-muted: rgba(245,247,250,0.68);
  --on-accent: #04211d;
}

html[data-theme="light"] {
  --bg: #F7FAFC;
  --bg-alt: #FFFFFF;
  --surface: #FFFFFF;
  --surface-strong: #EEF2F6;
  --border: rgba(11,28,44,0.12);
  --text: #0B1C2C;
  --text-muted: rgba(11,28,44,0.65);
  --accent: #0F9488;
  --accent-strong: #0C766D;
  --on-accent: #FFFFFF;
}

html, body {
  scroll-behavior: smooth;
}

body {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  transition: background 0.25s ease, color 0.25s ease;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  line-height: 1.15;
}

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

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,13,19,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

html[data-theme="light"] .site-header {
  background: rgba(247,250,252,0.82);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  height: 36px;
  width: auto;
}

.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--text);
  white-space: nowrap;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-switch {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.theme-switch-track {
  position: relative;
  width: 50px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.theme-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

html:not([data-theme="light"]) .theme-switch-knob {
  transform: translateX(24px);
}

.theme-switch-knob svg {
  position: absolute;
  width: 13px;
  height: 13px;
  color: var(--on-accent);
  transition: opacity 0.2s ease;
}

.theme-switch-knob .icon-sun { opacity: 0; }
.theme-switch-knob .icon-moon { opacity: 1; }

html[data-theme="light"] .theme-switch-knob .icon-sun { opacity: 1; }
html[data-theme="light"] .theme-switch-knob .icon-moon { opacity: 0; }

.nav-cta {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  white-space: nowrap;
}

.nav-toggle-mobile {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
}

/* ---------- Hero (always dark) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #0c1f30 0%, #081420 42%, #020507 100%);
  padding: 96px 0 110px;
}

.hero-glow {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  filter: blur(14px);
  background: radial-gradient(650px 650px at 82% 15%, var(--accent), transparent 70%);
  pointer-events: none;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(2,6,10,0.6) 0%, rgba(2,6,10,0.22) 46%, transparent 68%);
  pointer-events: none;
}

.hero-circuit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-circuit .chip {
  animation: chipGlow 3s ease-in-out infinite;
}

.hero-circuit .signal {
  animation: travel 4.5s linear infinite, travelFade 4.5s linear infinite;
}

@keyframes chipGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}
@keyframes travel {
  from { offset-distance: 0%; }
  to { offset-distance: 100%; }
}
@keyframes travelFade {
  0% { opacity: 0; }
  8% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-circuit .chip,
  .hero-circuit .signal { animation: none; }
}

.hero-inner {
  position: relative;
  max-width: 620px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
}

.hero h1 {
  font-size: 48px;
  color: #F5F7FA;
  margin-top: 18px;
}

.hero p {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(245,247,250,0.68);
  margin-top: 22px;
  max-width: 520px;
}

.hero p strong { color: #F5F7FA; }

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

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  border: none;
  cursor: pointer;
}

.btn-ghost {
  border: 1px solid rgba(255,255,255,0.28);
  color: #F5F7FA;
  font-weight: 500;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
}

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

section { padding: 96px 0; }

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

.section-head .eyebrow { display: block; margin-bottom: 12px; }

.section-head h2 {
  font-size: 34px;
  color: var(--text);
}

.section-head p {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- Product cards ---------- */

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
}

.product-card .product-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.product-card h3 {
  font-size: 24px;
  color: var(--text);
}

.product-card > p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.feature-list {
  list-style: none;
  margin-top: 24px;
  display: grid;
  gap: 14px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text);
}

.feature-list li strong { display: block; margin-bottom: 2px; }
.feature-list li span.desc { color: var(--text-muted); font-weight: 400; }

.feature-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg { width: 16px; height: 16px; }

/* ---------- Nosotros ---------- */

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

.about-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.about h2 { font-size: 30px; }

.about p {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- CTA banner ---------- */

.cta-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px 40px;
  text-align: center;
  margin: 0 24px;
}

.cta-banner h2 { color: var(--text); font-size: 28px; }
.cta-banner p { color: var(--text-muted); margin-top: 12px; }
.cta-banner .hero-actions { justify-content: center; margin-top: 28px; }

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-tagline {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 320px;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
}

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

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Contact page ---------- */

.contact-hero {
  padding: 72px 0 24px;
  text-align: center;
}

.contact-hero .eyebrow { display: block; margin-bottom: 12px; }
.contact-hero h1 { font-size: 38px; }
.contact-hero p { margin-top: 14px; color: var(--text-muted); max-width: 520px; margin-left: auto; margin-right: auto; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 820px;
  margin: 48px auto 0;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  text-align: center;
}

.contact-card .contact-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

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

.contact-card h3 { font-size: 19px; color: var(--text); }
.contact-card p { margin-top: 8px; color: var(--text-muted); font-size: 14px; }
.contact-card .btn-primary { margin-top: 20px; width: 100%; justify-content: center; }

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 860px) {
  .products-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .footer-top { flex-direction: column; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle-mobile { display: inline-flex; }
  .nav-actions .nav-cta { display: none; }

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

  body.nav-open .nav-links a { padding: 10px 0; width: 100%; }

  .hero { padding: 64px 0 72px; }
  .hero h1 { font-size: 30px; }
  section { padding: 64px 0; }
  .cta-banner { margin: 0 16px; padding: 40px 24px; }
}
