:root {
  --bg: #0a0e13;
  --bg-2: #0f141b;
  --panel: #131a22;
  --line: #1f2933;
  --line-2: #2a3642;
  --text: #e8edf2;
  --muted: #94a3b2;
  --dim: #6b7a89;
  --accent: #3cc8c0;
  --accent-2: #8fe7df;
  --warn: #f2b84b;
  --radius: 14px;
  --wrap: 1200px;
  --f-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 .6em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.mono { font-family: var(--f-mono); letter-spacing: .02em; }
.accent { color: var(--accent); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font: 500 .78rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent); margin-bottom: 1.4rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(60,200,192,.15); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(60,200,192,0); } }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 58ch; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .9em 1.5em; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: #04211f; font: 600 .95rem/1 var(--f-sans);
  cursor: pointer; transition: transform .2s, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: var(--accent-2); border-color: var(--accent-2); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { background: rgba(255,255,255,.04); border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: .65em 1.15em; font-size: .88rem; }

/* Navegación */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(10,14,19,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); background: rgba(10,14,19,.9); }
.nav__in { display: flex; align-items: center; justify-content: space-between; height: 112px; transition: height .3s; }
.nav__logo { display: flex; align-items: center; gap: 16px; }
.nav__logo img { height: 80px; width: auto; transition: height .3s; }
.nav.is-scrolled .nav__in { height: 80px; }
.nav.is-scrolled .nav__logo img { height: 56px; }
.nav__sub {
  padding-left: 16px; border-left: 1px solid var(--line-2);
  font: 500 .8rem/1.35 var(--f-sans); color: var(--muted); letter-spacing: .02em;
}
.nav__menu { display: flex; align-items: center; gap: 2rem; font-size: .93rem; }
.nav__menu a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav__menu a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); transition: transform .3s, top .3s; }
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* Hero */
.hero { position: relative; padding: 180px 0 110px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 60% at 85% 20%, rgba(60,200,192,.13), transparent 70%),
    radial-gradient(40% 50% at 10% 90%, rgba(60,120,200,.08), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: radial-gradient(90% 80% at 50% 30%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(90% 80% at 50% 30%, #000 40%, transparent 100%);
  opacity: .9;
}
.hero__in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 2rem 0 2.2rem; }
.hero__tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero__tags li {
  font: 500 .74rem/1 var(--f-mono); color: var(--dim); letter-spacing: .06em;
  padding: .55em .8em; border: 1px solid var(--line); border-radius: 6px;
}
.hero__img { position: relative; margin: 0; }
.hero__img img {
  border-radius: 20px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px var(--line);
}
.hero__img::before {
  content: ""; position: absolute; inset: -14px 14px 14px -14px; z-index: -1;
  border: 1px solid var(--line-2); border-radius: 22px;
}
.hero__img figcaption {
  position: absolute; left: 18px; bottom: 18px; right: 18px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px; border-radius: 12px;
  background: rgba(10,14,19,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.08); font-size: .9rem;
}
.hero__img figcaption .mono { font-size: .7rem; color: var(--accent); letter-spacing: .12em; }

/* Secciones */
.section { padding: 120px 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.sec-head { max-width: 760px; margin-bottom: 64px; }
.sec-head__lead { color: var(--muted); font-size: 1.08rem; }

/* Servicios */
.grid-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; padding: 32px 28px 26px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), rgba(19,26,34,.4));
  border: 1px solid var(--line); transition: border-color .3s, transform .3s;
  display: flex; flex-direction: column;
}
.card:hover { border-color: rgba(60,200,192,.45); transform: translateY(-3px); }
.card p { color: var(--muted); font-size: .96rem; }
.card__ico { width: 44px; height: 44px; margin-bottom: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card__tags { margin: auto 0 0; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: .74rem; color: var(--dim) !important; }
.card--wide {
  grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 28px;
  background: linear-gradient(100deg, rgba(60,200,192,.12), rgba(19,26,34,.6) 55%);
  border-color: rgba(60,200,192,.3);
}
.card--wide .card__ico { margin: 0; flex: 0 0 auto; width: 56px; height: 56px; }
.card--wide div { flex: 1; }
.card--wide p { margin: 0; }

/* Ingeniería */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.split__text > p { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 5px;
  background: rgba(60,200,192,.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%233cc8c0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.screens { position: relative; display: grid; gap: 18px; }
.screen {
  margin: 0; border-radius: 12px; overflow: hidden; background: #0c1117;
  border: 1px solid var(--line-2); box-shadow: 0 30px 60px -30px rgba(0,0,0,.9);
}
.screen--plc { width: 78%; margin-left: auto; margin-top: -70px; position: relative; }
.screen__bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: #121921; border-bottom: 1px solid var(--line);
}
.screen__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.screen__bar span { margin-left: 10px; font-size: .72rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schem { display: block; width: 100%; height: auto; color: #fff; background: #f5f6f2; }
.screen--eplan .schem { color: #000; }
.s-line { fill: none; stroke: #1b2430; stroke-width: 1.6; }
.s-acc { fill: none; stroke: #c43b2f; stroke-width: 1.6; }
.s-txt { font: 500 11px var(--f-mono); fill: #1b2430; }
.code {
  margin: 0; padding: 18px 20px; font-size: .78rem; line-height: 1.7; color: #c9d4de;
  overflow-x: auto; white-space: pre;
}
.code .k { color: #7fb4ff; }
.code .n { color: var(--warn); }
.code .c { color: #5f7183; font-style: italic; }
.cursor { display: inline-block; width: 7px; height: 1.1em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.split--top { align-items: end; margin-bottom: 56px; }
.split--top .checks { margin: 0; }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.phase { margin: 0; }
.phase__img {
  aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--panel);
}
.phase__img--eplan img { object-position: 62% center; }
.phase__img--tia { position: relative; background: #fff; }
.phase__img--tia img { object-position: 72% center; }
.phase__credit {
  position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 4px;
  background: rgba(10,14,19,.6); color: #cfd8e0; font: 400 .62rem/1.4 var(--f-sans);
}
.phase__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.phase:hover .phase__img img { transform: scale(1.04); }
.phase figcaption { display: grid; gap: 2px; padding: 16px 2px 0; color: var(--muted); font-size: .9rem; }
.phase figcaption .mono { font-size: .74rem; color: var(--accent); margin-bottom: 6px; }
.phase figcaption strong { font-family: var(--f-head); font-weight: 600; font-size: 1.08rem; color: var(--text); }

/* Galería */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; gap: 14px; grid-auto-flow: dense; }
.g { position: relative; margin: 0; border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.g--wide { grid-column: span 2; }
.g--tall { grid-row: span 2; }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .4s; filter: saturate(.92); }
.g:hover img { transform: scale(1.04); filter: saturate(1.05); }
.g figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(5,8,12,.88));
  font-size: .86rem; font-weight: 500; opacity: .95;
}

/* Método */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.steps li { position: relative; padding: 30px 28px 10px 0; border-top: 1px solid var(--line-2); }
.steps li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.steps__n { display: block; font-size: .8rem; color: var(--accent); margin-bottom: 1.2rem; }
.steps p { color: var(--muted); font-size: .95rem; }

/* Tecnologías */
.tech { padding: 70px 0; border-bottom: 1px solid var(--line); }
.tech .eyebrow { color: var(--dim); }
.tech__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 12px; }
.tech__list li {
  font-family: var(--f-head); font-weight: 500; font-size: 1.05rem; color: var(--muted);
  padding: .5em 1em; border-radius: 999px; border: 1px solid var(--line);
}

/* Contacto */
.contact__in { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact__list { list-style: none; padding: 0; margin: 2.2rem 0 0; display: grid; gap: 0; }
.contact__list li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact__list .mono { font-size: .72rem; color: var(--dim); letter-spacing: .12em; padding-top: .3em; }
.contact__list a { color: var(--text); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; justify-self: start; }
.contact__list a:hover { color: var(--accent); border-color: var(--accent); }
.form {
  display: grid; gap: 16px; padding: 32px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line);
}
.form label { display: grid; gap: 8px; font-size: .85rem; color: var(--muted); }
.form input, .form textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: .8em 1em;
  transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(60,200,192,.15); }
.form .is-invalid { border-color: #e06c5c; }
.form .btn { justify-self: start; margin-top: 6px; }
.form__note { font-size: .8rem; color: var(--dim); margin: 0; }

/* Footer */
.foot { padding: 56px 0 40px; border-top: 1px solid var(--line); background: var(--bg-2); font-size: .88rem; color: var(--dim); }
.foot__in { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center; }
.foot__logo { height: 36px; width: auto; opacity: .85; }
.foot p { margin: 0; }
.foot__links a:hover { color: var(--text); }

/* Animación de entrada */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot, .cursor { animation: none; }
}

/* Responsive */
@media (max-width: 1000px) {
  .hero__in, .split, .contact__in { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding-top: 160px; }
  .hero__img { max-width: 560px; }
  .grid-services { grid-template-columns: repeat(2, 1fr); }
  .phases { grid-template-columns: repeat(2, 1fr); }
  .split--top { margin-bottom: 40px; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .foot__in { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 20px; background: rgba(10,14,19,.97); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  }
  .nav__menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav__menu .btn { margin-top: 16px; }
  .nav__in, .nav.is-scrolled .nav__in { height: 72px; }
  .nav__logo img, .nav.is-scrolled .nav__logo img { height: 50px; }
  .hero { padding-top: 120px; }
  .section { padding: 84px 0; }
  .sec-head { margin-bottom: 44px; }
  .grid-services { grid-template-columns: 1fr; }
  .card--wide { flex-direction: column; align-items: flex-start; }
  .phases { gap: 22px 12px; }
  .phase figcaption { font-size: .82rem; }
  .code { font-size: .72rem; }
  .steps { grid-template-columns: 1fr; }
  .gallery { grid-auto-rows: 160px; gap: 10px; }
  .g--wide { grid-column: span 2; }
  .contact__list li { grid-template-columns: 1fr; gap: 4px; }
  .form { padding: 22px; }
  .hero__img::before { display: none; }
}
