/*
 * Global styles — Header, Footer, base typography
 * Hello Elementor Child v2.2
 *
 * All color/font/spacing tokens are injected via functions.php (hec_output_custom_vars).
 * Defaults here are fallback only.
 */

:root {
    --hec-font-heading: 'Cormorant Garamond', Georgia, serif;
    --hec-font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --hec-text: #1a1a1a;
    --hec-border: #e5e0d8;
    --hec-bg: #ffffff;
    --hec-bg-soft: #f8f6f3;
    --hec-accent: #b08d57;
    --hec-accent-dark: #8a6d3b;
    --hec-section-gap: 4rem;
    --hec-gutter: clamp(1.5rem, 5vw, 4rem);
    --hec-image-grayscale: 0.15;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--hec-font-body);
    color: var(--hec-text);
    background: var(--hec-bg);
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

/* ========================================================================
   HEADER
   ======================================================================== */
.hec-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--hec-bg);
    border-bottom: 1px solid var(--hec-border);
}

.hec-site-header__inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 1.25rem var(--hec-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hec-site-header__brand {
    font-family: var(--hec-font-heading);
    font-weight: 500;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    letter-spacing: -0.01em;
    color: var(--hec-text);
    text-decoration: none;
    transition: color 0.25s ease;
}

.hec-site-header__brand:hover {
    color: var(--hec-accent);
}

.hec-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.hec-menu li {
    margin: 0;
    padding: 0;
}

.hec-menu a {
    font-family: var(--hec-font-body);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--hec-text);
    text-decoration: none;
    position: relative;
    padding: 0.3rem 0;
    transition: color 0.25s ease;
}

.hec-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--hec-accent);
    transition: width 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

.hec-menu a:hover,
.hec-menu .current-menu-item > a,
.hec-menu .current_page_item > a {
    color: var(--hec-accent);
}

.hec-menu a:hover::after,
.hec-menu .current-menu-item > a::after,
.hec-menu .current_page_item > a::after {
    width: 100%;
}

/* Mobile toggle */
.hec-site-header__toggle,
.hec-site-header__toggle:hover,
.hec-site-header__toggle:focus,
.hec-site-header__toggle:active {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
    color: inherit;
    outline: none;
}

.hec-site-header__toggle {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.hec-site-header__toggle:focus-visible {
    outline: 2px solid var(--hec-accent) !important;
    outline-offset: 2px;
}

.hec-site-header__toggle span,
.hec-site-header__toggle:hover span,
.hec-site-header__toggle:focus span,
.hec-site-header__toggle:active span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--hec-text) !important;
    background-color: var(--hec-text) !important;
    transition: transform 0.3s ease, opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.hec-site-header__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.hec-site-header__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hec-site-header__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ========================================================================
   MAIN CONTENT WRAPPER
   ======================================================================== */
.hec-site-content {
    min-height: calc(100vh - 180px);
}

/* ========================================================================
   FOOTER
   ======================================================================== */
.hec-site-footer {
    border-top: 1px solid var(--hec-border);
    background: var(--hec-bg);
    margin-top: 4rem;
}

.hec-site-footer__inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 2rem var(--hec-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--hec-text);
    opacity: 0.75;
}

.hec-site-footer__copyright,
.hec-site-footer__vat {
    font-family: var(--hec-font-body);
}

.hec-site-footer__vat {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.72rem;
}

/* ========================================================================
   IMAGE TREATMENT (applied globally)
   ======================================================================== */
.hec-row__media img,
.hec-row__placeholder,
body.single-post .page-content img:not(.hec-hero__img) {
    filter: grayscale(var(--hec-image-grayscale));
    transition: filter 0.5s ease;
}

.hec-hero__img {
    filter: brightness(0.5) grayscale(var(--hec-image-grayscale));
}

body.single-post .page-content img:not(.hec-hero__img):hover,
.hec-row__media:hover img {
    filter: grayscale(0);
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */
@media (max-width: 768px) {
    .hec-site-header__inner {
        padding: 1rem 1.25rem;
    }

    .hec-site-header__toggle {
        display: flex;
    }

    .hec-site-header__nav {
        position: fixed;
        top: 64px;
        right: 0;
        left: 0;
        background: var(--hec-bg);
        border-bottom: 1px solid var(--hec-border);
        padding: 2rem;
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }

    .hec-site-header__nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .hec-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .hec-menu a {
        font-size: 0.9rem;
    }

    .hec-site-footer__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
        padding: 1.75rem 1.25rem;
    }
}
