:root {
  --orange: #f6851d;
  --orange-deep: #e07012;
  --blue: #1f7dba;
  --blue-deep: #165f8f;
  --navy: #0d3d5c;
  --ink: #1a2b36;
  --muted: #5a6d7a;
  --paper: #f6f8fb;
  --white: #ffffff;
  --line: rgba(13, 61, 92, 0.1);
  --shadow: 0 18px 50px rgba(13, 61, 92, 0.1);
  --radius: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-deep);
}

/* Dissolvenza iniziale a tutto schermo */
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #f4f7fb;
  pointer-events: none;
  animation: veil-out 1.15s ease 0.15s forwards;
}

@keyframes veil-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.42;
  animation: float 16s ease-in-out infinite;
}

.orb-orange {
  width: 420px;
  height: 420px;
  background: var(--orange);
  top: -120px;
  right: -80px;
}

.orb-blue {
  width: 480px;
  height: 480px;
  background: var(--blue);
  bottom: -160px;
  left: -120px;
  animation-delay: -6s;
}

.orb-soft {
  width: 260px;
  height: 260px;
  background: #9fd0ef;
  top: 40%;
  right: 18%;
  animation-delay: -10s;
  opacity: 0.28;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -24px) scale(1.08);
  }
}

.topbar,
.hero,
.services,
.values,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 8px;
  opacity: 0;
  animation: fade-up 0.9s ease 0.35s forwards;
}

.topbar-logo,
.footer-logo {
  width: min(280px, 68vw);
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(246, 133, 29, 0.12);
  color: var(--orange-deep);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(246, 133, 29, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(246, 133, 29, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(246, 133, 29, 0);
  }
}

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  opacity: 0;
  animation: fade-up 0.9s ease 0.5s forwards;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.12;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.03em;
  opacity: 0;
  animation: fade-up 0.95s ease 0.62s forwards;
}

.hero h1 em {
  font-style: normal;
  color: var(--orange);
}

.lead,
.coming {
  max-width: 720px;
  opacity: 0;
}

.lead {
  margin: 0 0 18px;
  font-size: 1.12rem;
  color: var(--muted);
  animation: fade-up 0.95s ease 0.78s forwards;
}

.coming {
  margin: 0 0 28px;
  padding: 16px 18px;
  border-left: 3px solid var(--orange);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 0 14px 14px 0;
  color: var(--navy);
  animation: fade-up 0.95s ease 0.92s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  animation: fade-up 0.95s ease 1.05s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: var(--white);
  box-shadow: 0 10px 24px rgba(246, 133, 29, 0.28);
}

.btn-primary:hover {
  color: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--white);
  color: var(--blue-deep);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.services {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 8px;
}

.services h2 {
  margin: 0 0 22px;
  font-size: 1.5rem;
  color: var(--navy);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(22px);
  animation: fade-up 0.8s ease forwards;
}

.card:nth-child(1) { animation-delay: 1.15s; }
.card:nth-child(2) { animation-delay: 1.28s; }
.card:nth-child(3) { animation-delay: 1.41s; }
.card:nth-child(4) { animation-delay: 1.54s; }

.card:hover {
  transform: translateY(-4px);
}

.card-icon {
  width: 48px;
  height: 48px;
  color: var(--orange);
  margin-bottom: 10px;
}

.card-icon-blue {
  color: var(--blue);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--navy);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.values {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 24px 8px;
  text-align: center;
  opacity: 0;
  animation: fade-up 0.9s ease 1.6s forwards;
}

.values ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.values li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
}

.cert {
  margin: 0 auto;
  color: var(--muted);
  max-width: 820px;
}

.footer {
  max-width: 1120px;
  margin: 40px auto 0;
  padding: 28px 24px 40px;
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: fade-up 0.9s ease 1.75s forwards;
}

.footer-logo {
  width: 220px;
  margin-bottom: 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.footer h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}

.footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.copyright {
  margin-top: 18px !important;
  font-size: 0.85rem !important;
}

.credit {
  font-size: 0.78em;
  font-weight: 400;
  color: #8a9aa5;
  margin-left: 0.35em;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 28px;
  font-size: 0.9rem;
}

.link-button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--blue);
  cursor: pointer;
}

.link-button:hover {
  color: var(--blue-deep);
}

.legal-page {
  animation: none;
}

.legal-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 24px 8px;
}

.legal-wrap h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--navy);
  letter-spacing: -0.03em;
}

.legal-date {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 28px;
}

.legal-wrap h2 {
  margin: 28px 0 10px;
  font-size: 1.15rem;
  color: var(--navy);
}

.legal-wrap p,
.legal-wrap li {
  color: var(--muted);
}

.legal-wrap ul {
  padding-left: 1.2rem;
}

.back-home {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  white-space: nowrap;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  max-width: 1120px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(13, 61, 92, 0.18);
  padding: 20px;
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-banner h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--navy);
}

.cookie-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

body.legal-simple .topbar,
body.legal-simple .footer {
  opacity: 1;
  animation: none;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .cards,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .cards,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .page-veil,
  .topbar,
  .eyebrow,
  .hero h1,
  .lead,
  .coming,
  .hero-actions,
  .card,
  .values,
  .footer {
    opacity: 1;
    transform: none;
    visibility: visible;
  }
}
