:root {
  --bg: #0b0f1a;
  --card: #161b2e;       /* colore principale delle card, footer e navbar */
  --accent: #4f7cff;
  --accent2: #00e0ff;
  --text: #e8ebf3;
  --muted: #9aa3c7;
    --text-dark: #cfd3e0; /* più scuro di --muted ma meno di --text */
}

/* ===== RESET & FONT ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, sans-serif;
}

/* ===== BODY & STRUTTURA ===== */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;

  background:
    radial-gradient(1200px 600px at 10% -10%, #1a245a55, transparent),
    var(--bg);

  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* contenuti spingono il footer in basso */
main {
  flex: 1;
  padding-top: 60px; /* spazio per navbar fixed */
}

/* ===== HEADER ===== */
header {
  padding: 80px 20px 60px;
  text-align: center;
}

header h1 {
  font-size: 3rem;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header p {
  max-width: 700px;
  margin: 20px auto 40px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ===== CTA ===== */
.cta {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #000;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 30px #00000055;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px #00000088;
}

/* ===== SEZIONI ===== */
section {
  padding: 80px 20px;
  max-width: 1100px;
  margin: auto;
}
/* ===== SEZIONE FEATURES & ABOUT ANIMATION ===== */
section.about-solutions {
  opacity: 0;
  transform: translateY(40px);
  transition: transform 0.6s ease, opacity 0.6s ease;
}

section.about-solutions.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

/* ===== CARD ===== */
.card {
  background: var(--card);
  color: var(--text);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(30px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 18px 35px rgba(0,0,0,0.5);
}

.card::after {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: radial-gradient(circle, var(--accent2) 0%, transparent 80%);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover::after {
  opacity: 0.2;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* animazione on scroll */
.card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PRICING ===== */
.pricing {
  text-align: center;
}

.price {
  font-size: 2.2rem;
  margin: 20px 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== FOOTER (sempre in basso) ===== */
footer {
  margin-top: auto;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid #ffffff10;
  background: var(--card);
}

footer a {
  color: var(--accent2);
  text-decoration: none;
  margin: 0 8px;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--accent);
}

/* ===== GLOW BACKGROUND ===== */
.glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, #4f7cff55, transparent 70%);
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
}

/* ===== NAVBAR GLOBAL (stesso colore per tutte le pagine) ===== */
.navbar,
.top-nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--card); /* blu come le altre pagine */
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 12px 0;
  z-index: 1000;
}

.top-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 40px;
}

.top-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.top-nav a:hover {
  color: var(--accent2);
}
/* ===== COOKIE BANNER BLOCCANTE E GRANDI ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #000;
  padding: 24px 20px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  z-index: 9999;
  display: none; /* mostrato tramite JS */
  box-shadow: 0 -5px 30px rgba(0,0,0,0.6);
}

.cookie-banner p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.cookie-btn {
  padding: 14px 28px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cookie-btn.accept {
  background: #fff;
  color: var(--accent);
}

.cookie-btn.decline {
  background: #000;
  color: var(--accent2);
}

.cookie-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.cookie-link {
  color: #000;
  text-decoration: underline;
  font-size: 1rem;
}

.cookie-link:hover {
  color: #e8ebf3;
}
/* Privacy cards layout */
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.privacy-card {
  background: var(--card);
  color: var(--text);
  padding: 25px 20px;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.privacy-card h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Testo con sfumatura */
.privacy-card h2 .gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.privacy-card p, .privacy-card ul {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

.privacy-card ul {
  padding-left: 20px;
}

.privacy-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.4);
}
/* ===== Pulsante Manage Cookies Footer ===== */
#manage-cookies {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 8px;
  border: none;
  background: var(--accent2);
  color: #000;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 8px;
}

#manage-cookies:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.card > * {
  position: relative;
  z-index: 2;
}
/* ===== PROJECT CARD ===== */
.project-card {
  padding: 0;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card-bg);
}

/* area visiva con proporzioni fisse */
.project-media {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* overlay info */
.project-info {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15),
    rgba(0,0,0,0.85)
  );
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;


  /* Nuovi parametri */
  max-height: 100%;
  overflow-y: auto; /* permette di scrollare il testo se troppo lungo */
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--accent2) rgba(0,0,0,0.3);
}

/* Scrollbar per Chrome/Edge/Safari */
.project-info::-webkit-scrollbar {
  width: 6px;
}
.project-info::-webkit-scrollbar-thumb {
  background-color: var(--accent2);
  border-radius: 3px;
}
.project-info::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.2);
}

.project-info h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--accent2);
}

.project-info p {
  font-size: 0.95rem;
 color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 1rem;
    word-wrap: break-word;   /* rompe le parole troppo lunghe */
  overflow-wrap: break-word;
}
.project-info .cta {
  align-self: flex-start; /* pulsante non si allarga al 100% */
  padding: 0.5rem 1rem;
  background-color: #00bfff;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s;
}

.project-info .cta:hover {
  background-color: #0091c1;
}

/* ===== DESKTOP: hover ===== */
@media (hover: hover) {
  .project-card:hover .project-info {
    opacity: 1;
    transform: translateY(0);
  }

  .project-card:hover img {
    transform: scale(1.05);
  }
}

/* ===== MOBILE: tap ===== */
@media (hover: none) {
  .project-card.active .project-info {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ===== Section Title ===== */
.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 50px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(40px);
  transition: transform 0.6s ease, opacity 0.6s ease;
}

/* Reveal title on scroll */
.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== About Section ===== */
.about-solutions {
  max-width: 900px;
  margin: 80px auto;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.about-solutions.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-solutions p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 30px;
  line-height: 1.6;
}
/* contact page  */
.contact-section {
  max-width: 1100px;
  margin: 80px auto;
  padding: 0 20px;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  justify-content: center;
}

.contact-info, .contact-form {
  flex: 1 1 400px;
  background: #1a1a1a;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  color: #fff;
}

.contact-info h2, .contact-form h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: center;
  background: linear-gradient(90deg, #00d4ff, #ff6bcb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.email-card {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.email-card span {
  margin-right: 10px;
}

.email-card a {
  color: #00d4ff;
  text-decoration: none;
  transition: color 0.3s;
}

.email-card a:hover {
  color: #ff6bcb;
}

.cta-wrapper {
  text-align: center;
  margin-top: 30px;
}

.contact-form form input,
.contact-form form textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: none;
  background: #2a2a2a;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s;
}

.contact-form form input:focus,
.contact-form form textarea:focus {
  outline: none;
  background: #333;
}

.contact-form form button.cta {
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  border: none;
  font-size: 1.1rem;
  background: linear-gradient(90deg, #00d4ff, #ff6bcb);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
}

.contact-form form button.cta:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* Responsive */
@media(max-width: 900px) {
  .contact-grid {
    flex-direction: column;
  }
}
