/* =================================================================
   GIARELLI FABIO — Impianti Elettrici e Sicurezza
   Landing page · design system
   Palette brand: giallo #f3e600 · antracite #2b2b2b/#3c3c3b · bianco
   ================================================================= */

:root {
    --yellow:      #f3e600;
    --yellow-deep: #d9cf00;
    --ink:         #141414;
    --ink-2:       #1c1c1c;
    --charcoal:    #242423;
    --charcoal-2:  #32322f;
    --line:        rgba(255, 255, 255, .10);
    --white:       #ffffff;
    --muted:       #b6b6b2;
    --muted-2:     #8a8a86;

    --maxw: 1180px;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 20px 50px -22px rgba(0, 0, 0, .8);
    --shadow-yellow: 0 14px 40px -12px rgba(243, 230, 0, .45);

    --font-display: "Saira Condensed", "Arial Narrow", sans-serif;
    --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--white);
    background: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 22px;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: .2px;
    margin: 0;
    text-transform: uppercase;
}

p { margin: 0 0 1em; }

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-size: .82rem;
    color: var(--yellow);
}
.kicker::before {
    content: "";
    width: 26px; height: 2px;
    background: var(--yellow);
    display: inline-block;
}

/* ---------------- Buttons ---------------- */
.btn {
    --bg: var(--yellow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-size: 1.02rem;
    padding: 13px 24px;
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    white-space: nowrap;
}
.btn svg { width: 19px; height: 19px; }
.btn-primary {
    background: var(--yellow);
    color: #1a1a1a;
    box-shadow: var(--shadow-yellow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 46px -10px rgba(243,230,0,.6); }
.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.28);
}
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); transform: translateY(-2px); }
.btn-dark {
    background: #1a1a1a;
    color: var(--white);
}
.btn-dark:hover { transform: translateY(-2px); }
.btn-lg { padding: 16px 30px; font-size: 1.12rem; }
.btn-block { width: 100%; }

/* ---------------- GF lightning pattern bg ---------------- */
.gf-pattern {
    background-image: url("../img/mark.svg");
    background-size: 90px;
    background-repeat: repeat;
    opacity: .04;
    filter: grayscale(1) brightness(2);
}

/* ---------------- Header / Nav ---------------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
    padding: 16px 0;
}
.site-header.scrolled {
    background: rgba(20, 20, 20, .88);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--line);
    padding: 10px 0;
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.nav__logo img { height: 46px; transition: height .3s ease; }
.site-header.scrolled .nav__logo img { height: 38px; }
.nav__links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0; padding: 0;
}
.nav__links a {
    font-weight: 600;
    font-size: .95rem;
    color: var(--white);
    opacity: .85;
    transition: opacity .2s, color .2s;
}
.nav__links a:hover { opacity: 1; color: var(--yellow); }
.nav__cta { display: flex; align-items: center; gap: 12px; }
.nav__toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    width: 44px; height: 44px; color: var(--white);
}
.nav__toggle svg { width: 28px; height: 28px; }

/* ---------------- Hero ---------------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 140px 0 90px;
    background:
        radial-gradient(1100px 600px at 78% 12%, rgba(243,230,0,.10), transparent 60%),
        linear-gradient(180deg, #161616 0%, #101010 100%);
    overflow: hidden;
}
.hero__bolt {
    position: absolute;
    right: -8%;
    top: 50%;
    transform: translateY(-50%) rotate(-8deg);
    width: 60%;
    max-width: 760px;
    opacity: .10;
    pointer-events: none;
    filter: drop-shadow(0 0 60px rgba(243,230,0,.3));
}
.hero__inner { position: relative; z-index: 2; max-width: 760px; }
.hero h1 {
    font-size: clamp(2.7rem, 7.5vw, 5.6rem);
    line-height: .94;
    margin: 18px 0 6px;
}
.hero h1 .hl { color: var(--yellow); }
.hero__sub {
    font-size: clamp(1.05rem, 2.2vw, 1.32rem);
    color: var(--muted);
    max-width: 560px;
    margin: 18px 0 30px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    margin-top: 38px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}
.hero__badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: .95rem;
    color: var(--white);
}
.hero__badge svg { width: 22px; height: 22px; color: var(--yellow); flex: none; }
.hero__badge small { color: var(--muted-2); display: block; font-weight: 500; font-size: .8rem; }
.scroll-cue {
    position: absolute;
    bottom: 26px; left: 50%;
    transform: translateX(-50%);
    color: var(--muted-2);
    font-size: .78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    z-index: 2;
}
.scroll-cue span { width: 1px; height: 34px; background: linear-gradient(var(--yellow), transparent); animation: cue 1.8s infinite; }
@keyframes cue { 0%,100%{opacity:.3; transform:scaleY(.6) translateY(-6px);} 50%{opacity:1; transform:scaleY(1) translateY(0);} }

/* ---------------- Sections ---------------- */
section { position: relative; }
.section { padding: 92px 0; }
.section-head { max-width: 680px; margin-bottom: 50px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin: 14px 0 0;
}
.section-head p { color: var(--muted); margin-top: 16px; font-size: 1.08rem; }

.bg-charcoal { background: var(--ink-2); }
.bg-yellow { background: var(--yellow); color: #1a1a1a; }

/* angled top edge */
.angle-top { position: relative; }
.angle-top::before {
    content: ""; position: absolute; inset: -1px 0 auto 0; height: 60px;
    background: inherit;
    clip-path: polygon(0 0, 100% 100%, 100% 0);
    transform: translateY(-59px);
}

/* ---------------- Servizi ---------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}
.service {
    position: relative;
    background: linear-gradient(180deg, var(--charcoal), var(--ink-2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 26px 30px;
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.service::after {
    content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 3px;
    background: var(--yellow); transform: scaleY(0); transform-origin: top; transition: transform .25s ease;
}
.service:hover { transform: translateY(-5px); border-color: rgba(243,230,0,.4); box-shadow: var(--shadow); }
.service:hover::after { transform: scaleY(1); }
.service__icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: grid; place-items: center;
    background: rgba(243,230,0,.12);
    color: var(--yellow);
    margin-bottom: 18px;
}
.service__icon svg { width: 30px; height: 30px; }
.service h3 { font-size: 1.45rem; margin-bottom: 8px; }
.service p { color: var(--muted); font-size: .97rem; margin: 0; }

/* ---------------- Punti di forza ---------------- */
.why {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.why__item {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255,255,255,.03);
    border: 1px solid var(--line);
}
.why__num {
    font-family: var(--font-display); font-weight: 700; font-size: 2.2rem;
    color: var(--yellow); line-height: 1; flex: none;
}
.why__item h3 { font-size: 1.25rem; margin-bottom: 6px; }
.why__item p { color: var(--muted); font-size: .94rem; margin: 0; }

/* ---------------- Chi sono ---------------- */
.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about__visual {
    position: relative;
    border-radius: var(--radius);
    background:
        radial-gradient(400px 300px at 70% 20%, rgba(243,230,0,.18), transparent 65%),
        linear-gradient(160deg, var(--charcoal-2), #161616);
    border: 1px solid var(--line);
    aspect-ratio: 4/3.4;
    display: grid; place-items: center;
    overflow: hidden;
}
.about__visual img { width: 72%; filter: drop-shadow(0 14px 40px rgba(243,230,0,.25)); }
.about__visual .gf-pattern { position: absolute; inset: 0; }
.about h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 18px; }
.about p { color: var(--muted); font-size: 1.05rem; }
.about ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.about li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.about li svg { width: 22px; height: 22px; color: var(--yellow); flex: none; }

/* ---------------- CTA strip ---------------- */
.cta-strip {
    background:
        radial-gradient(700px 300px at 80% 50%, rgba(0,0,0,.12), transparent),
        var(--yellow);
    color: #161616;
    border-radius: var(--radius);
    padding: 48px 44px;
    display: flex; align-items: center; justify-content: space-between; gap: 30px;
    flex-wrap: wrap;
    position: relative; overflow: hidden;
}
.cta-strip h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.cta-strip p { margin: 8px 0 0; font-weight: 500; opacity: .8; }

/* ---------------- Contatti ---------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 24px;
    align-items: start;
}
.contact-cards { display: grid; gap: 14px; }
.contact-card {
    display: flex; align-items: center; gap: 18px;
    padding: 22px 24px;
    border-radius: var(--radius);
    background: var(--charcoal);
    border: 1px solid var(--line);
    transition: transform .2s, border-color .2s;
}
.contact-card:hover { transform: translateY(-3px); border-color: rgba(243,230,0,.4); }
.contact-card__ic {
    width: 50px; height: 50px; border-radius: 12px; flex: none;
    display: grid; place-items: center; background: rgba(243,230,0,.12); color: var(--yellow);
}
.contact-card__ic svg { width: 26px; height: 26px; }
.contact-card small { color: var(--muted-2); display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; }
.contact-card b { font-size: 1.15rem; font-weight: 700; }
.contact-card.wa .contact-card__ic { background: rgba(37,211,102,.15); color: #25d366; }

.form {
    background: var(--charcoal);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
}
.form h3 { font-size: 1.5rem; margin-bottom: 6px; }
.form p.muted { color: var(--muted); font-size: .92rem; margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 7px; color: var(--white); }
.field input, .field textarea {
    width: 100%;
    background: #1a1a19;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--white);
    padding: 13px 15px;
    font: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(243,230,0,.18);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: .82rem; color: var(--muted-2); margin-top: 12px; }

.alert {
    padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 18px;
    font-weight: 600; font-size: .95rem;
}
.alert.ok  { background: rgba(37,211,102,.14); color: #5fe98f; border: 1px solid rgba(37,211,102,.3); }
.alert.err { background: rgba(255,80,80,.14); color: #ff9a9a; border: 1px solid rgba(255,80,80,.3); }

/* ---------------- Footer ---------------- */
.site-footer {
    background: #0e0e0e;
    border-top: 1px solid var(--line);
    padding: 60px 0 30px;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.site-footer img.flogo { height: 56px; margin-bottom: 16px; }
.site-footer p { color: var(--muted-2); font-size: .94rem; }
.footer-col h4 { font-size: 1rem; letter-spacing: 1.5px; color: var(--white); margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--muted); font-size: .94rem; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom {
    border-top: 1px solid var(--line);
    padding-top: 24px;
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    color: var(--muted-2); font-size: .85rem;
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--yellow); }

/* ---------------- Mobile sticky call bar ---------------- */
.callbar {
    position: fixed; inset: auto 0 0 0; z-index: 70;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--line);
    box-shadow: 0 -8px 30px rgba(0,0,0,.5);
}
.callbar a {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    padding: 15px; font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; font-size: 1rem;
}
.callbar a svg { width: 20px; height: 20px; }
.callbar .c-call { background: var(--yellow); color: #1a1a1a; }
.callbar .c-wa { background: #25d366; color: #fff; }

/* ---------------- Reveal on scroll ---------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
    .nav__links, .nav__cta .btn { display: none; }
    .nav__toggle { display: grid; place-items: center; }
    .nav.open .nav__links {
        display: flex; flex-direction: column; align-items: flex-start;
        position: absolute; inset: 100% 14px auto 14px;
        background: rgba(22,22,22,.98); backdrop-filter: blur(10px);
        border: 1px solid var(--line); border-radius: var(--radius);
        padding: 18px; gap: 14px; box-shadow: var(--shadow);
    }
    .about, .contact-grid { grid-template-columns: 1fr; }
    .about__visual { order: -1; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .cta-strip { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 620px) {
    .section { padding: 64px 0; }
    .hero { padding: 120px 0 110px; }
    .callbar { display: grid; }
    .footer-top { grid-template-columns: 1fr; gap: 28px; }
    .scroll-cue { display: none; }
    body { padding-bottom: 58px; }   /* spazio per la barra chiamata fissa */
}
@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .scroll-cue span { animation: none; }
}
