/*
Theme Name: code
Theme URI: https://example.com/code
Author: code
Description: Tema ultra-mínimo para una librería de bloques dinámicos de Gutenberg. El tema no aporta estilos visuales: todo el diseño vive en cada bloque.
Version: 3.0.0
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gut-lib
*/

/* ---------------------------------------------------------------------------
   Resets mínimos. El tema NO tiene diseño visual: cada bloque trae el suyo.
--------------------------------------------------------------------------- */

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

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

body {
    margin: 0;
    overflow-x: hidden; /* evita scrollbar horizontal por 100vw en alignfull */
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Accesibilidad: skip-link visible al recibir foco */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 1rem;
    background: #000;
    color: #fff;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
}

/* ---------------------------------------------------------------------------
   Alignfull / Alignwide — que el contenido llegue a los bordes reales.
--------------------------------------------------------------------------- */

.is-layout-constrained > .alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    width: 100vw;
}

.is-layout-constrained > .alignwide {
    max-width: var(--wp--style--global--wide-size, 1400px);
    margin-left: auto;
    margin-right: auto;
}

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