/* ===============================================================
   POSA.SOLAR — brand.css
   Palette, tipografia, header, logo, footer
   Prefisso: psl-  |  Parent theme: Accelerate
   =============================================================== */

/* ---------------------------------------------------------------
   FONT SELF-HOSTED (no Google Fonts CDN)
   I file .woff2 sono in /assets/fonts/. Nessuna chiamata a server
   esterni: nessun trasferimento dell'IP del visitatore fuori UE.
   --------------------------------------------------------------- */
@font-face {
    font-family: 'IBM Plex Sans';
    src: url('../fonts/plexsans-500.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Sans';
    src: url('../fonts/plexsans-600.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Sans';
    src: url('../fonts/plexsans-700.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-300.woff2') format('woff2');
    font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-400.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-600.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}

:root {
    /* --- Palette --- */
    --color-bg:           #F7F8F9;  /* sfondo body, grigio neutro chiaro */
    --color-stone-light:  #ECEFF1;  /* sezioni alternate chiare */
    --color-stone-dark:   #1B1F24;  /* sezioni scure */
    --color-ink:          #16191D;  /* testo principale (mai #000 puro) */
    --color-ink-soft:     #5A6069;  /* testo secondario */
    --color-line:         #D8DDE1;  /* bordi e divider */
    --color-accent:       #E8A33D;  /* ambra, accent CTA */
    --color-accent-hover: #C4842A;  /* ambra scura, hover */
    --color-success:      #2A7F3C;  /* conferme form */
    --color-error:        #C2272D;  /* errori validazione */
    --color-white:        #FFFFFF;

    /* HSL per manipolazioni runtime */
    --hsl-accent: 35, 79%, 57%;

    /* --- Tipografia --- */
    --font-headings: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
    --font-body:     'Inter', 'Segoe UI', system-ui, sans-serif;

    /* --- Layout --- */
    --container-max:     1240px;
    --container-padding: clamp(1rem, 4vw, 2rem);
    --radius:            4px;
    --radius-lg:         8px;
    --shadow-card:       0 1px 3px rgba(22,25,29,.06), 0 10px 30px rgba(22,25,29,.07);
}

/* ---------------------------------------------------------------
   TIPOGRAFIA BASE
   --------------------------------------------------------------- */
body,
body.custom-background {
    background: var(--color-bg);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--color-ink);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 0;
}

h1 { font-size: clamp(2rem, 4.4vw, 3rem);     line-height: 1.14; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); line-height: 1.22; margin-bottom: 1rem; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem);  line-height: 1.32; margin-bottom: .6rem; }
h4 { font-size: 1.02rem; line-height: 1.35; margin-bottom: .5rem; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }
/* strong NON forza il colore: lo eredita dal contenitore.
   Forzando var(--color-ink) diventava nero su nero nelle aree scure. */
strong { font-weight: 600; color: inherit; }

a { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 3px; }
a:hover, a:focus { color: var(--color-accent-hover); }

/* Eyebrow: micro-label uppercase tracciata */
.psl-eyebrow {
    display: block;
    font-family: var(--font-headings);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--color-accent-hover);
    margin-bottom: .7rem;
}
.psl-section.--ink .psl-eyebrow { color: var(--color-accent); }

/* Lead paragraph */
.psl-lead {
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    line-height: 1.55;
    color: var(--color-ink-soft);
    font-weight: 300;
}

/* ---------------------------------------------------------------
   HEADER — custom (header.php del child). Accelerate non c'entra piu'.
   --------------------------------------------------------------- */
.psl-skip {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background: var(--color-accent); color: var(--color-ink);
    padding: .8rem 1.2rem; font-weight: 600; text-decoration: none;
}
.psl-skip:focus { left: 1rem; top: 1rem; }

.psl-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-line);
    position: sticky;
    top: 0;
    z-index: 500;
}
.admin-bar .psl-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .psl-header { top: 46px; } }

.psl-header__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 74px;
}
.psl-header__logo { display: block; line-height: 0; flex-shrink: 0; text-decoration: none; }
.psl-header__logo img { height: 50px; width: auto; display: block; }

/* --- Navigazione --- */
.psl-nav { display: flex; align-items: center; gap: 1.5rem; }
.psl-menu {
    display: flex;
    align-items: center;
    gap: .2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.psl-menu li { position: relative; }
.psl-menu li a {
    display: block;
    font-family: var(--font-headings);
    font-weight: 500;
    font-size: .93rem;
    color: var(--color-ink);
    text-decoration: none;
    padding: .6rem .8rem;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: color .15s ease, background-color .15s ease;
}
.psl-menu li a:hover { color: var(--color-accent-hover); background: var(--color-stone-light); }
.psl-menu li.current-menu-item > a,
.psl-menu li.current_page_item > a,
.psl-menu li.current-menu-ancestor > a {
    color: var(--color-accent-hover);
    box-shadow: inset 0 -3px 0 var(--color-accent);
    border-radius: var(--radius) var(--radius) 0 0;
}

/* Sottomenu */
.psl-menu li ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--color-white);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    list-style: none;
    margin: 0;
    padding: .3rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.psl-menu li:hover > ul,
.psl-menu li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.psl-menu li ul li a { padding: .6rem 1rem; border-radius: 0; box-shadow: none; font-size: .9rem; }
.psl-menu li ul li a:hover { box-shadow: none; }

.psl-nav__cta { padding: .7rem 1.2rem; font-size: .88rem; white-space: nowrap; }

/* --- Burger (mobile) --- */
.psl-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
}
.psl-burger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--color-ink);
    margin: 0 auto;
    transition: transform .2s ease, opacity .2s ease;
}
.psl-burger.--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.psl-burger.--open span:nth-child(2) { opacity: 0; }
.psl-burger.--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1024px) {
    .psl-burger { display: flex; }
    .psl-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-line);
        box-shadow: var(--shadow-card);
        padding: .5rem var(--container-padding) 1.2rem;
    }
    .psl-nav.--open { display: flex; }
    .psl-menu { flex-direction: column; align-items: stretch; gap: 0; }
    .psl-menu li a { padding: .85rem .4rem; border-bottom: 1px solid var(--color-line); border-radius: 0; }
    .psl-menu li.current-menu-item > a { box-shadow: inset 3px 0 0 var(--color-accent); }
    .psl-menu li ul {
        position: static; opacity: 1; visibility: visible; transform: none;
        border: 0; box-shadow: none; padding: 0 0 0 1rem; min-width: 0;
    }
    .psl-nav__cta { margin-top: 1rem; width: 100%; }
    .psl-header__logo img { height: 42px; }
}

/* --- Main --- */
.psl-main { display: block; }
.psl-page, .psl-page .entry-content { margin: 0; padding: 0; }

/* ---------------------------------------------------------------
   FOOTER — custom (footer.php del child)
   --------------------------------------------------------------- */
.psl-footer {
    background: var(--color-stone-dark);
    color: rgba(255,255,255,.7);
    margin-top: clamp(3rem, 6vw, 5rem);
}
.psl-footer__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: clamp(3rem, 5vw, 4rem) var(--container-padding);
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
    gap: clamp(2rem, 4vw, 3.5rem);
}
@media (max-width: 980px) { .psl-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .psl-footer__inner { grid-template-columns: 1fr; } }

.psl-footer h3 {
    color: var(--color-white);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}
.psl-footer p { font-size: .9rem; line-height: 1.6; color: rgba(255,255,255,.65); }
.psl-footer strong { color: var(--color-white); font-weight: 600; }
.psl-footer ul { list-style: none; margin: 0; padding: 0; }
.psl-footer li { margin-bottom: .6rem; font-size: .92rem; }
.psl-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.psl-footer a:hover { color: var(--color-accent); }

.psl-footer__logo { height: 46px; width: auto; margin-bottom: 1.3rem; display: block; }
.psl-footer__claim {
    font-family: var(--font-headings);
    font-size: 1.08rem !important;
    font-weight: 600;
    color: var(--color-white) !important;
    margin-bottom: .8rem;
}
.psl-footer__contacts li { color: rgba(255,255,255,.65); }
.psl-footer__cta { margin-top: 1.2rem; }

.psl-footer__legal {
    border-top: 1px solid rgba(255,255,255,.1);
    background: rgba(0,0,0,.2);
}
.psl-footer__legal-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 1.6rem var(--container-padding);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.psl-footer__legal p { font-size: .8rem; color: rgba(255,255,255,.62); margin: 0; line-height: 1.7; }
.psl-footer__legal strong { color: var(--color-white); }
.psl-footer__links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.psl-footer__links a { font-size: .8rem; color: rgba(255,255,255,.7); }
