/* MyA Consulting: landing "Del caos al sistema" */

:root {
  --bg: #06070a;
  --bg-2: #0c0e13;
  --card: #0f1218;
  --ink: #ecebe6;
  --ink-2: #b9bcc4;
  --mute: #7c818b;
  --line: rgba(236, 235, 230, 0.09);
  --line-2: rgba(236, 235, 230, 0.16);
  --blue: #2a5bff;
  --blue-2: #5cc8ff;
  --blue-soft: rgba(42, 91, 255, 0.12);
  --red: #d4202c;
  --green: #3ddc84;
  --amber: #ffb547;

  --f-sans: 'Inter Tight', system-ui, sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --wrap: 1240px;
  --r: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--f-sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--blue-2); letter-spacing: -0.01em; }
strong { color: var(--ink); font-weight: 600; }

h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem); font-weight: 600; line-height: 1; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.03em; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }

/* ─── Botones y piezas ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap;
  padding: 0.75rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: transform 0.25s, background 0.25s, border-color 0.25s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 0.5rem 0.95rem; font-size: 13px; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #ec2834; }
.btn-ghost { border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); }

.pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.8rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.kicker { color: var(--blue-2); display: block; margin-bottom: 0.9rem; }

.checks { display: flex; flex-direction: column; gap: 0.45rem; }
.checks li { position: relative; padding-left: 1.2rem; color: var(--ink-2); font-size: 14px; }
.checks li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 7px; height: 7px; border: 1.5px solid var(--blue-2); border-radius: 2px; transform: rotate(45deg); }
.checks-sm li { font-size: 13px; }

.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chips li { padding: 0.25rem 0.6rem; border: 1px solid var(--line-2); border-radius: 6px; font-size: 12px; color: var(--ink-2); }
.chips.mono li { font-size: 10px; }

/* ─── Nav ─────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(6, 7, 10, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.nav-logo { font-weight: 700; font-size: 19px; letter-spacing: -0.03em; }
.nav-logo span { color: var(--blue-2); }
.nav-logo small { font-weight: 500; font-size: 13px; color: var(--mute); letter-spacing: 0; margin-left: 2px; }
.nav-links { display: flex; gap: 1.75rem; align-items: center; font-size: 14px; color: var(--ink-2); }
.nav-links a:not(.btn):hover { color: var(--ink); }

/* ─── Hero ────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: 72px 0 64px; background: radial-gradient(ellipse 50% 60% at 78% 40%, rgba(42, 91, 255, 0.16), transparent 70%); }
/* Capas: mosaico (0) < partículas (1) < texto (2) */
.hero { isolation: isolate; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; mix-blend-mode: screen; opacity: 0; transition: opacity 0.8s; }
.has-hero-fx .hero-canvas { opacity: 1; }
.hero-copy { position: relative; z-index: 2; }
.hero-hud { position: absolute; left: 24px; right: 24px; bottom: 14px; display: flex; justify-content: space-between; gap: 1rem; color: var(--mute); font-size: 10px; pointer-events: none; z-index: 1; opacity: 0; transition: opacity 0.6s; }
.has-hero-fx .hero-hud { opacity: 1; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-copy h1, .hero-copy .lead { text-shadow: 0 2px 24px var(--bg), 0 0 2px var(--bg); }
.hero-mosaic { z-index: 0; transition: transform 0.5s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.4rem; }
.hero h1 em { color: var(--blue); }
.lead { font-size: 17px; color: var(--ink-2); max-width: 540px; }
.hero-cta { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 2rem; margin-top: 0.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line); width: 100%; }
.hero-stats dt { font-size: 1.7rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.hero-stats dd { font-size: 12px; color: var(--mute); margin-top: 0.3rem; }

.hero-mosaic { position: relative; aspect-ratio: 1 / 0.86; }
.hero-mosaic .m { position: absolute; border-radius: 10px; border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85); }
.hero-mosaic .m1 { width: 78%; top: 0; left: 0; z-index: 2; }
.hero-mosaic .m2 { width: 62%; top: 34%; right: 0; z-index: 3; }
.hero-mosaic .m3 { width: 52%; bottom: 0; left: 6%; z-index: 1; opacity: 0.7; }
.hero-mosaic .phone { width: 22%; bottom: 2%; right: 6%; z-index: 4; border-radius: 16px; border: 4px solid #1a1d24; }

/* ─── Ticker ──────────────────────────────────────────── */
.ticker { overflow: hidden; border-block: 1px solid var(--line); padding: 14px 0; color: var(--mute); }
.ticker-track { display: flex; gap: 1.6rem; width: max-content; animation: ticker 60s linear infinite; }
.ticker b { color: var(--blue-2); font-weight: 400; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ─── Secciones ───────────────────────────────────────── */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--ink-2); margin-top: 0.9rem; font-size: 16px; }
.section-head-row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.section-head-row > div:first-child { max-width: 640px; }

/* Servicios: escenario fijo con partículas a la izquierda, tarjetas a la derecha */
.svc-scroll { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; }
/* sticky aísla el canvas: necesita fondo propio para que el modo screen funda el negro */
.svc-stage { position: sticky; top: 64px; height: calc(100vh - 64px); isolation: isolate; background: var(--bg); }
.svc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; }
.svc-meta { position: absolute; left: 0; bottom: 28px; display: flex; gap: 1rem; color: var(--mute); }
.svc-meta b { color: var(--blue-2); font-weight: 500; }
.svc-list { display: flex; flex-direction: column; gap: 22vh; padding: 20vh 0 26vh; }
.has-svc-fx .svc-list .service { opacity: 0.32; transform: scale(0.97); transition: opacity 0.5s, transform 0.5s, border-color 0.5s; }
.has-svc-fx .svc-list .service.is-active { opacity: 1; transform: none; border-color: rgba(92, 200, 255, 0.35); }
.no-webgl .svc-scroll { grid-template-columns: 1fr 1fr; }
.no-webgl .svc-stage { display: none; }
.no-webgl .svc-list { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0; }
.service { display: flex; flex-direction: column; gap: 0.9rem; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); transition: border-color 0.25s; }
.service:hover { border-color: rgba(92, 200, 255, 0.35); }
.service-top { display: flex; justify-content: space-between; color: var(--mute); }
.tag-hot { color: var(--red); }
.service > p { color: var(--ink-2); font-size: 14px; }
.service .checks { flex: 1; }
.service-link { font-size: 13px; font-weight: 600; color: var(--blue-2); margin-top: 0.4rem; }

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.steps li { padding: 22px 24px 4px 0; border-top: 1px solid var(--line-2); position: relative; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.steps li::before { content: ''; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--blue-2); }
.steps li + li::before { left: 24px; }
.steps span { color: var(--mute); }
.steps h3 { margin: 0.5rem 0 0.4rem; }
.steps p { color: var(--ink-2); font-size: 14px; }

/* Proyectos */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter { padding: 0.45rem 0.85rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; color: var(--ink-2); transition: all 0.2s; }
.filter span { color: var(--mute); margin-left: 0.2rem; }
.filter:hover { color: var(--ink); }
.filter.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter.is-on span { color: var(--bg); opacity: 0.6; }

.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.project { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color 0.25s, transform 0.25s; }
.project:hover { border-color: rgba(92, 200, 255, 0.35); }
.project-shot { position: relative; display: block; background: #000; border-bottom: 1px solid var(--line); overflow: hidden; }
.project-shot > img:not(.project-phone) { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.project:hover .project-shot > img:not(.project-phone) { transform: scale(1.03); }
.project-phone { position: absolute; right: 12px; bottom: -18%; width: 21%; border-radius: 10px; border: 3px solid #1a1d24; box-shadow: 0 16px 30px rgba(0, 0, 0, 0.7); transition: transform 0.4s; }
.project:hover .project-phone { transform: translateY(-10%); }
.browser-bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.browser-bar span { margin-left: 8px; font-size: 9.5px; color: var(--mute); text-transform: none; }
.shot-progress { margin-left: auto; font-size: 9px; font-weight: 400; color: var(--blue-2); }

/* Montaje píxel a píxel: la imagen nítida y el móvil aparecen cuando aterrizan las partículas */
.work-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
.has-work-fx .project-shot > img:not(.project-phone) { opacity: 0; transition: opacity 0.45s, transform 0.6s cubic-bezier(.2,.7,.2,1); }
.has-work-fx .project-phone { opacity: 0; transform: translateY(40%); transition: opacity 0.5s 0.1s, transform 0.7s 0.1s cubic-bezier(.2,.7,.2,1); }
.has-work-fx .is-built .project-shot > img:not(.project-phone) { opacity: 1; }
.has-work-fx .is-built .project-phone { opacity: 1; transform: none; }
.has-work-fx .project.is-built:hover .project-phone { transform: translateY(-10%); }
.has-work-fx .team-photo img { opacity: 0; transition: opacity 0.6s; }
.has-work-fx .team-photo.is-built img { opacity: 1; }

/* HUD de depuración (tecla D) */
.debug-hud { position: fixed; left: 16px; bottom: 16px; z-index: 60; margin: 0; padding: 12px 14px; background: rgba(6, 7, 10, 0.85); border: 1px solid var(--line-2); border-radius: 10px; backdrop-filter: blur(8px); font: 11px/1.6 var(--f-mono); color: var(--blue-2); pointer-events: none; }

.project-body { display: flex; flex-direction: column; gap: 0.7rem; padding: 20px 22px 22px; flex: 1; }
.project-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.project-cat { color: var(--blue-2); }
.status { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--green); font-size: 10px; }
.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.is-soon { color: var(--amber); }
.project h3 { font-size: 1.35rem; }
.project-desc { color: var(--ink-2); font-size: 14px; }
.project .checks { flex: 1; }
.project-foot { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.project-model { font-size: 13px; font-weight: 500; }
.project-model span { display: block; color: var(--mute); margin-bottom: 0.15rem; }
.project-link { font-size: 13px; font-weight: 600; color: var(--blue-2); }

/* Destacados: ocupan la fila entera, captura a la izquierda */
.project.is-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.45fr 1fr; }
.project.is-featured .project-shot { border-bottom: 0; border-right: 1px solid var(--line); }
.project.is-featured .project-shot > img:not(.project-phone) { aspect-ratio: auto; height: 100%; min-height: 380px; }
.project.is-featured .project-phone { width: 17%; bottom: 20px; right: 20px; }
.project.is-featured .project-body { padding: 28px 30px; }
.project.is-featured h3 { font-size: 1.9rem; }
.project.is-featured .checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1.2rem; flex: 0; }
.project.is-featured .project-foot { flex-direction: row; justify-content: space-between; align-items: flex-end; margin-top: auto; }

/* Stack */
.stack-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
.stack { display: flex; flex-direction: column; }
.stack-row { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stack-row:first-child { border-top: 1px solid var(--line); }
.stack-row > span { color: var(--mute); }

/* Equipo */
.team { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.team-photo { border-radius: var(--r); background: radial-gradient(ellipse 70% 70% at 50% 65%, rgba(42, 91, 255, 0.4), transparent 72%); border-bottom: 1px solid var(--line-2); }
.team-people { display: flex; flex-direction: column; gap: 1.6rem; }
.person h3 { font-size: 1.3rem; }
.person .role { color: var(--blue-2); display: block; margin: 0.3rem 0 0.7rem; }
.person p { color: var(--ink-2); font-size: 14px; margin-bottom: 0.8rem; }
blockquote { font-family: var(--f-serif); font-style: italic; font-size: 1.35rem; line-height: 1.3; padding-left: 1.1rem; border-left: 2px solid var(--blue); }
blockquote cite { display: block; font-style: normal; color: var(--mute); margin-top: 0.6rem; }

.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 64px; }
.timeline li { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.timeline span { color: var(--blue-2); }
.timeline h4 { font-size: 15px; font-weight: 600; margin: 0.45rem 0 0.3rem; }
.timeline p { color: var(--ink-2); font-size: 13px; }

/* Contacto */
.section-cta { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; display: flex; align-items: center; background: var(--bg-2); border-top: 1px solid var(--line); }
/* Agujero negro a la derecha; el contenido en una columna a la izquierda */
.bh-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 1.2s; }
.has-bh-fx .bh-canvas { opacity: 1; }
.bh-hud { position: absolute; right: 24px; bottom: 14px; color: var(--mute); font-size: 10px; pointer-events: none; }
.cta-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 540px); gap: 36px; }
.has-bh-fx .cta-grid h2, .has-bh-fx .cta-grid p { text-shadow: 0 2px 20px var(--bg-2); }
.cta-grid p { color: var(--ink-2); margin: 0.9rem 0 1.5rem; font-size: 16px; max-width: 500px; }
.cta-topics { display: flex; flex-direction: column; }
.cta-topics a { display: flex; justify-content: space-between; padding: 18px 4px; border-bottom: 1px solid var(--line-2); font-size: 17px; font-weight: 500; transition: color 0.2s, padding 0.25s; }
.cta-topics li:first-child a { border-top: 1px solid var(--line-2); }
.cta-topics a:hover { color: var(--blue-2); padding-left: 12px; }

/* Footer */
.footer { padding: 56px 0 28px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 2fr; gap: 32px; }
.footer p, .footer li { color: var(--ink-2); font-size: 13px; }
.footer p { margin: 0.6rem 0; }
.footer-grid > div:first-child > a:last-child { color: var(--blue-2); font-size: 13px; }
.footer h4 { color: var(--mute); font-weight: 500; margin-bottom: 0.9rem; }
.footer li { margin-bottom: 0.35rem; }
.footer-products ul { columns: 3; column-gap: 1.5rem; }
.footer-products a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--mute); }

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 1080px) {
  .projects { grid-template-columns: 1fr 1fr; }
  .project.is-featured { grid-template-columns: 1fr; }
  .project.is-featured .project-shot { border-right: 0; border-bottom: 1px solid var(--line); }
  .project.is-featured .project-shot > img:not(.project-phone) { min-height: 0; aspect-ratio: 16 / 10; }
}
@media (max-width: 860px) {
  .nav-links a:not(.btn) { display: none; }
  .hero-grid, .team, .cta-grid, .stack-grid { grid-template-columns: 1fr; }
  .has-bh-fx .section-cta { align-items: flex-end; padding-top: 46vh; }
  /* Móvil: el escenario queda fijo arriba y las tarjetas pasan por debajo */
  .svc-scroll { grid-template-columns: 1fr; gap: 0; }
  .svc-stage { height: 42vh; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); }
  .svc-meta { bottom: 10px; }
  .svc-list { gap: 30vh; padding: 8vh 0 30vh; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
  .steps, .timeline { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(3)::before { left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-products { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .section { padding: 72px 0; }
  .wrap { padding: 0 16px; }
  .projects, .steps, .timeline, .no-webgl .svc-list { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding-left: 0; border-left: 0; }
  .steps li + li::before { left: 0; }
  .project.is-featured .checks { grid-template-columns: 1fr; }
  .project.is-featured .project-foot { flex-direction: column; align-items: flex-start; }
  .stack-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .footer-products ul { columns: 2; }
}
@media (pointer: coarse) { .hero-hint { display: none; } }
