html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    color: #E5E7EB;

    background: linear-gradient(180deg,
            #070A12 0%,
            #0A0F1C 15%,
            #0E1430 30%,
            #151A3D 50%,
            #24124A 75%,
            #8000ff 100%);
}

.icon-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

section {
    padding: 80px 10%;
    position: relative;
    background: transparent;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 40px;
    background: rgba(7, 10, 18, 0.6);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.08);

    z-index: 1000;
    box-sizing: border-box;
}

nav a {
    color: #94A3B8;
    margin-left: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

nav a:hover {
    color: #A855F7;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #E5E7EB;
}

.logo img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 10px;
        padding: 12px 20px;
    }

    .links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* HERO */
.hero {
    /* height: 100vh; */
    padding: 100px;
    display: flex;
    align-items: center;
    /* padding: 0 10%; */
    background: radial-gradient(circle at top,
            rgba(59, 130, 246, 0.15),
            transparent 50%);
}

.hero h1 {
    font-size: 64px;
    line-height: 1.1;
}

.hero h1 span {
    background: linear-gradient(90deg, #3B82F6, #A855F7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: #a1a1aa;
    /* max-width: 600px; */
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 36px;
  }

  .hero {
    padding-top: 140px;
  }
}

.btn {
    margin-top: 25px;
    display: inline-block;
    padding: 12px 22px;
    border-radius: 999px;
    color: white;
    text-decoration: none;
    background: linear-gradient(90deg, #3B82F6, #A855F7);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.15);
    transition: 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.25);
}

/* SEZIONI */
.container {
    max-width: 1100px;
    margin: auto;
    text-align: center;
}

h2 {
    font-size: 36px;
    margin-bottom: 25px;
}

h2 span {
    background: linear-gradient(90deg, #3B82F6, #A855F7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    line-height: 1.6;
    color: #cbd5e1;
}

.muted {
    color: #9ca3af;
}

/* GRID CARDS */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: stretch;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* CARD FLIP CLEAN */
.card {
    perspective: 1200px;
    height: 135px;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s ease;
}

.card:hover .card-inner {
    transform: rotateY(180deg);
}

.card .front {
    background: rgba(17, 19, 39, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(168, 85, 247, 0.1);
}

.front,
.back {
    position: absolute;
    inset: 0;
    border-radius: 16px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 24px;
    text-align: center;

    backface-visibility: hidden;
}

.front {
    background: linear-gradient(145deg, #101735, #0C1020);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.back {
    background: linear-gradient(145deg, #101735, #0C1020);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transform: rotateY(180deg);
    color: #CBD5E1;
}

@media (max-width: 768px) {

    .grid {
        grid-template-columns: 1fr;
    }

    .card {
        height: auto;
    }

    .card-inner {
        transform: none !important;
        height: auto;
    }

    .front,
    .back {
        position: relative;
        transform: none;
        backface-visibility: visible;
        height: auto;
    }

    .back {
        display: block;
        /* NON display:none se vuoi testo completo */
        opacity: 0.8;
        margin-top: 8px;
    }

}

/* ICON */
i {
    font-size: 22px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #3B82F6, #A855F7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* STEPS */
.steps {
    margin-top: 40px;
}

.step {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.step span {
    color: #3b82f6;
    font-weight: bold;
}

/* FORM */

#contatti .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#contatti p {
    max-width: 600px;
    text-align: center;
}

form {
    width: 100%;
    max-width: 500px;
    margin-top: 30px;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

input,
textarea {
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f1115;
    color: white;
}

button {
    padding: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 10px;
}

.contact-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(17, 19, 39, 0.5);
    border: 1px solid rgba(168, 85, 247, 0.1);
    text-decoration: none;
    color: inherit;
    transition: 0.25s ease;
    cursor: pointer;
    width: 350px;
    justify-content: center;
}

.contact-box:hover {
    border-color: rgba(168, 85, 247, 0.4);
    transform: translateY(-2px);
}

/* .contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  text-align: center;
}

.contact-info h2 {
  text-align: center;
}

.contact-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(17, 19, 39, 0.5);
  border: 1px solid rgba(168, 85, 247, 0.1);
}

.contact-box i {
  font-size: 18px;
}

.contact-form {
  background: rgba(17, 19, 39, 0.6);
  padding: 30px;
  border-radius: 18px;
  border: 1px solid rgba(168, 85, 247, 0.15);
  backdrop-filter: blur(10px);
}

.contact-form form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
} */

/* TOAST */

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 18px;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.3s ease;
    pointer-events: none;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: linear-gradient(90deg, #3B82F6, #A855F7);
}

.toast.error {
    background: #ef4444;
}

.footer {
    padding: 30px 10%;
    text-align: center;
    border-top: 1px solid rgba(168, 85, 247, 0.08);
    background: rgba(7, 10, 18, 0.4);
    backdrop-filter: blur(10px);
    color: #9ca3af;
    font-size: 14px;
}