/*
Theme Name: Vernalia
Author: Vernalia
Description: Tema de bloques ligero y editable para construir el sitio Vernalia.
Version: 1.6.1
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vernalia
*/
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; height: auto; }
a { text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1; width: 100%; }
.vernalia-header { border-bottom: 1px solid color-mix(in srgb,var(--wp--preset--color--berenjena) 15%,transparent); }
.vernalia-footer { border-top: 1px solid color-mix(in srgb,var(--wp--preset--color--berenjena) 15%,transparent); }
.wp-block-post-title { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Responsive foundation. Native Columns/Media & Text retain WordPress breakpoints.
 * 600px: inline search; 782px: native columns; 1024px: expanded navigation.
 * Layout widths remain bounded on desktop; spacing and type scale continuously.
 */
:root {
    --vernalia-gap: clamp(1rem, 2.5vw, 2rem);
}
.wp-site-blocks { min-height: 100svh; }
:where(.wp-site-blocks, .editor-styles-wrapper) :where(h1, h2, h3, h4, h5, h6, p, li, a, figcaption) {
    overflow-wrap: anywhere;
}
:where(.wp-block-column, .wp-block-group, .wp-block-post-content, .wp-block-navigation, .wp-block-search__input) {
    min-width: 0;
}
:where(video, iframe, embed, object) { max-width: 100%; }
video { height: auto; }
:where(input, select, textarea, button) { font: inherit; max-width: 100%; }
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
    font-size: max(1rem, 1em);
}
:where(button, input[type="submit"], .wp-block-button__link, .wp-block-navigation-item__content) {
    min-height: 44px;
}
.wp-block-navigation .wp-block-navigation-item__content {
    display: inline-flex;
    align-items: center;
}
.wp-block-navigation :where(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close) {
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}
.wp-block-table, pre { max-width: 100%; overflow-x: auto; }
.wp-block-search__inside-wrapper { flex-wrap: wrap; gap: .75rem; }
.wp-block-search .wp-block-search__input { flex: 1 1 100%; }
.wp-block-search .wp-block-search__button { margin-left: 0; }
.vernalia-header > .wp-block-group { flex: 1 1 0; min-width: 0; }
.vernalia-header .wp-block-site-logo { flex-shrink: 0; }
.vernalia-header .wp-block-site-title { min-width: 0; }
.vernalia-header > .wp-block-navigation { flex-shrink: 0; }
.vernalia-footer { gap: var(--vernalia-gap); }
/* Opt-in grid for future card sections. Stacks safely even in narrow containers. */
.vernalia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: var(--vernalia-gap);
}
.vernalia-grid > * { min-width: 0; margin-block: 0; }
@media (min-width: 600px) {
    .wp-block-search .wp-block-search__input { flex-basis: 0; }
}
/* Keep the native accessible overlay through tablet widths; preserve "always"
 * and "never" overlay settings and WordPress keyboard/focus behavior. */
@media (max-width: 1023.98px) {
    .vernalia-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
        display: none;
    }
    .vernalia-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: flex;
    }
}
@media (prefers-reduced-motion: reduce) {
    .wp-block-navigation__responsive-container.is-menu-open { animation: none; }
}

/* Use the real font weights included with the theme. */
:where(.wp-site-blocks, .editor-styles-wrapper) { font-synthesis: none; }

/* Official earth palette, October 2026. */
body { background:var(--wp--preset--color--blanco); color:var(--wp--preset--color--negro); }
.vh-logo-dark { filter:url(#vernalia-logo-ink); }
.vh-logo-light,.vf__logo img { filter:url(#vernalia-logo-paper); }
.vstory__frame::before { background:var(--wp--preset--color--terracota); }
.vf__eyebrow,.vf__columns h3,.vf__stone,.vf__note svg { color:var(--wp--preset--color--arena); }
.vfaq summary:hover { background:var(--wp--preset--color--arena); }
.vcat__card:nth-child(3n) .vcat__media,.vblog__card:nth-child(3n+2) .vblog__media { background:var(--wp--preset--color--salvia); }
.vclosing__button--primary { background:var(--wp--preset--color--arcilla); color:var(--wp--preset--color--blanco); }

/* Join the final homepage closing section to the footer, including template spacing. */
body.home .wp-site-blocks > main:has(> .wp-block-post-content > .vclosing:last-child) {
    padding-bottom:0 !important; /* Override the page template's inline padding. */
    margin-block-end:0;
}
body.home .wp-block-post-content:has(> .vclosing:last-child),
body.home .wp-block-post-content > .vclosing:last-child {
    margin-block-end:0;
}
body.home .wp-site-blocks > main:has(> .wp-block-post-content > .vclosing:last-child) + footer {
    margin-block-start:0;
}

/* Nohemi ExtraLight for native and custom-block paragraphs, including the editor. */
.wp-site-blocks p, .editor-styles-wrapper p {
    font-family: var(--wp--preset--font-family--body);
    font-weight: 200;
    letter-spacing: 0.025em;
}

/* Shared heading spacing, including sections with their own tracking rules. */
:is(.wp-site-blocks, .editor-styles-wrapper) :is(h1, h2, h3, h4, h5, h6),
:is(.wp-site-blocks, .editor-styles-wrapper) :is(.vernalia-hero .vernalia-hero__title, .vernalia-processes h2, .vshop__hero h1, .vshop__filter-content h2, .vf__columns h3, .vh-search-heading) {
    letter-spacing: 0.025em;
}
