/* Fortivesta AI — stili futuristici adattivi */

:root {
  --bg-deep: #06080f;
  --bg-card: rgba(12, 18, 32, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border: rgba(0, 212, 255, 0.18);
  --accent: #00d4ff;
  --accent-soft: rgba(0, 212, 255, 0.12);
  --accent-2: #7c5cff;
  --text: #e8edf7;
  --text-muted: #8b9ab8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max: 1180px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(0, 212, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(124, 92, 255, 0.12), transparent 50%),
    linear-gradient(180deg, #06080f 0%, #0a0e1a 100%);
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

a:hover {
  color: #5ee4ff;
}

ul {
  list-style: none;
}

h1, h2, h3, h4, h5 {
  line-height: 1.25;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: 0.75rem;
}

section {
  padding: clamp(3rem, 6vw, 5.5rem) 1.25rem;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-lead {
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 2.5rem;
}

/* Percorso di navigazione */
.breadcrumbs {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: rgba(139, 154, 184, 0.5);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs [aria-current="page"] {
  color: var(--text);
}

/* Intestazione */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: rgba(6, 8, 15, 0.82);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-logo,
.footer-logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
}

.header-logo span,
.footer-logo span {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-list {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.75rem);
}

.nav-list a {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.nav-list a:hover {
  color: var(--text);
}

/* Pulsanti */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}

.btn:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.45);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(124, 92, 255, 0.25));
  border-color: rgba(0, 212, 255, 0.35);
}

/* Sezione principale */
.hero {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.hero-wrapper {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-left p,
.hero-right p {
  color: var(--text-muted);
  margin: 1.25rem 0 1.75rem;
  font-size: clamp(1rem, 1.8vw, 1.125rem);
}

.hero-right {
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-right::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.35), transparent 70%);
  pointer-events: none;
}

.hero-right h3 {
  font-size: 1.125rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* Chi siamo */
.about-wrapper {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  margin-top: 1rem;
}

.about-visual {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(0, 212, 255, 0.08), rgba(124, 92, 255, 0.08)),
    var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.about-visual svg {
  width: 60%;
  opacity: 0.9;
}

/* Griglie funzionalità */
.how-its-work,
.why-we,
.faq {
  background: linear-gradient(180deg, transparent, rgba(0, 212, 255, 0.02), transparent);
}

.how-its-work-list,
.why-we-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.how-its-work-list li,
.why-we-list li {
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, transform 0.25s;
}

.how-its-work-list li:hover,
.why-we-list li:hover {
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateY(-3px);
}

.how-its-work-icon-svg,
.why-we-icon-svg {
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  color: var(--accent);
}

.how-its-work-list h3,
.why-we-list h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.how-its-work-list p,
.why-we-list p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Recensioni */
.reviews {
  overflow: hidden;
}

.review-swiper {
  overflow: hidden;
  margin: 0 -1.25rem;
  padding: 0 1.25rem;
}

.reviews-swiper-wrapper {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}

.reviews-swiper-wrapper::-webkit-scrollbar {
  display: none;
}

.review-swiper-slide {
  flex: 0 0 min(320px, 85vw);
  scroll-snap-align: start;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.review-swiper-slide h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}

.review-name {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.review-swiper-slide p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.review-swiper-slide span {
  font-size: 0.8125rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.review-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  justify-content: flex-end;
}

.review-nav button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--accent);
  cursor: pointer;
  font-size: 1.125rem;
  transition: background 0.2s;
}

.review-nav button:hover {
  background: var(--accent-soft);
}

/* Domande frequenti */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 800px;
}

.faq-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.faq-question::after {
  content: "+";
  color: var(--accent);
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.25s;
}

.faq-list li.is-open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.125rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.faq-list li.is-open .faq-answer {
  display: block;
}

/* Modulo contatti */
.form {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.form-card {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
}

.form-card h2 {
  margin-bottom: 0.5rem;
}

.form-card > p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 0.9375rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-grid input,
.form-grid textarea {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-grid input:focus,
.form-grid textarea:focus {
  outline: none;
  border-color: rgba(0, 212, 255, 0.5);
}

.form-grid textarea {
  min-height: 120px;
  resize: vertical;
}

/* Invito all'azione */
.cta {
  text-align: center;
}

.cta p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0.75rem auto 1.5rem;
}

/* Avvertenza */
.disclaimer {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
}

.disclaimer h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.disclaimer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 900px;
  line-height: 1.7;
}

/* Piè di pagina */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
}

.footer-container {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-list a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-list a:hover {
  color: var(--text);
}

.footer-copy {
  width: 100%;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Banner cookie */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1rem 1.25rem;
  background: rgba(8, 12, 22, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner.is-hidden {
  display: none;
}

.cookie-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-text {
  flex: 1 1 280px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cookie-text a {
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-actions .btn-reject {
  background: transparent;
  border-color: rgba(139, 154, 184, 0.3);
  color: var(--text-muted);
}

.cookie-actions .btn-reject:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* Pagine legali */
.legal-page main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.legal-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 0.5rem;
  -webkit-text-fill-color: unset;
  color: var(--text);
  background: none;
}

.legal-page .legal-updated {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.legal-page p,
.legal-page li {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

.legal-page ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

/* Tablet */
@media (max-width: 1024px) {
  .how-its-work-list,
  .why-we-list {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .about-visual {
    order: -1;
    max-height: 280px;
  }
}

/* Dispositivi mobili */
@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(6, 8, 15, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.5rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 0.25rem;
  }

  .nav-list a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .how-its-work-list,
  .why-we-list {
    grid-template-columns: 1fr;
  }

  .cookie-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions .btn {
    flex: 1;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
