/* ==========================================================================
   Digital Sandbox Services — sitio corporativo
   Sistema de marca: verde #00C88A (señal), negro #0A0A0A (autoridad),
   gris #F6F6F6 (lienzo), arena #CDC0A4 (calidez puntual).
   DM Sans (todo) · DM Mono (datos/specs) · Outfit (logo, en SVG).
   ========================================================================== */

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

:root {
    --ink: #0a0a0a;
    --ink-panel: #14171c;      /* superficie de UI sobre negro */
    --ink-line: rgba(246, 246, 246, 0.14);
    --paper: #f6f6f6;
    --white: #ffffff;
    --green: #00c88a;
    --green-deep: #00734f;
    --green-text: #007a55;     /* verde con contraste sobre claro */
    --sand: #cdc0a4;
    --sand-soft: #f2eee4;
    --grafito: #2b2b2b;
    --muted: #6a6a6a;
    --muted-on-ink: #9aa0a6;
    --line: #e3e3e3;

    --measure: 62ch;           /* longitud de línea de lectura */
    --pad-x: clamp(20px, 5vw, 72px);
    --section-y: clamp(72px, 10vw, 140px);
    --radius: 16px;
    --radius-sm: 10px;

    --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'DM Mono', ui-monospace, 'SFMono-Regular', 'Consolas', monospace;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    background: var(--green);
    color: var(--ink);
}

/* ---------- utilidades de estructura ---------- */

.wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: var(--pad-x);
}

.section {
    padding-block: var(--section-y);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--green-text);
    margin-bottom: 22px;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--green);
}

.eyebrow--on-ink {
    color: var(--green);
}

.lead {
    max-width: var(--measure);
    font-size: clamp(1.05rem, 1.4vw, 1.28rem);
    line-height: 1.55;
    color: var(--grafito);
}

/* Titulares: DM Sans como elemento activo, tracking cerrado. */
.h-display {
    font-weight: 700;
    font-size: clamp(2.6rem, 6.4vw, 5.1rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
}

.h-section {
    font-weight: 700;
    font-size: clamp(2rem, 3.8vw, 3.15rem);
    line-height: 1.03;
    letter-spacing: -0.025em;
}

/* ---------- botones ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    padding: 15px 24px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease,
        border-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
    background: var(--green);
    color: var(--ink);
    border-color: var(--green);
}

.btn-primary:hover {
    background: #35d9a3;
    border-color: #35d9a3;
}

.btn-ghost-ink {
    background: transparent;
    color: var(--paper);
    border-color: var(--ink-line);
}

.btn-ghost-ink:hover {
    border-color: var(--paper);
}

.btn-ghost-light {
    background: transparent;
    color: var(--ink);
    border-color: #cfcfcf;
}

.btn-ghost-light:hover {
    border-color: var(--ink);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}

/* ==========================================================================
   NAV
   ========================================================================== */

.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.nav.is-stuck {
    background: rgba(10, 10, 10, 0.86);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--ink-line);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px var(--pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
}

.nav-logo img {
    height: 26px;
    width: auto;
}

.nav-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 5px;
    border: 1px solid rgba(246, 246, 246, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.nav-link {
    font-size: 0.92rem;
    color: var(--paper);
    opacity: 0.8;
    transition: opacity 0.25s ease, color 0.35s ease;
}

.nav-menu .nav-link {
    position: relative;
    z-index: 1;
    padding: 8px 16px;
    border-radius: 999px;
    white-space: nowrap;
}

.nav-link:hover {
    opacity: 1;
}

.nav-menu .nav-link.is-active {
    color: var(--ink);
    opacity: 1;
}

/* pastilla que se desliza a la sección activa */
.nav-indicator {
    position: absolute;
    z-index: 0;
    top: 5px;
    left: 0;
    height: calc(100% - 10px);
    width: var(--w, 0px);
    border-radius: 999px;
    background: var(--paper);
    transform: translateX(var(--x, 0px));
    opacity: 0;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
        width 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    pointer-events: none;
}

.nav-indicator.is-on {
    opacity: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav .btn {
    padding: 11px 20px;
    font-size: 0.92rem;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--ink-line);
    border-radius: 10px;
    cursor: pointer;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--paper);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* panel móvil: oculto por defecto (escritorio); se activa en el breakpoint */
.nav-panel { display: none; }

/* ==========================================================================
   HÉROE (portada negra)
   ========================================================================== */

.hero {
    position: relative;
    background: var(--ink);
    color: var(--paper);
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-top: clamp(110px, 14vh, 150px);
    padding-bottom: clamp(56px, 8vh, 96px);
    overflow: hidden;
}

.hero > .wrap {
    width: 100%;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(36px, 5vw, 72px);
    align-items: center;
}

.hero-copy h1 {
    color: var(--paper);
}

.hero-copy .lead {
    color: #c9ced3;
    margin-top: 24px;
    font-size: clamp(1rem, 1.2vw, 1.14rem);
    max-width: 50ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 38px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 26px 40px;
    margin-top: 54px;
    padding-top: 30px;
    border-top: 1px solid var(--ink-line);
}

.hero-meta div {
    min-width: 120px;
}

.hero-meta dt {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--muted-on-ink);
    margin-bottom: 6px;
}

.hero-meta dd {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--paper);
}

/* ---------- consola del sandbox (artefacto del héroe) ---------- */

.console {
    position: relative;
    background: var(--ink-panel);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius);
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    font-size: 0.94rem;
}

.console-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--ink-line);
    background: rgba(255, 255, 255, 0.02);
}

.console-id {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted-on-ink);
}

.console-id b {
    color: var(--paper);
    font-weight: 500;
}

.console-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--green);
}

.console-live::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(0, 200, 138, 0.5);
    animation: pulse 2.4s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 200, 138, 0.5); }
    70% { box-shadow: 0 0 0 7px rgba(0, 200, 138, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 200, 138, 0); }
}

.console-body {
    padding: 20px 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* oculto solo cuando JS anima la consola; sin JS se ve completa */
.js-anim .c-line {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(4px);
}

.js-anim .c-line {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.js-anim .c-line.show {
    opacity: 1;
    transform: none;
    filter: none;
}

/* sin JS o con reduced-motion, todo visible */
.no-anim .c-line {
    opacity: 1;
    transform: none;
}

.c-role {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--muted-on-ink);
    margin-bottom: 6px;
}

.c-msg {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ink-line);
    border-radius: 10px;
    padding: 12px 14px;
    color: #e7e9ec;
}

.c-msg--user {
    background: rgba(0, 200, 138, 0.09);
    border-color: rgba(0, 200, 138, 0.28);
}

.c-action {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--green);
    padding-left: 2px;
}

.c-action svg {
    width: 15px;
    height: 15px;
    flex: none;
}

.c-figure {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 4px;
}

.c-figure b {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--paper);
}

.c-figure span {
    font-size: 0.82rem;
    color: var(--muted-on-ink);
}

.console-note {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--muted-on-ink);
    text-align: right;
    margin-top: 12px;
}

/* ==========================================================================
   QUÉ CONSTRUIMOS — lista editorial (no rejilla de tarjetas)
   ========================================================================== */

.build {
    background: var(--white);
}

.build-head {
    max-width: 780px;
    margin-bottom: clamp(40px, 5vw, 68px);
}

.build-head p {
    margin-top: 22px;
}

.build-list {
    border-top: 1px solid var(--line);
}

.build-item {
    display: grid;
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
    gap: clamp(20px, 4vw, 64px);
    padding-block: clamp(28px, 3.4vw, 44px);
    border-bottom: 1px solid var(--line);
}

.build-item-title {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.build-item h3 {
    font-size: clamp(1.4rem, 2vw, 1.95rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.build-spec {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    color: var(--green-text);
}

.build-item-body p {
    max-width: var(--measure);
    color: var(--grafito);
    font-size: 1.03rem;
}

.build-eg {
    margin-top: 16px;
    padding-left: 16px;
    border-left: 2px solid var(--green);
    color: var(--muted);
    font-size: 0.95rem;
}

.build-eg b {
    color: var(--ink);
    font-weight: 600;
}

/* ==========================================================================
   FRANJA-TESIS (portada negra con marca de agua)
   ========================================================================== */

.thesis {
    position: relative;
    background: var(--ink);
    color: var(--paper);
    overflow: hidden;
}

.thesis-mark {
    position: absolute;
    right: -40px;
    bottom: -30px;
    width: min(46%, 460px);
    opacity: 0.06;
    pointer-events: none;
}

.thesis-inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.thesis h2 {
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.thesis h2 em {
    font-style: normal;
    color: var(--green);
}

.thesis p {
    max-width: var(--measure);
    margin-top: 26px;
    color: #d5d8dc;
    font-size: clamp(1.02rem, 1.3vw, 1.2rem);
}

/* ==========================================================================
   CÓMO TRABAJAMOS — secuencia real (numerada)
   ========================================================================== */

.process {
    background: var(--paper);
}

.process-head {
    max-width: 720px;
    margin-bottom: clamp(40px, 5vw, 64px);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 40px);
    counter-reset: step;
    list-style: none;
}

.process-step {
    position: relative;
    padding-top: 26px;
    border-top: 2px solid var(--ink);
}

.process-step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--green-text);
    display: block;
    margin-bottom: 16px;
}

.process-step h3 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 10px;
}

.process-step p {
    color: var(--grafito);
    font-size: 1rem;
}

/* ==========================================================================
   DEL SANDBOX A PRODUCCIÓN — sistemas construidos
   ========================================================================== */

.work {
    background: var(--white);
}

.work-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(36px, 4vw, 56px);
}

.work-head .lead {
    margin-top: 18px;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 24px);
}

.work-card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(24px, 2.6vw, 34px);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.work-card:hover {
    border-color: var(--ink);
    transform: translateY(-3px);
}

.work-card--wide {
    grid-column: 1 / -1;
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.work-tag {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.03em;
    color: var(--green-text);
    margin-bottom: 18px;
}

.work-card--wide .work-tag {
    color: var(--green);
}

.work-card h3 {
    font-size: clamp(1.25rem, 1.7vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.14;
    margin-bottom: 12px;
}

.work-card p {
    color: var(--grafito);
    font-size: 1rem;
    max-width: 52ch;
}

.work-card--wide p {
    color: #d5d8dc;
}

.work-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--ink-line);
}

.work-metrics div b {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--green);
}

.work-metrics div span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted-on-ink);
}

/* ==========================================================================
   FUNDADOR — composición de foto en capas + stats
   ========================================================================== */

.founder {
    background: var(--sand-soft);
}

.founder-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(36px, 6vw, 96px);
    align-items: center;
}

/* --- composición de imagen (izquierda) --- */
.founder-media {
    position: relative;
    padding: 26px 26px 40px 20px;
}

/* bloque verde detrás, arriba-izquierda */
.fdr-shape {
    position: absolute;
    top: 0;
    left: 0;
    width: 58%;
    height: 56%;
    background: var(--green-deep);
    border-radius: 20px;
    z-index: 1;
}

/* contorno verde fino que asoma a la izquierda */
.fdr-outline {
    position: absolute;
    left: 0;
    top: 42%;
    width: 66px;
    height: 40%;
    border: 1.5px solid var(--green);
    border-radius: 18px;
    z-index: 1;
}

/* foto principal */
.fdr-photo-main {
    position: relative;
    z-index: 3;
    width: 84%;
    margin-left: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 30px 60px -32px rgba(0, 48, 37, 0.45);
}

/* segunda foto (B/N), abajo-izquierda, superpuesta */
.fdr-photo-sub {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 4;
    width: 40%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    border: 5px solid var(--sand-soft);
    filter: grayscale(1) contrast(1.05);
}

/* trama de puntos, abajo-derecha */
.fdr-dots {
    position: absolute;
    right: 0;
    bottom: 30px;
    width: 96px;
    height: 66px;
    z-index: 1;
    background-image: radial-gradient(rgba(0, 48, 37, 0.28) 1.4px, transparent 1.4px);
    background-size: 13px 13px;
}

/* --- texto (derecha) --- */
.founder-eyebrow {
    color: var(--green-text);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
}

.founder-quote {
    font-size: clamp(1.4rem, 2.5vw, 2.15rem);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 28px;
}

.founder-name {
    font-weight: 700;
    font-size: 1.15rem;
}

.founder-role {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--green-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 5px;
}

.founder-bio {
    max-width: var(--measure);
    color: var(--grafito);
    margin-top: 20px;
    font-size: 1rem;
}

/* fila de stats */
.founder-stats {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 3vw, 36px);
    margin-top: clamp(32px, 4vw, 44px);
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.founder-stats li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.founder-stats li + li {
    padding-left: clamp(16px, 3vw, 36px);
    border-left: 1px solid var(--line);
}

.founder-stats svg {
    width: 26px;
    height: 26px;
    color: var(--green-text);
    margin-bottom: 8px;
}

.founder-stats b {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.founder-stats span {
    font-size: 0.88rem;
    color: var(--muted);
}

/* ==========================================================================
   NOTAS / FORO
   ========================================================================== */

.notes {
    background: var(--paper);
}

.notes-head {
    max-width: 720px;
    margin-bottom: clamp(36px, 4vw, 56px);
}

.notes-head .lead {
    margin-top: 18px;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 24px);
}

.note {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(22px, 2.4vw, 30px);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.note:hover {
    border-color: var(--ink);
    transform: translateY(-3px);
}

.note-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
}

.note-tag {
    color: var(--green-text);
    letter-spacing: 0.02em;
}

.note-date {
    color: var(--muted);
}

.note h3 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.22;
}

.note p {
    color: var(--grafito);
    font-size: 0.97rem;
}

.note-link {
    margin-top: auto;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--green-text);
    border-bottom: 1.5px solid transparent;
    align-self: flex-start;
    transition: border-color 0.18s ease;
}

.note-link:hover {
    border-bottom-color: var(--green);
}

/* cabecera de notas con acceso al banco completo */
.notes-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px 40px;
    margin-bottom: clamp(36px, 4vw, 56px);
}

.notes-top .notes-head { margin-bottom: 0; }

.notes-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border: 1.5px solid #cfcfcf;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: border-color 0.2s ease;
}

.notes-all svg {
    width: 16px;
    height: 16px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.notes-all:hover { border-color: var(--ink); }
.notes-all:hover svg { transform: translateX(4px); }

.note-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.note-read {
    color: var(--muted);
}

.note-read::before {
    content: "·";
    margin-right: 8px;
}

.note h3 a {
    transition: color 0.2s ease;
}

.note h3 a:hover {
    color: var(--green-text);
}

/* ==========================================================================
   CTA + CONTACTO (portada negra)
   ========================================================================== */

.contact {
    background: var(--ink);
    color: var(--paper);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(36px, 5vw, 80px);
    align-items: start;
}

.contact-copy h2 {
    color: var(--paper);
}

.contact-copy .lead {
    color: #d5d8dc;
    margin-top: 22px;
}

.contact-points {
    list-style: none;
    margin-top: 34px;
    display: grid;
    gap: 16px;
}

.contact-points li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: #e7e9ec;
    font-size: 1rem;
}

.contact-points svg {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    color: var(--green);
}

.contact-direct {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 30px;
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--ink-line);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--muted-on-ink);
}

.contact-direct a:hover {
    color: var(--green);
}

/* formulario */
.contact-form {
    background: var(--ink-panel);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius);
    padding: clamp(24px, 3vw, 36px);
    display: grid;
    gap: 14px;
}

.field label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--muted-on-ink);
    margin-bottom: 7px;
}

.field input,
.field textarea {
    width: 100%;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--paper);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #6d7378;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--green);
    background: rgba(0, 200, 138, 0.05);
    outline: none;
}

.field textarea {
    min-height: 110px;
    resize: vertical;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.contact-form .btn {
    margin-top: 6px;
    width: 100%;
}

.form-foot {
    font-size: 0.82rem;
    color: var(--muted-on-ink);
}

.form-foot a {
    color: var(--green);
    border-bottom: 1px solid transparent;
}

.form-foot a:hover {
    border-bottom-color: var(--green);
}

.form-msg {
    font-size: 0.9rem;
    min-height: 1.2em;
}

.form-msg.error { color: #ff9d8a; }
.form-msg.success { color: var(--green); }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    background: var(--ink);
    color: var(--paper);
    border-top: 1px solid var(--ink-line);
    padding-block: clamp(48px, 6vw, 76px);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: clamp(32px, 4vw, 60px);
}

.footer-logo {
    height: 26px;
    width: auto;
    margin-bottom: 20px;
}

.footer-about {
    max-width: 42ch;
    color: var(--muted-on-ink);
    font-size: 0.95rem;
}

.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    color: var(--green);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: #c9cdd1;
    font-size: 0.96rem;
    padding-block: 5px;
    transition: color 0.16s ease;
}

.footer-col a:hover {
    color: var(--paper);
}

.footer-base {
    max-width: 1200px;
    margin: clamp(40px, 5vw, 60px) auto 0;
    padding: 24px var(--pad-x) 0;
    border-top: 1px solid var(--ink-line);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted-on-ink);
}

/* ==========================================================================
   MOTION — capa "PRO" (ligera, GPU, apagable)
   ========================================================================== */

/* barra de progreso de lectura */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--green-deep), var(--green));
    z-index: 60;
    will-change: transform;
}

/* aura del héroe */
.hero-aurora {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-aurora span {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    will-change: transform;
}

.hero-aurora .aur-1 {
    width: min(52vw, 560px);
    height: min(52vw, 560px);
    top: -160px;
    right: -90px;
    background: radial-gradient(circle, rgba(0, 200, 138, 0.30), transparent 68%);
    animation: aur-drift-1 20s ease-in-out infinite;
}

.hero-aurora .aur-2 {
    width: min(46vw, 480px);
    height: min(46vw, 480px);
    bottom: -180px;
    left: -80px;
    background: radial-gradient(circle, rgba(0, 115, 79, 0.42), transparent 70%);
    animation: aur-drift-2 26s ease-in-out infinite;
}

@keyframes aur-drift-1 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-40px, 34px, 0) scale(1.12); }
}

@keyframes aur-drift-2 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(46px, -30px, 0) scale(1.1); }
}

/* consola: tilt 3D + magnético. Los valores los interpola JS cuadro a cuadro
   (suavizado tipo planet-jumping), por eso no lleva transición de transform. */
.console {
    --console-tilt: perspective(1000px) translate3d(var(--ctx, 0px), var(--cty, 0px), 0)
        rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transform: var(--console-tilt);
}

.console-scan {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 42%;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(0, 200, 138, 0.09), transparent);
    opacity: 0;
    mix-blend-mode: screen;
    animation: scan 6.5s ease-in-out 1.2s infinite;
}

@keyframes scan {
    0% { transform: translateY(-60%); opacity: 0; }
    12% { opacity: 1; }
    60% { opacity: 1; }
    80%, 100% { transform: translateY(230%); opacity: 0; }
}

/* reveal por scroll (solo si el usuario acepta movimiento) */
@media (prefers-reduced-motion: no-preference) {
    /* entrada con blur (planet-jumping) + ease [0.16,1,0.3,1] (video-hero) */
    html.js-motion .reveal {
        opacity: 0;
        transform: translateY(26px) scale(0.985);
        filter: blur(8px);
        transition: opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
            transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
            filter 0.95s cubic-bezier(0.16, 1, 0.3, 1);
    }

    html.js-motion .reveal.in {
        opacity: 1;
        transform: none;
        filter: none;
    }

    /* coreografía del héroe (escalonada como video-hero: .5 → .6 → .8 → 1.0) */
    html.js-motion .hero-copy .reveal:nth-child(1) { transition-delay: 0.05s; }
    html.js-motion .hero-copy .reveal:nth-child(3) { transition-delay: 0.55s; }
    html.js-motion .hero-copy .reveal:nth-child(4) { transition-delay: 0.7s; }
    html.js-motion .hero-copy .reveal:nth-child(5) { transition-delay: 0.85s; }

    /* la consola entra desde abajo y luego conserva su tilt vivo */
    html.js-motion .console.reveal {
        transition-delay: 0.45s;
        transform: translateY(34px) scale(0.97);
    }

    html.js-motion .console.reveal.in {
        transform: var(--console-tilt);
    }

    html.js-motion .console.reveal.in.is-live {
        transition: opacity 0.3s ease, filter 0.3s ease;
    }
}

/* spotlight que sigue el cursor (tarjetas) */
.spot {
    position: relative;
}

.spot::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%),
        rgba(0, 200, 138, 0.07), transparent 65%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

/* el contenido queda por encima del brillo, sin teñirse */
.spot > * {
    position: relative;
    z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
    .spot:hover::before { opacity: 1; }
}

/* barrido de brillo en botón primario */
.btn-primary {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    transform: translateX(-160%) skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    z-index: -1;
    pointer-events: none;
}

@media (hover: hover) {
    .btn-primary:hover::after {
        transition: transform 0.7s ease;
        transform: translateX(320%) skewX(-18deg);
    }
}

/* ==========================================================================
   MOVIMIENTO CREATIVO — referencia: 3D Creator Portfolio
   (marquee por scroll, apilado sticky, titulares palabra a palabra, magnético)
   ========================================================================== */

/* --- Marquee / ticker de capacidades, reacciona al scroll --- */
.ticker {
    background: var(--ink);
    padding-block: clamp(30px, 5vw, 60px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.2vw, 16px);
}

.ticker-row {
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.ticker-track {
    display: inline-flex;
    align-items: center;
    flex: none;
    width: max-content;
    will-change: transform;
}

.ticker .tw {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 1;
    font-size: clamp(1.5rem, 4.6vw, 3.4rem);
    color: var(--paper);
    white-space: nowrap;
}

.ticker .tw--ghost {
    color: transparent;
    -webkit-text-stroke: 1px rgba(215, 226, 234, 0.34);
    text-stroke: 1px rgba(215, 226, 234, 0.34);
}

.ticker .dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green);
    margin-inline: clamp(20px, 3vw, 46px);
}

/* --- Mazo apilado de "Sistemas" (fórmula sticky de 3d-creator-portfolio) ---
   Tarjetas de altura uniforme: al apilarse solo asoma la franja-cabecera
   de las anteriores, nunca su contenido. */
.work-stack {
    --stack-top: 96px;
    --stack-off: 58px;
    --card-h: clamp(420px, calc(100vh - 290px), 540px);
    position: relative;
    margin-top: clamp(8px, 2vw, 20px);
}

.stack-item {
    position: sticky;
    top: var(--stack-top);
    min-height: 82vh;
}

.sys-card {
    position: relative;
    top: calc(var(--i, 0) * var(--stack-off));
    height: var(--card-h);
    display: flex;
    flex-direction: column;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid rgba(246, 246, 246, 0.1);
    border-radius: 28px;
    overflow: hidden;
    transform: scale(var(--s, 1));
    transform-origin: top center;
    box-shadow: 0 -24px 60px -34px rgba(0, 0, 0, 0.55);
}

/* oscurecimiento por profundidad (lo controla JS con --d) */
.sys-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #000;
    opacity: var(--d, 0);
    pointer-events: none;
    z-index: 3;
}

.sys-head {
    flex: none;
    height: var(--stack-off);
    display: flex;
    align-items: center;
    gap: 18px;
    padding-inline: clamp(22px, 3vw, 40px);
    border-bottom: 1px solid rgba(246, 246, 246, 0.08);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.sys-index {
    color: var(--green);
}

.sys-tag {
    color: var(--muted-on-ink);
    letter-spacing: 0.02em;
}

.sys-state {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted-on-ink);
}

.sys-state::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3a3f45;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.sys-card.is-active .sys-state::before {
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(0, 200, 138, 0.18);
}

.sys-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    gap: clamp(22px, 3vw, 48px);
    padding: clamp(24px, 3vw, 40px);
}

.sys-copy {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sys-copy h3 {
    font-size: clamp(1.45rem, 2.3vw, 2.1rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.022em;
    margin-bottom: 14px;
}

.sys-copy p {
    color: #b9bfc5;
    font-size: 1rem;
    max-width: 46ch;
}

.sys-copy .work-metrics {
    margin-top: auto;
}

.sys-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 22px;
}

.sys-chips li {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #d5d8dc;
    padding: 7px 12px;
    border: 1px solid rgba(246, 246, 246, 0.14);
    border-radius: 999px;
}

/* --- visual de cada tarjeta --- */
.sys-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 18px;
    background: var(--ink-panel);
    border: 1px solid var(--ink-line);
    padding: clamp(16px, 2vw, 24px);
    overflow: hidden;
}

.viz-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--muted-on-ink);
    margin-bottom: 18px;
}

.viz-val {
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--paper);
    letter-spacing: -0.02em;
}

.viz-chip {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 200, 138, 0.4);
    color: var(--green);
}

/* 1 · barras de flujo de caja */
.viz-bars {
    flex: 1;
    min-height: 90px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--ink-line);
}

.viz-bars i {
    flex: 1;
    height: calc(var(--h) * 100%);
    border-radius: 6px 6px 2px 2px;
    background: rgba(246, 246, 246, 0.12);
    transform: scaleY(0.08);
    transform-origin: bottom;
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.viz-bars i.is-hi {
    background: linear-gradient(180deg, var(--green), var(--green-deep));
}

.sys-card.is-active .viz-bars i { transform: scaleY(1); }
.sys-card.is-active .viz-bars i:nth-child(2) { transition-delay: 0.06s; }
.sys-card.is-active .viz-bars i:nth-child(3) { transition-delay: 0.12s; }
.sys-card.is-active .viz-bars i:nth-child(4) { transition-delay: 0.18s; }
.sys-card.is-active .viz-bars i:nth-child(5) { transition-delay: 0.24s; }
.sys-card.is-active .viz-bars i:nth-child(6) { transition-delay: 0.30s; }
.sys-card.is-active .viz-bars i:nth-child(7) { transition-delay: 0.36s; }

.viz-note {
    margin-top: 14px;
    font-size: 0.86rem;
    color: #c9ced3;
}

.viz-note b {
    color: var(--green);
    font-weight: 600;
}

/* 2 · documento con cita resaltada */
.viz-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.viz-lines i {
    display: block;
    width: var(--w);
    height: 8px;
    border-radius: 4px;
    background: rgba(246, 246, 246, 0.1);
    background-image: linear-gradient(90deg, rgba(0, 200, 138, 0.75), rgba(0, 200, 138, 0.75));
    background-repeat: no-repeat;
    background-size: 0% 100%;
    transition: background-size 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.sys-card.is-active .viz-lines i.is-hi { background-size: 100% 100%; }
.sys-card.is-active .viz-lines i.is-hi + i.is-hi { transition-delay: 0.35s; }

.viz-cite {
    margin-top: 16px;
    padding: 10px 12px;
    border-left: 2px solid var(--green);
    background: rgba(0, 200, 138, 0.07);
    font-size: 0.86rem;
    color: #d5d8dc;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease 0.6s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
}

.sys-card.is-active .viz-cite { opacity: 1; transform: none; }

/* 3 · flujo del agente */
.viz-steps {
    list-style: none;
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-left: 30px;
}

.viz-steps::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--ink-line);
}

.viz-steps::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    width: 2px;
    height: calc(100% - 16px);
    background: var(--green);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 1.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.sys-card.is-active .viz-steps::after { transform: scaleY(1); }

.viz-steps li {
    position: relative;
    font-size: 0.92rem;
    color: var(--muted-on-ink);
    transition: color 0.4s ease;
}

.viz-steps li small {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #6d7378;
    margin-top: 2px;
}

.viz-steps li::before {
    content: "";
    position: absolute;
    left: -30px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ink-panel);
    border: 2px solid #3a3f45;
    transition: border-color 0.4s ease, background-color 0.4s ease;
}

.sys-card.is-active .viz-steps li { color: var(--paper); }
.sys-card.is-active .viz-steps li::before { border-color: var(--green); background: var(--green); }
.sys-card.is-active .viz-steps li:nth-child(1),
.sys-card.is-active .viz-steps li:nth-child(1)::before { transition-delay: 0.1s; }
.sys-card.is-active .viz-steps li:nth-child(2),
.sys-card.is-active .viz-steps li:nth-child(2)::before { transition-delay: 0.55s; }
.sys-card.is-active .viz-steps li:nth-child(3),
.sys-card.is-active .viz-steps li:nth-child(3)::before { transition-delay: 1s; }
.sys-card.is-active .viz-steps li:nth-child(4),
.sys-card.is-active .viz-steps li:nth-child(4)::before { transition-delay: 1.45s; }

/* --- Titulares revelados palabra a palabra --- */
.js-motion .wr .word {
    display: inline-block;
    vertical-align: top;
    overflow: hidden;
    padding: 0.14em 0.03em;
    margin: -0.14em -0.03em;
}

.js-motion .wr .word-inner {
    display: inline-block;
    transform: translateY(112%) rotate(7deg);
    transform-origin: left bottom;
    filter: blur(6px);
    transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.95s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-motion .wr.in .word-inner {
    transform: none;
    filter: none;
}

/* --- Elemento magnético (foto del fundador) --- */
.magnet {
    will-change: transform;
    transition: transform 0.6s ease-in-out;
}

/* ==========================================================================
   EXPERIENCIA DE ENTRADA — referencias: planet-jumping-portal + video-hero
   ========================================================================== */

/* --- Secuencia de arranque (solo 1 vez por sesión) --- */
.boot {
    display: none;
}

html.boot-pending,
html.boot-pending body {
    overflow: hidden;
}

html.boot-pending .boot {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: block;
    background: var(--ink);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.9s ease;
}

.boot.is-leaving {
    opacity: 0;
    pointer-events: none;
}

.boot-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 200, 138, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 200, 138, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 55%);
    mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 55%);
}

.boot-count {
    position: absolute;
    left: 50%;
    bottom: clamp(26px, 5vh, 48px);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--paper);
}

.boot-count.is-leaving {
    animation: boot-count-out 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes boot-count-out {
    to { opacity: 0; filter: blur(7px); transform: translate(-50%, -34px); }
}

.boot-num {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    line-height: 1;
}

.boot-num #boot-value {
    font-size: clamp(3rem, 6vw, 4.2rem);
    font-weight: 400;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    min-width: 2.1ch;
    text-align: right;
}

.boot-pct {
    font-size: 1.4rem;
    padding-bottom: 6px;
    color: var(--green);
}

.boot-label {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    color: var(--muted-on-ink);
}

.boot-bar {
    width: min(220px, 50vw);
    height: 1px;
    background: rgba(246, 246, 246, 0.12);
    overflow: hidden;
}

.boot-bar i {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--green);
    transform: scaleX(var(--p, 0));
    transform-origin: left;
}

/* la marca que vuela del centro al nav */
.boot-mark {
    position: fixed;
    z-index: 160;
    left: 50%;
    top: 46%;
    width: clamp(84px, 9vw, 120px);
    transform: translate(-50%, -50%);
    will-change: left, top, width, transform;
    transition: left 1.25s cubic-bezier(0.16, 1, 0.3, 1),
        top 1.25s cubic-bezier(0.16, 1, 0.3, 1),
        width 1.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.25s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.45s ease;
    pointer-events: none;
    display: none;
}

html.boot-pending .boot-mark,
.boot-mark.is-docking {
    display: block;
}

.boot-mark img {
    width: 100%;
    display: block;
    animation: mark-breathe 2.4s ease-in-out infinite;
}

@keyframes mark-breathe {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(0, 200, 138, 0)); }
    50% { filter: drop-shadow(0 0 22px rgba(0, 200, 138, 0.45)); }
}

.boot-mark.is-docked {
    transform: none;
}

.boot-mark.is-docked img {
    animation: none;
}

.boot-mark.is-gone {
    opacity: 0;
}

html.boot-logo .nav-logo {
    opacity: 0;
}

.nav-logo {
    transition: opacity 0.5s ease;
}

/* --- entrada del nav (reveal-down de planet-jumping) --- */
html.js-motion body:not(.intro-ready) .nav-menu,
html.js-motion body:not(.intro-ready) .nav-actions {
    opacity: 0;
}

.intro-ready .nav-menu {
    animation: reveal-down 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.intro-ready .nav-actions {
    animation: reveal-down 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

@keyframes reveal-down {
    from { opacity: 0; filter: blur(8px); transform: translateY(-18px); }
    to { opacity: 1; filter: blur(0); transform: none; }
}

/* --- malla neuronal del héroe (canvas) --- */
.hero-mesh {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.5) 38%, #000 62%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.5) 38%, #000 62%);
}

/* entra con fade + escala 1.05 → 1 en 1.8s (video-hero) */
html.js-motion .hero-mesh {
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1), transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js-motion .intro-ready .hero-mesh {
    opacity: 1;
    transform: none;
}

/* --- titular del héroe: más contenido, con la última línea en vivo --- */
.hero-title {
    font-size: clamp(2.2rem, 4.2vw, 3.6rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.ht-dyn {
    display: block;
    white-space: nowrap;
}

.ht-rotate {
    border-radius: 6px;
    transition: background-color 0.25s ease;
}

.ht-rotate.is-selected {
    background: rgba(0, 200, 138, 0.28);
}

.ht-caret {
    display: inline-block;
    width: 0.07em;
    height: 0.86em;
    margin-left: 0.06em;
    vertical-align: -0.06em;
    background: var(--green);
    animation: caret-blink 1.05s steps(1) infinite;
}

.ht-caret.is-typing {
    animation: none;
    opacity: 1;
}

@keyframes caret-blink {
    50% { opacity: 0; }
}

html.js-motion body:not(.intro-ready) .ht-dyn {
    opacity: 0;
}

.ht-dyn {
    transition: opacity 0.6s ease 0.5s;
}

/* --- consola: salida de escenario con blur antes del siguiente --- */
.js-anim .c-line.show.is-out {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-8px);
}

.js-anim .c-line {
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.5s ease;
}

.console-id b,
.c-role {
    transition: opacity 0.3s ease;
}

/* --- cursor personalizado (planet-jumping) --- */
.cursor {
    display: none;
}

html.has-cursor .cursor {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

html.has-cursor .cursor.is-visible {
    opacity: 1;
}

html.has-cursor .cursor.is-hidden {
    opacity: 0;
}

html.has-cursor,
html.has-cursor a,
html.has-cursor button {
    cursor: none;
}

html.has-cursor input,
html.has-cursor textarea {
    cursor: text;
}

.cursor-dot-wrap,
.cursor-ring-wrap {
    position: absolute;
    left: 0;
    top: 0;
    will-change: transform;
}

.cursor-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    transform: translate(-50%, -50%);
}

.cursor-ring {
    position: absolute;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--green);
    transform: translate(-50%, -50%) scale(var(--cs, 1));
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.25s ease, border-color 0.25s ease;
}

.cursor.is-hover .cursor-ring {
    --cs: 1.55;
    background: rgba(0, 200, 138, 0.12);
}

.cursor.is-label .cursor-ring {
    --cs: 2.3;
    background: var(--green);
}

.cursor-label {
    position: absolute;
    transform: translate(-50%, -50%) translateY(4px);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    color: var(--ink);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cursor.is-label .cursor-label {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.cursor.is-label .cursor-dot {
    opacity: 0;
}

/* ==========================================================================
   MOTION — accesibilidad
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1100px) {
    .nav-menu .nav-link { padding: 8px 11px; font-size: 0.86rem; }
}

@media (max-width: 960px) {
    .hero-mesh {
        -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.55) 45%, #000 75%);
        mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.55) 45%, #000 75%);
    }
    .hero-grid { grid-template-columns: 1fr; gap: 44px; }
    .console { max-width: 520px; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .nav-menu,
    .nav-actions .btn { display: none; }

    .nav-toggle { display: flex; }

    .nav-panel {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.97);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--ink-line);
        padding: 8px var(--pad-x) 22px;
        display: none;
        flex-direction: column;
        gap: 4px;
    }

    .nav-panel.is-open { display: flex; }

    .nav-panel .nav-link {
        padding: 14px 0;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--ink-line);
    }

    .nav-panel .btn {
        margin-top: 16px;
        justify-content: center;
    }

    /* mazo de Sistemas: en móvil, lista normal (sin sticky ni escalado) */
    .stack-item { position: static; min-height: 0; margin-bottom: 16px; }
    .sys-card { top: 0; height: auto; transform: none !important; }
    .sys-card::after { display: none; }
    .sys-body { grid-template-columns: 1fr; }
    .sys-visual { min-height: 230px; }
    .sys-tag { display: none; }

    .build-item { grid-template-columns: 1fr; gap: 16px; }
    .process-steps { grid-template-columns: 1fr; gap: 8px; }
    .process-step { padding-block: 24px 4px; }
    .work-grid { grid-template-columns: 1fr; }
    .notes-grid { grid-template-columns: 1fr; }
    .founder-grid { grid-template-columns: 1fr; gap: 44px; }
    .founder-media { max-width: 440px; padding-bottom: 32px; }
}

@media (max-width: 560px) {
    .hero-title { font-size: clamp(1.8rem, 8.4vw, 2.2rem); }
    .field-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero-meta { gap: 20px 30px; }
    .btn { width: 100%; }
    .hero-actions .btn { width: 100%; }

    .founder-stats { grid-template-columns: 1fr; gap: 0; }
    .founder-stats li + li {
        border-left: none;
        border-top: 1px solid var(--line);
        padding-left: 0;
        padding-top: 16px;
        margin-top: 16px;
    }
    .founder-stats svg { margin-bottom: 4px; }
}

/* formulario: estado de envío y enlaces en mensajes */
.contact-form .btn:disabled { opacity: 0.65; cursor: progress; transform: none; }
.form-msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- cambio de idioma (ES / EN) ---------- */
.lang-switch {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid rgba(246, 246, 246, 0.28);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    color: var(--paper);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.25s ease, border-color 0.25s ease;
}

.lang-switch:hover,
.lang-switch:focus-visible {
    opacity: 1;
    border-color: var(--green);
}

.nav-panel .lang-switch {
    align-self: flex-start;
    margin-top: 6px;
}
