/*
Theme Name: GAS Solaris Terra
Description: Tema proprietario di GAS Solaris ispirato a natura, territorio, filiera corta e acquisto solidale.
Version: 0.1.7
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: gas-solaris-terra
License: GPL-2.0-or-later
*/

/* --------------------------------------------------------------------------
   GAS SOLARIS TERRA
   Design system:
   forest     #315A43
   leaf       #6E8753
   sage       #B8C8A7
   cream      #F7F3E8
   warm white #FFFCF5
   soil       #74543D
   clay       #C56F4A
   ink        #263129
   -------------------------------------------------------------------------- */

:root {
    --gas-forest: #315a43;
    --gas-forest-dark: #234434;
    --gas-leaf: #6e8753;
    --gas-sage: #b8c8a7;
    --gas-cream: #f7f3e8;
    --gas-warm-white: #fffcf5;
    --gas-soil: #74543d;
    --gas-clay: #c56f4a;
    --gas-ink: #263129;
    --gas-muted: #667269;
    --gas-border: #d9dfd2;

    --gas-radius-sm: 0.65rem;
    --gas-radius-md: 1.15rem;
    --gas-radius-lg: 2rem;

    --gas-shadow:
        0 1rem 3rem rgba(38, 49, 41, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    text-underline-offset: 0.18em;
    text-decoration-thickness: 0.08em;
}

a:hover,
a:focus-visible {
    color: var(--gas-clay);
}

:focus-visible {
    outline: 3px solid var(--gas-clay);
    outline-offset: 3px;
}

/* Header */

.gas-site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgba(49, 90, 67, 0.12);
    background:
        rgba(255, 252, 245, 0.96);
}

.gas-header-inner {
    min-height: 5.5rem;
}

.gas-site-header .wp-block-site-title {
    margin: 0;
    letter-spacing: -0.035em;
}

.gas-site-header .wp-block-site-title a {
    text-decoration: none;
}

.gas-site-header .wp-block-navigation-item__content {
    font-weight: 650;
    text-decoration: none;
}

.gas-site-header .wp-block-navigation__submenu-container {
    padding: 0.5rem;
    border: 1px solid var(--gas-border) !important;
    border-radius: var(--gas-radius-sm);
    box-shadow: var(--gas-shadow);
    background: var(--gas-warm-white) !important;
}

/* Hero */

.gas-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding-top: clamp(4rem, 9vw, 8rem);
    padding-bottom: clamp(4rem, 8vw, 7rem);
    background:
        radial-gradient(
            circle at 88% 14%,
            rgba(184, 200, 167, 0.8),
            transparent 30%
        ),
        radial-gradient(
            circle at 75% 85%,
            rgba(197, 111, 74, 0.14),
            transparent 28%
        ),
        linear-gradient(
            145deg,
            var(--gas-warm-white),
            var(--gas-cream)
        );
}

.gas-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: clamp(18rem, 38vw, 38rem);
    height: clamp(18rem, 38vw, 38rem);
    right: -10%;
    top: 10%;
    border-radius:
        62% 38% 54% 46% /
        42% 58% 42% 58%;
    background:
        linear-gradient(
            145deg,
            rgba(49, 90, 67, 0.14),
            rgba(110, 135, 83, 0.22)
        );
    transform: rotate(-8deg);
}

.gas-eyebrow {
    margin-bottom: 1rem;
    color: var(--gas-soil);
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gas-hero h1 {
    max-width: 13ch;
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-size: clamp(2.7rem, 7vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.gas-hero-copy {
    max-width: 42rem;
    color: var(--gas-muted);
    font-size: clamp(1.08rem, 2vw, 1.3rem);
    line-height: 1.65;
}

/* Buttons */

.wp-element-button,
.wp-block-button__link {
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0.65rem 1.4rem
        rgba(49, 90, 67, 0.17);
}

/* Homepage sections */

.gas-section {
    padding-top: clamp(3.5rem, 7vw, 6.5rem);
    padding-bottom: clamp(3.5rem, 7vw, 6.5rem);
}

.gas-section-title {
    max-width: 14ch;
    letter-spacing: -0.04em;
}

.gas-value-card,
.gas-producer-card {
    height: 100%;
    padding: clamp(1.4rem, 3vw, 2rem);
    border: 1px solid var(--gas-border);
    border-radius: var(--gas-radius-md);
    background: var(--gas-warm-white);
    box-shadow:
        0 0.5rem 2rem
        rgba(38, 49, 41, 0.035);
}

.gas-value-card h3,
.gas-producer-card h3 {
    margin-top: 0;
}

.gas-value-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    margin-bottom: 1.1rem;
    border-radius: 999px;
    color: var(--gas-warm-white);
    background: var(--gas-forest);
    font-weight: 750;
}

/* Content pages */

.gas-page-shell {
    padding-top: clamp(3rem, 6vw, 5.5rem);
    padding-bottom: clamp(4rem, 8vw, 7rem);
}

.gas-page-title {
    max-width: 18ch;
    margin-bottom: 2rem;
    letter-spacing: -0.045em;
}

.wp-block-post-content {
    line-height: 1.75;
}

.wp-block-post-content h2,
.wp-block-post-content h3 {
    margin-top: 2.2em;
    letter-spacing: -0.03em;
}

.wp-block-post-content img {
    border-radius: var(--gas-radius-md);
}

/* Chi siamo / Produttori link collections */

.page-id-13 .wp-block-post-content > ul,
.page-id-26 .wp-block-post-content > ul {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(14rem, 1fr)
        );
    gap: 1rem;
    padding: 0;
    list-style: none;
}

.page-id-13 .wp-block-post-content > ul > li,
.page-id-26 .wp-block-post-content > ul > li {
    margin: 0;
}

.page-id-13 .wp-block-post-content > ul a,
.page-id-26 .wp-block-post-content > ul a {
    display: flex;
    align-items: center;
    min-height: 7rem;
    padding: 1.4rem;
    border: 1px solid var(--gas-border);
    border-radius: var(--gas-radius-md);
    color: var(--gas-forest-dark);
    background:
        linear-gradient(
            145deg,
            var(--gas-warm-white),
            var(--gas-cream)
        );
    font-size: 1.08rem;
    font-weight: 750;
    text-decoration: none;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.page-id-13 .wp-block-post-content > ul a:hover,
.page-id-26 .wp-block-post-content > ul a:hover {
    transform: translateY(-3px);
    border-color: var(--gas-sage);
    box-shadow: var(--gas-shadow);
}

/* Contact / Forminator */

.forminator-ui {
    margin-top: 2rem !important;
}

.forminator-ui .forminator-field label,
.forminator-ui .forminator-label {
    color: var(--gas-ink) !important;
    font-weight: 700 !important;
}

.forminator-ui input,
.forminator-ui textarea,
.forminator-ui select {
    border: 1px solid var(--gas-border) !important;
    border-radius: var(--gas-radius-sm) !important;
    background: var(--gas-warm-white) !important;
}

.forminator-ui input:focus,
.forminator-ui textarea:focus,
.forminator-ui select:focus {
    border-color: var(--gas-forest) !important;
    box-shadow:
        0 0 0 3px
        rgba(49, 90, 67, 0.12) !important;
}

.forminator-ui .forminator-button-submit {
    border-radius: 999px !important;
    background: var(--gas-forest) !important;
    font-weight: 750 !important;
}

/* CTA */

.gas-contact-band {
    overflow: hidden;
    border-radius: var(--gas-radius-lg);
    color: var(--gas-warm-white);
    background:
        radial-gradient(
            circle at 85% 10%,
            rgba(184, 200, 167, 0.28),
            transparent 32%
        ),
        var(--gas-forest);
}

/* Footer */

.gas-site-footer {
    border-top: 1px solid rgba(49, 90, 67, 0.13);
    background: var(--gas-cream);
}

.gas-site-footer a {
    color: var(--gas-forest-dark);
}

/* Responsive */

@media (max-width: 781px) {

    .gas-header-inner {
        min-height: 4.6rem;
    }

    .gas-hero {
        padding-top: 3.75rem;
    }

    .gas-hero h1 {
        max-width: 11ch;
    }

    .gas-site-header .wp-block-navigation__responsive-container-open {
        color: var(--gas-forest);
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* ==========================================================================
   R4I-C2 ORIGINAL BACKGROUND VISUALS
   Editorial atmospheric imagery — not documentary photography.
   Layout geometry intentionally unchanged.
   ========================================================================== */

.gas-hero {
    background:
        linear-gradient(
            90deg,
            rgba(255, 252, 245, 0.98) 0%,
            rgba(255, 252, 245, 0.94) 35%,
            rgba(247, 243, 232, 0.72) 58%,
            rgba(247, 243, 232, 0.30) 78%,
            rgba(247, 243, 232, 0.12) 100%
        ),
        url("assets/images/hero-field.png")
        center center / cover no-repeat;
}

.gas-principles-photo {
    background:
        linear-gradient(
            180deg,
            rgba(247, 243, 232, 0.91),
            rgba(247, 243, 232, 0.95)
        ),
        url("assets/images/filiera-local.png")
        center center / cover no-repeat !important;
}

.gas-producers-photo {
    background:
        linear-gradient(
            90deg,
            rgba(255, 252, 245, 0.97) 0%,
            rgba(255, 252, 245, 0.93) 42%,
            rgba(255, 252, 245, 0.77) 67%,
            rgba(255, 252, 245, 0.54) 100%
        ),
        url("assets/images/raccolto-local.png")
        center center / cover no-repeat;
}

.gas-principles-photo,
.gas-producers-photo {
    background-attachment: scroll;
}

@media (max-width: 781px) {

    .gas-hero {
        background:
            linear-gradient(
                90deg,
                rgba(255, 252, 245, 0.98) 0%,
                rgba(255, 252, 245, 0.93) 62%,
                rgba(247, 243, 232, 0.66) 100%
            ),
            url("assets/images/hero-field.png")
            68% center / cover no-repeat;
    }

    .gas-principles-photo {
        background:
            linear-gradient(
                rgba(247, 243, 232, 0.94),
                rgba(247, 243, 232, 0.97)
            ),
            url("assets/images/filiera-local.png")
            70% center / cover no-repeat !important;
    }

    .gas-producers-photo {
        background:
            linear-gradient(
                rgba(255, 252, 245, 0.95),
                rgba(255, 252, 245, 0.90)
            ),
            url("assets/images/raccolto-local.png")
            72% center / cover no-repeat;
    }
}

/* ==========================================================================
   R4I-C3 BRAND AND INTERNAL PAGE REFINEMENT
   ========================================================================== */

/*
 * Remove only the top-level WordPress block gap between
 * header, main and footer.
 */
.wp-site-blocks > * {
    margin-block-start: 0;
}

/* Canonical Solaris brand asset. */

.gas-brand-logo {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-start;
    line-height: 0;
    text-decoration: none;
}

.gas-brand-logo img {
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
}

.gas-brand-logo--header img {
    width: clamp(8.5rem, 11vw, 10.5rem);
    max-width: 100%;
}

.gas-brand-logo--footer {
    margin-bottom: 0.9rem;
}

.gas-brand-logo--footer img {
    width: clamp(5.25rem, 7vw, 6.5rem);
    max-width: 100%;
}

/* Internal pages: centered editorial surface. */

.gas-page-shell {
    padding-inline: clamp(1rem, 4vw, 2.5rem);
    background:
        linear-gradient(
            180deg,
            var(--gas-cream) 0%,
            var(--gas-warm-white) 100%
        );
}

.gas-page-card {
    width: min(100%, 60rem);
    margin-inline: auto;
    padding:
        clamp(1.6rem, 4vw, 3.5rem)
        clamp(1.35rem, 4.5vw, 4rem);
    border: 1px solid rgba(49, 90, 67, 0.13);
    border-radius: 1.25rem;
    background: rgba(255, 254, 249, 0.97);
    box-shadow:
        0 1.25rem 3.75rem
        rgba(38, 49, 41, 0.085);
}

.gas-page-card .gas-page-title {
    margin-top: 0;
}

.gas-page-card > .wp-block-separator {
    opacity: 0.55;
}

@media (max-width: 781px) {

    .gas-brand-logo--header img {
        width: 7.75rem;
    }

    .gas-brand-logo--footer img {
        width: 5.25rem;
    }

    .gas-page-shell {
        padding-inline: 0.8rem;
    }

    .gas-page-card {
        padding: 1.35rem 1.15rem 1.75rem;
        border-radius: 0.9rem;
        box-shadow:
            0 0.85rem 2.4rem
            rgba(38, 49, 41, 0.075);
    }
}

/* R4I-C3E5: centered internal page title */
.gas-page-card .gas-page-title {
    width: 100%;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

/* R4I-C3G: mobile layout refinement */
@media (max-width: 781px) {

    html,
    body {
        max-width: 100%;
        overflow-x: clip;
    }

    /*
     * Header: gutter uniforme e pulsante menu correttamente separato.
     */
    .gas-site-header .gas-header-inner {
        box-sizing: border-box;
        width: 100%;
        padding-right: 1.25rem;
        padding-left: 1.25rem;
    }

    .gas-site-header .wp-block-navigation__responsive-container-open {
        margin-left: auto;
        padding: 0.45rem;
    }

    /*
     * Home hero: il fondo resta full-bleed, il contenuto riceve
     * il gutter mobile.
     */
    .gas-hero > .wp-block-group {
        box-sizing: border-box;
        width: 100%;
        padding-right: 1.25rem;
        padding-left: 1.25rem;
    }

    /*
     * Sezioni della Home: gutter coerente senza modificare
     * gas-page-shell o gas-page-card.
     */
    .gas-section {
        box-sizing: border-box;
        width: 100%;
        padding-right: 1.25rem;
        padding-left: 1.25rem;
    }

    /*
     * CTA: margini laterali, padding più adatto al mobile
     * e disposizione verticale leggibile.
     */
    .gas-contact-band {
        box-sizing: border-box;
        width: auto;
        margin-right: 1.25rem !important;
        margin-left: 1.25rem !important;
        padding: 2rem 1.25rem !important;
        gap: 1.25rem;
        flex-direction: column;
        align-items: flex-start !important;
    }

    .gas-contact-band > .wp-block-group {
        width: 100%;
    }

    .gas-contact-band .wp-block-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    /*
     * Menu mobile WordPress: gerarchia verticale, allineamento
     * a sinistra e sottomenu privi di riquadri.
     */
    .wp-block-navigation__responsive-container.is-menu-open {
        box-sizing: border-box;
        padding: 1.25rem !important;
        background: #fffcf5 !important;
        color: #263129 !important;
    }

    .wp-block-navigation__responsive-container-close {
        top: 1.25rem;
        right: 1.25rem;
        padding: 0.45rem;
        color: #315a43;
    }

    .wp-block-navigation__responsive-container-content {
        box-sizing: border-box;
        width: 100%;
        padding-top: 3.75rem !important;
        align-items: stretch !important;
        text-align: left;
    }

    .wp-block-navigation__responsive-container-content
    .wp-block-navigation__container {
        width: 100%;
        gap: 0 !important;
        align-items: stretch !important;
    }

    .wp-block-navigation__responsive-container-content
    .wp-block-navigation-item {
        box-sizing: border-box;
        width: 100%;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    .wp-block-navigation__responsive-container-content
    .wp-block-navigation-item__content {
        box-sizing: border-box;
        display: block;
        width: 100%;
        padding: 0.9rem 0;
        border-bottom: 1px solid rgba(49, 90, 67, 0.16);
        color: #263129;
        text-align: left;
        font-size: 1rem;
        font-weight: 750;
        line-height: 1.35;
    }

    .wp-block-navigation__responsive-container-content
    .wp-block-navigation__submenu-icon {
        margin-left: auto;
    }

    .wp-block-navigation__responsive-container-content
    .wp-block-navigation__submenu-container {
        position: static !important;
        box-sizing: border-box;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        padding: 0.15rem 0 0.65rem 1rem !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: visible !important;
        border: 0 !important;
        border-left: 2px solid rgba(110, 135, 83, 0.3) !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .wp-block-navigation__responsive-container-content
    .wp-block-navigation__submenu-container
    .wp-block-navigation-item__content {
        padding: 0.55rem 0 0.55rem 0.85rem;
        border-bottom: 0;
        color: #315a43;
        font-size: 0.9rem;
        font-weight: 650;
    }

    /*
     * Footer: composizione verticale centrata e gutter uniforme.
     */
    .gas-site-footer > .wp-block-group {
        box-sizing: border-box;
        width: 100%;
        padding: 2.5rem 1.25rem !important;
        gap: 1.25rem;
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
    }

    .gas-site-footer > .wp-block-group > .wp-block-group {
        width: 100%;
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
    }

    .gas-site-footer img {
        display: block;
        width: auto;
        max-width: 6rem;
        height: auto;
        margin-right: auto;
        margin-left: auto;
    }

    .gas-site-footer p {
        width: 100%;
        margin-right: auto;
        margin-left: auto;
        text-align: center;
        line-height: 1.9;
    }
}

