/* ==========================================================================
   ticonline | ilustración de la página «Desarrollo web»
   Un navegador que se construye, el código, el móvil y las mediciones.
   ========================================================================== */

/* Navegador */
.mk-browser {
  position: absolute; left: 0; top: 0; width: 80%; aspect-ratio: 16 / 11.8; overflow: hidden;
  container-type: inline-size;
  background: var(--tile); color: var(--tile-ink);
  border: 1px solid rgba(255, 232, 205, 0.5); border-radius: 12px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.mk-bar {
  display: flex; align-items: center; gap: 1.2cqw; height: 6.4cqw; padding: 0 2.4cqw;
  background: #f1e8db; border-bottom: 1px solid var(--tile-line);
}
.mk-bar > i { width: 1.5cqw; height: 1.5cqw; border-radius: 50%; background: #d3c2ab; }
.mk-url {
  display: flex; align-items: center; gap: 1cqw; margin-left: 2cqw; padding: 0 2cqw; height: 3.6cqw; flex: 0 1 38cqw;
  background: #fff; border-radius: 99px; font-size: 1.8cqw; color: var(--tile-muted); white-space: nowrap;
}
.mk-url svg { width: 1.8cqw; height: 1.8cqw; flex: none; }
.mk-live {
  display: inline-flex; align-items: center; gap: 0.9cqw; margin-left: auto; padding: 0.7cqw 1.8cqw;
  background: var(--ok-bg); color: var(--ok); border-radius: 99px; font-size: 1.7cqw; font-weight: 500; white-space: nowrap;
}
.mk-live b { width: 1.1cqw; height: 1.1cqw; border-radius: 50%; background: currentColor; }

.mk-site { display: grid; gap: 3.2cqw; padding: 3cqw 4cqw; }
.mk-site .part { transition: background-color 350ms, color 350ms; }
.mk-nav { display: flex; align-items: center; gap: 3cqw; font-size: 1.8cqw; color: var(--tile-muted); border-radius: 1cqw; }
.mk-nav strong, .mk-m-nav strong { display: inline-flex; align-items: baseline; gap: 0.3cqw; margin-right: auto; font-size: 2.6cqw; font-weight: 600; letter-spacing: -0.04em; color: var(--tile-ink); }
.mk-nav strong i, .mk-m-nav strong i { width: 0.8cqw; height: 0.8cqw; border-radius: 50%; background: var(--tile-accent); }
.mk-nav em { font-style: normal; padding: 1cqw 2.2cqw; border-radius: 99px; background: var(--tile-accent); color: #fff8ef; font-weight: 500; }

.mk-hero { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 4cqw; }
.mk-hero__text { display: grid; gap: 1.6cqw; justify-items: start; }
.mk-hero h4, .mk-phone h4 { margin: 0; font-size: 4.6cqw; font-weight: 600; line-height: 1.04; letter-spacing: -0.04em; text-wrap: balance; border-radius: 1cqw; }
.mk-hero p, .mk-phone p { margin: 0; font-size: 1.8cqw; line-height: 1.4; color: var(--tile-muted); border-radius: 1cqw; }
.mk-btn { display: inline-block; padding: 1.3cqw 2.8cqw; border-radius: 99px; background: var(--tile-accent); color: #fff8ef; font-size: 1.7cqw; font-weight: 500; }
.mk-img {
  aspect-ratio: 4 / 2.9; border-radius: 2cqw;
  background:
    radial-gradient(60% 60% at 28% 30%, #7ea3e6, transparent 62%),
    radial-gradient(70% 70% at 82% 84%, #2c5aa0, transparent 70%),
    #0f1f3d;
}
.mk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2cqw; }
.mk-card { display: grid; gap: 0.5cqw; padding: 1.8cqw; background: #fff; border: 1px solid var(--tile-line); border-radius: 1.8cqw; }
.mk-card i { width: 3cqw; height: 3cqw; margin-bottom: 0.8cqw; border-radius: 0.9cqw; background: #dbe6f7; }
.mk-card b { font-size: 1.9cqw; font-weight: 600; }
.mk-card span { font-size: 1.5cqw; color: var(--tile-muted); }

/* Esqueleto: con JS, cada pieza empieza como un bloque gris y se «construye» con .is-built */
.js-build .mk-site .part:not(.is-built) { background: var(--wire); color: transparent; border-color: transparent; }
.js-build .mk-site .part:not(.is-built) > * { visibility: hidden; }
.js-build .mk-site .mk-btn.part:not(.is-built) { background: var(--wire); }

/* Código (solo aparece durante el paso 2) */
.mk-code {
  position: absolute; right: 0; top: 16%; width: 50%; overflow: hidden;
  background: #160e09; border: 1px solid rgba(248, 238, 226, 0.14); border-radius: 12px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.8);
  opacity: 0; visibility: hidden;
}
.mk-code__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid rgba(248, 238, 226, 0.1); }
.mk-code__bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(248, 238, 226, 0.22); }
.mk-code__bar span { margin-left: 8px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--img-muted); }
.mk-code pre { margin: 0; padding: 14px 16px 18px; overflow: hidden; font-family: var(--font-mono); font-size: clamp(0.6875rem, 1.55cqw, 0.9rem); line-height: 1.7; color: var(--img-fg); }
.mk-code code { display: block; font: inherit; }
.mk-code .ln { display: block; white-space: pre; }
.mk-code u { text-decoration: none; color: var(--img-accent); }
.mk-code s { text-decoration: none; color: #cfd9ea; }
.mk-code q { quotes: none; color: #c9d9a8; }
.mk-code i { font-style: normal; color: #cfd9ea; }

/* Móvil */
.mk-phone {
  position: absolute; right: 1%; bottom: 0; width: 26%; aspect-ratio: 9 / 18.5;
  container-type: inline-size;
}
/* El marco va en un hijo: los cqw de un contenedor se miden contra su propio ancestro, no contra él */
.mk-phone__shell {
  height: 100%; padding: 2.6cqw; background: #1b120c;
  border: 1px solid rgba(248, 238, 226, 0.22); border-radius: 15cqw;
  box-shadow: 0 40px 70px -26px rgba(0, 0, 0, 0.85);
}
.mk-phone__screen {
  position: relative; height: 100%; overflow: hidden; display: grid; align-content: start; justify-items: start; gap: 5cqw;
  padding: 16cqw 7cqw 7cqw; background: var(--tile); color: var(--tile-ink); border-radius: 12.4cqw;
}
.mk-phone__notch { position: absolute; left: 50%; top: 3.6cqw; width: 30cqw; height: 6.4cqw; translate: -50% 0; border-radius: 99px; background: #0d0704; }
.mk-m-nav { display: flex; align-items: center; width: 100%; }
.mk-m-nav strong { font-size: 7cqw; }
.mk-burger { display: grid; gap: 1.4cqw; }
.mk-burger b { display: block; width: 7cqw; height: 0.9cqw; border-radius: 1px; background: var(--tile-ink); }
.mk-phone h4 { font-size: 11.5cqw; }
.mk-phone p { font-size: 5.4cqw; }
.mk-phone .mk-btn { padding: 3cqw 6.4cqw; font-size: 5cqw; }
.mk-phone .mk-img { width: 100%; border-radius: 5cqw; }

/* Puntuaciones */
.mk-score {
  position: absolute; left: 5%; bottom: 0; width: 56%; padding: 12px 18px 14px;
  background: rgba(27, 18, 12, 0.88); border: 1px solid rgba(248, 238, 226, 0.16); border-radius: 16px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.mk-score p { margin: 0 0 10px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--img-muted); }
.mk-score ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mk-score li { position: relative; display: grid; justify-items: center; gap: 6px; }
.mk-score svg { width: clamp(44px, 9cqw, 64px); height: auto; rotate: -90deg; overflow: visible; }
.mk-score circle { fill: none; stroke-width: 3; }
.mk-score .t { stroke: rgba(248, 238, 226, 0.16); }
.mk-score .v { stroke: var(--img-accent); stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: 5; }
.mk-score b { position: absolute; top: clamp(15px, 3.1cqw, 22px); left: 0; right: 0; text-align: center; font-size: clamp(0.8125rem, 1.8cqw, 1rem); font-weight: 500; font-variant-numeric: tabular-nums; }
.mk-score span { font-size: 0.75rem; color: var(--img-muted); text-align: center; line-height: 1.2; }

/* Móvil */
@media (max-width: 860px) {
  .mk-browser { width: 84%; }
  .mk-phone { width: 30%; }
  .mk-code { width: 64%; top: 12%; }
  .mk-score { left: 2%; width: 68%; padding: 10px 12px 12px; }
}
