/* ============================================================
   HOMEPAGE — Aghostino Theme
   ============================================================ */

/* ── reset scoped ─────────────────────────────────────────── */
.hp-main { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
.hp-main *, .hp-main *::before, .hp-main *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── container ────────────────────────────────────────────── */
.hp-container { max-width: 1160px; margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; }

/* ── section header ───────────────────────────────────────── */
.hp-section-header { text-align: center; margin-bottom: 64px; }
.hp-section-title { font-size: clamp(1.8rem, 3vw + .5rem, 2.75rem); font-weight: 800; letter-spacing: -.035em; color: #fff; line-height: 1.15; margin-bottom: 14px; }
.hp-section-subtitle { font-size: 1.0625rem; color: rgba(255,255,255,.6); line-height: 1.65; max-width: 520px; margin-left: auto; margin-right: auto; }

/* ── gradient text ────────────────────────────────────────── */
.hp-gradient-text { background: linear-gradient(135deg, #fff 0%, #c4a0e8 55%, #9e7eb0 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* =============================================================
   HERO
   ============================================================= */
.hp-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(170deg, #1a0d2e 0%, #2d1449 40%, #441e6d 75%, #3b1a60 100%);
}

/* glows decorativi */
.hp-hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hp-hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); }
.hp-hero-glow--1 { width: 800px; height: 800px; background: radial-gradient(circle, rgba(196,160,232,.22) 0%, transparent 70%); top: -200px; left: 50%; transform: translateX(-50%); }
.hp-hero-glow--2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(124,58,237,.18) 0%, transparent 70%); bottom: -100px; right: -50px; }
.hp-hero-glow--3 { width: 350px; height: 350px; background: radial-gradient(circle, rgba(196,160,232,.12) 0%, transparent 70%); top: 30%; left: -80px; }

/* layout hero: split = immagine + testo | centered = solo testo */
.hp-hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 120px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.hp-hero-inner--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.hp-hero-inner--centered .hp-hero-text {
    align-items: center;
    text-align: center;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.hp-hero-text { display: flex; flex-direction: column; align-items: flex-start; }

/* badge */
.hp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(196,160,232,.35);
    border-radius: 100px;
    padding: 7px 16px;
    font-size: .8125rem;
    font-weight: 500;
    color: #c4a0e8;
    letter-spacing: .01em;
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
}

/* titolo */
.hp-hero-title {
    font-size: clamp(2.8rem, 6vw + .5rem, 5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.05em;
    color: #fff;
    margin-bottom: 20px;
}

/* sottotitolo */
.hp-hero-subtitle {
    font-size: 1.0625rem;
    color: rgba(255,255,255,.62);
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 32px;
}

/* blocco html personalizzato (ex searchbar) */
.hp-hero-custom {
    width: 100%;
    max-width: 520px;
}
.hp-hero-custom a.hp-btn--primary,
.hp-hero-custom .hp-btn--primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: .9375rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    background: #fff;
    color: #441e6d;
    border: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.hp-hero-custom a.hp-btn--primary:hover,
.hp-hero-custom .hp-btn--primary:hover { background: #c4a0e8; color: #2d1449; box-shadow: 0 8px 32px rgba(196,160,232,.45); transform: translateY(-2px); }

/* immagine destra hero */
.hp-hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hp-hero-img {
    width: 100%;
    height: auto;
    max-height: 580px;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 40px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06);
    display: block;
}

/* scroll hint */
.hp-scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); }
.hp-scroll-line { width: 1px; height: 44px; background: linear-gradient(to bottom, rgba(255,255,255,.35), transparent); animation: hp-scroll-pulse 2s ease-in-out infinite; }
@keyframes hp-scroll-pulse { 0%, 100% { opacity: .3; } 50% { opacity: .9; } }

/* =============================================================
   STEPS
   ============================================================= */
.hp-steps {
    padding-top: 96px;
    padding-bottom: 96px;
    background: #1a0d2e;
    border-top: 1px solid rgba(255,255,255,.07);
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.hp-steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hp-step-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 36px 28px 32px;
    position: relative;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.hp-step-card:hover { transform: translateY(-6px); border-color: rgba(196,160,232,.3); box-shadow: 0 24px 48px rgba(0,0,0,.35); }
.hp-step-num {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 28px;
    height: 28px;
    background: rgba(196,160,232,.1);
    border: 1px solid rgba(196,160,232,.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 800;
    color: #9e7eb0;
}
.hp-step-icon { font-size: 2.25rem; margin-bottom: 18px; display: block; line-height: 1; }
.hp-step-img { width: 64px; height: 64px; object-fit: contain; display: block; }
.hp-step-title { font-size: 1.125rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.hp-step-text { font-size: .875rem; color: rgba(255,255,255,.55); line-height: 1.7; }

/* =============================================================
   FEATURES
   ============================================================= */
.hp-features {
    padding-top: 96px;
    padding-bottom: 96px;
    background: linear-gradient(180deg, #1a0d2e 0%, #2d1449 100%);
}
.hp-features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hp-feat-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 28px 22px;
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.hp-feat-card:hover { transform: translateY(-4px); border-color: rgba(196,160,232,.28); background: rgba(196,160,232,.06); }
.hp-feat-icon { font-size: 1.85rem; margin-bottom: 14px; display: block; line-height: 1; }
.hp-feat-title { font-size: .9375rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.hp-feat-text { font-size: .8125rem; color: rgba(255,255,255,.52); line-height: 1.65; }

/* =============================================================
   FAQ
   ============================================================= */
.hp-faq {
    padding-top: 96px;
    padding-bottom: 96px;
    background: #1a0d2e;
    border-top: 1px solid rgba(255,255,255,.07);
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.hp-faq-inner { max-width: 780px; }
.hp-faq-list { display: flex; flex-direction: column; }
.hp-faq-item { border-bottom: 1px solid rgba(255,255,255,.08); }
.hp-faq-item:last-child { border-bottom: none; }
.hp-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 22px 0;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    font-family: inherit;
    transition: color .2s ease;
}
.hp-faq-question:hover { color: #c4a0e8; }
.hp-faq-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    transition: transform .3s ease, background .2s ease, border-color .2s ease;
    color: rgba(255,255,255,.6);
}
.hp-faq-question[aria-expanded="true"] .hp-faq-icon { transform: rotate(180deg); background: rgba(196,160,232,.15); border-color: rgba(196,160,232,.35); color: #c4a0e8; }
.hp-faq-answer { max-height: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.4,0,.2,1), opacity .3s ease; opacity: 0; }
.hp-faq-answer.is-open { max-height: 400px; opacity: 1; }
.hp-faq-answer p { font-size: .9375rem; color: rgba(255,255,255,.58); line-height: 1.75; padding-bottom: 22px; }

/* =============================================================
   CTA
   ============================================================= */
.hp-cta { padding-top: 80px; padding-bottom: 80px; background: #2d1449; }
.hp-cta-box {
    position: relative;
    background: linear-gradient(135deg, rgba(68,30,109,.7) 0%, rgba(45,20,73,.9) 100%);
    border: 1px solid rgba(196,160,232,.28);
    border-radius: 24px;
    padding: 80px 48px;
    text-align: center;
    overflow: hidden;
}
.hp-cta-glow { position: absolute; width: 700px; height: 700px; background: radial-gradient(circle, rgba(196,160,232,.12), transparent 70%); top: 50%; left: 50%; transform: translate(-50%,-50%); pointer-events: none; }
.hp-cta-content { position: relative; z-index: 1; }
.hp-cta-title { font-size: clamp(1.75rem, 3vw + .5rem, 2.75rem); font-weight: 800; letter-spacing: -.04em; color: #fff; margin-bottom: 16px; }
.hp-cta-subtitle { font-size: 1rem; color: rgba(255,255,255,.6); line-height: 1.7; max-width: 500px; margin-left: auto; margin-right: auto; margin-bottom: 36px; }
.hp-cta-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* =============================================================
   BUTTONS
   ============================================================= */
.hp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: .9375rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border: none;
    line-height: 1;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.hp-btn:hover { transform: translateY(-2px); }
.hp-btn:active { transform: translateY(0); }
.hp-btn--primary { background: #fff; color: #441e6d; box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.hp-btn--primary:hover { background: #c4a0e8; color: #2d1449; box-shadow: 0 8px 32px rgba(196,160,232,.45); }
.hp-btn--ghost { background: rgba(255,255,255,.07); color: #fff; border: 1.5px solid rgba(255,255,255,.15); }
.hp-btn--ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }

/* =============================================================
   REVEAL ANIMATION
   ============================================================= */
[data-hp-reveal] { transition: opacity .65s ease, transform .65s ease; }
[data-hp-reveal].hp-will-animate { opacity: 0; transform: translateY(26px); }
[data-hp-reveal].hp-revealed { opacity: 1 !important; transform: translateY(0) !important; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1100px) {
    .hp-hero-inner--split { grid-template-columns: 1fr; gap: 40px; }
    .hp-hero-inner--split .hp-hero-visual { display: none; }
    .hp-hero-inner--split .hp-hero-text { align-items: center; text-align: center; }
    .hp-hero-inner--split .hp-hero-subtitle,
    .hp-hero-inner--split .hp-hero-custom { margin-left: auto; margin-right: auto; }
    .hp-features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hp-hero { min-height: auto; }
    .hp-hero-inner { padding-top: 80px; padding-bottom: 60px; }
    .hp-hero-title { letter-spacing: -.04em; }
    .hp-steps-grid { grid-template-columns: 1fr; gap: 16px; }
    .hp-steps, .hp-features, .hp-faq, .hp-cta { padding-top: 64px; padding-bottom: 64px; }
    .hp-section-header { margin-bottom: 40px; }
    .hp-cta-box { padding: 48px 24px; }
}

@media (max-width: 500px) {
    .hp-features-grid { grid-template-columns: 1fr; }
    .hp-cta-actions { flex-direction: column; width: 100%; }
    .hp-btn { width: 100%; justify-content: center; }
    .hp-container { padding-left: 20px; padding-right: 20px; }
}
