/* ==========================================================
   VEGA · pagina "Work in progress"
   Palette e font dal design system Easynet Group
   ========================================================== */

/* Font servito in locale: nessuna chiamata a server di terzi (Google) */
@font-face {
  font-family: "Questrial";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/questrial-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Questrial";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/questrial-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0b1120;
  --fg: #ffffff;
  --fg-2: rgba(255, 255, 255, 0.78);
  --fg-3: rgba(255, 255, 255, 0.66);
  --line: rgba(255, 255, 255, 0.18);
  --green: #55af33;
  --green-light: #92ce7b;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(20px, 5vw, 72px);
  font-family: "Questrial", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Sfondo a livelli ---------- */

.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.sky__image,
.sky__stars {
  position: absolute;
  inset: -40px;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 1.2s var(--ease);
  will-change: transform;
}

.sky__image {
  background:
    /* rinforzo del bagliore verde in basso a destra */
    radial-gradient(ellipse 42% 55% at 98% 98%, rgba(85, 175, 51, .62), rgba(85, 175, 51, .24) 50%, transparent 100%),
    var(--bg) url("assets/sfondo-vega.jpg") center / cover no-repeat;
  animation: sky-in 2.4s var(--ease) both, sky-breathe 30s ease-in-out 2.4s infinite alternate;
}

.sky__stars { width: calc(100% + 80px); height: calc(100% + 80px); }

/* luce morbida che segue il cursore */
.sky__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 40%),
              rgba(143, 186, 255, 0.10), transparent 60%);
  opacity: 0;
  transition: opacity .8s var(--ease);
}
.has-pointer .sky__glow { opacity: 1; }

@keyframes sky-in {
  from { opacity: 0; scale: 1.12; }
  to   { opacity: 1; scale: 1.04; }
}
@keyframes sky-breathe {
  from { scale: 1.04; }
  to   { scale: 1.10; }
}

/* ---------- Layout ---------- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 32px var(--gutter);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar__brand { display: block; line-height: 0; border-radius: 6px; }
.topbar__brand img { height: 38px; width: auto; display: block; }
.topbar__powered {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.hero {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 28px;
  padding: 64px 0;
}

/* ---------- Logo VEGA ---------- */

.hero__logo {
  margin: 0;
  width: min(560px, 82vw);
  line-height: 0;
}
.hero__logo svg {
  width: 100%;
  height: auto;
  overflow: visible;
  fill: #fff;
}

/* le lettere entrano una alla volta, dal basso e sfocate */
.letter {
  opacity: 0;
  transform: translateY(6px);
  filter: blur(4px);
  animation: letter-in 1s var(--ease) forwards;
  animation-delay: calc(.25s + var(--i) * .12s);
}
@keyframes letter-in {
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* la stella della A: si accende, poi brilla */
.spark { transform-box: fill-box; transform-origin: center; }
.spark__star {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation:
    spark-in .9s var(--ease) .85s forwards,
    spark-twinkle 4.5s ease-in-out 1.9s infinite;
}
.spark__glow {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation:
    glow-in 1.2s var(--ease) .95s forwards,
    glow-pulse 4.5s ease-in-out 1.9s infinite;
}
@keyframes spark-in {
  0%   { opacity: 0; transform: scale(0) rotate(-90deg); }
  70%  { opacity: 1; transform: scale(1.35) rotate(10deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes spark-twinkle {
  0%, 100% { transform: scale(1) rotate(0); }
  45%      { transform: scale(1.18) rotate(45deg); }
  55%      { transform: scale(.92) rotate(45deg); }
}
@keyframes glow-in {
  from { opacity: 0; transform: scale(.2); }
  to   { opacity: .9; transform: scale(1); }
}
@keyframes glow-pulse {
  0%, 100% { opacity: .75; transform: scale(1); }
  45%      { opacity: 1;   transform: scale(1.35); }
}

/* ---------- Testi ---------- */

.hero__claim {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero__text {
  margin: 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg-2);
}

/* comparsa a cascata */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal .9s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---------- Badge Work in progress ---------- */

.wip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(11, 17, 32, .55);
  overflow: hidden;
  isolation: isolate;
}
/* riflesso che attraversa il badge */
.wip::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgba(146, 206, 123, .22) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: shimmer 5s var(--ease) 2.6s infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-120%); }
  35%, 100% { transform: translateX(120%); }
}

.wip__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(85, 175, 51, .6); }
  70%  { box-shadow: 0 0 0 11px rgba(85, 175, 51, 0); }
  100% { box-shadow: 0 0 0 0 rgba(85, 175, 51, 0); }
}

.wip__label {
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---------- Contatti ---------- */

.contacts {
  display: grid;
  /* al massimo 3 colonne; sotto i ~700px si impilano */
  grid-template-columns: repeat(auto-fit, minmax(max(220px, 30%), 1fr));
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.contact { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

.contact__label {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.contact__big  { font-size: 22px; }
.contact__text { font-size: 16px; line-height: 1.5; font-style: normal; }

/* riga legale sotto i contatti */
.legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .10);
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg-3);
}
.legal__company { margin: 0; flex: 1 1 520px; }
.legal__links { display: flex; gap: 20px; }
.legal__links a { font-size: 13px; }

/* ---------- Pagina privacy ---------- */

.doc {
  flex-grow: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 0 72px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-2);
}
.doc__back { display: inline-block; margin-bottom: 32px; font-size: 14px; }
.doc h1 { margin: 0 0 8px; font-weight: 400; font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.01em; color: var(--fg); }
.doc__meta { margin: 0 0 40px; font-size: 14px; color: var(--fg-3); }
.doc h2 { margin: 40px 0 12px; font-weight: 400; font-size: 22px; line-height: 1.3; color: var(--fg); scroll-margin-top: 24px; }
.doc p, .doc ul { margin: 0 0 14px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.doc strong { font-weight: 400; color: var(--fg); }
.doc .link { color: var(--fg); }
.doc-panel {
  background: rgba(11, 17, 32, .78);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 48px);
}

/* link con sottolineatura che si disegna */
.link {
  color: var(--fg);
  text-decoration: none;
  background: linear-gradient(var(--green-light), var(--green-light)) left bottom / 0 1px no-repeat;
  transition: color .22s var(--ease), background-size .32s var(--ease);
}
.link:hover,
.link:focus-visible {
  color: var(--green-light);
  background-size: 100% 1px;
}

a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(85, 175, 51, .45);
  border-radius: 4px;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  .page { padding-top: 24px; padding-bottom: 24px; }
  .topbar__brand img { height: 26px; }
  .topbar__powered { font-size: 11px; }
  .hero { gap: 22px; padding: 48px 0; }
  .hero__text { font-size: 16px; }
  .wip { padding: 11px 18px; }
  .wip__label { font-size: 13px; }
}

/* ---------- Movimento ridotto ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .wip::after { display: none; }
  .sky__image, .sky__stars { transform: none !important; }
}
