/* ============================================================
   SEO Suite cosmetic layer over the original ilab engine.
   COSMETIC ONLY — no blob / scroll / animation rules here, so the
   original scroll engine (main.js + style.css) is left fully intact.
   ============================================================ */

/* Even spacing between the three intro paragraphs (original only spaced the first). */
#text1 p { margin-bottom: 3.5vh; }
#text1 p:last-child { margin-bottom: 0; }

/* Replace the Italian "CONTATTACI PER UN PREVENTIVO" rotating badge with an
   English "CONTACT US · FOR A QUOTE" circular word-mark (same rotating element). */
.edit_button_text:before {
    background-image: url('../img/cta_en_black.svg') !important;
}
.mainBody.animated .edit_button_text:before {
    background-image: url('../img/cta_en_white.svg') !important;
}

/* Replace the circular ILAB logo with a SEO SUITE word-mark.
   mix-blend-mode keeps it readable on both the dark hero and light sections. */
#mytopnav a.brand-logo {
    background-image: none !important;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #ffffff;
    mix-blend-mode: difference;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.35s ease;
}
/* SEO SUITE shows only at the very top of the hero, fades as soon as you scroll. */
body.at-top #mytopnav a.brand-logo { opacity: 1; }

/* ============================================================
   Service tiles (boxes) + detail panel + contact slide-up panel
   ============================================================ */

/* --- Explore label above the service tiles --- */
#explore-label {
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(0,0,0,0.45);
    margin: 0 0 24px;
    opacity: 0;
    transform: translateY(15px);
    transition: transform 0.3s linear 0.3s, opacity 0.3s linear 0.3s, color .25s ease;
}
body.animated #explore-label { color: rgba(255,255,255,0.55); }
#explore-label.animated { opacity: 1; transform: translateY(0); }

/* --- Service tiles (were the client-logo grid) --- */
.customer-clients li {
    display: flex;
    box-sizing: border-box;
}
.customer-clients li .integration {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: calc(100% - 14px);
    min-height: 130px;
    margin: 7px;
    padding: 14px 10px;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-size: 15px;
    line-height: 1.55;
    color: #1c1c1c;
    border: 2px solid rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: color .25s ease, border-color .25s ease, transform .25s ease;
}
.customer-clients li .integration:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 0, 0, 0.45);
}
.customer-clients li .integration:active { font-weight: 900; }
/* Tiles follow the blob so they stay readable in both light and dark states. */
body.animated .customer-clients li .integration {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}
body.animated .customer-clients li .integration:hover { border-color: rgba(255, 255, 255, 0.55); }

@media (max-width: 767px) {
    .customer-clients li { width: 50% !important; }
    .customer-clients li:first-child { width: 100% !important; }
}

/* --- Free website analysis CTA section --- */
#free-analysis-section {
    padding: 80px 0 60px;
    text-align: center;
}
#free-analysis-label {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(0,0,0,0.38);
    margin: 0 0 28px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease 0.1s, transform 0.35s ease 0.1s, color 0.25s ease;
}
body.animated #free-analysis-label { color: rgba(255,255,255,0.38); }
#free-analysis-section.animated #free-analysis-label { opacity: 1; transform: translateY(0); }

#free-analysis-title {
    font-family: 'Grumpy 24', Georgia, serif;
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    line-height: 1.05;
    color: #1c1c1c;
    margin: 0 0 28px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s ease 0.2s, transform 0.45s ease 0.2s, color 0.25s ease;
}
#free-analysis-title span { display: inline; }
body.animated #free-analysis-title { color: #ffffff; }
#free-analysis-section.animated #free-analysis-title { opacity: 1; transform: translateY(0); }

#free-analysis-sub {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: rgba(0,0,0,0.5);
    max-width: 420px;
    margin: 0 auto 40px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease 0.32s, transform 0.4s ease 0.32s, color 0.25s ease;
}
body.animated #free-analysis-sub { color: rgba(255,255,255,0.5); }
#free-analysis-section.animated #free-analysis-sub { opacity: 1; transform: translateY(0); }

#free-analysis-cta {
    display: inline-block;
    background: #1c1c1c;
    color: #ffffff;
    border: none;
    border-radius: 100px;
    padding: 18px 44px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease 0.44s, transform 0.4s ease 0.44s, background 0.2s ease, color 0.2s ease;
}
body.animated #free-analysis-cta { background: #ffffff; color: #1c1c1c; }
#free-analysis-section.animated #free-analysis-cta { opacity: 1; transform: translateY(0); }
#free-analysis-cta:hover { transform: translateY(-3px) !important; opacity: 0.88 !important; }

/* --- Contact slide-up panel --- */
#contact-panel {
    position: fixed;
    top: 0;
    left: 0; right: 0;
    height: 100%;
    background: #0e0e0e;
    z-index: 10000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Parked off-screen via transform (relative to its own size) so it can't
       peek back in when iOS Safari's address bar resizes the viewport. */
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.55s cubic-bezier(0.22,1,0.36,1), visibility 0s linear 0.55s;
    display: flex;
}
#contact-panel.open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.55s cubic-bezier(0.22,1,0.36,1), visibility 0s;
}
#contact-panel-backdrop { display: none; position: fixed; inset: 0; z-index: 9999; }
#contact-panel-backdrop.open { display: block; }
#contact-panel-close {
    position: fixed; top: 28px; right: 28px; z-index: 2;
    top: max(28px, env(safe-area-inset-top, 0px) + 12px);
    background: none; border: none; font-size: 32px; line-height: 1;
    color: #fff; cursor: pointer; opacity: 0.6; transition: opacity 0.2s;
}
#contact-panel-close:hover { opacity: 1; }
/* Centre with margin:auto (not align-items:center) so the heading is never
   pushed above the scrollable top when the form is taller than the screen.
   Extra top/bottom padding clears the iOS address bar and home indicator. */
#contact-panel-inner {
    width: min(560px, 88vw);
    margin: auto;
    padding: 88px 0 56px;
    padding-top: max(88px, env(safe-area-inset-top, 0px) + 64px);
    padding-bottom: max(56px, env(safe-area-inset-bottom, 0px) + 40px);
}
#contact-panel-title {
    font-family: 'Grumpy 24', Georgia, serif;
    font-size: clamp(2.4rem, 7vw, 4rem);
    color: #fff; margin: 0 0 48px; line-height: 1.05;
}
.cpf-row { margin-bottom: 32px; }
.cpf-row-2 { display: flex; gap: 32px; }
.cpf-row-2 .cpf-field { flex: 1; }
.cpf-field { padding-bottom: 4px; }
.cpf-field label {
    display: block;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px; font-weight: 700; letter-spacing: 1.8px;
    text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 10px;
}
.cpf-field input {
    width: 100%; box-sizing: border-box; background: transparent; border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2); color: #fff;
    font-family: Arial, Helvetica, sans-serif; font-size: 15px; padding: 10px 0;
    outline: none; transition: border-color 0.2s;
}
.cpf-field input::placeholder { color: rgba(255,255,255,0.25); }
.cpf-field input:focus { border-color: rgba(255,255,255,0.7); }
.cpf-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.cpf-tag {
    background: transparent; border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.55); border-radius: 100px; padding: 8px 18px;
    font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: 700;
    letter-spacing: 1.2px; text-transform: uppercase; cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.cpf-tag:hover { border-color: rgba(255,255,255,0.6); color: #fff; }
.cpf-tag.active { background: #fff; color: #0e0e0e; border-color: #fff; }
#contact-panel-form .cpf-row:last-of-type { display: flex; justify-content: flex-end; }
#cpf-submit {
    margin-top: 16px; background: #fff; color: #0e0e0e; border: none;
    border-radius: 100px; padding: 16px 40px;
    font-family: Arial, Helvetica, sans-serif; font-weight: 900; font-size: 13px;
    letter-spacing: 2px; text-transform: uppercase; cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}
#cpf-submit:hover { transform: translateY(-2px); background: #e8e8e8; }
@media (max-width: 600px) {
    .cpf-row-2 { flex-direction: column; gap: 0; }
    .cpf-row-2 .cpf-field + .cpf-field { margin-top: 32px; }
}

/* --- Send ripple + success overlay --- */
#send-ripple {
    position: fixed; border-radius: 50%; background: #ffffff; transform: scale(0);
    pointer-events: none; z-index: 10001; transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
#send-ripple.expand { transform: scale(1); }
#send-success-overlay {
    position: fixed; inset: 0; background: transparent; z-index: 10004;
    display: none; align-items: center; justify-content: center; pointer-events: none;
}
#send-success-overlay.visible { display: flex; }
#send-success-close {
    position: fixed; top: 28px; right: 28px; background: none; border: none;
    font-size: 32px; line-height: 1; color: #111; cursor: pointer; opacity: 0.5;
    pointer-events: all; transition: opacity 0.2s; z-index: 1;
}
#send-success-close:hover { opacity: 1; }
#send-success-text {
    text-align: center; font-family: 'Grumpy 24', Georgia, serif;
    font-size: clamp(2.4rem, 9vw, 5rem); color: #111; line-height: 1.05;
}

/* --- SEO AI Suite stats (replaced the awards badges) --- */
#aa-loghi.stat-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}
#aa-loghi.stat-grid li {
    width: 33.333%;
    text-align: center;
    box-sizing: border-box;
    padding: 10px 18px;
    list-style: none;
}
#aa-loghi.stat-grid .stat-num {
    display: block;
    font-family: 'Grumpy 24', Georgia, serif;
    font-size: 3em;
    line-height: 1;
    color: #fff;
}
#aa-loghi.stat-grid .stat-label {
    display: block;
    font-style: normal;
    margin-top: 16px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255,255,255,0.55);
}
@media (max-width: 767px) {
    #aa-loghi.stat-grid { flex-direction: column; }
    #aa-loghi.stat-grid li { width: 100%; padding: 18px; }
}

/* --- Pixel orb contact button — shown only while the hero is on screen --- */
#pixel-orb {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 120px;
    height: 120px;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    cursor: pointer;
}
body.hero-view #pixel-orb { opacity: 1; pointer-events: all; }

/* The pixel orb replaces the rotating pencil badge as the contact button. */
.bottom_nav { display: none !important; }
