:root {
  --bg: #0b0e14;
  --panel: #11151f;
  --panel2: #161b27;
  --border: #222a3a;
  --text: #e6e9f0;
  --muted: #98a2ba;
  --faint: #5f697e;
  --brand: #00d4e8;
  --warm: #f5baa6;
  --conflict: #ff5c6c;
  --synergy: #46d6a3;
}

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

html,
body {
  background: var(--bg);
  color: var(--text);
  width: 100%;
}

body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

::selection {
  background: rgba(0, 212, 232, 0.3);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  height: 84px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, #00d4e8, transparent 45%, #f5baa6, transparent 90%);
  opacity: 0.5;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-group img {
  height: 58px;
  width: auto;
}
.brand-caption {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-3px);
}
.btn-primary {
  background: var(--brand);
  color: var(--bg);
  border: 1px solid var(--brand);
}
.btn-primary.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}
.btn-primary.btn-lg {
  padding: 14px 30px;
  font-size: 14px;
}
.btn-secondary {
  padding: 14px 26px;
  font-size: 14px;
  background: none;
  color: var(--text);
  border: 1px solid var(--border);
}

/* ---------- Section chrome (dashed frame + label) ---------- */
.section {
  position: relative;
}
.section-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 60px 26px 80px;
}
.frame {
  position: absolute;
  inset: 18px;
  border: 1px dashed var(--border);
  pointer-events: none;
}
.section-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  margin-bottom: 40px;
}

/* ---------- Glow orbs ---------- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: 0.1;
}
.orb-brand {
  background: var(--brand);
}
.orb-warm {
  background: var(--warm);
}
.orb-float-1 {
  animation: orbfloat1 16s ease-in-out infinite;
}
.orb-float-2 {
  animation: orbfloat2 20s ease-in-out infinite;
}
@keyframes orbfloat1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-30px, 40px) scale(1.08);
  }
}
@keyframes orbfloat2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, -30px) scale(1.05);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
}
.hero-waves {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-waves svg {
  position: absolute;
  inset: 0;
}
.hero-waves .orb-1 {
  width: 480px;
  height: 480px;
  top: -160px;
  right: -100px;
  background: var(--brand);
  opacity: 0.28;
}
.hero-waves .orb-2 {
  width: 360px;
  height: 360px;
  bottom: -140px;
  left: 6%;
  background: var(--warm);
  opacity: 0.22;
}
.hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, var(--bg) 96%);
}
.wave-1 {
  animation: wavedrift1 18s linear infinite;
}
.wave-2 {
  animation: wavedrift2 24s linear infinite reverse;
}
.wave-3 {
  animation: wavedrift3 14s linear infinite;
}
@keyframes wavedrift1 {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-420px);
  }
}
@keyframes wavedrift2 {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-520px);
  }
}
@keyframes wavedrift3 {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-340px);
  }
}

.hero-meta {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 26px 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 26px 60px;
}
.hero-text {
  position: relative;
  max-width: 640px;
}
.hero-text-glow {
  position: absolute;
  inset: -40px -60px;
  background: radial-gradient(60% 70% at 35% 40%, color-mix(in srgb, var(--bg) 75%, transparent) 0%, transparent 72%);
  z-index: -1;
}
.hero-text h1 {
  font-size: 50px;
  font-weight: 600;
  line-height: 1.16;
  margin: 0;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.55);
}
.hero-text h1 span {
  color: var(--brand);
}
.hero-text p {
  font-size: 15px;
  color: var(--muted);
  margin-top: 24px;
  line-height: 1.65;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}
.hero-cta {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  color: var(--muted);
  z-index: 1;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, 6px);
    opacity: 1;
  }
}

/* ---------- Ticker ---------- */
.ticker {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 14px 0;
}
.ticker-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: marquee 105s linear infinite;
}
.ticker-track span {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.ticker-track span em {
  color: var(--brand);
  font-style: normal;
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Perché esistiamo ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}
.why-grid h2 {
  font-size: 30px;
  font-weight: 600;
  margin: 0;
  line-height: 1.28;
}
.why-grid h2 span {
  color: var(--brand);
}
.why-grid p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin-top: 4px;
}

/* ---------- Bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.bento-card {
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel2);
  padding: 24px;
}
.bento-card.span-2 {
  grid-column: span 2;
}
.bento-eyebrow {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.bento-title {
  font-size: 17px;
  font-weight: 600;
  margin-top: 12px;
}
.bento-card.span-2 .bento-title {
  font-size: 20px;
}
.bento-body {
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.7;
}

/* ---------- Quando conta davvero ---------- */
.matters-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.matters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.matters-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  padding: 18px;
}
.matters-card-title {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.matters-card-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 10px;
}

/* ---------- Badge eventi ---------- */
.event-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.event-badge {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  white-space: nowrap;
}
.event-badge em {
  font-style: normal;
  color: #00d4e8;
  font-family: "IBM Plex Mono", monospace;
  margin-left: 4px;
}

/* ---------- Research card ---------- */
.research-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel2);
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.research-card p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 620px;
}
.research-card em {
  font-style: italic;
  color: var(--muted);
}

/* ---------- Final CTA ---------- */
.final-cta {
  position: relative;
}
.final-cta-content {
  position: relative;
  padding: 0 26px 100px;
  text-align: center;
}
.final-cta h2 {
  font-size: 30px;
  font-weight: 600;
  margin: 0;
}
.final-cta h2 span {
  color: var(--brand);
}
.final-cta-btn {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.final-cta-footer {
  margin-top: 44px;
  font-size: 12px;
  color: var(--faint);
}
.final-cta-footer a {
  color: var(--faint);
  text-decoration: underline;
}
.final-cta-footer a:hover {
  color: var(--muted);
}

/* ---------- Pagine legali (Privacy, Termini) ---------- */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 70px 26px 100px;
}
.legal-content h1 {
  font-size: 32px;
  font-weight: 600;
}
.legal-content .legal-updated {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.legal-content h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 12px;
}
.legal-content p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin-top: 10px;
}
.legal-content ul {
  margin-top: 10px;
  padding-left: 20px;
}
.legal-content li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}
.legal-content a {
  color: var(--brand);
  text-decoration: none;
}
.legal-content strong {
  color: var(--text);
}
.legal-back {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.legal-back a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .orb-float-1,
  .orb-float-2,
  .wave-1,
  .wave-2,
  .wave-3,
  .scroll-cue,
  .ticker-track {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-card.span-2 {
    grid-column: span 2;
  }
  .matters-grid {
    grid-template-columns: 1fr;
  }
  .hero-text h1 {
    font-size: 36px;
  }
  .research-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 520px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .bento-card.span-2 {
    grid-column: span 1;
  }
}

/* ---------- Login (dimostrativo: non autentica davvero) ---------- */
.login-wrap {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-outer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 340px;
}
.login-logo-outer {
  height: 76px;
  width: auto;
  margin-bottom: 32px;
}
.login-card {
  width: 100%;
  border: 1px solid rgba(0, 212, 232, 0.1);
  border-radius: 14px;
  background: var(--panel);
  padding: 28px;
}
.login-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
  margin-bottom: 22px;
}
.login-card label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
.login-card input {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  font-family: inherit;
  margin-bottom: 16px;
}
.login-card input:last-of-type {
  margin-bottom: 20px;
}
.login-note {
  font-size: 12px;
  color: var(--brand);
  margin-bottom: 16px;
  display: none;
  line-height: 1.5;
}
.login-note.visible {
  display: block;
}
.login-submit {
  width: 100%;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--brand);
  color: var(--bg);
  border: 1px solid var(--brand);
  cursor: pointer;
}
.login-back {
  margin-top: 18px;
  text-align: center;
}
.login-back a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

/* Header: su schermi molto stretti la scritta accanto al logo esce dallo spazio disponibile. */
@media (max-width: 480px) {
  .brand-caption {
    display: none;
  }
  .brand-group img {
    height: 42px;
  }
}
