/* =========================================================
   Kanet · Servicios web
   ========================================================= */

:root {
  --bg: #021e28;
  --bg-2: #03293a;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8f3f6;
  --muted: #93aeb8;
  --accent: #00e5ef;
  --accent-soft: rgba(0, 229, 239, 0.12);
  --accent-ink: #012a35;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 18px;
  --radius-lg: 28px;
  --container: 1180px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }

.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1rem; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.5rem;
  border-radius: 999px;
  font-weight: 600; font-size: .98rem;
  border: 1px solid transparent;
  transition: transform .3s var(--ease), background .3s, box-shadow .3s, border-color .3s, color .3s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgba(0, 229, 239, .6); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(0, 229, 239, .8); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: .6rem 1.1rem; font-size: .9rem; }

/* ---------- Encabezado ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(2, 30, 40, .72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-color: var(--line);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand img { height: 42px; width: auto; }

.nav { display: flex; align-items: center; gap: 2.2rem; }
.nav a:not(.btn) { font-size: .95rem; color: var(--muted); position: relative; transition: color .3s; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:not(.btn):hover, .nav a.is-active { color: var(--text); }
.nav a:not(.btn):hover::after, .nav a.is-active::after { transform: scaleX(1); }

.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: transparent; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .35s var(--ease), top .35s var(--ease); }
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Fondos decorativos ---------- */
.glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.glow--a { width: 620px; height: 620px; right: -120px; top: -80px; background: radial-gradient(circle, rgba(0, 229, 239, .28), transparent 65%); }
.glow--b { width: 520px; height: 520px; left: -200px; bottom: -180px; background: radial-gradient(circle, rgba(5, 90, 120, .55), transparent 65%); }
.glow--c { width: 720px; height: 720px; left: 50%; top: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(0, 229, 239, .2), transparent 62%); }
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  opacity: .5;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 940px);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 5rem;
  overflow: hidden;
  background: linear-gradient(180deg, #022a39 0%, var(--bg) 100%);
}
.hero__bg { position: absolute; inset: 0; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 1.4rem;
}
.eyebrow .mono { color: var(--accent); letter-spacing: .04em; text-transform: none; font-size: .85rem; }
.hero .eyebrow { padding: .45rem .9rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }

.hero__title { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 600; letter-spacing: -0.035em; }
.hero__title em { font-style: normal; background: linear-gradient(90deg, #fff, #9fdde6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { margin-top: 1.6rem; max-width: 34rem; font-size: 1.15rem; color: var(--muted); }
.hero__actions { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__tags { list-style: none; padding: 0; margin: 2.8rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }
.hero__tags li { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); }
.hero__tags li::before { content: "#"; color: var(--accent); margin-right: .25rem; }

.hero__art { position: relative; justify-self: center; width: min(100%, 470px); aspect-ratio: 1; }
.mark { position: absolute; inset: 0; display: grid; place-items: center; animation: float 8s ease-in-out infinite; }
.mark__svg { width: 88%; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .45)) drop-shadow(0 0 50px rgba(0, 229, 239, .15)); }
.mark__orbit {
  position: absolute; inset: -2%;
  border: 1px dashed rgba(0, 229, 239, .25); border-radius: 50%;
  animation: spin 50s linear infinite;
}
.mark__orbit::before {
  content: ""; position: absolute; top: 12%; left: 12%; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 18px var(--accent);
}

.code-card {
  position: absolute; left: -12%; bottom: 2%;
  padding: 1rem 1.25rem 1.1rem;
  background: rgba(3, 41, 58, .75);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  animation: float 8s ease-in-out infinite reverse;
}
.code-card__dots { display: flex; gap: 6px; margin-bottom: .7rem; }
.code-card__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.code-card__dots i:first-child { background: #ff6b6b; }
.code-card__dots i:nth-child(2) { background: #ffd166; }
.code-card__dots i:last-child { background: #06d6a0; }
.code-card pre { margin: 0; font-family: var(--font-mono); font-size: .8rem; line-height: 1.7; color: #cfe3e9; }
.c-k { color: #c792ea; } .c-v { color: var(--accent); } .c-s { color: #c3e88d; }

.scroll-cue { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); width: 26px; height: 42px; border: 1.5px solid var(--line-strong); border-radius: 20px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: cue 2s var(--ease) infinite; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Franja ---------- */
.ticker { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 1.25rem 0; }
.ticker__track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker__track span { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; color: var(--muted); padding: 0 2rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 4rem; }
.ticker__track span::after { content: "</>"; font-family: var(--font-mono); font-size: .85rem; color: var(--accent); margin-left: 2rem; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding: clamp(5rem, 11vw, 8.5rem) 0; position: relative; }
.section--alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%); }
.section__head { max-width: 46rem; margin-bottom: 3.5rem; }
.section__title { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 600; }

/* Nosotros */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 5rem; }
.about__body { display: grid; gap: 1.2rem; color: var(--muted); font-size: 1.1rem; align-self: end; }
.about__body strong { color: var(--text); }
.values { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 3rem; }
.value { padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.value__icon, .service__icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 14px; background: var(--accent-soft); color: var(--accent);
  margin-bottom: 1.4rem;
}
.value__icon svg, .service__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.value h3 { font-size: 1.25rem; margin-bottom: .6rem; }
.value p { color: var(--muted); font-size: .98rem; }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.service {
  position: relative; padding: 2.2rem 2rem 2.3rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden; isolation: isolate;
  transition: transform .5s var(--ease), border-color .4s, background .4s;
}
.service::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(0, 229, 239, .12), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.service:hover { transform: translateY(-6px); border-color: rgba(0, 229, 239, .35); background: var(--surface-hover); }
.service:hover::before { opacity: 1; }
.service__num { position: absolute; top: 1.6rem; right: 1.8rem; font-size: .8rem; color: var(--muted); opacity: .7; }
.service h3 { font-size: 1.35rem; margin-bottom: .7rem; }
.service p { color: var(--muted); font-size: .98rem; }

/* Proceso */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: s; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 22px; left: 22px; right: 22px; height: 1px;
  background: linear-gradient(90deg, var(--accent), rgba(0, 229, 239, .1));
}
.step { position: relative; padding-top: 4.2rem; }
.step__num {
  position: absolute; top: 0; left: 0;
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: var(--bg); border: 1px solid var(--accent);
  color: var(--accent); font-size: .85rem;
  box-shadow: 0 0 0 6px var(--bg), 0 0 24px rgba(0, 229, 239, .25);
}
.step h3 { font-size: 1.25rem; margin-bottom: .55rem; }
.step p { color: var(--muted); font-size: .98rem; max-width: 16rem; }

/* Contacto */
.contact { position: relative; overflow: hidden; padding: clamp(6rem, 13vw, 10rem) 0; border-top: 1px solid var(--line); text-align: center; }
.contact__bg { position: absolute; inset: 0; }
.contact__bg .grid-lines { mask-image: radial-gradient(ellipse 50% 60% at 50% 50%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 50% 60% at 50% 50%, #000 20%, transparent 75%); }
.contact__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.contact__title { font-size: clamp(2.3rem, 5.5vw, 4.2rem); font-weight: 600; letter-spacing: -0.035em; }
.contact__lead { margin-top: 1.4rem; max-width: 32rem; color: var(--muted); font-size: 1.15rem; }
.contact__actions { margin-top: 2.8rem; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .9rem; }
.contact__mail {
  display: inline-flex; align-items: center; gap: .9rem;
  padding: 1.1rem 1.9rem;
  font-family: var(--font-display); font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 600;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px;
  box-shadow: 0 20px 50px -18px rgba(0, 229, 239, .75);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.contact__mail:hover { transform: translateY(-3px); box-shadow: 0 26px 60px -18px rgba(0, 229, 239, .9); }
.contact__mail svg, .copy-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 1rem 1.3rem; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong);
  font: 500 .95rem var(--font-body);
  transition: border-color .3s, color .3s;
}
.copy-btn svg { width: 18px; height: 18px; }
.copy-btn:hover, .copy-btn.is-copied { border-color: var(--accent); color: var(--accent); }

/* ---------- Pie ---------- */
.footer { border-top: 1px solid var(--line); padding: 2.2rem 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer .brand img { height: 36px; }
.footer__nav { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.footer__nav a { color: var(--muted); font-size: .92rem; transition: color .3s; }
.footer__nav a:hover { color: var(--accent); }
.footer__copy { color: var(--muted); font-size: .88rem; }

/* ---------- Animaciones de entrada ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero__art { width: min(80%, 400px); }
  .code-card { left: -6%; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 3rem; }
  .steps::before { display: none; }
}

@media (max-width: 820px) {
  .burger { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 1rem 1.25rem 1.75rem;
    background: rgba(2, 30, 40, .97);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .35s var(--ease), opacity .35s, visibility .35s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: 1rem .25rem; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav__cta { margin-top: 1.25rem; justify-content: center; }
  .header:has(.nav.is-open) { background: rgba(2, 30, 40, .97); }

  .about { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; margin-top: 1.5rem; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .services, .steps { grid-template-columns: 1fr; }
  .code-card { display: none; }
  .hero__art { width: 78%; }
  .footer__inner { flex-direction: column; text-align: center; }
  .contact__mail { padding: 1rem 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Proyectos ---------- */
.work { --cols: 4; --gap: 1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.work > * { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); }
.work__item {
  position: relative; padding: 1.6rem 1.5rem 1.7rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: transform .5s var(--ease), border-color .4s, background .4s;
}
.work__item:hover { transform: translateY(-6px); border-color: rgba(0, 229, 239, .35); background: var(--surface-hover); }
.work__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(0, 229, 239, .3); color: var(--accent); margin-bottom: 1.3rem; }
.work__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.work__item h3 { font-size: 1.1rem; margin-bottom: .45rem; }
.work__item p { color: var(--muted); font-size: .92rem; line-height: 1.55; }
.work__more { margin-top: 2.2rem; color: var(--muted); }
.work__more a { color: var(--accent); border-bottom: 1px solid rgba(0, 229, 239, .4); transition: border-color .3s; }
.work__more a:hover { border-color: var(--accent); }

@media (max-width: 1100px) { .work { --cols: 3; } }
@media (max-width: 820px) { .work { --cols: 2; } }
@media (max-width: 520px) { .work { --cols: 1; } }

.section__lead { margin-top: 1.2rem; color: var(--muted); font-size: 1.1rem; max-width: 38rem; }
