:root{
  --p1: 200 165 230;
  --p2: 140 190 225;
  --p3: 145 215 195;
  --p4: 235 195 150;

  --radius-lg: 48px;
  --edge: 18px;
  --gap: 18px;

  --glass: 255 255 255;
  --glass-alpha: .18;
  --glass-border: .28;
  --glass-shadow: 0 26px 80px rgba(0,0,0,.22);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system,
               "SF Pro Display", "SF Pro Text",
               Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  background: linear-gradient(
    135deg,
    rgba(140,190,225,.55),
    rgba(145,215,195,.55),
    rgba(235,195,150,.55),
    rgba(200,165,230,.55)
  );
  background-attachment: fixed;
  background-size: 220% 220%;
  animation: pastelMove 22s ease-in-out infinite;

  overflow-x: hidden;
  position: relative;
}

/* VELO */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background:
    radial-gradient(1200px 700px at 20% 15%, rgba(255,255,255,.14), transparent 60%),
    radial-gradient(1100px 650px at 85% 20%, rgba(255,255,255,.10), transparent 55%),
    radial-gradient(1200px 900px at 50% 80%, rgba(0,0,0,.20), transparent 60%),
    linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.18));
}

@keyframes pastelMove {
  0%   { background-position: 0% 45%; }
  50%  { background-position: 100% 55%; }
  100% { background-position: 0% 45%; }
}

/* Layout */
.page{
  display: flex;
  justify-content: center;
  padding: var(--edge);
  position: relative;
  z-index: 1;
}

.stack{
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 680px;
  display: grid;
  gap: var(--gap);
}

/* Reset link */
a,
a:visited,
a:hover,
a:active,
a:focus{
  text-decoration: none;
  color: inherit;
}

/* ================= TITOLI ================= */

.projects-title{
  position: relative;
  z-index: 10;

  margin: 0;
  width: 100%;

  font-size: clamp(28px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: clamp(2px, .6vw, 6px);
  text-transform: uppercase;

  color: #ffffff;
  text-align: center;

  white-space: nowrap;
  overflow: hidden;

  text-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.project-header h2{
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 22px 0;
  color: rgba(255,255,255,.95);
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 8px 22px rgba(0,0,0,.25);
}

/* ================= CARD BASE ================= */

.card{
  border-radius: var(--radius-lg);
  background: rgba(var(--glass), var(--glass-alpha));
  border: 1px solid rgba(255,255,255,var(--glass-border));
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(125%);
  padding: 22px;
  overflow: hidden;
}

/* ================= APP CARD ================= */

.app-card{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  transition: transform .25s ease, box-shadow .25s ease;
}

.app-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.app-left{
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-image{
  width: clamp(90px, 22vw, 155px);
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  object-fit: contain;
}

.app-info{
  color: rgba(25,25,28,.88);
}

.app-title{
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: rgba(25,25,28,.92);
}

.app-downloads,
.app-rating{
  margin-top: 4px;
  font-size: 15px;
  color: rgba(25,25,28,.82);
}

.play-link{
  flex-shrink: 0;
}

.play-link img{
  width: 90px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ================= MINI APPS ================= */

.apps-grid{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

.mini-app{
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-app img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================= APP IN PROGRESS ================= */

.progress-card{
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.progress-label{
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.95);
}

.progress-inner{
  display: flex;
  flex-direction: row-reverse;
  gap: 22px;
  align-items: center;
  padding: 20px;
  border-radius: 26px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
}

.progress-video{
  flex: 1;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(0,0,0,.35);
}

.progress-video video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.progress-image{
  width: 180px;
  flex-shrink: 0;
}

.progress-image img{
  width: 100%;
  border-radius: 22px;
  object-fit: contain;
}

/* ================= TOOLS ================= */

.tools-card{
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.tools-label{
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.95);
}

.tools-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 30px 24px 24px 24px;
  border-radius: 26px;
  background: rgba(0,0,0,.75);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px) saturate(120%);
}

.tools-image{
  width: 85%;
  max-width: 420px;
}

.tools-image img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.tools-warning{
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  color: #ff3b30;
  letter-spacing: 1px;
}

/* ================= FOOTER ================= */

.footer-card{
  border-radius: var(--radius-lg);
  background: rgba(var(--glass), var(--glass-alpha));
  border: 1px solid rgba(255,255,255,var(--glass-border));
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px);
  padding: 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 720px){
  .progress-inner{
    flex-direction: column;
  }

  .progress-image{
    order: -1;
    width: 100%;
    max-width: 260px;
  }

  .progress-video{
    order: 1;
  }
}

@media (max-width: 520px){
  .app-card{
    flex-direction: column;
    align-items: flex-start;
  }

  .apps-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}