/* =========================================================
   Assodigit — mockup ecosistema digitale
   HTML/CSS/JS puro · nessuna dipendenza esterna
   ========================================================= */

:root {
  --bg: #111315;
  --bg-elev: #16181b;
  --ink: #f4f4f4;
  --ink-soft: #b9bcc0;
  --ink-muted: #7c8085;
  --panel-ink: #16181b;
  --panel-ink-soft: #4a4e52;
  --line: rgba(255, 255, 255, 0.10);
  --gutter: 30px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

a { color: inherit; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 64px var(--gutter) 52px;
  background:
    linear-gradient(to top, rgba(15, 98, 254, 0.6) 0%, rgba(15, 98, 254, 0) 45%),
    linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 65%),
    rgba(17, 19, 21, 0.58);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.hero-logo {
  width: min(640px, 82vw);
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
  margin-bottom: 0;
}

.hero-lead { flex: 0 1 auto; }


.hero-title {
  margin: 0;
  font-size: 36px;
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--ink-soft);
  max-width: 820px;
}

/* =========================================================
   NETWORK / COLONNE
   ========================================================= */
.network {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

/* livello di base: immagine a copertura dell'intera pagina (hero compresa) */
.network-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("../assets/box-ets-bg.webp");
  background-size: cover;
  background-position: center;
  opacity: 1;
}

/* livello hover: dissolvenza incrociata sull'immagine del box attivo */
.network-bg-hover {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.network-bg-hover.is-active { opacity: 1; z-index: 1; }

.columns {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 0;
}

.col {
  position: relative;
  border-right: 1px solid var(--line);
  background-color: transparent;
}

.col:first-child { border-left: 1px solid var(--line); }

.col-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* pannello chiaro "frosted" nella metà superiore */
.panel {
  position: relative;
  padding: 40px var(--gutter) 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #ffffff;
  border-bottom: 2px solid #0f62fe;
  transition: border-bottom-width 0.2s ease, background-color 0.3s ease;
}

.col-link:hover .panel {
  border-bottom-width: 7px;
  background: rgba(255, 255, 255, 0.88);
}

.panel > * { position: relative; z-index: 1; }

.logo-wrap {
  display: inline-flex;
  align-items: flex-end;
  height: 72px;
  margin-bottom: 22px;
}

.logo { display: block; }

.logo-wordmark { height: 54px; width: auto; }
.col--one .logo-wordmark { height: 68px; }

.category {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #0f62fe;
}

.col-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--panel-ink);
}

.col-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--panel-ink-soft);
  max-width: 26ch;
}

/* "Scopri" alla base del pannello bianco */
.discover {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #0f62fe;
  padding-top: 28px;
}

.discover .arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

.col-link:hover .discover .arrow { transform: translateX(6px); }

/* ---- Panel expand on hover ---- */
.panel-extra {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-top: 20px;
  transition: max-height 0.4s ease, opacity 0.25s ease;
}

.panel-features {
  list-style: none;
  margin: 0;
  padding: 14px 0 6px;
  border-top: 1px solid rgba(0, 0, 0, 0.09);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.panel-features li {
  font-size: 13px;
  line-height: 1.4;
  color: var(--panel-ink-soft);
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.panel-features li::before {
  content: "";
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0f62fe;
  margin-top: 6px;
}

/* On hover: expand this card, dim the others */
@media (hover: hover) {
  .col-link:hover .panel-extra {
    max-height: 180px;
    opacity: 1;
  }

  .col-link:hover .panel {
    background: #ffffff;
  }

  .columns:has(.col-link:hover) .col:not(:has(.col-link:hover)) .panel {
    background: rgba(240, 241, 243, 0.75);
  }

  .columns:has(.col-link:hover) .col:not(:has(.col-link:hover)) {
    filter: brightness(0.82);
  }
}

.col-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -4px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .hero-subtitle { max-width: 620px; }
  .columns {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .network-bg,
  .network-bg-hover { display: none; }

  .col--ets   { background-image: url("../assets/box-ets-bg.webp"); }
  .col--one   { background-image: url("../assets/box-one-bg.webp"); }
  .col--plus  { background-image: url("../assets/box-plus-bg.webp"); }
  .col--media { background-image: url("../assets/box-media-bg.webp"); }

  .col,
  .col:first-child {
    border: none;
    border-bottom: 1px solid var(--line);
    background-size: cover;
    background-position: center;
    padding-bottom: 55vw;
  }
  .panel {
    padding: 32px var(--gutter) 28px;
    min-height: 0 !important;
  }
  .col-link:hover .panel { min-height: 0 !important; }
  .discover {
    color: #0f62fe;
    padding-top: 22px;
  }
}

@media (max-width: 560px) {
  :root { --gutter: 22px; }
  .hero { padding: 28px var(--gutter) 24px; }
  .hero-logo { width: min(280px, 72vw); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .panel,
  .network-bg,
  .network-bg-hover,
  .col,
  .discover .arrow { transition: none; }
}
