/*
Theme Name: Electronic Solution (GeneratePress Child)
Theme URI: https://www.electronicsolution.computer
Description: Tema Child per Electronic Solution – Design System "Big Tech Luxury" Grigio Ossidiana / Oro
Author: E.S. TEAM LAVORO WEB
Author URI: https://www.electronicsolution.computer
Template: generatepress
Version: 2.0.0
Text Domain: electronic-solution-child
*/

/* ===================================================================
   DESIGN TOKENS
   =================================================================== */
:root {
    /* — Backgrounds — */
    --bg-obsidian: #0A0A0A;
    --bg-obsidian-mid: #0E0E10;
    --bg-obsidian-end: #111113;
    --bg-card: #161618;
    --bg-card-hover: #1C1C1F;
    --bg-input: #111113;

    /* — Brand — */
    --gold: #C5A059;
    --gold-light: #d4b477;
    --gold-dark: #a8873e;
    --gold-glow: rgba(197, 160, 89, .25);
    --gold-glow-strong: rgba(197, 160, 89, .45);

    /* — Text — */
    --text-white: #FFFFFF;
    --text-silver: #D0D1D3;
    --text-muted: #8a8d93;
    --text-dark: #0B0C10;

    /* — Typography — */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* — Sizing — */
    --container-max: 1280px;
    --container-padding: 2rem;
    --section-spacing: 9rem;
    --card-radius: 1rem;
    --card-radius-lg: 1.5rem;
    --btn-radius: 0.625rem;

    /* — Luxury Typography Scale (1.25 ratio) — */
    --text-xs: 0.75rem;     /* 12px  — legal, fine print */
    --text-sm: 0.875rem;    /* 14px  — captions, nav */
    --text-base: 1rem;      /* 16px  — body */
    --text-lg: 1.125rem;    /* 18px  — lead paragraphs */
    --text-xl: 1.25rem;     /* 20px  — card titles */
    --text-2xl: 1.5rem;     /* 24px  — sub-headings */
    --text-3xl: 2rem;       /* 32px  — section headings */
    --text-4xl: 2.75rem;    /* 44px  — hero sub */
    --text-5xl: 3.5rem;     /* 56px  — hero heading */

    /* — Timing — */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
    --transition-base: 0.35s var(--ease-out-expo);
    --transition-slow: 0.6s var(--ease-out-expo);
    --transition-reveal: 0.8s var(--ease-out-quint);

    /* — Z-index — */
    --z-navbar: 1000;
    --z-overlay: 500;
}

/* ===================================================================
   RESET & GLOBAL OVERRIDES (over GeneratePress)
   =================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

body,
body.flavor-flavor,
body.flavor-flavor .site {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.75;
    color: var(--text-silver);
    background: var(--bg-obsidian);
    letter-spacing: 0.01em;
}

/* Override GeneratePress wrappers */
.site-content,
.inside-article,
.entry-content,
#page,
#content,
.site {
    background: transparent !important;
    color: inherit !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--gold-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    color: var(--text-white);
    line-height: 1.12;
    margin: 0 0 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ===================================================================
   UTILITIES
   =================================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.text--accent {
    color: var(--gold);
}

.text--white {
    color: var(--text-white);
}

/* ===================================================================
   REVEAL ANIMATIONS (JS Intersection Observer driven)
   Wrapped in prefers-reduced-motion for accessibility compliance.
   Users who disable OS animations see instant content, no motion.
   =================================================================== */

/* Default: content visible, no animation (accessible baseline) */
.reveal {
    opacity: 1;
    transform: none;
    filter: none;
}

.reveal.revealed {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Animated version: only for users who accept motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(48px);
        filter: blur(4px);
        transition:
            opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
            transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
            filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: opacity, transform, filter;
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }

    /* Staggered children — dramatic cascade */
    .reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
    .reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.15s; }
    .reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.30s; }
    .reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.45s; }
}

/* ===================================================================
   NAVBAR
   =================================================================== */

/* Hide GeneratePress default nav */
#site-navigation,
.main-navigation,
.site-header:not(.es-header) {
    display: none !important;
}

.es-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-navbar);
    background: rgba(10, 10, 12, 0.45);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 -12px 20px -12px rgba(255, 0, 40, 0.55);
    transition:
        background 0.4s ease,
        backdrop-filter 0.4s ease,
        -webkit-backdrop-filter 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.es-header.scrolled {
    background: rgba(10, 10, 12, 0.65);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 -12px 20px -12px rgba(255, 0, 40, 0.8),
        0 4px 30px rgba(0, 0, 0, 0.5);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0.9rem var(--container-padding);
}

.navbar__logo-img {
    height: 42px;
    width: auto;
    transition: transform var(--transition-base), filter var(--transition-base);
}

.navbar__logo:hover .navbar__logo-img {
    transform: scale(1.04);
    filter: drop-shadow(0 0 12px var(--gold-glow));
}

.navbar__menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.navbar__link {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-silver);
    position: relative;
    padding: 0.25rem 0;
    transition: color var(--transition-base);
}

.navbar__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width var(--transition-base);
}

.navbar__link:hover,
.navbar__link--active {
    color: var(--text-white);
}

.navbar__link:hover::after,
.navbar__link--active::after {
    width: 100%;
}

.navbar__link--cta {
    background: var(--gold);
    color: var(--text-dark) !important;
    padding: 0.6rem 1.5rem;
    border-radius: var(--btn-radius);
    font-weight: 600;
    transition: background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.navbar__link--cta::after {
    display: none;
}

.navbar__link--cta:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--gold-glow);
}

/* Hamburger */
.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1010;
}

.navbar__toggle-bar {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--text-white);
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.navbar__toggle.active .navbar__toggle-bar:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.navbar__toggle.active .navbar__toggle-bar:nth-child(2) {
    opacity: 0;
}

.navbar__toggle.active .navbar__toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

/* ===================================================================
   BUTTONS
   =================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.9rem 2rem;
    border-radius: var(--btn-radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn--primary {
    background: var(--gold);
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(197, 160, 89, 0.15);
}

.btn--primary:hover {
    background: var(--gold-light);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(197, 160, 89, 0.3);
}

.btn--outline {
    background: transparent;
    color: var(--text-white);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.btn--outline:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(197, 160, 89, 0.1);
}

.btn--full {
    width: 100%;
    justify-content: center;
}

.btn__icon {
    transition: transform var(--transition-base);
}

.btn:hover .btn__icon {
    transform: translateX(4px);
}

/* ===================================================================
   HERO SECTION
   =================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 999;
    background: linear-gradient(160deg, var(--bg-obsidian) 0%, var(--bg-obsidian-mid) 50%, var(--bg-obsidian-end) 100%);
}

/* Containment wrapper for background elements (video, overlay)
   so they don't bleed while keeping .hero overflow: visible for dropdown */
.hero__bg-contain {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.hero__bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
    z-index: 1;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(197, 160, 89, 0.06) 0%, transparent 70%),
        linear-gradient(180deg, rgba(11, 12, 16, 0.3) 0%, rgba(11, 12, 16, 0.9) 100%);
    z-index: 2;
}

.hero__container {
    position: relative;
    z-index: 3;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 10rem var(--container-padding) 5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.hero__badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.2);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-white);
    margin-bottom: 1.5rem;
}

.hero__title--accent {
    color: var(--gold);
    display: block;
}

.hero__subtitle {
    font-size: var(--text-lg);
    line-height: 1.75;
    color: var(--text-silver);
    max-width: 540px;
    margin-bottom: 3rem;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible; /* Allow heartbeat glow to breathe beyond edges */
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.hero__logo-image {
    max-width: 420px;
    width: 100%;
    height: auto;
    mix-blend-mode: screen;
    filter: none;
    background: transparent;
    box-shadow: none;
}

/* heroFloat animation removed — logo stays fixed and authoritative */

/* ── Organic Heartbeat Glow — continuous "living" pulse ──
   Soft, expansive radial gradient that breathes naturally.
   No hover required — works on all devices including mobile. */
.hero__visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 120%;
    height: 120%;
    z-index: -1;
    background: radial-gradient(
        circle,
        rgba(255, 0, 51, 0.6)  0%,
        rgba(255, 0, 51, 0.3)  30%,
        rgba(255, 0, 51, 0.08) 50%,
        rgba(255, 0, 51, 0)    65%
    );
    opacity: 0.5;
    pointer-events: none;
}

/* Heartbeat animation — only for users who accept motion */
@media (prefers-reduced-motion: no-preference) {
    .hero__visual::before {
        animation: heartbeatGlow 4s ease-in-out infinite alternate;
    }

    @keyframes heartbeatGlow {
        0% {
            opacity: 0.3;
            transform: translate(-50%, -50%) scale(0.92);
        }
        100% {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1.08);
        }
    }
}

.hero__glow {
    position: absolute;
    width: 500px;
    height: 500px;
    max-width: 100vw; /* Prevent horizontal scrollbar on narrow viewports */
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.45;
}

@media (prefers-reduced-motion: no-preference) {
    .hero__glow {
        animation: pulseGlow 4s ease-in-out infinite alternate;
    }

    @keyframes pulseGlow {
        0% { opacity: 0.3; transform: scale(0.9); }
        100% { opacity: 0.6; transform: scale(1.1); }
    }
}

/* Scroll Indicator */
.hero__scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero__scroll-text {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero__scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--gold), transparent);
}

@media (prefers-reduced-motion: no-preference) {
    .hero__scroll-line {
        animation: scrollPulse 2s ease-in-out infinite;
    }

    @keyframes scrollPulse {
        0%, 100% { opacity: 1; transform: scaleY(1); }
        50% { opacity: 0.4; transform: scaleY(0.6); }
    }
}

/* ===================================================================
   SECTION HEADER (reusable)
   =================================================================== */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 5rem;
}

.section-header--left {
    text-align: left;
    margin-left: 0;
}

.section-header__tag {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.25rem;
}

.section-header__title {
    font-size: clamp(2rem, 3.5vw, var(--text-3xl));
    font-weight: 700;
    line-height: 1.12;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.section-header__description {
    font-size: var(--text-lg);
    color: var(--text-silver);
    line-height: 1.75;
}

/* ===================================================================
   SERVICES SECTION
   =================================================================== */
.services {
    padding: var(--section-spacing) 0;
    background: linear-gradient(180deg, var(--bg-obsidian-end) 0%, var(--bg-obsidian) 100%);
}

.services__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

/* Service Card */
.service-card {
    background: var(--bg-card);
    border-radius: var(--card-radius-lg);
    padding: 2.75rem;
    box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.06),
                0 4px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--card-radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, transparent 40%, var(--gold-glow) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    border-color: rgba(197, 160, 89, 0.18);
    box-shadow:
        0 0 0 1px rgba(197, 160, 89, 0.12),
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 24px 64px rgba(0, 0, 0, 0.25),
        0 0 60px rgba(197, 160, 89, 0.08);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card__icon-wrapper {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(197, 160, 89, 0.1);
    border-radius: 14px;
    margin-bottom: 1.5rem;
}

.service-card__icon {
    width: 28px;
    height: 28px;
    color: var(--gold);
}

.service-card__image-wrapper {
    border-radius: var(--card-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    aspect-ratio: 16 / 9;
}

.service-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-card__image {
    transform: scale(1.08);
    filter: brightness(1.1) saturate(1.2);
}

.service-card__title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.service-card__description {
    font-size: 0.95rem;
    color: var(--text-silver);
    line-height: 1.8;
    margin-bottom: 1.75rem;
}

.service-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 1.25rem;
}

.service-card__features li {
    font-size: var(--text-sm);
    color: var(--text-silver);
    padding: 0.5rem 0;
    padding-left: 1.5em;
    position: relative;
    line-height: 1.65;
}

.service-card__features li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: 700;
}

.service-card__features li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.02);
}

.service-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    transition: gap var(--transition-base);
    position: relative;
    z-index: 2;
    pointer-events: auto;
    cursor: pointer;
}

.service-card__link:hover {
    gap: 0.8rem;
    color: var(--gold-light);
}

/* ===================================================================
   SERVIZI BUTTONS — Nuclear clickability fix
   =================================================================== */
.es-btn-servizi {
    position: relative !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure service card parent does not block child clicks */
.service-card {
    pointer-events: auto;
}

/* ===================================================================
   CASE STUDIES / PORTFOLIO SECTION
   =================================================================== */
.case-studies {
    padding: var(--section-spacing) 0;
    background: var(--bg-obsidian);
}

.case-studies__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.case-studies__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.case-card {
    position: relative;
    border-radius: var(--card-radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transition:
        border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-card:hover {
    border-color: rgba(197, 160, 89, 0.2);
    transform: translateY(-4px);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(197, 160, 89, 0.08);
}

.case-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-card:hover .case-card__image {
    transform: scale(1.08);
    filter: brightness(0.8);
}

.case-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(11, 12, 16, 0.95) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    transition: background var(--transition-base);
}

.case-card:hover .case-card__overlay {
    background: linear-gradient(0deg, rgba(11, 12, 16, 0.98) 0%, rgba(11, 12, 16, 0.4) 100%);
}

.case-card__tag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.case-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.case-card__desc {
    font-size: 0.85rem;
    color: var(--text-silver);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.case-card:hover .case-card__desc {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================================
   ABOUT / CEO SECTION
   =================================================================== */
.about {
    padding: var(--section-spacing) 0;
    background: linear-gradient(180deg, var(--bg-obsidian) 0%, var(--bg-obsidian-end) 100%);
}

.about__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.about__image-wrapper {
    position: relative;
    overflow: hidden; /* Contain .about__image-accent at right: -20px on narrow viewports */
}

.about__image {
    width: 100%;
    border-radius: var(--card-radius-lg);
    object-fit: contain;
    background: var(--bg-card);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.about__image-wrapper:hover .about__image {
    transform: scale(1.04);
}

.about__image-border {
    position: absolute;
    inset: -8px;
    border: 1px solid rgba(197, 160, 89, 0.15);
    border-radius: calc(var(--card-radius-lg) + 6px);
    transition: border-color var(--transition-base);
}

.about__image-wrapper:hover .about__image-border {
    border-color: rgba(197, 160, 89, 0.35);
}

.about__image-accent {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
}

.about__text p {
    font-size: 1.05rem;
    color: var(--text-silver);
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.about__stats {
    display: flex;
    gap: 4rem;
    margin: 3rem 0;
    padding: 2.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.about__stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.about__stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about__quote {
    margin: 2.5rem 0 0;
    padding: 2rem 2.5rem;
    border-left: 3px solid var(--gold);
    background: rgba(197, 160, 89, 0.03);
    border-radius: 0 var(--card-radius) var(--card-radius) 0;
}

.about__quote p {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-white);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.about__quote-author cite {
    font-style: normal;
}

.about__quote-author strong {
    display: block;
    color: var(--text-white);
    font-size: 0.95rem;
}

.about__quote-author span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===================================================================
   NOTA PERSONALE — CEO Transparency Block
   =================================================================== */
.about__nota-personale {
    margin-top: 3rem;
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--card-radius-lg) var(--card-radius-lg) 0;
    position: relative;
    overflow: hidden;
}

.about__nota-personale::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.about__nota-personale-header {
    margin-bottom: 1.5rem;
}

.about__nota-personale-body p {
    font-size: 1.05rem;
    color: var(--text-silver);
    line-height: 1.8;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

.about__nota-personale-body p:last-child {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--text-white);
    font-style: italic;
}

.about__nota-personale-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

.about__nota-personale-footer cite {
    font-style: normal;
}

.about__nota-personale-footer strong {
    display: block;
    color: var(--text-white);
    font-size: 0.95rem;
}

.about__nota-personale-footer span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .about__nota-personale {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .about__nota-personale-body p {
        font-size: 0.95rem;
    }
}

/* ===================================================================
   CONTACT SECTION
   =================================================================== */
.contact {
    padding: var(--section-spacing) 0;
    background: var(--bg-obsidian-end);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.04) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
}

.contact__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.contact__description {
    font-size: 1.05rem;
    color: var(--text-silver);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact__details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact__detail {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.contact__detail-icon {
    width: 24px;
    height: 24px;
    color: var(--gold);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact__detail strong {
    display: block;
    color: var(--text-white);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.contact__detail span,
.contact__detail a {
    font-size: 0.9rem;
    color: var(--text-silver);
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Contact Form */
.contact__form-wrapper {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--card-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.04);
    min-width: 0;       /* Prevent flex/grid children from pushing beyond container */
    overflow: hidden;   /* Structural containment for CF7-generated form elements */
}

.contact__form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.contact__form-group--full {
    grid-column: 1 / -1;
}

.contact__label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.contact__input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--btn-radius);
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.contact__input::placeholder {
    color: var(--text-muted);
}

.contact__input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.contact__textarea {
    resize: vertical;
    min-height: 120px;
}

.contact__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23C5C6C7' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===================================================================
   CF7 (Contact Form 7) — Structural Containment
   Prevents CF7-generated elements (which use size="40" on inputs)
   from exceeding their parent containers on narrow viewports.
   =================================================================== */
.wpcf7,
.wpcf7-form {
    max-width: 100%;
    box-sizing: border-box;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--btn-radius);
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
    color: var(--text-muted);
}

.wpcf7 textarea {
    resize: vertical;
    min-height: 120px;
}

.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit {
    width: 100%;
    background: var(--gold);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.9rem 2rem;
    border: none;
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(197, 160, 89, 0.15);
}

.wpcf7 input[type="submit"]:hover,
.wpcf7 .wpcf7-submit:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(197, 160, 89, 0.3);
}

/* CF7 labels */
.wpcf7 label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

/* CF7 validation messages */
.wpcf7-not-valid-tip {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.wpcf7-response-output {
    border-color: var(--gold) !important;
    color: var(--text-silver);
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: var(--btn-radius);
    margin: 1rem 0 0;
}

/* CF7 inside modal — force same containment */
.es-modal__cf7-wrapper {
    max-width: 100%;
    overflow: hidden;
}

.es-modal__cf7-wrapper .wpcf7 input[type="text"],
.es-modal__cf7-wrapper .wpcf7 input[type="email"],
.es-modal__cf7-wrapper .wpcf7 input[type="tel"],
.es-modal__cf7-wrapper .wpcf7 select,
.es-modal__cf7-wrapper .wpcf7 textarea {
    background: var(--bg-input, rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--btn-radius, 12px);
    color: var(--text-white, #f5f5f7);
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.88rem;
}

/* Word-wrap safety net for unbroken strings (emails, URLs) */
.contact__detail a,
.contact__detail span,
.footer__link,
.footer__legal-text,
.footer__legal-text a {
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

/* ===================================================================
   FOOTER
   =================================================================== */

/* Hide GeneratePress footer */
.site-footer:not(.es-footer),
.site-info {
    display: none !important;
}

.es-footer {
    background: var(--bg-obsidian);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 5rem 0 0;
}

.footer__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.footer__top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer__logo-img {
    height: 38px;
    width: auto;
    margin-bottom: 1rem;
}

.footer__tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer__heading {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.2rem;
}

.footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__links li {
    margin-bottom: 0.6rem;
}

.footer__link {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: inline-block;
    transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.footer__link:hover {
    color: var(--gold);
    transform: translateX(3px);
}

.footer__link--text {
    cursor: default;
}

.footer__link--text:hover {
    color: var(--text-muted);
    padding-left: 0;
}

.footer__divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin: 0;
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer__copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.footer__legal {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}

.footer__link--small {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer__legal-block {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    width: 100%;
}

.footer__legal-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin: 0;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

.footer__legal-text a {
    color: var(--text-muted);
    transition: color var(--transition-base);
}

.footer__legal-text a:hover {
    color: var(--gold);
}

/* ===================================================================
   LOGO BADGE — White container for contrast on Obsidian
   =================================================================== */
.logo-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(245, 245, 247, 0.88);
    border: 1px solid rgba(220, 220, 225, 0.6);
    border-radius: 12px;
    padding: 4px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

.logo-badge:hover {
    background: rgba(250, 250, 252, 0.95);
    border-color: rgba(200, 200, 210, 0.7);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15), 0 0 15px var(--gold-glow);
    transform: scale(1.03);
}

.logo-badge .navbar__logo-img,
.logo-badge .footer__logo-img {
    filter: brightness(1.1);
}

/* ===================================================================
   HERO BRAND NAME — Dominant H1
   =================================================================== */
.hero__brand-name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin: 0 0 0.75rem;
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.4);
}

/* ===================================================================
   ABOUT IMAGE — Panoramic Mode
   =================================================================== */
.about__image-wrapper--panoramic {
    grid-column: 1 / -1;
}

.about__image--panoramic {
    width: 100%;
    object-fit: cover;
    border-radius: 24px;
    aspect-ratio: 16 / 7;
}

.contact__detail--whatsapp {
    list-style: none;
    padding-top: 0.5rem;
}

.btn--whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background: #25D366;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--btn-radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
}

.btn--whatsapp:hover {
    background: #20BD5A;
    color: #ffffff;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

.btn--whatsapp:active {
    transform: translateY(-1px) scale(1.01);
}

.btn--whatsapp svg {
    flex-shrink: 0;
}

/* ===================================================================
   SECONDARY QUOTE (Steve Jobs)
   =================================================================== */
.about__quote--secondary {
    margin-top: 1.5rem;
    border-left-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

.about__quote--secondary p {
    color: var(--text-silver);
    font-size: 1.05rem;
}

/* ===================================================================
   NAVBAR LOGO — Sizing
   =================================================================== */
.navbar__logo-img {
    height: 52px;
    width: auto;
    max-width: 220px;
    transition: transform var(--transition-base);
}

/* ===================================================================
   FOOTER LOGO — Sizing
   =================================================================== */
.footer__logo-img {
    transition: transform var(--transition-base);
}

/* ===================================================================
   LUXURY MICRO-INTERACTIONS (60fps – transform & opacity only)
   Hardware-accelerated. Wrapped for accessibility.
   =================================================================== */

@media (prefers-reduced-motion: no-preference) {

    /* Service card images — dramatic zoom */
    .service-card__image {
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                    filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .service-card:hover .service-card__image {
        transform: scale(1.08);
    }

    /* All buttons — elegant lift */
    .btn {
        transition: all 0.3s ease-in-out;
    }
    .btn:hover {
        transform: translateY(-2px);
    }
    .btn:active {
        transform: translateY(0);
    }

    /* Service card — dramatic lift */
    .service-card {
        transition:
            transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
            border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
            background 0.5s cubic-bezier(0.16, 1, 0.3, 1),
            box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .service-card:hover {
        transform: translateY(-6px);
    }

    /* Case card — dramatic lift */
    .case-card {
        transition:
            transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
            border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
            box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .case-card:hover {
        transform: translateY(-4px);
    }

    /* About image hover — elegant zoom */
    .about__image-wrapper:hover .about__image {
        transform: scale(1.04);
    }

    /* Reveal stagger — extended cascade for 5th/6th children */
    .reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.60s; }
    .reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.75s; }

    /* Stat number — gentle scale on hover */
    .about__stat-number {
        transition: transform 0.3s ease-in-out;
    }
    .about__stat:hover .about__stat-number {
        transform: scale(1.08);
    }

    /* Contact detail — soft slide */
    .contact__detail {
        transition: transform 0.3s ease-in-out;
    }
    .contact__detail:hover {
        transform: translateX(6px);
    }

    /* Footer logo — soft glow on hover */
    .footer__brand:hover .logo-badge {
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5), 0 0 12px var(--gold-glow);
    }

    /* Footer link — smooth shift */
    .footer__link {
        transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
    }
    .footer__link:hover {
        transform: translateX(3px);
    }

    /* Navbar link underline animation */
    .navbar__link::after {
        transition: width 0.35s var(--ease-out-expo);
    }

    /* Logo badge — smooth hover */
    .logo-badge {
        transition:
            background 0.3s ease-in-out,
            box-shadow 0.3s ease-in-out,
            transform 0.3s ease-in-out,
            border-color 0.3s ease-in-out;
    }

    /* Gold accent text — subtle shimmer on hover parent */
    .service-card:hover .service-card__title {
        color: var(--gold-light);
        transition: color 0.4s ease-in-out;
    }
}

/* ===================================================================
   FOOTER — Link Clickability Fix
   =================================================================== */
.footer__bottom {
    position: relative;
    z-index: 9999;
    pointer-events: auto;
}

.footer__legal {
    position: relative;
    z-index: 9999;
    pointer-events: auto;
}

.footer__legal a,
.footer__legal .footer__link {
    pointer-events: auto;
    position: relative;
    z-index: 9999;
    cursor: pointer;
}

.footer__legal-block {
    position: relative;
    z-index: 9999;
    pointer-events: auto;
}

.footer__legal-block a {
    pointer-events: auto;
    position: relative;
    z-index: 9999;
    cursor: pointer;
}

/* ===================================================================
   RESPONSIVE — MOBILE
   =================================================================== */
@media (max-width: 1024px) {
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 7rem;
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__brand-name {
        font-size: clamp(2.5rem, 7vw, 4rem);
    }

    .hero__visual {
        order: -1;
    }

    .hero__logo-image {
        max-width: 280px;
    }

    .services__grid {
        grid-template-columns: 1fr;
    }

    .case-studies__grid {
        grid-template-columns: 1fr;
    }

    .about__container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact__container {
        grid-template-columns: 1fr;
    }

    .footer__top {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-spacing: 5rem;
        --container-padding: 1.25rem;
    }

    .navbar__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: rgba(11, 12, 16, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right var(--transition-base);
        z-index: 1005;
    }

    .navbar__menu.open {
        right: 0;
    }

    .navbar__toggle {
        display: flex;
    }

    .hero__title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero__container {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .hero__scroll-indicator {
        bottom: 1rem;
    }

    .hero__scroll-line {
        height: 32px;
    }

    .contact__form {
        grid-template-columns: 1fr;
    }

    .contact__form-wrapper {
        padding: 1.5rem;
    }

    .contact__detail div {
        min-width: 0;
    }

    .footer__top {
        grid-template-columns: 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer__legal {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .about__stats {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    /* Portfolio cards — taller ratio on mobile so text is never clipped */
    .case-card {
        aspect-ratio: 16 / 12;
    }

    .case-card__overlay {
        padding: 1.25rem;
    }

    .case-card__title {
        font-size: 1.1rem;
    }

    .case-card__tag {
        font-size: 0.7rem;
        margin-bottom: 0.35rem;
    }

    .hero__brand-name {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .logo-badge {
        padding: 3px 6px;
        border-radius: 10px;
    }
}

/* ===================================================================
   DESKTOP HERO TYPOGRAPHY — Directive 2
   =================================================================== */
@media (min-width: 992px) {
    .hero__brand-name {
        font-size: 4.2rem;
    }

    .hero__title {
        font-size: 3.2rem;
    }
}

/* ===================================================================
   GLASSMORPHISM DROPDOWN — "Scopri i Servizi"
   =================================================================== */
.hero-dropdown {
    position: relative;
    display: inline-block;
}

.hero-dropdown__menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 260px;
    background: rgba(31, 40, 51, 0.75);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--card-radius);
    padding: 15px 0 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out-expo),
        transform 0.3s var(--ease-out-expo),
        visibility 0.3s;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 30px rgba(197, 160, 89, 0.08);
    z-index: 100;
    list-style: none;
    margin: 0;
}

/* Invisible hover bridge — prevents losing hover state between trigger and menu */
.hero-dropdown__menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.hero-dropdown:hover .hero-dropdown__menu,
.hero-dropdown.open .hero-dropdown__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.hero-dropdown__item {
    display: block;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-silver);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, padding-left 0.2s;
    border-left: 3px solid transparent;
}

.hero-dropdown__item:hover {
    background: rgba(197, 160, 89, 0.1);
    color: var(--gold);
    padding-left: 1.75rem;
    border-left-color: var(--gold);
}

.hero-dropdown__item span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ===================================================================
   ABOUT SECTION — Full-width text on desktop (Directive 5)
   =================================================================== */
@media (min-width: 992px) {
    .about__container {
        grid-template-columns: 1fr;
    }

    .about__content {
        max-width: 100%;
    }

    .about__text {
        max-width: 100%;
    }
}

/* ===================================================================
   GLOBAL TEXT ALIGNMENT — Clean Tech Look
   =================================================================== */
p,
.es-lead,
.section-header__description,
.service-card__description,
.contact__description,
.about__text p,
.hero__subtitle,
.footer__tagline {
    text-align: left;
}

/* ===================================================================
   HOTFIX: Forza l'Header di GeneratePress a stare sopra tutto
   =================================================================== */
.site-header,
#masthead,
.inside-header {
    position: relative !important;
    z-index: 99999 !important;
}

/* Abbassa la Hero a un livello intermedio (basta per il dropdown, ma sta sotto l'header) */
.es-hero,
.es-page-hero {
    position: relative;
    z-index: 999 !important;
}

/* ===================================================================
   HOTFIX: Centratura Layout su Desktop Wide
   Forza tutti i contenitori macro a centrare il corpo pagina.
   =================================================================== */
.es-wrap,
#page,
.site-content,
.site-main,
.entry-content,
.inside-article,
#main-content {
    margin: 0 auto !important;
    width: 100%;
    max-width: 100%;
    display: block;
}

/* ===================================================================
   CLEAN ROOM — Bottoni Servizi (classe vergine, zero interferenze JS)
   =================================================================== */
.es-btn-clean-contact {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 24px;
    background: linear-gradient(90deg, #C5A059, #b28b50);
    color: #000 !important;
    border-radius: 14px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none !important;
    position: relative !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    border: none;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.25);
    margin-top: 0.5rem;
}

.es-btn-clean-contact:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    box-shadow: 0 8px 30px rgba(197, 160, 89, 0.4);
    color: #000 !important;
    text-decoration: none !important;
}

.es-btn-clean-contact:active {
    transform: translateY(0);
}

/* Service card: ensure card receives hover for luxury effects,
   while ::before overlay (gradient border) doesn't block clicks */
.service-card {
    pointer-events: auto;
}

.service-card::before {
    pointer-events: none;
}

/* ===================================================================
   CONTACT MODAL — Glassmorphism Luxury Overlay
   =================================================================== */
.es-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s var(--ease-out-expo, cubic-bezier(0.19, 1, 0.22, 1));
}

.es-modal--visible {
    opacity: 1;
}

.es-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(15px) saturate(1.4);
    -webkit-backdrop-filter: blur(15px) saturate(1.4);
}

.es-modal__container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-card, #16181e);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: var(--card-radius-lg, 24px);
    padding: 2.5rem;
    box-shadow:
        0 0 0 1px rgba(197, 160, 89, 0.10),
        0 32px 80px rgba(0, 0, 0, 0.6),
        0 0 120px rgba(197, 160, 89, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s var(--ease-out-expo, cubic-bezier(0.19, 1, 0.22, 1));
}

.es-modal--visible .es-modal__container {
    transform: scale(1) translateY(0);
}

/* Close button */
.es-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: var(--text-silver, #c5c6c7);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    z-index: 2;
}

.es-modal-close:hover {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    transform: rotate(90deg);
}

/* Title & subtitle */
.es-modal__title {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-white, #f5f5f7);
    margin: 0 0 0.5rem;
}

.es-modal__subtitle {
    font-size: 0.9rem;
    color: var(--text-muted, #6c6e74);
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

/* Form layout */
.es-modal__form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.es-modal__field--full {
    grid-column: 1 / -1;
}

.es-modal__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-white, #f5f5f7);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.es-modal__input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input, rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--btn-radius, 12px);
    color: var(--text-white, #f5f5f7);
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.88rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.es-modal__input::placeholder {
    color: var(--text-muted, #6c6e74);
}

.es-modal__input:focus {
    outline: none;
    border-color: var(--gold, #c5a059);
    box-shadow: 0 0 0 3px var(--gold-glow, rgba(197, 160, 89, 0.15));
}

.es-modal__textarea {
    resize: vertical;
    min-height: 90px;
}

.es-modal__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23C5C6C7' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.es-modal__submit {
    margin-top: 0.5rem;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .es-modal__container {
        width: 95%;
        padding: 1.5rem;
    }

    .es-modal__form {
        grid-template-columns: 1fr;
    }

    .es-modal__title {
        font-size: 1.3rem;
    }
}

/* ===================================================================
   OBIETTIVO 1: LOGO HEADER — Massimizzazione (≈95% del badge)
   ----------------------------------------------------------------
   Struttura: .navbar__logo > .logo-badge > .navbar__logo-img
   Padding ridotto al minimo; l'immagine riempie quasi tutto il badge
   con object-fit: contain per non deformarla.
   =================================================================== */
.navbar__logo .logo-badge {
    padding: 1px 3px;
    height: 60px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}

.navbar__logo .logo-badge .navbar__logo-img {
    height: calc(100% - 2px); /* ≈ 95% badge height */
    width: auto;
    max-width: none;
    object-fit: contain;
    display: block;
}

/* ===================================================================
   OBIETTIVO 2: LOGO FOOTER — Massimizzazione (≈95% del badge)
   ----------------------------------------------------------------
   Struttura: .footer__logo > .logo-badge > .footer__logo-img
   =================================================================== */
.footer__logo .logo-badge {
    padding: 1px 3px;
    height: 46px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}

.footer__logo .logo-badge .footer__logo-img {
    height: calc(100% - 2px); /* ≈ 95% badge height */
    width: auto;
    object-fit: contain;
    display: block;
    margin-bottom: 0;
}

/* ===================================================================
   OBIETTIVO 3: HEADER — Trasparente al top, semi-trasparente allo scroll
   ----------------------------------------------------------------
   Il JS in animations.js aggiunge già la classe .scrolled
   quando window.scrollY > 60 px.
   Default → trasparente (hero video visibile dietro).
   Scrolled → sfondo scuro all'88% di opacità + blur leggero(5px),
   così il testo del menu rimane sempre leggibile.
   =================================================================== */

/* ── Black Diamond Glass — Default (top of page, hero visible behind) ── */
.es-header {
    background: rgba(10, 10, 12, 0.45);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 -12px 20px -12px rgba(255, 0, 40, 0.55);
    transition:
        background 0.4s ease,
        backdrop-filter 0.4s ease,
        -webkit-backdrop-filter 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

/* ── Black Diamond Glass — Scrolled (opaque, full red reflection) ── */
.es-header.scrolled {
    background: rgba(10, 10, 12, 0.65);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 -12px 20px -12px rgba(255, 0, 40, 0.8),
        0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Responsive: aggiusta dimensione badge logo su mobile */
@media (max-width: 768px) {
    .navbar__logo .logo-badge {
        height: 50px;
        padding: 1px 2px;
    }

    .footer__logo .logo-badge {
        height: 38px;
        padding: 1px 2px;
    }
}

/* ===================================================================
   LUXURY POLISH — Section Separators & Final Refinements
   Gold gradient dividers between major sections.
   =================================================================== */

/* Elegant section separator — thin gold gradient line
   NOTE: .about and .contact excluded — they use ::before for their own effects */
.services::before,
.case-studies::before {
    content: '';
    display: block;
    width: 120px;
    height: 1px;
    margin: 0 auto 4rem;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--gold) 50%,
        transparent 100%);
    opacity: 0.4;
}

/* Selection color — Brand gold */
::selection {
    background: rgba(197, 160, 89, 0.25);
    color: var(--text-white);
}

::-moz-selection {
    background: rgba(197, 160, 89, 0.25);
    color: var(--text-white);
}

/* Focus visible — Elegant gold focus ring for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Scrollbar — Luxury dark theme */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-obsidian);
}

::-webkit-scrollbar-thumb {
    background: rgba(197, 160, 89, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(197, 160, 89, 0.35);
}

/* Nota Personale — Luxury refinement */
.about__nota-personale {
    padding: 3rem;
}

.about__nota-personale-body p {
    line-height: 1.85;
}

/* Contact form wrapper — Elevated look */
.contact__form-wrapper {
    border-color: rgba(197, 160, 89, 0.06);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

/* Hero badge — Tighter letter spacing for luxury feel */
.hero__badge {
    letter-spacing: 0.14em;
    font-size: var(--text-xs);
}

/* Tablet breakpoint — smooth section spacing transition */
@media (max-width: 1024px) {
    :root {
        --section-spacing: 7rem;
    }

    .services::before,
    .case-studies::before {
        margin-bottom: 3rem;
    }
}

/* Mobile — refined separators */
@media (max-width: 768px) {
    .services::before,
    .case-studies::before {
        width: 80px;
        margin-bottom: 2.5rem;
    }

    .about__nota-personale {
        padding: 1.75rem;
    }

    .section-header {
        margin-bottom: 3.5rem;
    }

    .service-card {
        padding: 2rem;
    }
}