/* =============================================================
   Homepage — hero "anello astrale" + griglia strumenti
   ============================================================= */

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(4rem, 12vw, 9rem);
}
/* Sfondo fotografico (Via Lattea, Pexels) attenuato dietro l'hero */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(18,14,42,.55), var(--indaco-900) 92%),
        linear-gradient(90deg, var(--indaco-900) 8%, transparent 60%),
        url("../img/hero-stars.jpg") center/cover no-repeat;
    opacity: .8;
    z-index: 0;
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 2;
}

/* Entrata dell'hero in CSS puro (nessuna dipendenza JS: il testo è
   sempre garantito, l'animazione è un miglioramento). */
.hero [data-anim] {
    opacity: 0;
    transform: translateY(22px);
    animation: hero-in .9s var(--ease) forwards;
}
.hero [data-anim]:nth-child(1) { animation-delay: .10s; }
.hero [data-anim]:nth-child(2) { animation-delay: .22s; }
.hero [data-anim]:nth-child(3) { animation-delay: .34s; }
.hero [data-anim]:nth-child(4) { animation-delay: .46s; }
@keyframes hero-in { to { opacity: 1; transform: none; } }
.hero h1 {
    font-size: clamp(2.6rem, 6.5vw, 5rem);
    font-weight: 400;
    margin-block: .3em .35em;
}
.hero h1 em {
    font-style: italic;
    color: var(--oro-soft);
}
.hero p {
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    color: var(--lavanda);
    margin-bottom: 2rem;
}

/* Anello astrale che ruota lentamente dietro l'hero (elemento firma) */
.astral-ring {
    position: absolute;
    top: 50%;
    right: -12%;
    transform: translateY(-50%);
    width: min(58vw, 640px);
    aspect-ratio: 1;
    z-index: 1;
    pointer-events: none;
    opacity: .9;
}
.astral-ring .ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(232, 182, 90, .35);
}
.astral-ring .ring.r2 { inset: 9%;  border-color: rgba(233, 167, 182, .28); border-style: dashed; }
.astral-ring .ring.r3 { inset: 20%; border-color: rgba(185, 175, 214, .22); }
.astral-ring .spin {
    position: absolute;
    inset: 0;
    animation: ring-spin 60s linear infinite;
}
.astral-ring .spin.slow { animation-duration: 120s; animation-direction: reverse; }
/* Tacche sull'anello */
.astral-ring .tick {
    position: absolute;
    top: 50%; left: 50%;
    width: 2px; height: 10px;
    background: var(--oro);
    transform-origin: center calc(min(29vw, 320px));
    border-radius: 2px;
    opacity: .5;
}
.astral-ring .core {
    position: absolute;
    inset: 34%;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, rgba(242, 211, 153, .85), rgba(232, 182, 90, .25) 55%, transparent 70%);
    filter: blur(2px);
    box-shadow: 0 0 80px -10px rgba(232, 182, 90, .6);
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

/* ---------- Intestazioni di sezione ---------- */
.tools-head { margin-bottom: 2.6rem; }
.tools-head.center { margin-inline: auto; text-align: center; }
.tools-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.tools-head p { color: var(--lavanda); font-size: 1.1rem; margin-top: .5rem; }

/* ---------- Come funziona (sequenza reale: 3 passi; colonne Bootstrap
   row/col-md-4 nel markup, qui solo lo stile della card) ---------- */
.how-step {
    height: 100%;
    padding: 1.8rem 1.6rem;
    border: 1px solid rgba(185, 175, 214, .12);
    border-radius: var(--radius);
    background: linear-gradient(160deg, var(--indaco-700), var(--indaco-800));
}
.how-num {
    font-family: var(--font-num);
    font-size: 1.05rem;
    color: var(--oro);
    letter-spacing: .1em;
}
.how-step h3 { font-size: 1.25rem; margin: .7rem 0 .5rem; }
.how-step p { color: var(--lavanda); line-height: 1.65; }

/* ---------- Sezioni strumenti ---------- */
.tools-section.alt { background: rgba(255, 255, 255, .015); }
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: 1.6rem;
}

/* ---------- Card strumento ---------- */
.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, var(--indaco-700), var(--indaco-800));
    border: 1px solid rgba(185, 175, 214, .12);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.tool-card:hover { transform: translateY(-6px); border-color: rgba(232, 182, 90, .4); }

/* Header visivo: gradiente (fallback) + eventuale immagine via JS (data-bg) */
.tool-media {
    position: relative;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, var(--indaco-600), var(--indaco-800));
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(185, 175, 214, .1);
}
.tool-media .tool-glyph {
    width: 58px; height: 58px;
    margin: 0;
    color: var(--oro-soft);
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .55));
}
.tool-glyph svg { width: 100%; height: 100%; }
.tool-badge {
    position: absolute;
    top: .8rem; right: .8rem;
    font-family: var(--font-num);
    font-size: 1rem;
    font-weight: 600;
    color: var(--indaco-900);
    background: linear-gradient(135deg, var(--oro-soft), var(--oro));
    padding: .3rem .75rem;
    border-radius: 999px;
    box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .6);
}
.tool-badge.is-free {
    color: var(--panna);
    background: rgba(18, 14, 42, .72);
    border: 1px solid var(--oro);
}

.tool-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.4rem 1.5rem 1.5rem;
}
.tool-card h3 { font-size: 1.35rem; margin-bottom: .45rem; }
.tool-card .desc {
    color: var(--lavanda);
    font-size: .96rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    flex: 1;
}
.tool-foot { margin-top: auto; }
.tool-cta {
    font-weight: 600;
    font-size: .95rem;
    color: var(--oro-soft);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.tool-cta:hover { color: var(--oro); }
.tool-soon {
    font-family: var(--font-num);
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--lavanda);
}

/* ---------- Banda CTA finale ---------- */
.cta-band { text-align: center; }
.cta-inner {
    padding: 2.6rem 2rem;
    border: 1px solid rgba(232, 182, 90, .25);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 0%, rgba(232, 182, 90, .10), transparent 70%),
        linear-gradient(160deg, var(--indaco-700), var(--indaco-800));
}
.cta-inner h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.cta-inner p { color: var(--lavanda); margin: .8rem 0 1.6rem; }
