/* ═══════════════════════════════════════════════════════════════════════════
   AFFARINORO — Landing "Bonus Supereroe"  (shortcode [afn_landing_bonus])
   Tutto scoped sotto .afn-page-bonus per non collidere con Salient/WPBakery.
   I font (Cinzel, Cormorant Garamond, DM Sans, Bungee) sono caricati via
   wp_enqueue_style dal plugin — qui NON va il @import.
   ═══════════════════════════════════════════════════════════════════════════ */

html{ scroll-behavior: smooth; }   /* smooth-scroll per il CTA "Calcola il mio bonus" */

.afn-page-bonus{
    --navy-abyss:#08162F;
    --navy-deep:#0d1f3c;
    --navy-mid:#173f76;
    --navy-surface:#1a4a8a;
    --gold-deep:#6B4F12;
    --gold-core:#C9A227;
    --gold-bright:#E8C547;
    --gold-glow:#FBEFA3;
    --pearl:#F5EFD9;
    --ink-soft:#C6BEA5;
    --ink-dim:#7E8AA0;
    --hero-red:#E63946;
    --hero-cream:#FFF4D6;

    position:relative;
    margin: -40px calc(50% - 50vw) 0;   /* sfonda i padding del builder e va full-width */
    padding: 0;
    width: 100vw;
    max-width: 100vw;
    overflow:hidden;
    background:
        radial-gradient(900px 600px at 110% 0%, rgba(232,197,71,0.18), transparent 65%),
        radial-gradient(700px 500px at -10% 30%, rgba(201,162,39,0.10), transparent 60%),
        linear-gradient(180deg, #102e5c 0%, #173f76 35%, #1a4a8a 100%);
    font-family:'DM Sans', sans-serif;
    color:var(--pearl);
}
.afn-page-bonus *, .afn-page-bonus *::before, .afn-page-bonus *::after{
    box-sizing:border-box;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SUPEREROE
   ═══════════════════════════════════════════════════════════════════════════ */
.afn-hero{
    position:relative;
    padding: clamp(48px, 9vw, 96px) clamp(22px, 5vw, 64px) clamp(56px, 8vw, 88px);
    text-align:center;
    overflow:hidden;
    isolation:isolate;
}

/* HALFTONE DOTS pattern (fumetto) */
.afn-hero::before{
    content:"";
    position:absolute; inset:0;
    background-image: radial-gradient(circle, rgba(232,197,71,0.18) 1.2px, transparent 1.6px);
    background-size: 14px 14px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
    opacity:0.55;
    z-index:0;
    pointer-events:none;
}

/* ACTION LINES radiali */
.afn-hero::after{
    content:"";
    position:absolute; inset:0;
    background:
        repeating-conic-gradient(
            from 0deg at 50% 38%,
            transparent 0deg,
            transparent 6deg,
            rgba(232,197,71,0.06) 6deg,
            rgba(232,197,71,0.06) 7deg
        );
    mask-image: radial-gradient(circle at 50% 38%, transparent 22%, #000 28%, #000 80%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at 50% 38%, transparent 22%, #000 28%, #000 80%, transparent 100%);
    opacity:0.75;
    z-index:0;
    animation: afnSpin 80s linear infinite;
    pointer-events:none;
}
@keyframes afnSpin{ to{ transform: rotate(360deg); } }

.afn-hero__inner{
    position:relative;
    z-index:2;
    max-width: 880px;
    margin: 0 auto;
}

/* POW BADGE — esplosione comic */
.afn-pow{
    position:relative;
    display:inline-block;
    width: clamp(140px, 22vw, 200px);
    aspect-ratio: 1;
    margin: 0 auto clamp(20px, 3vw, 34px);
    z-index: 3;
    animation: afnPowIn 0.9s cubic-bezier(.34,1.56,.64,1) 0.1s both, afnPowPulse 3.4s ease-in-out 1s infinite;
    filter: drop-shadow(0 14px 26px rgba(230,57,70,0.45)) drop-shadow(0 0 30px rgba(232,197,71,0.35));
}
.afn-pow svg{ width:100%; height:100%; display:block; }
.afn-pow__text{
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    font-family:'Bungee', 'Cinzel', sans-serif;
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 900;
    color: var(--hero-cream);
    letter-spacing: -0.5px;
    text-shadow:
        2px 2px 0 var(--navy-abyss),
        -1px -1px 0 var(--navy-abyss),
        0 4px 0 rgba(0,0,0,0.35);
    transform: rotate(-8deg);
    white-space: nowrap;
}
@keyframes afnPowIn{
    0%   { opacity:0; transform: scale(0.2) rotate(-40deg); }
    60%  { transform: scale(1.18) rotate(6deg); }
    100% { opacity:1; transform: scale(1) rotate(0); }
}
@keyframes afnPowPulse{
    0%, 100% { transform: scale(1) rotate(0); }
    50%      { transform: scale(1.05) rotate(-2deg); }
}

/* EYEBROW */
.afn-hero__eyebrow{
    display:inline-block;
    font-family:'Cinzel', serif;
    font-size: clamp(10px, 1.5vw, 12px);
    font-weight: 700;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--gold-bright);
    padding: 7px 18px;
    border: 1px solid rgba(232,197,71,0.45);
    border-radius: 999px;
    background: rgba(8,22,47,0.5);
    backdrop-filter: blur(4px);
    margin: 0;
    white-space: nowrap;
}
.afn-hero__eyebrow .afn-dot{
    display:inline-block; width:6px; height:6px; border-radius:50%;
    background: var(--gold-bright);
    margin-right: 10px;
    transform: translateY(-2px);
    box-shadow: 0 0 10px var(--gold-bright);
    animation: afnDotBlink 1.6s ease-in-out infinite;
}
@keyframes afnDotBlink{
    0%, 100% { opacity:1; transform: translateY(-2px) scale(1); }
    50%      { opacity:0.4; transform: translateY(-2px) scale(0.7); }
}

/* HEADLINE */
.afn-hero__title{
    font-family:'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.1rem, 6.5vw, 4.4rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.02em;
    margin: 0 0 clamp(14px, 2vw, 22px);
    color: var(--pearl);
    animation: afnFadeUp 0.9s ease 0.55s both;
}
.afn-hero__title em{
    display:inline-block;
    font-style: italic;
    font-weight: 600;
    background: linear-gradient(135deg, var(--gold-core) 0%, var(--gold-bright) 35%, var(--gold-glow) 50%, var(--gold-bright) 65%, var(--gold-core) 100%);
    background-size: 220% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: afnGoldFlow 5s linear infinite;
    position:relative;
}
.afn-hero__title em::after{
    content:"";
    position:absolute;
    left: 4%; right: 4%;
    bottom: -4px;
    height: 8px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'><path d='M0 5 Q 25 0 50 4 T 100 5 T 150 4 T 200 5' fill='none' stroke='%23E8C547' stroke-width='2' stroke-linecap='round'/></svg>") center/100% 100% no-repeat;
    opacity: 0.75;
}
@keyframes afnGoldFlow{ to{ background-position: 220% center; } }

/* SUBCOPY */
.afn-hero__sub{
    font-family:'DM Sans', sans-serif;
    font-size: clamp(0.96rem, 1.9vw, 1.18rem);
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 560px;
    margin: 0 auto clamp(28px, 4vw, 40px);
    animation: afnFadeUp 0.9s ease 0.7s both;
}
.afn-hero__sub strong{
    color: var(--pearl);
    font-weight: 600;
}

/* INFO STRIP (3 step) */
.afn-hero__steps{
    display:flex;
    justify-content:center;
    gap: clamp(8px, 1.6vw, 18px);
    flex-wrap: wrap;
    margin-bottom: clamp(28px, 4vw, 44px);
    animation: afnFadeUp 0.9s ease 0.85s both;
}
.afn-step{
    display:flex; align-items:center; gap:10px;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(232,197,71,0.22);
    font-size: clamp(0.78rem, 1.5vw, 0.88rem);
    color: var(--ink-soft);
    backdrop-filter: blur(6px);
}
.afn-step__num{
    display:inline-flex; align-items:center; justify-content:center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-core), var(--gold-bright));
    color: var(--navy-abyss);
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 11px;
}

/* HERO CTA — bottone primario mobile-first che porta al calcolatore */
.afn-hero-cta-wrap{
    animation: afnFadeUp 0.9s ease 1s both;
}
.afn-hero-cta{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap: 12px;
    text-decoration:none;
    padding: clamp(16px, 2.6vw, 20px) clamp(30px, 6vw, 48px);
    border-radius: 999px;
    font-family:'Cinzel', serif;
    font-size: clamp(0.95rem, 2.4vw, 1.1rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--navy-abyss);
    background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold-core) 25%, var(--gold-bright) 50%, var(--gold-glow) 60%, var(--gold-bright) 70%, var(--gold-core) 85%, var(--gold-deep) 100%);
    background-size: 250% 100%;
    box-shadow:
        0 10px 30px rgba(201,162,39,0.4),
        inset 0 1px 0 rgba(255,255,255,0.45),
        inset 0 -2px 0 rgba(107,79,18,0.3);
    position:relative;
    overflow:hidden;
    cursor:pointer;
    animation: afnGoldFlow 5s linear infinite, afnCtaGlow 2.6s ease-in-out infinite;
    transition: transform .2s ease, box-shadow .3s ease;
}
.afn-hero-cta::after{
    content:""; position:absolute; top:0; left:-75%;
    width:40%; height:100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: skewX(-25deg);
    animation: afnCtaShine 3.6s ease-in-out infinite;
}
@keyframes afnCtaShine{ 0%,45%{ left:-75%; } 65%,100%{ left:130%; } }
@keyframes afnCtaGlow{
    0%,100% { box-shadow: 0 10px 30px rgba(201,162,39,0.35), inset 0 1px 0 rgba(255,255,255,0.45), inset 0 -2px 0 rgba(107,79,18,0.3); }
    50%     { box-shadow: 0 14px 44px rgba(232,197,71,0.6), inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -2px 0 rgba(107,79,18,0.3); }
}
.afn-hero-cta:hover{ transform: translateY(-2px); }
.afn-hero-cta:active{ transform: translateY(1px); }
.afn-hero-cta__chevron{
    font-size: 1.35em;
    line-height: 1;
    margin-top: -2px;
    animation: afnChevBounce 1.4s ease-in-out infinite;
}
@keyframes afnChevBounce{
    0%,100% { transform: translateY(-2px); }
    50%     { transform: translateY(4px); }
}
.afn-hero-cta__hint{
    display:block;
    margin-top: 14px;
    font-family:'DM Sans', sans-serif;
    font-size: clamp(0.78rem, 1.6vw, 0.86rem);
    color: var(--ink-soft);
    letter-spacing: 0.02em;
}
.afn-hero-cta__hint b{ color: var(--gold-bright); font-weight: 600; }

@keyframes afnFadeUp{
    from { opacity:0; transform: translateY(16px); }
    to   { opacity:1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BRAND ROW — logo + "missione completata" affiancati
   ═══════════════════════════════════════════════════════════════════════════ */
.afn-brand-row{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2vw, 22px);
    flex-wrap: wrap;
    margin: 0 auto clamp(20px, 3vw, 30px);
    animation: afnFadeUp 0.8s ease 0.4s both;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGO AFFARINORO — il vero logo del brand (sul costume del supereroe)
   ═══════════════════════════════════════════════════════════════════════════ */
.afn-logo{
    display:inline-block;
    position:relative;
    margin: 0;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,0.5)) drop-shadow(0 0 22px rgba(232,197,71,0.18));
    animation: afnLogoIn 0.9s cubic-bezier(.34,1.56,.64,1) 0.25s both, afnLogoSway 7s ease-in-out 1.5s infinite;
    z-index: 3;
}
.afn-logo picture, .afn-logo img{
    display:block;
    width: clamp(120px, 20vw, 180px);
    height: auto;
    margin: 0;
}
@keyframes afnLogoIn{
    0%   { opacity:0; transform: rotate(-12deg) scale(0.6); }
    100% { opacity:1; transform: rotate(-2deg) scale(1); }
}
@keyframes afnLogoSway{
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50%      { transform: rotate(0deg) translateY(-2px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEZIONE FORM (il CF7 si stila da solo, qui solo padding/centratura)
   ═══════════════════════════════════════════════════════════════════════════ */
.afn-form-section{
    position:relative;
    padding: clamp(20px, 3vw, 36px) clamp(16px, 4vw, 32px) clamp(40px, 6vw, 72px);
    z-index: 2;
    scroll-margin-top: 90px;   /* compensa eventuale header sticky di Salient */
}

/* ═══════════════════════════════════════════════════════════════════════════
   BRIDGE — "ora vieni a ritirarlo"
   ═══════════════════════════════════════════════════════════════════════════ */
.afn-bridge{
    position:relative;
    text-align:center;
    padding: clamp(50px, 7vw, 90px) clamp(22px, 5vw, 56px) clamp(36px, 5vw, 60px);
    max-width: 880px;
    margin: 0 auto;
}
.afn-bridge::before{
    content:"";
    position:absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: clamp(80px, 14vw, 140px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-core), transparent);
}
.afn-bridge__eyebrow{
    display:inline-block;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--gold-bright);
    margin-bottom: 14px;
}
.afn-bridge__eyebrow::before,
.afn-bridge__eyebrow::after{
    content: '\25C6';
    color: var(--gold-core);
    font-size: 7px;
    margin: 0 12px;
    transform: translateY(-2px);
    display:inline-block;
}
.afn-bridge__title{
    font-family:'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--pearl);
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}
.afn-bridge__title em{
    font-style: italic;
    color: var(--gold-bright);
    font-weight: 600;
}
.afn-bridge__sub{
    font-family:'DM Sans', sans-serif;
    font-size: clamp(0.92rem, 1.7vw, 1.05rem);
    color: var(--ink-soft);
    max-width: 520px;
    margin: 0 auto 22px;
    line-height: 1.55;
}
.afn-bridge__sub strong{ color: var(--gold-bright); font-weight: 600; }
.afn-bridge__arrow{
    display:inline-block;
    color: var(--gold-bright);
    font-size: 22px;
    animation: afnArrowBob 2s ease-in-out infinite;
}
@keyframes afnArrowBob{
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50%      { transform: translateY(8px); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEZIONE STORE LOCATOR
   ═══════════════════════════════════════════════════════════════════════════ */
.afn-stores-wrap{
    position:relative;
    padding: 0 clamp(16px, 4vw, 40px) clamp(50px, 7vw, 80px);
    max-width: 1180px;
    margin: 0 auto;
    z-index: 2;
}
/* Titolo "Punti vendita Affarinoro Palermo" — reso oro animato, scoped alla pagina */
.afn-page-bonus .afn-locator .afn-title{
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-size: clamp(1.6rem, 3.4vw, 2.4rem) !important;
    font-weight: 700 !important;
    text-align: center !important;
    letter-spacing: -0.3px !important;
    margin: 0 auto clamp(22px, 3vw, 32px) !important;
    background: linear-gradient(135deg, var(--gold-core) 0%, var(--gold-bright) 35%, var(--gold-glow) 50%, var(--gold-bright) 65%, var(--gold-core) 100%) !important;
    background-size: 220% auto !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    animation: afnGoldFlow 5s linear infinite !important;
    filter: drop-shadow(0 2px 10px rgba(232,197,71,0.18));
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER della pagina
   ═══════════════════════════════════════════════════════════════════════════ */
.afn-page-footer{
    position:relative;
    text-align:center;
    padding: clamp(36px, 5vw, 60px) clamp(22px, 5vw, 56px) clamp(48px, 6vw, 72px);
    border-top: 1px solid rgba(232,197,71,0.18);
    background: linear-gradient(180deg, transparent, rgba(8,22,47,0.6));
    z-index: 2;
}
.afn-page-footer__claim{
    font-family:'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.1rem, 2.4vw, 1.5rem);
    color: var(--pearl);
    margin: 0 0 10px;
    letter-spacing: 0.2px;
}
.afn-page-footer__reminder{
    font-family:'DM Sans', sans-serif;
    font-size: 0.84rem;
    color: var(--ink-dim);
    max-width: 460px;
    margin: 0 auto;
    line-height: 1.5;
}
.afn-page-footer__reminder strong{ color: var(--gold-bright); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE TWEAKS — QR-scan viewport (320-430)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 540px){
    .afn-hero{ padding: 56px 20px 64px; }
    .afn-hero__steps{ gap: 6px; }
    .afn-step{ padding: 7px 12px; font-size: 0.75rem; }
    .afn-bridge::before{ width: 80px; }
}
@media (max-width: 380px){
    .afn-hero__eyebrow{ letter-spacing: 0.32em; font-size: 9.5px; padding: 6px 14px; }
    .afn-step{ font-size: 0.72rem; padding: 6px 10px; }
}

/* Riduce motion per chi ha prefers-reduced-motion */
@media (prefers-reduced-motion: reduce){
    .afn-pow, .afn-hero::after, .afn-hero__title em,
    .afn-bridge__arrow, .afn-hero__eyebrow .afn-dot,
    .afn-hero-cta, .afn-hero-cta::after, .afn-hero-cta__chevron{
        animation: none !important;
    }
    html{ scroll-behavior: auto; }
}
