:root {
  --bg: #edf3f8;
  --text: #0f172a;
  --primary: #38bdf8;
  --secondary: #6366f1;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, sans-serif;
  overflow-x: hidden;
  line-height: 1.6;

  padding-top: 80px;
}

/* =========================
   CONTAINER
========================= */
.container-custom {
  width: min(1100px, 90%);
  margin: auto;
}

/* =========================
   SEZIONI
========================= */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0;
}

/* =========================
   NAVBAR
========================= */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 80px;
  z-index: 999;

  backdrop-filter: blur(20px);
  background: rgba(248, 251, 255, 0.85);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.nav-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desktop-nav {
  display: flex;
  gap: 25px;
}

/* =========================
   HERO
========================= */
.hero-section {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 1.05;
}

.hero-content p {
  max-width: 520px;
  opacity: .85;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* =========================
   ABOUT
========================= */
#about {
  width: 100%;
  background: #f5f7fa;
  padding: 100px 0;
}

#about .container-custom {
  background: white;
  padding: 1rem;
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,.06);
}

#about h2 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin: 10px 0 20px;
}

#about p {
  max-width: 700px;
  opacity: .85;
  margin-bottom: 12px;
}

/* =========================
   HERO VISUAL (CERCHI)
========================= */
.hero-visual {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.storm-core {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  mix-blend-mode: screen;

  animation: corePulse 3s ease-in-out infinite;
  transform-origin: center;
}

/* =========================
   CORE PULSE (diverso dai ring)
========================= */
@keyframes corePulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(56,189,248,0.0);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.12);
    box-shadow: 0 0 40px rgba(56,189,248,0.35);
    filter: brightness(1.2);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(56,189,248,0.0);
    filter: brightness(1);
  }
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(56,189,248,.35);
  transform-origin: center;
}

/* =========================
   ANIMAZIONE BASE
========================= */
@keyframes ringPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.2;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.6;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.2;
  }
}

/* =========================
   RING ESTERNO (parte prima)
========================= */
.ring-3 {
  width: 460px;
  height: 460px;

  animation: ringPulse 3s ease-in-out infinite;
  animation-delay: 0s;
}

/* =========================
   RING MEDIO
========================= */
.ring-2 {
  width: 360px;
  height: 360px;

  animation: ringPulse 3s ease-in-out infinite;
  animation-delay: 0.4s;
}

/* =========================
   RING INTERNO
========================= */
.ring-1 {
  width: 260px;
  height: 260px;

  animation: ringPulse 3s ease-in-out infinite;
  animation-delay: 0.8s;
}

/* =========================
   FOOTER
========================= */
.footer{
  padding: 1rem;
}

/* =========================
   GRIDS
========================= */
.services-grid,
.contact-grid,
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
}

.footer-grid{
  justify-items: space-between;
  align-items: center;
}

/* =========================
   SERVICE CARD
========================= */
.service-card {
  padding: 30px;
  margin-top: 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(0,0,0,.05);
  transition: .3s;
}

.service-card:hover {
  transform: translateY(-8px);
}

/* =========================
   CTA
========================= */
.cta-box {
  padding: 70px;
  border-radius: 40px;
  text-align: center;

  background: linear-gradient(135deg,
    rgba(56,189,248,.15),
    rgba(99,102,241,.15)
  );
}

/* =========================
   BUTTONS
========================= */
.btn-primary,
.btn-secondary {
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-contact{
  margin-top: 1.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.btn-secondary {
  border: 1px solid rgba(0,0,0,.12);
  background: white;
}

/* =========================
   PROGRESS BAR
========================= */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 9999;
}

/* =========================
   CONTACT CARD 
========================= */

.contact-cta {
  text-align: center;
  margin-bottom: 50px;
}

.contact-cta h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 10px;
  font-weight: 700;
}

.contact-cta p {
  max-width: 600px;
  margin: auto;
  opacity: 0.75;
  font-size: 1.05rem;
}

.contact-card {
  position: relative;

  padding: 35px;
  border-radius: 24px;
  margin-top:5rem;

  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);

  border: 1px solid rgba(15, 23, 42, 0.06);

  display: flex;
  flex-direction: column;
  gap: 14px;

  transition: all 0.35s ease;

  overflow: hidden;
}

/* glow */
.contact-card::before {
  content: "";
  position: absolute;
  inset: -2px;

  background: radial-gradient(
    circle at top left,
    rgba(56,189,248,.25),
    transparent 60%
  );

  opacity: 0;
  transition: opacity 0.4s ease;

  z-index: 0;
}

.contact-card:hover::before {
  opacity: 1;
}

/* hover effetto premium */
.contact-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 25px 70px rgba(56,189,248,.12);
}

/* contenuto sopra glow */
.contact-card * {
  position: relative;
  z-index: 1;
}

/* titolo */
.contact-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

/* line under title */
.contact-card h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* links */
.contact-card a {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 12px 14px;
  border-radius: 12px;

  text-decoration: none;

  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255,255,255,0.6);

  transition: .25s ease;
}

/* hover link */
.contact-card a:hover {
  background: rgba(56,189,248,0.08);
  border-color: rgba(56,189,248,0.25);
  transform: translateX(5px);
}

/* spacing links */
.contact-card a + a {
  margin-top: 6px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {

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

  .desktop-nav {
    display: none;
  }

  #about .container-custom {
    padding: 30px;
  }

  .hero-visual {
    height: 320px;
  }
}

@media (max-width: 600px) {

  .hero-content h1 {
    font-size: 2.1rem;
  }

  .section {
    padding: 70px 0;
  }
}