:root {
    --el-bordeaux-deep: #2b0017;
    --el-bordeaux: #7a1e2d;
    --el-bordeaux-bright: #a62f45;
    --el-rose: #c26d6d;
    --el-sand: #e6e1dc;
    --el-paper: #f7f5f3;
    --el-white: #ffffff;
    --el-black: #0d0d0d;
    --el-ink: #1d1a1b;
    --el-muted: #686064;
    --el-line: #e8e2df;
    --el-display: "Space Grotesk", sans-serif;
    --el-body: "Manrope", sans-serif;
    --el-container: 1240px;
    --el-gutter: clamp(20px, 4vw, 64px);
    --el-radius: 22px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--el-white);
    color: var(--el-ink);
    font-family: var(--el-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,p { margin-top: 0; }
h1,h2,h3,.el-display { font-family: var(--el-display); letter-spacing: -.04em; }
mark { background: none; color: var(--el-bordeaux); }

.el-container {
    width: min(calc(100% - (var(--el-gutter) * 2)), var(--el-container));
    margin-inline: auto;
}

/* Header */
.el-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.9);
    border-bottom: 1px solid rgba(232,226,223,.8);
    backdrop-filter: blur(18px);
}
.el-header__inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.el-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}
.el-brand__mark { width: 32px; color: var(--el-bordeaux); }
.el-brand__mark svg { width: 100%; height: auto; }
.el-brand__name {
    font-family: var(--el-display);
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .16em;
}
.el-nav { display:flex; align-items:center; gap:28px; }
.el-nav__list { display:flex; gap:26px; list-style:none; padding:0; margin:0; }
.el-nav__list a { font-size:.92rem; font-weight:600; color:#3d383a; }
.el-nav__list a:hover,.current-menu-item>a { color:var(--el-bordeaux); }
.el-header-cta {
    display:inline-flex;
    min-height:42px;
    align-items:center;
    padding:0 18px;
    border-radius:999px;
    background:var(--el-bordeaux);
    color:#fff;
    font-family:var(--el-display);
    font-weight:600;
}
.el-nav-toggle { display:none; }

/* Core sections */
.el-section { padding-block: clamp(76px, 10vw, 136px); }
.el-section--soft { background: var(--el-paper); }
.el-section--dark { background: var(--el-black); color: var(--el-white); }
.el-eyebrow,.el-kicker {
    margin-bottom:16px;
    color:var(--el-bordeaux-bright);
    font-family:var(--el-display);
    font-size:.76rem;
    font-weight:700;
    letter-spacing:.14em;
    text-transform:uppercase;
}
.el-section--dark .el-eyebrow { color:#e5a1ab; }
.el-section-heading { max-width:780px; margin-bottom:56px; }
.el-section-heading h2,.el-split h2 {
    margin-bottom:18px;
    font-size:clamp(2.35rem,4.6vw,4.7rem);
    line-height:1;
}
.el-section-heading>p:last-child,.el-list-item p,.el-feature p,.el-example p,.el-prose p {
    color:var(--el-muted);
}
.el-split {
    display:grid;
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
    gap:clamp(48px,8vw,120px);
}
.el-prose { font-size:1.08rem; }

/* Hero */
.el-hero {
    min-height:calc(100svh - 78px);
    display:grid;
    align-items:center;
    overflow:hidden;
}
.el-hero__grid {
    display:grid;
    grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);
    align-items:center;
    gap:clamp(50px,8vw,120px);
    padding-block:clamp(80px,11vw,150px);
}
.el-hero__title {
    max-width:950px;
    margin-bottom:26px;
    font-size:clamp(3.65rem,7.4vw,7.7rem);
    line-height:.9;
    letter-spacing:-.06em;
}
.el-hero__lead {
    max-width:720px;
    color:#51494d;
    font-size:clamp(1.08rem,1.45vw,1.28rem);
}
.el-hero__sigil {
    width:min(100%,300px);
    margin-inline:auto;
    color:var(--el-bordeaux);
}
.el-hero__sigil svg { width:100%; height:auto; }
.el-actions { margin-top:34px; gap:12px; }

/* WP buttons */
.el-button .wp-block-button__link {
    min-height:52px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 24px;
    border-radius:999px;
    border:1px solid transparent;
    font-family:var(--el-display);
    font-weight:600;
    font-size:.93rem;
}
.el-button--primary .wp-block-button__link { background:var(--el-bordeaux); color:#fff; }
.el-button--secondary .wp-block-button__link { background:#fff; color:var(--el-ink); border-color:var(--el-line); }
.el-button--light .wp-block-button__link { background:#fff; color:var(--el-bordeaux-deep); }

/* Cards */
.el-services-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:18px;
}
.el-card {
    min-height:290px;
    display:flex;
    flex-direction:column;
    padding:30px;
    border:1px solid var(--el-line);
    border-radius:var(--el-radius);
    background:#fff;
}
.el-card--featured {
    grid-column:span 2;
    min-height:370px;
    color:#fff;
    background:var(--el-bordeaux-deep);
    border-color:transparent;
}
.el-index { color:var(--el-rose); font-family:var(--el-display); font-size:.8rem; font-weight:700; }
.el-card h3 { margin-top:auto; margin-bottom:12px; font-size:clamp(1.7rem,2.5vw,2.6rem); line-height:1.05; }
.el-card p { color:var(--el-muted); }
.el-card--featured p { color:rgba(255,255,255,.7); }
.el-link { margin-top:20px; font-family:var(--el-display); font-weight:600; }
.el-card .el-link a { color:var(--el-bordeaux); }
.el-card--featured .el-link a { color:#f0b1ba; }

/* Lists / steps / examples */
.el-list { border-top:1px solid var(--el-line); }
.el-list-item { padding:28px 0; border-bottom:1px solid var(--el-line); }
.el-list-item h3 { margin:8px 0; font-size:1.65rem; }
.el-steps {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:1px;
    background:rgba(255,255,255,.14);
    border:1px solid rgba(255,255,255,.14);
}
.el-step { min-height:260px; padding:28px; background:var(--el-black); }
.el-step h3 { margin-top:58px; font-size:1.45rem; }
.el-step p { color:rgba(255,255,255,.62); }
.el-example-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.el-example { padding:30px; border:1px solid var(--el-line); border-radius:var(--el-radius); }
.el-example h3 { margin-top:70px; font-size:1.55rem; }

/* Page hero / features */
.el-page-hero { padding-block:clamp(88px,12vw,160px); border-bottom:1px solid var(--el-line); }
.el-page-hero__grid {
    display:grid;
    grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);
    align-items:end;
    gap:clamp(48px,8vw,120px);
}
.el-page-hero h1 { margin:0; font-size:clamp(3.4rem,7vw,7rem); line-height:.92; letter-spacing:-.06em; }
.el-page-hero__lead { margin:0; color:var(--el-muted); font-size:clamp(1.08rem,1.6vw,1.3rem); }
.el-feature-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.el-feature-grid--three { grid-template-columns:repeat(3,1fr); }
.el-feature {
    min-height:320px;
    padding:32px;
    border:1px solid var(--el-line);
    border-radius:var(--el-radius);
    background:#fff;
}
.el-feature h2 { margin-top:74px; font-size:clamp(1.8rem,2.6vw,2.7rem); line-height:1.02; }

/* CTA */
.el-cta { padding-block:clamp(70px,9vw,110px); background:var(--el-bordeaux); color:#fff; }
.el-cta .el-eyebrow { color:#efb0ba; }
.el-cta__inner { display:flex; align-items:end; justify-content:space-between; gap:48px; }
.el-cta h2 { max-width:850px; margin:0; font-size:clamp(2.2rem,4.8vw,4.8rem); line-height:.98; }

/* Contact */
.el-contact-grid { display:grid; grid-template-columns:.8fr 1.2fr; gap:clamp(48px,8vw,120px); }
.el-contact-panel { padding:clamp(26px,4vw,48px); border:1px solid var(--el-line); border-radius:var(--el-radius); box-shadow:0 24px 70px rgba(43,0,23,.08); }
.el-contact-form { display:grid; gap:20px; }
.el-form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.el-contact-form label { display:grid; gap:8px; }
.el-contact-form label>span { font-size:.82rem; font-weight:700; }
.el-contact-form input,.el-contact-form select,.el-contact-form textarea {
    width:100%;
    border:1px solid #d9d1ce;
    border-radius:12px;
    background:#fff;
    padding:13px 14px;
}
.el-contact-form textarea { resize:vertical; }
.el-form-privacy { color:var(--el-muted); font-size:.78rem; }
.el-submit {
    min-height:52px;
    padding:0 24px;
    border:0;
    border-radius:999px;
    background:var(--el-bordeaux);
    color:#fff;
    font-family:var(--el-display);
    font-weight:600;
}
.el-honeypot { position:absolute!important; left:-9999px!important; }
.el-notice { margin-bottom:24px; padding:14px 16px; border-radius:10px; }
.el-notice--success { background:#eef7ef; color:#23582b; }
.el-notice--error { background:#fff0f1; color:#8a2533; }

/* Footer */
.el-footer { padding:72px 0 28px; background:var(--el-black); color:#fff; }
.el-footer__grid { display:grid; grid-template-columns:1.7fr .7fr .7fr; gap:64px; }
.el-footer__grid>div { display:flex; flex-direction:column; gap:10px; }
.el-footer__grid p,.el-footer__grid a { color:rgba(255,255,255,.6); }
.el-brand--footer .el-brand__mark { color:var(--el-rose); }
.el-footer__bottom {
    display:flex;
    justify-content:space-between;
    gap:32px;
    margin-top:64px;
    padding-top:24px;
    border-top:1px solid rgba(255,255,255,.14);
    color:rgba(255,255,255,.5);
    font-size:.85rem;
}
.el-generic { padding-block:80px; }

/* Mobile */
@media (max-width: 920px) {
    .el-hero__grid,.el-page-hero__grid,.el-split,.el-contact-grid,.el-footer__grid { grid-template-columns:1fr; }
    .el-hero__sigil { display:none; }
    .el-services-grid { grid-template-columns:1fr 1fr; }
    .el-card--featured { grid-column:span 2; }
    .el-steps { grid-template-columns:1fr 1fr; }
    .el-example-grid,.el-feature-grid,.el-feature-grid--three { grid-template-columns:1fr; }
    .el-footer__bottom { flex-direction:column; }
}
@media (max-width: 780px) {
    .el-nav-toggle {
        display:block;
        width:44px;height:44px;padding:10px;border:0;background:transparent;
    }
    .el-nav-toggle>span:not(.screen-reader-text) { display:block;height:2px;margin:5px 0;background:var(--el-black); }
    .el-nav {
        position:absolute;top:78px;left:0;right:0;
        display:none;align-items:stretch;flex-direction:column;
        padding:24px var(--el-gutter) 30px;background:#fff;border-bottom:1px solid var(--el-line);
    }
    .el-nav.is-open { display:flex; }
    .el-nav__list { flex-direction:column; gap:4px; }
    .el-nav__list a { display:block;padding:10px 0; }
}
@media (max-width: 620px) {
    .el-services-grid,.el-steps,.el-form-row { grid-template-columns:1fr; }
    .el-card--featured { grid-column:auto; }
    .el-cta__inner { align-items:flex-start; flex-direction:column; }
}


/* =====================================================================
   Esper Labs v0.4 — advanced visual layer
   ===================================================================== */

::selection { background: var(--el-bordeaux); color: #fff; }

body {
    overflow-x: hidden;
    background:
        linear-gradient(rgba(122,30,45,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122,30,45,.018) 1px, transparent 1px),
        var(--el-white);
    background-size: 72px 72px;
}

.el-header {
    transition: min-height .25s ease, box-shadow .25s ease, background .25s ease;
}
.el-header.is-scrolled {
    background: rgba(255,255,255,.96);
    box-shadow: 0 14px 45px rgba(43,0,23,.06);
}
.el-header__signal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    color: #81787c;
    font-family: var(--el-display);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .13em;
}
.el-header__signal i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--el-bordeaux-bright);
    box-shadow: 0 0 0 5px rgba(166,47,69,.09);
}

.el-brand__mark {
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.el-brand:hover .el-brand__mark { transform: rotate(-4deg) scale(1.05); }

/* Hero — grid, glow and orbital sigil */
.el-hero {
    position: relative;
    isolation: isolate;
    background: #fff;
}
.el-hero::before {
    content: "";
    position: absolute;
    z-index: -2;
    width: min(62vw, 850px);
    aspect-ratio: 1;
    right: -24vw;
    top: -34%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(166,47,69,.14), rgba(122,30,45,.035) 46%, transparent 70%);
    filter: blur(4px);
}
.el-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 49.85%, rgba(122,30,45,.055) 50%, transparent 50.15%),
        linear-gradient(transparent 49.85%, rgba(122,30,45,.045) 50%, transparent 50.15%);
    background-size: 160px 160px;
    mask-image: linear-gradient(to right, transparent, #000 42%, #000);
    opacity: .7;
}
.el-hero__content { position: relative; z-index: 2; }
.el-hero__content::before {
    content: "ESPER / 01";
    display: block;
    margin-bottom: 28px;
    color: #9d9297;
    font-family: var(--el-display);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .18em;
}
.el-hero__title mark {
    position: relative;
    display: inline;
    background-image: linear-gradient(transparent 82%, rgba(166,47,69,.13) 82%);
}
.el-hero__sigil {
    position: relative;
    width: min(100%, 350px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 76px;
    border: 1px solid rgba(122,30,45,.18);
    border-radius: 50%;
    background: rgba(255,255,255,.62);
    box-shadow:
        0 0 0 22px rgba(122,30,45,.025),
        0 30px 90px rgba(43,0,23,.08);
    backdrop-filter: blur(12px);
    transition: transform .22s ease-out;
}
.el-hero__sigil > svg {
    position: relative;
    z-index: 3;
    width: 100%;
    filter: drop-shadow(0 18px 35px rgba(122,30,45,.16));
    animation: el-sigil-float 5.5s ease-in-out infinite;
}
.el-hero__orbit {
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    border: 1px dashed rgba(122,30,45,.25);
}
.el-hero__orbit--one { animation: el-orbit 24s linear infinite; }
.el-hero__orbit--two {
    inset: 29%;
    border-style: solid;
    border-color: rgba(122,30,45,.1);
}
.el-hero__dot {
    position: absolute;
    z-index: 4;
    width: 10px;
    height: 10px;
    top: 10%;
    left: 50%;
    border-radius: 50%;
    background: var(--el-bordeaux-bright);
    box-shadow: 0 0 0 8px rgba(166,47,69,.1);
}
@keyframes el-orbit { to { transform: rotate(360deg); } }
@keyframes el-sigil-float {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

/* Signal ticker */
.el-signal-strip {
    width: 100%;
    max-width: none !important;
    overflow: hidden;
    padding: 17px 0;
    background: var(--el-black);
    color: #fff;
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.el-signal-strip__track {
    width: max-content;
    margin: 0;
    white-space: nowrap;
    font-family: var(--el-display);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .15em;
    color: rgba(255,255,255,.68);
    will-change: transform;
    animation: el-marquee 26s linear infinite;
}
@keyframes el-marquee { to { transform: translateX(-50%); } }

/* Section detailing */
.el-section { position: relative; }
.el-section-heading { position: relative; }
.el-section-heading::after {
    content: "";
    position: absolute;
    width: 48px;
    height: 2px;
    left: 0;
    bottom: -18px;
    background: var(--el-bordeaux);
}
.el-section--dark {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 15%, rgba(194,109,109,.11), transparent 30%),
        linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px),
        var(--el-black);
    background-size: auto, 68px 68px, 68px 68px, auto;
}
.el-section--dark::after {
    content: "BUILD / EVOLVE";
    position: absolute;
    right: -30px;
    bottom: 10px;
    font-family: var(--el-display);
    font-size: clamp(4rem, 11vw, 10rem);
    font-weight: 700;
    letter-spacing: -.07em;
    color: rgba(255,255,255,.018);
    pointer-events: none;
}

/* Interactive cards */
.el-card,
.el-feature,
.el-example,
.el-founder-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transition:
        transform .35s cubic-bezier(.2,.8,.2,1),
        border-color .35s ease,
        box-shadow .35s ease;
}
.el-card::before,
.el-feature::before,
.el-example::before,
.el-founder-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: radial-gradient(
        420px circle at var(--spot-x, 50%) var(--spot-y, 50%),
        rgba(166,47,69,.095),
        transparent 42%
    );
    opacity: 0;
    transition: opacity .3s ease;
}
.el-card:hover,
.el-feature:hover,
.el-example:hover,
.el-founder-card:hover {
    transform: translateY(-6px);
    border-color: rgba(122,30,45,.28);
    box-shadow: 0 26px 70px rgba(43,0,23,.09);
}
.el-card:hover::before,
.el-feature:hover::before,
.el-example:hover::before,
.el-founder-card:hover::before { opacity: 1; }

.el-card--featured::before {
    background: radial-gradient(
        440px circle at var(--spot-x, 50%) var(--spot-y, 50%),
        rgba(255,255,255,.11),
        transparent 46%
    );
}
.el-card--featured:hover {
    border-color: rgba(255,255,255,.12);
    box-shadow: 0 28px 80px rgba(43,0,23,.22);
}

/* Steps have a more designed numbering system */
.el-step { position: relative; overflow: hidden; }
.el-step::after {
    content: "";
    position: absolute;
    width: 62px;
    height: 62px;
    right: -31px;
    top: -31px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
}

/* Page heroes */
.el-page-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 88% 45%, rgba(166,47,69,.09), transparent 28%),
        #fff;
}
.el-page-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 49.8%, rgba(122,30,45,.035) 50%, transparent 50.2%);
    background-size: 180px 100%;
}
.page-software-aziendale .el-page-hero::after,
.page-siti-web-ecommerce .el-page-hero::after,
.page-seo .el-page-hero::after,
.page-chi-siamo .el-page-hero::after,
.page-contatti .el-page-hero::after {
    position: absolute;
    z-index: -1;
    right: -1vw;
    bottom: -7vw;
    font-family: var(--el-display);
    font-size: clamp(11rem, 28vw, 26rem);
    font-weight: 700;
    line-height: .7;
    color: rgba(122,30,45,.025);
    letter-spacing: -.09em;
}
.page-software-aziendale .el-page-hero::after { content: "01"; }
.page-siti-web-ecommerce .el-page-hero::after { content: "02"; }
.page-seo .el-page-hero::after { content: "03"; }
.page-chi-siamo .el-page-hero::after { content: "04"; }
.page-contatti .el-page-hero::after { content: "05"; }

/* Home about teaser */
.el-about-teaser {
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(122,30,45,.045) 1px, transparent 1px),
        linear-gradient(rgba(122,30,45,.045) 1px, transparent 1px),
        #fff;
    background-size: 44px 44px;
}
.el-about-teaser__grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(48px, 8vw, 120px);
    align-items: end;
}
.el-about-teaser h2 {
    max-width: 720px;
    margin-bottom: 0;
    font-size: clamp(3rem, 6vw, 6.2rem);
    line-height: .92;
}
.el-about-teaser__copy {
    padding: clamp(28px, 4vw, 50px);
    border-left: 1px solid var(--el-bordeaux);
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(8px);
}
.el-about-teaser__copy > p:first-child {
    color: var(--el-muted);
    font-size: 1.08rem;
}

/* About / founder layer */
.el-metrics-wrap {
    max-width: none !important;
    padding: 0;
    border-bottom: 1px solid var(--el-line);
    background: var(--el-white);
}
.el-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.el-metric {
    min-height: 150px;
    padding: 28px 30px;
    border-left: 1px solid var(--el-line);
}
.el-metric:last-child { border-right: 1px solid var(--el-line); }
.el-metric h3 {
    margin: 0 0 24px;
    color: var(--el-bordeaux);
    font-family: var(--el-display);
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    line-height: .9;
    letter-spacing: -.06em;
}
.el-metric p {
    margin: 0;
    color: var(--el-muted);
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .11em;
}

.el-founders-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.el-founder-card {
    min-height: 480px;
    display: flex;
    flex-direction: column;
    padding: 32px;
    border: 1px solid var(--el-line);
    border-radius: var(--el-radius);
    background: #fff;
}
.el-founder-card__initials {
    margin: 0 0 auto;
    color: rgba(122,30,45,.10);
    font-family: var(--el-display);
    font-size: clamp(6.2rem, 10vw, 9rem);
    font-weight: 700;
    line-height: .75;
    letter-spacing: -.09em;
}
.el-founder-card .el-kicker { margin-top: 60px; }
.el-founder-card h3 {
    margin-bottom: 12px;
    font-size: 2rem;
}
.el-founder-card > p:last-child { color: var(--el-muted); }

/* Location artwork */
.el-location-section {
    max-width: none !important;
    padding-block: clamp(80px, 10vw, 140px);
    overflow: hidden;
    background: var(--el-bordeaux-deep);
    color: #fff;
}
.el-location-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: clamp(50px, 8vw, 120px);
    align-items: center;
}
.el-location-copy .el-eyebrow { color: #e7a5b0; }
.el-location-copy h2 {
    margin-bottom: 24px;
    font-size: clamp(2.7rem, 5.4vw, 5.7rem);
    line-height: .94;
}
.el-location-copy > p:last-child {
    max-width: 650px;
    color: rgba(255,255,255,.63);
}
.el-location-art {
    position: relative;
    min-height: 500px;
    border: 1px solid rgba(255,255,255,.15);
    overflow: hidden;
    background:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
        rgba(255,255,255,.02);
    background-size: 42px 42px;
}
.el-location-art__axis {
    position: absolute;
    background: rgba(255,255,255,.18);
}
.el-location-art__axis--x { left: 0; right: 0; top: 52%; height: 1px; }
.el-location-art__axis--y { top: 0; bottom: 0; left: 61%; width: 1px; }
.el-location-art__ring {
    position: absolute;
    left: 61%;
    top: 52%;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.el-location-art__ring--one { width: 220px; height: 220px; }
.el-location-art__ring--two { width: 360px; height: 360px; border-style: dashed; animation: el-orbit 40s linear infinite reverse; }
.el-location-art__pin {
    position: absolute;
    left: 61%;
    top: 52%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 11px rgba(255,255,255,.08);
}
.el-location-art__pin span {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: var(--el-bordeaux-bright);
}
.el-location-art__code {
    position: absolute;
    top: 24px;
    left: 26px;
    font-family: var(--el-display);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .16em;
    color: rgba(255,255,255,.55);
}
.el-location-art__word {
    position: absolute;
    right: -10px;
    bottom: -18px;
    font-family: var(--el-display);
    font-size: clamp(4rem, 9vw, 8rem);
    font-weight: 700;
    letter-spacing: -.08em;
    color: rgba(255,255,255,.07);
}

/* Contact detail rail */
.el-contact-details-section {
    padding-block: clamp(70px, 8vw, 110px);
    background: var(--el-paper);
    border-top: 1px solid var(--el-line);
}
.el-company-contacts {
    display: grid;
    grid-template-columns: .7fr 1.3fr;
    gap: clamp(40px, 7vw, 90px);
}
.el-company-contacts__intro h2 {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 4.3rem);
    line-height: .95;
}
.el-company-contacts__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.el-contact-chip {
    min-height: 124px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 22px;
    border: 1px solid var(--el-line);
    background: #fff;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
a.el-contact-chip:hover {
    transform: translateY(-4px);
    border-color: rgba(122,30,45,.3);
    box-shadow: 0 18px 45px rgba(43,0,23,.07);
}
.el-contact-chip span {
    color: var(--el-muted);
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.el-contact-chip strong {
    font-family: var(--el-display);
    font-size: 1.08rem;
}
.el-contact-chip small { color: var(--el-muted); }

/* FAQ pattern */
.el-faq-list details {
    padding: 22px 0;
    border-top: 1px solid var(--el-line);
}
.el-faq-list details:last-child { border-bottom: 1px solid var(--el-line); }
.el-faq-list summary {
    cursor: pointer;
    font-family: var(--el-display);
    font-size: 1.15rem;
    font-weight: 600;
}
.el-faq-list details p {
    max-width: 680px;
    padding-top: 16px;
    color: var(--el-muted);
}

/* Registered WP block styles */
.is-style-esperlabs-panel {
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--el-line);
    border-radius: var(--el-radius);
    background: #fff;
}
.is-style-esperlabs-dark {
    padding: clamp(28px, 4vw, 48px);
    background: var(--el-black);
    color: #fff;
}
.is-style-esperlabs-display {
    font-family: var(--el-display);
    letter-spacing: -.05em;
}
.wp-block-button.is-style-esperlabs-outline .wp-block-button__link {
    background: transparent;
    color: var(--el-bordeaux);
    border: 1px solid rgba(122,30,45,.35);
}

/* Footer refinement */
.el-footer {
    position: relative;
    overflow: hidden;
}
.el-footer::after {
    content: "ESPER";
    position: absolute;
    z-index: 0;
    right: -1vw;
    bottom: -7vw;
    color: rgba(255,255,255,.025);
    font-family: var(--el-display);
    font-size: clamp(10rem, 26vw, 24rem);
    font-weight: 700;
    letter-spacing: -.09em;
    line-height: .7;
}
.el-footer .el-container { position: relative; z-index: 1; }
.el-footer__location {
    margin-top: 14px;
    color: rgba(255,255,255,.38);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* Reveal on scroll: JS only activates it after page load */
.el-reveal-ready {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity .7s cubic-bezier(.2,.8,.2,1),
        transform .7s cubic-bezier(.2,.8,.2,1);
}
.el-reveal-ready.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1080px) {
    .el-header__signal { display: none; }
}
@media (max-width: 920px) {
    .el-about-teaser__grid,
    .el-location-grid,
    .el-company-contacts { grid-template-columns: 1fr; }
    .el-founders-grid { grid-template-columns: 1fr; }
    .el-founder-card { min-height: 360px; }
    .el-metrics { grid-template-columns: 1fr 1fr; }
    .el-metric:nth-child(2) { border-right: 1px solid var(--el-line); }
    .el-location-art { min-height: 390px; }
}
@media (max-width: 620px) {
    .el-metrics { grid-template-columns: 1fr; }
    .el-metric,
    .el-metric:nth-child(2),
    .el-metric:last-child { border-right: 1px solid var(--el-line); }
    .el-company-contacts__grid { grid-template-columns: 1fr; }
    .el-hero__content::before { margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .el-signal-strip__track,
    .el-hero__sigil > svg,
    .el-hero__orbit,
    .el-location-art__ring--two { animation: none !important; }
    .el-reveal-ready {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* =====================================================================
   Esper Labs v0.4.1 — desktop / Gutenberg layout corrections
   ===================================================================== */

/* Gutenberg flow margins were staggering grid children on desktop. */
.el-services-grid > *,
.el-steps > *,
.el-example-grid > *,
.el-feature-grid > *,
.el-founders-grid > *,
.el-metrics > *,
.el-page-hero__grid > *,
.el-about-teaser__grid > *,
.el-location-grid > *,
.el-company-contacts > *,
.el-company-contacts__grid > *,
.el-cta__inner > *,
.el-split > * {
    min-width: 0;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

.el-page-hero__grid > *,
.el-about-teaser__grid > *,
.el-location-grid > *,
.el-company-contacts > *,
.el-split > * {
    width: 100%;
    max-width: none !important;
}

.el-page-hero__grid > .wp-block-group > *,
.el-about-teaser__grid > .wp-block-group > *,
.el-location-grid > .wp-block-group > *,
.el-company-contacts__intro > *,
.el-cta__inner > .wp-block-group > * {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Services: 8/4 first row, 6/6 second row. */
@media (min-width: 921px) {
    .el-services-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        align-items: stretch;
    }

    .el-services-grid > :nth-child(1),
    .el-services-grid .el-card--featured {
        grid-column: span 8;
    }

    .el-services-grid > :nth-child(2) {
        grid-column: span 4;
    }

    .el-services-grid > :nth-child(3),
    .el-services-grid > :nth-child(4) {
        grid-column: span 6;
    }

    .el-services-grid .el-card {
        height: 100%;
    }
}

.el-steps,
.el-example-grid,
.el-feature-grid,
.el-founders-grid {
    align-items: stretch;
}

.el-step,
.el-example,
.el-feature,
.el-founder-card {
    height: 100%;
}

.el-steps {
    overflow: hidden;
}

.el-steps > .el-step {
    margin-top: 0 !important;
}

/* About teaser: remove giant blank area and narrow text column. */
.el-about-teaser__grid {
    align-items: center;
}

.el-about-teaser__copy {
    width: 100%;
    max-width: none !important;
}

.el-about-teaser__copy > p {
    width: 100%;
    max-width: 36rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.el-about-teaser__copy .el-link {
    margin-top: 26px;
}

/* Service-page heroes. */
.el-page-hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr);
    align-items: end;
}

.el-page-hero h1 {
    max-width: 11.5ch;
    font-size: clamp(3.35rem, 5.9vw, 6.25rem);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.el-page-hero__lead {
    width: 100%;
    max-width: 35rem !important;
    justify-self: end;
}

.page-siti-web-ecommerce .el-page-hero h1 {
    max-width: 11.5ch;
    font-size: clamp(3.25rem, 5.45vw, 5.75rem);
}

/* Editorial split sections. */
.el-split {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: start;
}

.el-split h2 {
    max-width: 11.5ch;
    font-size: clamp(2.55rem, 4.15vw, 4.25rem);
    line-height: .98;
}

.el-split .el-prose {
    max-width: 42rem !important;
}

/* CTA: stable button column and no broken labels. */
.el-cta__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: clamp(40px, 7vw, 100px);
}

.el-cta__inner > .wp-block-group {
    max-width: 900px !important;
}

.el-cta .wp-block-buttons {
    width: max-content;
    max-width: none !important;
    margin: 0 !important;
    justify-self: end;
    flex-shrink: 0;
}

.el-cta .wp-block-button {
    width: auto;
    margin: 0 !important;
}

.el-cta .wp-block-button__link,
.el-button--light .wp-block-button__link {
    width: auto;
    min-width: 168px;
    white-space: nowrap;
    word-break: keep-all;
}

/* Founder/metric rows. */
.el-founders-grid > .el-founder-card,
.el-metrics > .el-metric {
    margin-top: 0 !important;
}

@media (min-width: 921px) and (max-width: 1500px) {
    .el-founder-card__initials {
        font-size: clamp(5.5rem, 8vw, 7.5rem);
    }
}

@media (max-width: 1180px) and (min-width: 921px) {
    .el-page-hero__grid {
        grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr);
        gap: 52px;
    }

    .el-page-hero h1,
    .page-siti-web-ecommerce .el-page-hero h1 {
        font-size: clamp(3.15rem, 5.2vw, 5rem);
    }

    .el-split h2 {
        font-size: clamp(2.45rem, 3.8vw, 3.7rem);
    }
}

@media (max-width: 920px) {
    .el-page-hero h1,
    .page-siti-web-ecommerce .el-page-hero h1,
    .el-split h2 {
        max-width: none;
    }

    .el-cta__inner {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .el-cta .wp-block-buttons {
        justify-self: start;
    }

    .el-about-teaser__copy > p {
        max-width: 42rem !important;
    }
}

@media (max-width: 620px) {
    .el-cta .wp-block-button__link,
    .el-button--light .wp-block-button__link {
        min-width: 0;
        white-space: normal;
    }
}


/* =====================================================================
   Esper Labs v0.4.2 — About teaser + Arezzo desktop composition
   ===================================================================== */

/* "Tre competenze. Una direzione." must stay inside its own column. */
@media (min-width: 921px) {
    .el-about-teaser__grid {
        grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
        gap: clamp(48px, 6vw, 88px);
    }

    .el-about-teaser h2 {
        width: 100%;
        max-width: 9.6ch;
        font-size: clamp(3rem, 4.7vw, 4.9rem);
        line-height: .92;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .el-about-teaser__copy {
        min-width: 0;
    }
}

/* Arezzo: desktop composition should read as a wide editorial statement,
   not as a mobile headline enlarged to desktop size. */
@media (min-width: 921px) {
    .el-location-grid {
        grid-template-columns: minmax(0, .96fr) minmax(460px, 1.04fr);
        gap: clamp(60px, 7vw, 105px);
        align-items: center;
    }

    .el-location-copy h2 {
        width: 100%;
        max-width: 10.5ch;
        font-size: clamp(3.4rem, 4.8vw, 5rem);
        line-height: .93;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .el-location-copy > p:last-child {
        max-width: 34rem;
        font-size: 1rem;
        line-height: 1.75;
    }

    .el-location-art {
        width: 100%;
        min-height: 440px;
        max-height: 520px;
        aspect-ratio: 1.08 / 1;
    }
}

/* Laptop widths need an extra step before tablet layout. */
@media (min-width: 921px) and (max-width: 1180px) {
    .el-about-teaser h2 {
        max-width: 10.5ch;
        font-size: clamp(2.9rem, 4.4vw, 4.15rem);
    }

    .el-location-grid {
        grid-template-columns: minmax(0, .95fr) minmax(390px, 1.05fr);
        gap: 52px;
    }

    .el-location-copy h2 {
        max-width: 10.5ch;
        font-size: clamp(3rem, 4.35vw, 4.2rem);
    }

    .el-location-art {
        min-height: 390px;
    }
}

@media (max-width: 920px) {
    .el-about-teaser h2,
    .el-location-copy h2 {
        max-width: none;
    }
}


/* =====================================================================
   Esper Labs v0.4.3 — final Arezzo desktop composition
   ===================================================================== */

@media (min-width: 1181px) {
    .el-location-grid {
        grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr);
        gap: clamp(54px, 5vw, 82px);
    }

    .el-location-copy h2 {
        width: 100%;
        max-width: 12.5ch;
        font-size: clamp(3.4rem, 4.15vw, 4.2rem);
        line-height: .94;
        letter-spacing: -.055em;
    }

    .el-location-copy > p:last-child {
        max-width: 37rem;
        font-size: 1.02rem;
        line-height: 1.72;
    }

    .el-location-art {
        width: min(100%, 520px);
        min-height: 430px;
        max-height: 500px;
        justify-self: end;
    }
}

/* Typical 13–15" laptops: keep the same horizontal idea,
   but compress it before switching to the mobile stack. */
@media (min-width: 921px) and (max-width: 1180px) {
    .el-location-grid {
        grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr);
        gap: 42px;
    }

    .el-location-copy h2 {
        max-width: 12.5ch;
        font-size: clamp(3rem, 4.2vw, 3.75rem);
        line-height: .95;
    }

    .el-location-copy > p:last-child {
        max-width: 34rem;
    }

    .el-location-art {
        width: min(100%, 450px);
        min-height: 365px;
        justify-self: end;
    }
}


/* =====================================================================
   Esper Labs v0.4.4 — desktop QA pass
   Fixes typography, proportions and Gutenberg layout without changing copy.
   ===================================================================== */

/* Strong headings are useful, but not every section should behave like a hero. */
@media (min-width: 1181px) {
    .el-section-heading h2,
    .el-split h2,
    .el-about-teaser h2,
    .el-company-contacts__intro h2 {
        font-size: clamp(2.65rem, 3.65vw, 4rem);
        line-height: .98;
        letter-spacing: -.05em;
    }
}

/* ---------------------------------------------------------------------
   CONTACT PAGE — hero
   --------------------------------------------------------------------- */
@media (min-width: 1181px) {
    .page-contatti .el-page-hero {
        padding-block: 112px 122px;
    }

    .page-contatti .el-page-hero__grid {
        grid-template-columns: minmax(0, 1.16fr) minmax(360px, .84fr);
        gap: clamp(70px, 7vw, 120px);
        align-items: end;
    }

    .page-contatti .el-page-hero h1 {
        max-width: 8.8ch;
        font-size: clamp(4.1rem, 5.4vw, 5.75rem);
        line-height: .9;
    }

    .page-contatti .el-page-hero__lead {
        max-width: 32rem !important;
        font-size: 1.12rem;
        line-height: 1.7;
        padding-bottom: 4px;
    }
}

@media (min-width: 921px) and (max-width: 1180px) {
    .page-contatti .el-page-hero__grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
        gap: 54px;
    }

    .page-contatti .el-page-hero h1 {
        max-width: 8.8ch;
        font-size: clamp(3.55rem, 5vw, 4.65rem);
    }

    .page-contatti .el-page-hero__lead {
        max-width: 30rem !important;
    }
}

/* ---------------------------------------------------------------------
   CONTACT PAGE — first call / form
   --------------------------------------------------------------------- */
.el-contact-grid {
    align-items: start;
}

.el-contact-grid > .wp-block-group {
    min-width: 0;
}

.el-contact-grid > .wp-block-group > * {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media (min-width: 1181px) {
    .el-contact-grid {
        grid-template-columns: minmax(310px, .72fr) minmax(560px, 1.28fr);
        gap: clamp(70px, 7vw, 110px);
    }

    .el-contact-grid > .wp-block-group:first-child {
        padding-top: 12px;
    }

    .el-contact-grid > .wp-block-group:first-child h2 {
        max-width: 11ch;
        font-size: clamp(2rem, 2.5vw, 2.8rem);
        line-height: 1.06;
        margin-bottom: 30px;
    }

    .el-contact-grid > .wp-block-group:first-child > p {
        max-width: 27rem !important;
        font-size: 1rem;
        line-height: 1.7;
    }

    .el-contact-grid > .wp-block-group:first-child ul {
        max-width: 28rem !important;
        padding-left: 1.35rem;
        margin-top: 26px;
    }

    .el-contact-grid > .wp-block-group:first-child li {
        margin-bottom: 9px;
        line-height: 1.55;
    }

    .el-contact-panel {
        width: 100%;
        padding: 42px 46px 48px;
    }
}

/* Keep the small eyebrow visible instead of clipping into the previous section. */
.el-contact-grid .el-eyebrow {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ---------------------------------------------------------------------
   CONTACT PAGE — direct channels
   --------------------------------------------------------------------- */
.el-company-contacts {
    align-items: stretch;
}

.el-company-contacts__intro {
    min-width: 0;
}

.el-company-contacts__intro h2 {
    max-width: 8.5ch;
}

.el-company-contacts__grid {
    align-items: stretch;
}

.el-contact-chip {
    min-height: 0;
}

@media (min-width: 1181px) {
    .el-company-contacts {
        grid-template-columns: minmax(340px, .82fr) minmax(0, 1.18fr);
        gap: clamp(56px, 6vw, 92px);
        align-items: center;
    }

    .el-company-contacts__intro h2 {
        max-width: 8.4ch;
        font-size: clamp(3rem, 4vw, 4.3rem);
        line-height: .93;
    }

    .el-company-contacts__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .el-contact-chip {
        min-height: 190px;
        padding: 28px;
    }

    .el-contact-chip strong {
        font-size: 1.12rem;
        overflow-wrap: anywhere;
    }
}

/* ---------------------------------------------------------------------
   SOFTWARE PAGE — principle
   --------------------------------------------------------------------- */
@media (min-width: 1181px) {
    .page-software-aziendale .el-split {
        grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
        gap: clamp(70px, 7vw, 115px);
        align-items: start;
    }

    .page-software-aziendale .el-split h2 {
        max-width: 10.8ch;
        font-size: clamp(3rem, 4vw, 4.25rem);
        line-height: .97;
    }

    .page-software-aziendale .el-split .el-prose {
        max-width: 40rem !important;
        padding-top: 3px;
    }

    .page-software-aziendale .el-split .el-prose p {
        font-size: 1.04rem;
        line-height: 1.75;
    }
}

/* ---------------------------------------------------------------------
   WEB / E-COMMERCE PAGE — technology section
   --------------------------------------------------------------------- */
@media (min-width: 1181px) {
    .page-siti-web-ecommerce .el-split {
        grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
        gap: clamp(72px, 7vw, 118px);
        align-items: start;
    }

    .page-siti-web-ecommerce .el-split h2 {
        max-width: 10.2ch;
        font-size: clamp(3rem, 3.9vw, 4.15rem);
        line-height: .97;
    }

    .page-siti-web-ecommerce .el-split .el-prose {
        max-width: 38rem !important;
        padding-top: 3px;
    }

    .page-siti-web-ecommerce .el-split .el-prose p {
        font-size: 1.02rem;
        line-height: 1.72;
    }
}

/* ---------------------------------------------------------------------
   FEATURE CARDS — reduce unnecessary height
   --------------------------------------------------------------------- */
.el-feature {
    min-height: 0;
}

.el-feature h2 {
    margin-top: 52px;
}

@media (min-width: 1181px) {
    .el-feature {
        padding: 30px 32px 34px;
    }

    .el-feature h2 {
        margin-top: 48px;
        font-size: clamp(1.8rem, 2.25vw, 2.5rem);
        line-height: 1.03;
    }

    .el-feature p {
        line-height: 1.65;
    }

    .el-feature-grid--three .el-feature {
        min-height: 410px;
    }

    .el-feature-grid:not(.el-feature-grid--three) .el-feature {
        min-height: 330px;
    }
}

/* ---------------------------------------------------------------------
   AREZZO — keep strong but more editorial / horizontal
   --------------------------------------------------------------------- */
@media (min-width: 1181px) {
    .el-location-section {
        padding-block: 92px 104px;
    }

    .el-location-grid {
        grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
        gap: clamp(56px, 5vw, 86px);
        align-items: center;
    }

    .el-location-copy h2 {
        max-width: 11.8ch;
        font-size: clamp(3.35rem, 4vw, 4.25rem);
        line-height: .94;
    }

    .el-location-copy > p:last-child {
        max-width: 34rem;
        font-size: 1rem;
        line-height: 1.72;
    }

    .el-location-art {
        width: min(100%, 500px);
        min-height: 420px;
        max-height: 470px;
    }
}

/* ---------------------------------------------------------------------
   GENERIC DESKTOP TYPOGRAPHY GUARDRAILS
   --------------------------------------------------------------------- */
@media (min-width: 1181px) {
    .el-page-hero h1 {
        text-wrap: balance;
    }

    .el-section-heading h2,
    .el-split h2,
    .el-about-teaser h2,
    .el-location-copy h2,
    .el-company-contacts__intro h2 {
        text-wrap: balance;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .el-page-hero__lead,
    .el-prose,
    .el-about-teaser__copy,
    .el-location-copy > p:last-child {
        text-wrap: pretty;
    }
}

/* ---------------------------------------------------------------------
   921–1180 laptop QA
   --------------------------------------------------------------------- */
@media (min-width: 921px) and (max-width: 1180px) {
    .el-contact-grid {
        grid-template-columns: minmax(280px, .78fr) minmax(500px, 1.22fr);
        gap: 46px;
    }

    .el-contact-panel {
        padding: 34px;
    }

    .el-company-contacts {
        grid-template-columns: minmax(290px, .82fr) minmax(0, 1.18fr);
        gap: 44px;
    }

    .el-company-contacts__intro h2 {
        max-width: 8.5ch;
        font-size: clamp(2.7rem, 3.8vw, 3.45rem);
    }

    .el-contact-chip {
        min-height: 160px;
    }

    .page-software-aziendale .el-split h2,
    .page-siti-web-ecommerce .el-split h2 {
        max-width: 10.5ch;
        font-size: clamp(2.65rem, 3.7vw, 3.5rem);
    }
}

/* ---------------------------------------------------------------------
   Tablet/mobile fallback
   --------------------------------------------------------------------- */
@media (max-width: 920px) {
    .el-contact-grid,
    .el-company-contacts {
        grid-template-columns: 1fr;
    }

    .el-company-contacts__intro h2,
    .page-software-aziendale .el-split h2,
    .page-siti-web-ecommerce .el-split h2 {
        max-width: none;
    }

    .el-contact-chip {
        min-height: 120px;
    }
}


/* =====================================================================
   Esper Labs v0.4.5 — hard fixes from desktop QA screenshots
   ===================================================================== */

/* CONTACT HERO
   Previous max-width in ch made the single long word "funzionando"
   overflow its grid column. Give the title a real width instead. */
@media (min-width: 1181px) {
    .page-contatti .el-page-hero__grid {
        grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
        gap: 84px;
        align-items: end;
    }

    .page-contatti .el-page-hero__grid > * {
        min-width: 0;
        max-width: none !important;
    }

    .page-contatti .el-page-hero h1 {
        width: 100%;
        max-width: none;
        font-size: clamp(4rem, 4.8vw, 5.15rem);
        line-height: .91;
        letter-spacing: -.055em;
        overflow: visible;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .page-contatti .el-page-hero__lead {
        width: 100%;
        max-width: 31rem !important;
        justify-self: end;
        font-size: 1.08rem;
        line-height: 1.68;
    }
}

@media (min-width: 921px) and (max-width: 1180px) {
    .page-contatti .el-page-hero__grid {
        grid-template-columns: minmax(0, 1.08fr) minmax(310px, .92fr);
        gap: 48px;
    }

    .page-contatti .el-page-hero h1 {
        width: 100%;
        max-width: none;
        font-size: clamp(3.55rem, 4.6vw, 4.4rem);
        line-height: .92;
    }
}

/* DIRECT CONTACTS
   Keep the two contact cards useful, not tall/narrow, and keep the email readable. */
@media (min-width: 1181px) {
    .el-company-contacts {
        grid-template-columns: minmax(360px, .9fr) minmax(620px, 1.1fr);
        gap: 64px;
    }

    .el-company-contacts__intro h2 {
        max-width: 9ch;
        font-size: clamp(2.8rem, 3.65vw, 3.9rem);
        line-height: .94;
    }

    .el-company-contacts__grid {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
        gap: 16px;
    }

    .el-contact-chip {
        min-height: 170px;
        padding: 28px 30px;
    }

    .el-contact-chip strong {
        font-size: 1.02rem;
        line-height: 1.35;
        overflow-wrap: normal;
        word-break: normal;
    }

    .el-contact-chip[href^="mailto:"] strong {
        white-space: nowrap;
        font-size: clamp(.9rem, 1.05vw, 1rem);
        letter-spacing: -.015em;
    }
}

@media (min-width: 921px) and (max-width: 1180px) {
    .el-company-contacts {
        grid-template-columns: minmax(300px, .88fr) minmax(520px, 1.12fr);
        gap: 42px;
    }

    .el-company-contacts__grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }

    .el-contact-chip[href^="mailto:"] strong {
        white-space: nowrap;
        font-size: .88rem;
    }
}

/* AREZZO
   More horizontal editorial composition. */
@media (min-width: 1181px) {
    .el-location-grid {
        grid-template-columns: minmax(0, 1.22fr) minmax(390px, .78fr);
        gap: 64px;
        align-items: center;
    }

    .el-location-copy h2 {
        width: 100%;
        max-width: 15ch;
        font-size: clamp(3rem, 3.65vw, 3.8rem);
        line-height: .94;
        letter-spacing: -.055em;
        text-wrap: balance;
    }

    .el-location-copy > p:last-child {
        max-width: 38rem;
        font-size: 1rem;
        line-height: 1.7;
    }

    .el-location-art {
        width: min(100%, 470px);
        min-height: 390px;
        max-height: 440px;
        justify-self: end;
    }
}

@media (min-width: 921px) and (max-width: 1180px) {
    .el-location-grid {
        grid-template-columns: minmax(0, 1.16fr) minmax(340px, .84fr);
        gap: 42px;
    }

    .el-location-copy h2 {
        max-width: 15ch;
        font-size: clamp(2.8rem, 3.65vw, 3.4rem);
    }

    .el-location-art {
        width: min(100%, 420px);
        min-height: 350px;
    }
}

/* Mobile/tablet: return to natural wrapping. */
@media (max-width: 920px) {
    .page-contatti .el-page-hero h1,
    .el-location-copy h2 {
        width: auto;
        max-width: none;
    }

    .el-contact-chip[href^="mailto:"] strong {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}


/* =====================================================================
   Esper Labs v0.4.6 — definitive contact hero fix
   ===================================================================== */

/* Contact has a uniquely long Italian headline. It gets its own scale
   instead of sharing the generic service-page hero dimensions. */
@media (min-width: 1281px) {
    .page-contatti .el-page-hero__grid {
        grid-template-columns: minmax(0, 1.28fr) minmax(330px, .72fr);
        column-gap: 96px;
        align-items: center;
    }

    .page-contatti .el-page-hero__grid > .wp-block-group {
        min-width: 0;
        width: 100%;
        max-width: none !important;
    }

    .page-contatti .el-page-hero h1 {
        display: block;
        width: 100%;
        max-width: 100%;
        margin-right: 0;
        font-size: clamp(3.8rem, 4.15vw, 4.55rem);
        line-height: .92;
        letter-spacing: -.052em;
        overflow: hidden;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .page-contatti .el-page-hero__lead {
        width: 100%;
        max-width: 30rem !important;
        margin-left: auto !important;
        justify-self: end;
        font-size: 1.05rem;
        line-height: 1.68;
    }
}

@media (min-width: 921px) and (max-width: 1280px) {
    .page-contatti .el-page-hero__grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
        column-gap: 56px;
        align-items: center;
    }

    .page-contatti .el-page-hero h1 {
        width: 100%;
        max-width: 100%;
        font-size: clamp(3.2rem, 4.25vw, 3.95rem);
        line-height: .93;
        overflow: hidden;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .page-contatti .el-page-hero__lead {
        max-width: 28rem !important;
        margin-left: auto !important;
    }
}

@media (max-width: 920px) {
    .page-contatti .el-page-hero h1 {
        overflow: visible;
        max-width: none;
    }
}
