/* Altiva Technologies — tema oscuro */
:root {
  --bg: #07090F;
  --bg-2: #0B0E17;
  --panel: #0F131E;
  --panel-2: #141927;
  --line: #1E2433;
  --line-2: #2A3245;
  --text: #ECEFF6;
  --muted: #9099AD;
  --faint: #626B80;
  --blue: #3B5BFF;          /* azul del logo, un punto más claro para fondo oscuro */
  --blue-text: #8DA0FF;     /* azul para texto sobre fondo oscuro (contraste AA) */
  --blue-glow: rgba(59, 91, 255, .35);
  --orange: #FF7F1E;
  --radius: 14px;
  --wrap: 1160px;
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-text); text-underline-offset: 3px; }
a:hover { color: var(--text); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
p { margin: 0; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--blue); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  background: var(--blue); color: #fff; border: 1px solid var(--blue);
  border-radius: 10px; font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
  box-shadow: 0 0 0 0 var(--blue-glow);
}
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 30px -6px var(--blue-glow); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--panel-2); box-shadow: none; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Navegación */
.nav { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid transparent; transition: background .2s, border-color .2s; }
.nav.is-scrolled { background: rgba(7, 9, 15, .82); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__word { display: flex; flex-direction: column; font-weight: 700; font-size: 21px; line-height: 1; letter-spacing: -.03em; }
.brand__sub { margin-top: 4px; font: 500 8.5px/1 var(--mono); letter-spacing: .42em; text-transform: uppercase; color: var(--muted); }
.nav__menu { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav__menu a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav__menu a:not(.btn):hover { color: var(--text); }
.nav__tools { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; padding: 3px; }
.lang button { background: none; border: 0; color: var(--faint); font: 500 12px/1 var(--mono); padding: 7px 9px; border-radius: 6px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }
.nav__toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 10px; background: none; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.nav__toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 184px 0 96px; margin-top: -72px; border-bottom: 1px solid var(--line); }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 55% at 80% 20%, rgba(59, 91, 255, .22), transparent 70%), linear-gradient(to bottom, transparent 60%, var(--bg)); }
.hero__grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__inner { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(15, 19, 30, .7); font: 500 13px/1 var(--mono); color: var(--muted); }
.dot { width: 8px; height: 8px; background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.hero h1 { margin: 28px 0 24px; font-size: clamp(44px, 8.4vw, 104px); font-weight: 750; letter-spacing: -.045em; line-height: .98; max-width: 12ch; }
.hero h1 em { font-style: normal; color: transparent; background: linear-gradient(100deg, var(--blue-text) 10%, var(--blue) 60%, var(--orange) 110%); -webkit-background-clip: text; background-clip: text; }
.lead { max-width: 58ch; font-size: clamp(17px, 2vw, 20px); color: var(--muted); margin-bottom: 36px; }
.hero__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 0; margin: 64px 0 0; border-top: 1px solid var(--line); }
.hero__facts div { padding: 20px 20px 0 0; }
.hero__facts dt { font: 600 24px/1.1 var(--font); letter-spacing: -.02em; }
.hero__facts dd { margin: 6px 0 0; color: var(--faint); font-size: 14px; line-height: 1.4; }

/* Secciones */
.section { padding: 112px 0; }
.section--tight { padding: 72px 0; }
.section--panel { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 640px; margin-bottom: 56px; }
.section__head h2 { font-size: clamp(32px, 4.6vw, 52px); margin-bottom: 16px; }
.section__head p:not(.kicker) { color: var(--muted); font-size: 18px; }
.kicker { font: 500 13px/1 var(--mono); color: var(--blue-text); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 18px !important; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.split .section__head { margin-bottom: 0; position: sticky; top: 112px; }

/* Servicios */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { position: relative; padding: 28px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card::before { content: ''; position: absolute; top: -1px; left: 24px; width: 32px; height: 2px; background: var(--blue); }
.card:nth-child(4)::before { background: var(--orange); }
.card__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); margin-bottom: 22px; }
.card__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--blue-text); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card__inc { margin-top: 16px !important; padding-top: 16px; border-top: 1px dashed var(--line-2); font-size: 14px !important; color: var(--faint) !important; }

/* Casos */
.case { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.case__body { padding: 48px; }
.case__brand { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.case__brand img { width: 56px; height: 56px; padding: 6px; border-radius: 14px; background: #F6F4EC; }
.case__brand h3 { font-size: 28px; }
.case__tag { font: 500 13px/1.3 var(--mono); color: var(--faint); margin-top: 6px !important; }
.case__body > p { color: var(--muted); max-width: 60ch; }
.case__features { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.case__features li { position: relative; padding-left: 20px; font-size: 15px; }
.case__features li::before { content: ''; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--blue); }
.tags { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font: 500 12.5px/1 var(--mono); padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--muted); }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }
.case__next { margin-top: 32px; color: var(--muted); }

.case__visual { position: relative; display: grid; place-items: center; padding: 48px 24px; background: radial-gradient(70% 60% at 50% 45%, rgba(202, 150, 47, .16), transparent 70%), linear-gradient(160deg, #10241A, #0B1510); border-left: 1px solid var(--line); min-height: 460px; }
.phone { position: relative; width: 240px; border-radius: 36px; padding: 10px; background: #050608; border: 1px solid #2B3140; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); transform: rotate(-4deg); }
.phone__screen { width: 100%; height: auto; border-radius: 27px; }

/* Carrusel */
.gallery { margin-top: 24px; }
.gallery__track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.gallery__slide img { width: 100%; height: auto; }
.gallery__slide figcaption { padding: 14px 20px; font-size: 15px; color: var(--muted); border-top: 1px solid var(--line); }
.gallery__nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.gallery__btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; font: inherit; font-size: 18px; color: var(--text); background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; }
.gallery__btn:hover:not(:disabled) { border-color: var(--blue-text); }
.gallery__btn:disabled { opacity: .4; cursor: default; }
.gallery__btn .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gallery__dots { display: flex; gap: 8px; }
.gallery__dots i { width: 8px; height: 8px; background: var(--line-2); transition: background-color .2s; }
.gallery__dots i.is-on { background: var(--blue); }

/* Proceso */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; }
.steps li { position: relative; padding: 32px 28px 0 0; border-top: 1px solid var(--line-2); counter-increment: step; }
.steps li::before { content: ''; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--blue); box-shadow: 0 0 14px var(--blue-glow); }
.steps li:last-child::before { background: var(--orange); box-shadow: 0 0 14px rgba(255, 127, 30, .5); }
.steps__when { display: block; font: 500 12.5px/1 var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.steps h3 { font-size: 21px; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 15.5px; }

/* Por qué */
.reasons { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.reasons div { padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.reasons dt { font-weight: 650; font-size: 18px; margin-bottom: 8px; }
.reasons dd { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Stack */
.stack { text-align: center; }
.stack .kicker { color: var(--faint); }
.stack__list { list-style: none; padding: 0; margin: 0 auto 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 820px; }
.stack__list li { font: 500 15px/1 var(--mono); padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.stack__note { color: var(--faint); font-size: 15px; max-width: 60ch; margin: 0 auto; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; font-weight: 600; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 8px; font: 400 18px/1 var(--mono); color: var(--blue-text); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 54px 24px 0; color: var(--muted); }

/* Contacto */
.contact__direct { margin-top: 20px !important; font-size: 16px !important; }
.brief { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 36px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label, .field legend { font-size: 14px; font-weight: 550; color: var(--text); padding: 0; margin-bottom: 0; }
.field legend { margin-bottom: 8px; }
.opt { color: var(--faint); font-weight: 400; }
input, select, textarea {
  width: 100%; font: 400 16px/1.4 var(--font); color: var(--text);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 120px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
[aria-invalid="true"] { border-color: var(--orange); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-block; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14.5px; color: var(--muted); transition: all .15s; }
.chips input:checked + span { background: rgba(59, 91, 255, .16); border-color: var(--blue); color: var(--text); }
.chips input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.brief__error { color: #FFB07A; font-size: 15px; }

/* Footer */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--line); }
.footer__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 16px 40px; align-items: center; }
.footer__tag { color: var(--faint); font-size: 15px; }
.footer__links { display: flex; gap: 24px; font-size: 15px; }
.footer__links a { color: var(--muted); text-decoration: none; }
.footer__links a:hover { color: var(--text); }
.footer__copy { grid-column: 1 / -1; color: var(--faint); font: 400 13px/1 var(--mono); padding-top: 24px; border-top: 1px solid var(--line); margin-top: 16px; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.notfound .brand { margin-bottom: 40px; }
.notfound h1 { font-size: clamp(36px, 6vw, 56px); margin-bottom: 14px; }
.notfound p { color: var(--muted); margin-bottom: 32px; }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1020px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .case { grid-template-columns: 1fr; }
  .case__visual { border-left: 0; border-top: 1px solid var(--line); min-height: 400px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split .section__head { position: static; }
}
@media (max-width: 820px) {
  .nav__toggle { display: flex; }
  .nav__menu { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: var(--bg); box-shadow: 0 30px 40px -10px rgba(0,0,0,.7); border-bottom: 1px solid var(--line); display: none; }
  .nav__menu.is-open { display: flex; }
  .nav__menu a:not(.btn) { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav__menu .btn { margin-top: 16px; }
  .nav__tools { margin-left: auto; }
  .nav { background: rgba(7, 9, 15, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  body { font-size: 16px; }
  .hero { padding-top: 136px; padding-bottom: 64px; }
  .eyebrow { font-size: 12px; }
  .hero__facts { grid-template-columns: 1fr; margin-top: 48px; }
  .hero__facts div { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .hero__facts dd { margin: 0; }
  .cta-row .btn { flex: 1 1 100%; }
  .section { padding: 80px 0; }
  .section__head { margin-bottom: 40px; }
  .cards, .steps, .reasons, .case__features { grid-template-columns: 1fr; }
  .case__body { padding: 28px 22px; }
  .brief { grid-template-columns: 1fr; padding: 22px; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__links { flex-direction: column; gap: 10px; }
  .faq details p { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
