:root {
  --bg: #050505;
  --panel: rgba(8, 10, 12, 0.72);
  --text: #f0f0f0;
  --muted: #9aa3ab;
  --line: rgba(255, 255, 255, 0.09);
  --cyan: #00d2ff;
  --cyan-soft: rgba(0, 210, 255, 0.14);
  --amber: #ffb900;

  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --radius: 10px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.03em; line-height: 1.05; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--cyan);
  color: #000;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip:focus { top: 16px; }

/* Lienzo del enjambre: fijo detrás de todo el contenido */
.swarm {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.site-header,
main,
.site-footer { position: relative; z-index: 1; }

/* Cabecera */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  transition: background-color 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.brand img { width: 148px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 0.95rem; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.nav a:not(.btn):hover { color: var(--text); }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-weight: 550;
  font-size: 0.98rem;
  text-decoration: none;
  color: var(--text);
  background: rgba(5, 5, 5, 0.4);
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.btn:hover { border-color: var(--text); }
.btn-primary { background: var(--cyan); border-color: var(--cyan); color: #001018; }
.btn-primary:hover { background: #fff; border-color: #fff; }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.link {
  display: inline-block;
  color: var(--cyan);
  font-weight: 550;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.link:hover { color: #fff; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 120px 96px;
}
.hero h1 {
  font-size: clamp(2.9rem, 5.8vw, 5.4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
h1 .intro,
h2 .intro {
  display: block;
  margin-bottom: 0.55em;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--muted);
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.lead {
  margin-top: 36px;
  max-width: 30ch;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.45;
  color: var(--muted);
}
.hero .actions { margin-top: 40px; }

/* Entrada orquestada: el titular aparece mientras el enjambre forma la M */
.js h1 .intro,
h2 .intro { animation: fade 0.8s ease both; }
.js .hero h1 .line { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
.js .hero h1 .line:nth-child(2) { animation-delay: 0.3s; }
.js .hero h1 .line:nth-child(3) { animation-delay: 0.65s; }
.js .hero h1 .line:nth-child(4) { animation-delay: 1s; }
.js .hero .lead,
.js .hero .actions { animation: fade 1s ease 1.4s both; }

@keyframes rise {
  from { clip-path: inset(0 0 100% 0); transform: translateY(0.35em); }
  to { clip-path: inset(0 0 0 0); transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--cyan);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* Ecosistema: pasos altos, el enjambre cambia de forma a la derecha */
.eco { padding-top: 12vh; }
.eco-title {
  font-size: clamp(2.4rem, 4.6vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.eco-title .line { display: block; }
.eco-step {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  max-width: 34rem;
}
.eco-step h3 {
  font-size: clamp(2.6rem, 4.8vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.eco-tag { font-size: clamp(1.15rem, 1.6vw, 1.4rem); font-weight: 500; letter-spacing: -0.01em; }
.eco-step p:not(.eco-tag) { color: var(--muted); max-width: 46ch; }
.eco-step .link { align-self: flex-start; margin-top: 6px; }

/* Secciones genéricas */
.section { padding-block: clamp(96px, 14vh, 160px); }
.section-head { display: grid; gap: 20px; max-width: 44rem; }
.section-head h2 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); }
.section-head p { color: var(--muted); font-size: 1.15rem; max-width: 60ch; }
.section-head .btn { justify-self: start; margin-top: 12px; }

/* Arquitectura: panel translúcido sobre el campo de nodos */
.arch .wrap {
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding-block: clamp(40px, 7vw, 88px);
  padding-inline: clamp(20px, 5vw, 72px);
  max-width: calc(var(--max) - 2 * var(--gutter));
  width: calc(100% - 2 * var(--gutter));
}
.principles {
  margin: clamp(48px, 7vw, 80px) 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.principles > div {
  padding: 32px 28px 36px 0;
  border-bottom: 1px solid var(--line);
}
.principles > div:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.principles dt { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
.principles dd { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* Dónde trabajamos */
.fields {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.field h3 {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--cyan);
  margin-bottom: 16px;
}
.field ul { list-style: none; margin: 0; padding: 0; }
.field li {
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

/* Declaración: centrada dentro del anillo de nodos */
.statement {
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding-block: 120px;
}
.statement .wrap { display: grid; justify-items: center; gap: 28px; }
.statement h2 {
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  max-width: 17em;
  text-wrap: balance;
}
.statement p { color: var(--muted); max-width: 52ch; font-size: 1.1rem; }
.statement .actions { justify-content: center; }

/* Contacto */
.contact .contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-data { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-data > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 4px 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.55);
}
.contact-data dt { grid-row: span 3; color: var(--muted); font-size: 0.95rem; padding-top: 2px; }
.contact-data dd { margin: 0; font-size: 1.15rem; font-weight: 500; }
.contact-data a { text-decoration: none; }
.contact-data a:hover { color: var(--cyan); }

/* Pie */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: 32px;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-inner img { width: 32px; height: 32px; opacity: 0.85; }
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; margin: 0 0 0 auto; padding: 0; }
.social a { text-decoration: none; }
.social a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 960px) {
  .principles { grid-template-columns: 1fr 1fr; }
  .principles > div:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .principles > div:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
  .fields { grid-template-columns: 1fr 1fr; }
  .fields .section-head { grid-column: 1 / -1; }
  .contact .contact-inner { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 720px) {
  .nav a:not(.btn) { display: none; }
  .brand img { width: 128px; }
  .hero { align-items: flex-end; }
  .scroll-cue { display: none; }
  .eco-step { min-height: 100vh; min-height: 100svh; justify-content: flex-end; padding-bottom: 12vh; }
  .eco-step p:not(.eco-tag),
  .eco-tag { background: rgba(5, 5, 5, 0.5); }
  .principles { grid-template-columns: 1fr; }
  .principles > div,
  .principles > div:nth-child(even) { padding: 24px 0; border-left: 0; }
  .fields { grid-template-columns: 1fr; gap: 40px; }
  .contact-data > div { grid-template-columns: 1fr; }
  .contact-data dt { grid-row: auto; }
  .social { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { animation: none !important; transition: none !important; }
}
