/*
   Filaris — filaris.gmtechno.com
   La identidad corporativa GM TECHNO manda: los colores salen del manual sin
   retocar y el cuerpo de texto va en Futura, que es la única familia que el
   manual habilita fuera del logotipo. La jerarquía la hacen el peso, el tamaño,
   la caja y el interletrado — no una segunda tipografía, que estaría prohibida.
   El detalle está en docs/ESTILO-MARCA.md.
*/

/* ---------- Tipografías ---------------------------------------------------

   Futura Md BT es de licencia paga y no se puede servir desde acá sin comprar
   la web font. Mientras tanto, la pila busca primero las Futura instaladas en
   la máquina del visitante y después las geométricas más parecidas (Century
   Gothic viene con Office; URW Gothic es la libre de Linux). Cuando se compre
   la licencia, poner el @font-face acá arriba y listo: nada más cambia.

   @font-face { font-family: 'Futura Md BT'; src: url(assets/futura-md.woff2) format('woff2'); font-weight: 500; font-display: swap; }
*/

:root {
    --font-brand: 'Futura Md BT', 'Futura PT', Futura, 'Century Gothic',
                  'URW Gothic', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
    /* Sólo para la maqueta de la app: es un dibujo del producto, no texto de
       marca, y las rutas y los tamaños necesitan ancho fijo para alinearse. */
    --font-data: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', 'SF Mono',
                 Menlo, Consolas, monospace;

    /* ---------- Paleta corporativa (manual 1.2, sin alterar) ---------- */
    --indigo: #3E4095;   /* RGB 62 64 149   */
    --sky:    #8AD1EB;   /* RGB 138 209 235 */
    --mist:   #E6E7E8;   /* RGB 230 231 232 */
    --paper:  #FEFEFE;   /* RGB 254 254 254 */

    /* Neutro elegido: el negro 82% de la papelería, corrido hacia el índigo
       para que la página no tenga ni un gris de fábrica. */
    --ink: #191A2E;

    /* ---------- Tokens de superficie (tema claro) ---------- */
    --bg: var(--paper);
    --bg-sunk: var(--mist);
    --surface: #FFFFFF;
    --surface-2: #F4F5F7;
    --text: var(--ink);
    --text-soft: #55576E;
    --line: #D8DAE2;
    --line-soft: #E9EAF0;
    --accent: var(--indigo);
    --accent-text: var(--indigo);
    --accent-on: #FFFFFF;
    --halo: rgba(62, 64, 149, .10);
    --demo-bar: #EEF0F6;
    --selected: rgba(62, 64, 149, .10);

    --shadow: 0 1px 2px rgba(25, 26, 46, .05), 0 12px 32px rgba(25, 26, 46, .08);

    /* ---------- Escala tipográfica ---------- */
    --step--1: clamp(.78rem, .76rem + .1vw, .84rem);
    --step-0:  clamp(1rem, .97rem + .15vw, 1.09rem);
    --step-1:  clamp(1.2rem, 1.13rem + .35vw, 1.45rem);
    --step-2:  clamp(1.5rem, 1.36rem + .7vw, 2rem);
    --step-3:  clamp(2rem, 1.7rem + 1.5vw, 3.1rem);
    --step-4:  clamp(2.6rem, 2rem + 3vw, 4.6rem);

    --rail: 1160px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #101124;
        --bg-sunk: #0A0B18;
        --surface: #1A1C33;
        --surface-2: #22243F;
        --text: #E9EAF4;
        --text-soft: #A0A3BC;
        --line: #32354F;
        --line-soft: #262943;
        /* El índigo puro no llega a contraste sobre fondo oscuro: para texto y
           bordes se usa aclarado. El logotipo nunca — ése va monocromo blanco,
           que es lo que el manual pide sobre fondos no corporativos. */
        --accent: #8F92E8;
        --accent-text: #A9ABEF;
        --accent-on: #0D0E1C;
        --halo: rgba(143, 146, 232, .14);
        --demo-bar: #22243F;
        --selected: rgba(143, 146, 232, .16);
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .45);
    }
}

:root[data-theme="dark"] {
    --bg: #101124;
    --bg-sunk: #0A0B18;
    --surface: #1A1C33;
    --surface-2: #22243F;
    --text: #E9EAF4;
    --text-soft: #A0A3BC;
    --line: #32354F;
    --line-soft: #262943;
    --accent: #8F92E8;
    --accent-text: #A9ABEF;
    --accent-on: #0D0E1C;
    --halo: rgba(143, 146, 232, .14);
    --demo-bar: #22243F;
    --selected: rgba(143, 146, 232, .16);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .45);
}

/* ---------- Base ---------------------------------------------------------- */

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

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

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

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

h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.1; font-weight: 600; }
p { margin: 0; }
img { max-width: 100%; display: block; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--text); }

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

.rail {
    width: min(100% - 2.5rem, var(--rail));
    margin-inline: auto;
}

/* El rótulo de sección cita el encabezado de columnas del explorador: caja
   alta, interletrado y una línea de un pixel debajo. Es la pantalla insignia
   del producto, así que la página la usa para ordenarse. */
.eyebrow {
    font-size: var(--step--1);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-soft);
    font-weight: 600;
    padding-bottom: .55rem;
    border-bottom: 1px solid var(--line);
    display: block;
    margin-bottom: 1.75rem;
}

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

/* ---------- Cabecera ------------------------------------------------------ */

.top {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}

.top .rail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: .9rem;
}

/* "Filaris" es el nombre del producto en la tipografía de cuerpo: no es el
   logotipo GM TECHNO, que no se puede componer con otra tipografía. Cuando la
   diseñadora entregue la marca de la app, reemplazar este texto por su SVG. */
.wordmark {
    font-size: var(--step-1);
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
}
.wordmark:hover { color: var(--text); }

.wordmark .glyph {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    border-radius: 3px;
    background:
        linear-gradient(var(--sky) 0 0) 0 0 / 42% 100% no-repeat,
        var(--indigo);
}

.nav {
    display: flex;
    gap: clamp(1rem, 3vw, 2.2rem);
    align-items: center;
    font-size: var(--step--1);
    letter-spacing: .04em;
}
.nav a { color: var(--text-soft); text-decoration: none; }
.nav a:hover { color: var(--accent-text); }

@media (max-width: 640px) {
    .nav .hide-sm { display: none; }
}

/* ---------- Hero ---------------------------------------------------------- */

.hero { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: 0; }

.hero-grid {
    display: grid;
    gap: clamp(2.5rem, 5vw, 4rem);
    align-items: center;
}
@media (min-width: 940px) {
    .hero-grid { grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); }
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: var(--step--1);
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--accent-text);
    background: var(--halo);
    border-radius: 100px;
    padding: .35rem .85rem;
    margin-bottom: 1.5rem;
}
.chip::before {
    content: "";
    width: .45rem; height: .45rem;
    border-radius: 50%;
    background: var(--accent);
}

h1 {
    font-size: var(--step-4);
    letter-spacing: -.025em;
    font-weight: 700;
}
h1 em {
    font-style: normal;
    color: var(--accent-text);
}

.deck {
    margin-top: 1.5rem;
    font-size: var(--step-1);
    color: var(--text-soft);
    max-width: 34ch;
    line-height: 1.45;
}

.actions {
    margin-top: 2.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: .8rem 1.25rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: var(--accent);
    color: var(--accent-on);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: .7rem 1.4rem;
    font-family: inherit;
    font-size: var(--step-0);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover {
    color: var(--accent-on);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--halo);
}
.btn-quiet {
    background: transparent;
    color: var(--accent-text);
    border-color: var(--line);
}
.btn-quiet:hover { color: var(--accent-text); border-color: var(--accent); }

.note { font-size: var(--step--1); color: var(--text-soft); }

/* ---------- La maqueta del panel doble ------------------------------------ */

.demo {
    position: relative;   /* el archivo que vuela se posiciona contra esto */
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

code {
    font-family: var(--font-data);
    font-size: .88em;
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    border-radius: 3px;
    padding: .05em .35em;
}

.demo-chrome {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .85rem;
    background: var(--demo-bar);
    border-bottom: 1px solid var(--line);
    font-size: var(--step--1);
    color: var(--text-soft);
}
.demo-chrome .dot {
    width: .5rem; height: .5rem; border-radius: 50%;
    background: var(--line);
    flex: none;
}
.demo-chrome .dot.live { background: var(--sky); }

.panes {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
}
@media (max-width: 620px) {
    .panes { grid-template-columns: 1fr; }
    .arrowbar { flex-direction: row !important; border-inline: 0 !important;
                border-block: 1px solid var(--line) !important; }
}

.pane { min-width: 0; }
.pane + .arrowbar + .pane { border-left: 0; }

.pane-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    padding: .6rem .8rem .5rem;
    font-size: var(--step--1);
    border-bottom: 1px solid var(--line-soft);
}
.pane-head .where {
    font-family: var(--font-data);
    font-size: .78em;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pane-head .who { font-weight: 600; letter-spacing: .02em; }

.cols {
    display: grid;
    grid-template-columns: 1fr 5.5rem;
    gap: .5rem;
    padding: .4rem .8rem;
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-soft);
    background: var(--surface-2);
    border-bottom: 1px solid var(--line-soft);
}
.cols span:last-child { text-align: right; }

.rows { list-style: none; margin: 0; padding: .25rem 0; min-height: 12.5rem; }

.row {
    display: grid;
    grid-template-columns: 1fr 5.5rem;
    gap: .5rem;
    align-items: center;
    padding: .38rem .8rem;
    font-size: var(--step--1);
}
.row .name {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}
.row .label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.row .size {
    text-align: right;
    font-family: var(--font-data);
    font-size: .78em;
    font-variant-numeric: tabular-nums;
    color: var(--text-soft);
}
.row.is-picked { background: var(--selected); border-radius: 3px; }

/* Los iconos de tipo son cuadrados de color, como en la app: carpeta índigo,
   archivo hueco, imagen en cielo. Sin librería de iconos y sin emoji. */
.ico { width: .85rem; height: .7rem; border-radius: 2px; flex: none; }
.ico.folder { background: var(--accent); }
.ico.file   { background: transparent; border: 1.5px solid var(--line); }
.ico.image  { background: var(--sky); }

.arrowbar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .5rem;
    padding: .5rem .45rem;
    background: var(--surface-2);
    border-inline: 1px solid var(--line-soft);
}

.arrow {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--accent-text);
    border-radius: 4px;
    width: 2.1rem;
    height: 1.9rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-family: inherit;
    font-size: .95rem;
    line-height: 1;
    transition: border-color .15s ease, background .15s ease;
}
.arrow:hover { border-color: var(--accent); background: var(--halo); }
.arrow.pulse { animation: pulse 1.4s ease-in-out 3; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--halo); }
    50%      { box-shadow: 0 0 0 6px var(--halo); }
}

/* El vuelo del archivo de un panel al otro: una sola vez al cargar, y a pedido
   cuando alguien toca la flecha. Es la tesis del producto en un gesto. */
.flier {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: 3px;
    box-shadow: 0 8px 24px var(--halo);
    padding: .38rem .8rem;
    font-size: var(--step--1);
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: transform .85s cubic-bezier(.4, 0, .2, 1), opacity .3s ease .55s;
}

.demo-foot {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .5rem .85rem;
    border-top: 1px solid var(--line);
    background: var(--demo-bar);
    font-size: .72rem;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

/* ---------- Bloques de contenido ------------------------------------------ */

.band { background: var(--bg-sunk); }

.two-up {
    display: grid;
    gap: clamp(2rem, 4vw, 3.5rem);
}
@media (min-width: 860px) {
    .two-up { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); align-items: start; }
}

h2 {
    font-size: var(--step-3);
    letter-spacing: -.02em;
}
.lede {
    margin-top: 1rem;
    color: var(--text-soft);
    max-width: 60ch;
}

.cards {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    padding: 1.5rem;
}
.card h3 {
    font-size: var(--step-1);
    letter-spacing: -.01em;
    margin-bottom: .6rem;
}
.card p { color: var(--text-soft); font-size: var(--step--1); line-height: 1.65; }

/* Lista de hechos: cada línea es una afirmación verificable, con una barra
   índigo a la izquierda en vez de una viñeta. */
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.facts li {
    border-left: 2px solid var(--accent);
    padding-left: 1.1rem;
}
.facts strong { display: block; font-weight: 600; }
.facts span { color: var(--text-soft); font-size: var(--step--1); }

.spec {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--step--1);
    margin-top: 1.5rem;
}
.spec th, .spec td {
    text-align: left;
    padding: .7rem .9rem .7rem 0;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}
.spec th {
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-size: .7rem;
    color: var(--text-soft);
    white-space: nowrap;
    width: 11rem;
}
.table-scroll { overflow-x: auto; }

/* ---------- Pie ----------------------------------------------------------- */

.foot {
    border-top: 1px solid var(--line);
    padding-block: 2.75rem 3.5rem;
    font-size: var(--step--1);
    color: var(--text-soft);
}
.foot .rail {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 3rem;
    justify-content: space-between;
    align-items: flex-start;
}
.foot a { color: var(--text-soft); }
.foot a:hover { color: var(--accent-text); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }

/*
   Ranura para el logotipo GM TECHNO. Va acá el SVG oficial, no una
   reconstrucción: el manual (2.2) prohíbe alterar tipografía, colores y
   proporciones, y componer "GMTECHNO" con otra tipografía sería exactamente
   eso. Sobre fondo oscuro corresponde la versión monocroma blanca.

   <img class="corp-logo" src="assets/gmtechno.svg" alt="GM TECHNO">

   Contorno libre mínimo: 1x la altura de la G a cada lado (manual 2.1).
*/
.corp-logo { height: 2.1rem; width: auto; }
.corp-mark {
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text);
}

/* ---------- Páginas de texto legal ---------------------------------------- */

.doc { max-width: 68ch; margin-inline: auto; }
.doc h1 { font-size: var(--step-3); letter-spacing: -.02em; }
.doc h2 {
    font-size: var(--step-1);
    margin-top: 2.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line-soft);
}
.doc h3 { font-size: var(--step-0); margin-top: 1.75rem; color: var(--accent-text); }
.doc p, .doc li { color: var(--text-soft); line-height: 1.75; }
.doc p { margin-top: 1rem; }
.doc ul { padding-left: 1.2rem; display: grid; gap: .5rem; margin-top: 1rem; }
.doc .stamp {
    font-size: var(--step--1);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 1rem;
}
.doc strong { color: var(--text); }
