/* SkeyDev — Blu / Viola / Bianco / Argento / Nero */

:root {
  --black: #050508;
  --black-2: #0c0c14;
  --black-3: #12121c;
  --white: #ffffff;
  --silver: #b8c0d0;
  --silver-dim: #7a8499;
  --silver-line: rgba(184, 192, 208, 0.12);
  --blue: #3b6cf4;
  --blue-light: #6b93ff;
  --violet: #7c3aed;
  --violet-light: #a78bfa;
  --grad: linear-gradient(135deg, var(--blue) 0%, var(--violet) 100%);
  --grad-soft: linear-gradient(135deg, rgba(59,108,244,0.15) 0%, rgba(124,58,237,0.15) 100%);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(184, 192, 208, 0.1);
  --nav-h: 72px;
  --radius: 20px;
  --radius-sm: 12px;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

html {
  scroll-padding-top: var(--nav-h);
  overflow-x: clip;
}

html.nav-open,
body.nav-open,
body.modal-open { overflow: hidden; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--silver);
  background: var(--black);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

.wrap {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Background glow ---- */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-glow__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: float 18s ease-in-out infinite;
}

.bg-glow__orb--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,108,244,0.35) 0%, transparent 70%);
  top: -15%; left: -10%;
}

.bg-glow__orb--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,0.3) 0%, transparent 70%);
  top: 40%; right: -15%;
  animation-delay: -6s;
}

.bg-glow__orb--3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(107,147,255,0.2) 0%, transparent 70%);
  bottom: -10%; left: 30%;
  animation-delay: -12s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(40px, -30px); }
  66% { transform: translate(-30px, 40px); }
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}

.nav.scrolled {
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  height: 30px;
  filter: brightness(0) invert(1);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--silver-dim);
  transition: color 0.3s;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--violet-light);
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}

.nav__links a:hover,
.nav__links a.active { color: var(--white); }

.nav__links a:hover::after,
.nav__links a.active::after { width: 100%; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav__burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__brand { flex-shrink: 0; position: relative; z-index: 202; }
.nav__burger {
  position: relative;
  z-index: 202;
  -webkit-tap-highlight-color: transparent;
}

/* bio block — chi sono */
.bio-block { max-width: 780px; margin-inline: auto; }

.bio-block__content {
  padding: 40px 44px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

.bio-block__content p {
  color: var(--silver-dim);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 18px;
}

.bio-block__content p:last-child { margin-bottom: 0; }
.bio-block__content strong { color: var(--white); font-weight: 600; }

.grad-inline {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}

.btn--fill {
  background: rgba(255, 255, 255, 0.92);
  color: var(--black);
}

.btn--fill:hover {
  background: var(--white);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--silver);
  border-color: rgba(184, 192, 208, 0.22);
}

.btn--outline:hover {
  color: var(--white);
  border-color: rgba(184, 192, 208, 0.45);
  background: rgba(255, 255, 255, 0.04);
}

.btn--text {
  padding: 0;
  background: none;
  color: var(--silver);
  gap: 6px;
}

.btn--text:hover { color: var(--violet-light); }

.btn--full { width: 100%; }
.btn__loading { display: none; }
.btn.loading .btn__label { display: none; }
.btn.loading .btn__loading { display: inline; }

/* legacy class names */
a.btn--primary, button.btn--primary,
.btn.btn--primary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--black);
  box-shadow: none;
}
a.btn--primary:hover, button.btn--primary:hover,
.btn.btn--primary:hover {
  background: var(--white);
  transform: translateY(-1px);
  box-shadow: none;
}
a.btn--ghost, .btn.btn--ghost {
  background: transparent;
  color: var(--silver);
  border: 1px solid rgba(184, 192, 208, 0.22);
}
a.btn--ghost:hover, .btn.btn--ghost:hover {
  color: var(--white);
  border-color: rgba(184, 192, 208, 0.45);
  background: rgba(255, 255, 255, 0.04);
  transform: none;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 60px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--silver);
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}

.pill__dot {
  width: 7px; height: 7px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

.pill--sm {
  padding: 6px 12px;
  font-size: 0.72rem;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero__title {
  font-family: var(--font);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 24px;
}

.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.hero__title em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.hero__text {
  font-size: 1.05rem;
  color: var(--silver-dim);
  max-width: 480px;
  margin-bottom: 36px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__copy { order: 1; }
.hero__visual { order: 2; }

/* ---- CTA band ---- */
.cta-band {
  position: relative;
  z-index: 1;
  padding: 0 0 48px;
  margin-top: -20px;
}

.cta-band--inline { padding: 0; margin-top: 48px; }

.cta-band__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding: 40px 44px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cta-band__glow {
  position: absolute;
  top: 50%; left: 0;
  width: 320px; height: 200px;
  transform: translate(-30%, -50%);
  background: radial-gradient(ellipse, rgba(59,108,244,0.18) 0%, rgba(124,58,237,0.12) 50%, transparent 70%);
  pointer-events: none;
}

.cta-band__label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet-light);
  margin-bottom: 10px;
}

.cta-band__title {
  font-family: var(--font);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 10px;
}

.cta-band__text {
  font-size: 0.92rem;
  color: var(--silver-dim);
  max-width: 480px;
  line-height: 1.65;
  margin: 0;
}

.cta-band__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

.cta-band__mail {
  font-size: 0.88rem;
  color: var(--silver);
  transition: color 0.3s;
  padding-left: 4px;
}

.cta-band__mail:hover { color: var(--violet-light); }

/* Home portfolio preview — card semplice, zero GSAP/tilt */
.home-portfolio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.home-portfolio .work-preview {
  opacity: 1;
  transform: none;
}

.work-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 28px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.35s, transform 0.35s var(--ease), box-shadow 0.35s;
}

.work-preview::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--grad);
}

.work-preview:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(59, 108, 244, 0.12);
}

.work-preview--more {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.02);
}

.work-preview--more:hover {
  border-color: rgba(124, 58, 237, 0.55);
}

.work-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.work-preview__cat {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet-light);
}

.work-preview__arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  color: var(--blue-light);
  font-size: 0.9rem;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.work-preview:hover .work-preview__arrow {
  color: var(--white);
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.4);
}

.work-preview__title {
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
  line-height: 1.25;
}

.work-preview__desc {
  font-size: 0.9rem;
  color: var(--silver-dim);
  line-height: 1.6;
  margin: 0;
}

.work-preview__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

.work-preview__tags span {
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.04);
  color: var(--silver);
  border: 1px solid var(--glass-border);
}

.featured-more {
  text-align: center;
  margin-top: 28px;
}

/* ---- Chi sono (who) ---- */
.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.who-card {
  padding: 28px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: border-color 0.35s, transform 0.35s var(--ease);
}

.who-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-4px);
}

.who-card__icon {
  display: block;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--violet-light);
  margin-bottom: 14px;
}

.who-card h3 {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.who-card p {
  font-size: 0.88rem;
  color: var(--silver-dim);
  line-height: 1.6;
  margin: 0;
}

.who-facts {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin-inline: auto;
}

.who-fact {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px 28px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.who-fact__num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--violet-light);
  background: var(--grad-soft);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 10px;
}

.who-fact h3 {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.who-fact p {
  font-size: 0.88rem;
  color: var(--silver-dim);
  line-height: 1.6;
  margin: 0;
}

.who-stack {
  display: grid;
  gap: 28px;
  margin-bottom: 0;
}

.who-stack__title {
  font-family: var(--font);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 10px;
}

.who-stack__text p {
  color: var(--silver-dim);
  font-size: 0.92rem;
  max-width: 480px;
}

.tags--wide { margin-top: 8px; }

/* Hero card / code window */
.hero__card {
  position: relative;
  perspective: 1000px;
}

.hero__card-glow {
  position: absolute;
  inset: -20%;
  background: var(--grad);
  filter: blur(60px);
  opacity: 0.25;
  border-radius: 50%;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.05); }
}

.hero__card-inner {
  position: relative;
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform 0.6s var(--ease);
}

.hero__card:hover .hero__card-inner {
  transform: rotateY(0deg) rotateX(0deg);
}

.code-window {
  background: var(--black-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
}

.code-window__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--glass-border);
}

.code-window__bar i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--silver-line);
}

.code-window__bar i:nth-child(1) { background: #ff5f57; }
.code-window__bar i:nth-child(2) { background: #febc2e; }
.code-window__bar i:nth-child(3) { background: #28c840; }

.code-window__bar span {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--silver-dim);
  font-family: monospace;
}

.code-window__body {
  padding: 24px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--silver);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.code-window__body code { white-space: pre-wrap; word-break: break-word; }

.c-v { color: var(--violet-light); }
.c-b { color: var(--blue-light); }
.c-s { color: var(--silver); }
.c-g { color: #34d399; }

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--violet), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ---- Page hero (inner pages) ---- */
.page-hero {
  position: relative;
  z-index: 1;
  padding: calc(var(--nav-h) + 56px) 0 48px;
  border-bottom: 1px solid var(--silver-line);
}

.page-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: var(--silver-dim);
  flex-wrap: wrap;
}

.page-breadcrumb a {
  color: var(--silver);
  transition: color 0.3s ease;
}

.page-breadcrumb a:hover {
  color: var(--white);
}

.page-breadcrumb [aria-current="page"] {
  color: var(--white);
  font-weight: 600;
}

.page-hero__title {
  font-family: var(--font);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 16px;
}

.page-hero__line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.05em;
}

.page-hero__line > span {
  display: inline-block;
  will-change: transform;
}

.page-hero__desc {
  font-size: 1.05rem;
  color: var(--silver-dim);
  max-width: 540px;
  line-height: 1.7;
}

.page-cta {
  text-align: center;
  margin-top: 56px;
  padding: 40px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.page-cta p {
  color: var(--silver-dim);
  margin-bottom: 24px;
  max-width: 480px;
  margin-inline: auto;
}

.page-cta--spaced { margin-top: 48px; }

/* ---- Home cards ---- */
.home-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.home-card {
  display: block;
  padding: 32px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}

.home-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 20px 50px rgba(59, 108, 244, 0.12);
}

.home-card__icon {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--violet-light);
  margin-bottom: 16px;
}

.home-card h3 {
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.home-card p {
  font-size: 0.9rem;
  color: var(--silver-dim);
  margin-bottom: 20px;
  line-height: 1.6;
}

.home-card__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-light);
  transition: color 0.3s;
}

.home-card:hover .home-card__link { color: var(--violet-light); }

.home-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.home-teaser__text h2 {
  font-family: var(--font);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 14px;
}

.home-teaser__text p {
  color: var(--silver-dim);
  max-width: 520px;
  font-size: 0.98rem;
}

/* ---- Sections ---- */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.section--alt {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--silver-line);
  border-bottom: 1px solid var(--silver-line);
}

.sec-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}

.sec-head__label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet-light);
  margin-bottom: 12px;
}

.sec-head__title {
  font-family: var(--font);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.15;
}

.sec-head__desc {
  color: var(--silver-dim);
  font-size: 1rem;
}

.about .sec-head__label,
.about .sec-head__title,
.contact .sec-head__label,
.contact .sec-head__title { text-align: left; }

/* ---- Services ---- */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service {
  padding: 36px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}

.service::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.service:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 20px 60px rgba(59, 108, 244, 0.12);
}

.service:hover::before { transform: scaleX(1); }

.service__icon {
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-soft);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 14px;
  color: var(--violet-light);
  margin-bottom: 22px;
  transition: transform 0.4s var(--ease);
}

.service__icon svg { width: 24px; height: 24px; }
.service:hover .service__icon { transform: scale(1.08); }

.service h3 {
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.service p {
  font-size: 0.92rem;
  color: var(--silver-dim);
  line-height: 1.65;
}

/* ---- Portfolio / Work cards ---- */
.portfolio {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.featured {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
  overflow: hidden;
}

.project::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--grad);
  opacity: 0.7;
  transition: opacity 0.3s, width 0.3s var(--ease);
}

.project::after {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.4s;
  opacity: 0;
}

.project--link { cursor: pointer; }

.project:hover,
.project--link:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 16px 48px rgba(59, 108, 244, 0.12);
  outline: none;
}

.project:hover::before { opacity: 1; width: 4px; }
.project:hover::after { opacity: 1; }

.project__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project__icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: var(--grad-soft);
  color: var(--violet-light);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

.project__icon svg { width: 20px; height: 20px; }

.project:hover .project__icon {
  transform: scale(1.06);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.25);
}

.project__icon--web { color: var(--blue-light); border-color: rgba(59,108,244,0.3); }
.project__icon--bot { color: #38bdf8; border-color: rgba(56,189,248,0.3); }
.project__icon--code { color: var(--violet-light); }
.project__icon--app { color: #818cf8; border-color: rgba(129,140,248,0.3); }
.project__icon--ia { color: #c084fc; border-color: rgba(192,132,252,0.3); }

.project__meta-top {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.project__cat {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet-light);
  text-align: right;
}

.project__year {
  font-size: 0.72rem;
  color: var(--silver-dim);
  letter-spacing: 0.04em;
}

.project__title {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin: 0;
}

.project__desc {
  font-size: 0.88rem;
  color: var(--silver-dim);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.project__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--glass-border);
}

.project__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project__stack span {
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.04);
  color: var(--silver);
  border: 1px solid var(--glass-border);
}

.project__visit {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  font-size: 0.9rem;
  color: var(--blue-light);
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}

.project:hover .project__visit {
  color: var(--white);
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.4);
  transform: translate(2px, -2px);
}

.project__note {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--silver);
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
}

/* Portfolio page extras */
.audience {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 48px;
}

.audience__pill {
  padding: 10px 18px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--silver);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  transition: border-color 0.3s, color 0.3s;
}

.audience__pill:hover {
  border-color: rgba(124, 58, 237, 0.35);
  color: var(--white);
}

.portfolio-intro {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 40px;
  color: var(--silver-dim);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---- About ---- */
.about {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 80px;
  align-items: center;
}

.about__visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 360px;
}

.about__ring {
  width: 260px; height: 260px;
  border-radius: 50%;
  background: var(--grad);
  padding: 3px;
  animation: ringSpin 12s linear infinite;
  position: relative;
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

.about__avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--black-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--white);
}

.about__badge {
  position: absolute;
  padding: 10px 16px;
  background: rgba(12, 12, 20, 0.9);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--white);
  backdrop-filter: blur(12px);
  white-space: nowrap;
  animation: badgeFloat 5s ease-in-out infinite;
}

.about__badge--1 { top: 10%; right: 0; animation-delay: 0s; }
.about__badge--2 { bottom: 20%; left: -5%; animation-delay: -1.5s; }
.about__badge--3 { top: 55%; right: -10%; animation-delay: -3s; color: var(--violet-light); }

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.about__content p {
  color: var(--silver-dim);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.about__content strong { color: var(--white); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.tags span {
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--silver);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  transition: border-color 0.3s, color 0.3s, transform 0.3s var(--ease);
}

.tags span:hover {
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--white);
  transform: translateY(-2px);
}

/* ---- Contact ---- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}

.contact__subtitle {
  font-family: var(--font);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
}

.contact__info p {
  color: var(--silver-dim);
  margin: 0 0 28px;
  max-width: 400px;
}

.contact__note {
  margin-top: 28px;
  padding: 20px 22px;
  background: rgba(124, 58, 237, 0.08);
  border-left: 3px solid var(--violet);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.contact__note p {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--silver);
  margin: 0;
}

.contact__items { display: flex; flex-direction: column; gap: 16px; }

.contact__item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  color: var(--white);
  transition: color 0.3s;
}

a.contact__item:hover { color: var(--violet-light); }

.contact__item svg {
  width: 22px; height: 22px;
  color: var(--blue-light);
  flex-shrink: 0;
}

/* ---- Form ---- */
.form {
  padding: 36px;
  background: var(--black-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

.form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--silver-dim);
  margin-bottom: 18px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form input,
.form select,
.form textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--white);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* Custom select */
.custom-select {
  position: relative;
  margin-top: 8px;
}

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

.custom-select__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--white);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.custom-select__trigger:hover {
  border-color: rgba(184, 192, 208, 0.25);
  background: rgba(255,255,255,0.06);
}

.custom-select.open .custom-select__trigger,
.custom-select__trigger:focus-visible {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
  outline: none;
}

.custom-select__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select__value.is-placeholder { color: var(--silver-dim); }

.custom-select__chevron {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--violet-light);
  transition: transform 0.3s var(--ease);
}

.custom-select.open .custom-select__chevron { transform: rotate(180deg); }

.custom-select__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 50;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--black-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  max-height: min(280px, 50vh);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.custom-select__menu--up {
  top: auto;
  bottom: calc(100% + 6px);
  transform: translateY(8px);
}

.custom-select.open .custom-select__menu--up {
  transform: translateY(0);
}

.custom-select.open .custom-select__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.custom-select { z-index: 1; }
.custom-select.open { z-index: 60; }

.custom-select__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  font-size: 0.88rem;
  color: var(--silver);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.custom-select__option:hover,
.custom-select__option:focus {
  background: rgba(124, 58, 237, 0.12);
  color: var(--white);
  outline: none;
}

.custom-select__option.is-selected {
  background: rgba(59, 108, 244, 0.1);
  color: var(--white);
}

.custom-select__option.is-selected::after {
  content: '✓';
  font-size: 0.75rem;
  color: var(--violet-light);
  font-weight: 700;
}

.custom-select__menu::-webkit-scrollbar { width: 4px; }
.custom-select__menu::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 10px;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

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

.form__note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--silver-dim);
  margin-top: 14px;
}

.form__success {
  margin-top: 14px;
  padding: 14px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--radius-sm);
  color: #6ee7b7;
  font-size: 0.9rem;
  text-align: center;
}

.form__error {
  margin-top: 14px;
  padding: 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 0.9rem;
  text-align: center;
}

.link {
  color: var(--violet-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s;
}

.link:hover { color: var(--white); }

/* ---- Footer CTA ---- */
.footer-cta {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding: 72px 0;
  background: var(--black-2);
  border-top: 1px solid var(--silver-line);
  overflow: hidden;
}

.footer-cta__glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 600px; height: 300px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(59,108,244,0.2) 0%, rgba(124,58,237,0.15) 50%, transparent 70%);
  pointer-events: none;
}

.footer-cta__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-cta__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet-light);
  margin-bottom: 12px;
}

.footer-cta__text h2 {
  font-family: var(--font);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 12px;
  max-width: 480px;
}

.footer-cta__text p {
  font-size: 0.95rem;
  color: var(--silver-dim);
  max-width: 460px;
  line-height: 1.65;
}

.footer-cta__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  flex-shrink: 0;
}

.footer-cta__mail {
  font-size: 0.9rem;
  color: var(--silver);
  transition: color 0.3s;
  padding-left: 4px;
}

.footer-cta__mail:hover { color: var(--violet-light); }

body[data-page="contatti"] .footer-cta { display: none; }

/* ---- Footer ---- */
.footer {
  position: relative;
  z-index: 1;
  background: var(--black);
  border-top: 1px solid var(--silver-line);
  padding-top: 64px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--silver-line);
}

.footer__brand-block { max-width: 340px; }

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer__email {
  font-size: 0.95rem !important;
  color: var(--white) !important;
  font-weight: 500;
}

.footer__logo {
  height: 28px;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}

.footer__tagline {
  font-size: 0.9rem;
  color: var(--silver-dim);
  max-width: 300px;
  line-height: 1.65;
  margin-bottom: 20px;
}

.footer__tagline strong { color: var(--white); font-weight: 600; }

.footer__pill { display: inline-flex; }

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col h4 {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.footer__col a,
.footer__col span,
.footer__col .link {
  font-size: 0.88rem;
  color: var(--silver-dim);
  transition: color 0.3s;
  text-align: left;
}

.footer__col a:hover,
.footer__col .link:hover { color: var(--violet-light); }

.footer__note {
  font-size: 0.78rem !important;
  color: var(--silver-dim) !important;
  opacity: 0.7;
  margin-top: 4px;
}

.footer__bar { padding: 20px 0 28px; }

.footer__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--silver-dim);
}

.footer__made { color: var(--silver-dim); }

.footer__made .heart {
  color: var(--violet-light);
  display: inline-block;
  animation: heartPulse 1.6s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ---- Modal ---- */
.modal {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0;
  max-width: 580px;
  width: calc(100% - 40px);
  max-height: min(85vh, 680px);
  background: var(--black-2);
  color: var(--silver);
  margin: auto;
  overflow: hidden;
}

.modal:not([open]) {
  display: none !important;
}

.modal[open] {
  display: flex;
  flex-direction: column;
}

.modal::backdrop {
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(10px);
}

.modal__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--glass-border);
}

.modal__head h2 {
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  margin: 0;
}

.modal__close {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--silver-dim);
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.modal__close:hover {
  background: var(--glass);
  color: var(--white);
  border-color: var(--glass-border);
}

.modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 26px 28px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.45) transparent;
}

.modal__body::-webkit-scrollbar { width: 5px; }
.modal__body::-webkit-scrollbar-track { background: transparent; }
.modal__body::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.45);
  border-radius: 10px;
}

.modal h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--white);
  margin: 18px 0 6px;
}

.modal p { font-size: 0.86rem; margin-bottom: 8px; line-height: 1.65; }
.modal a { color: var(--violet-light); }

.modal__list {
  margin: 8px 0 12px 18px;
  padding: 0;
  font-size: 0.86rem;
  color: var(--silver-dim);
  line-height: 1.65;
}

.modal__list li { margin-bottom: 4px; }

/* ---- Cookie consent ---- */
.cookie-consent {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 10020;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  max-height: calc(100dvh - 24px);
  pointer-events: none;
}

.cookie-consent[hidden] { display: none !important; }

.cookie-consent__card {
  position: relative;
  margin-left: auto;
  width: min(100%, 560px);
  max-height: min(720px, calc(100dvh - 48px));
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(12, 12, 20, 0.94);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.45) transparent;
  pointer-events: auto;
}

.cookie-consent.is-expanded .cookie-consent__card {
  width: min(100%, 760px);
  max-height: min(820px, calc(100dvh - 48px));
}

.cookie-consent__card::-webkit-scrollbar { width: 6px; }
.cookie-consent__card::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.45);
  border-radius: 999px;
}

.cookie-consent__dismiss {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--silver-dim);
  border: 1px solid transparent;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.cookie-consent__dismiss:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--glass-border);
}

.cookie-consent__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet-light);
  margin-bottom: 10px;
}

.cookie-consent__title {
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 10px;
}

.cookie-consent__text {
  font-size: 0.9rem;
  color: var(--silver-dim);
  line-height: 1.65;
  margin-bottom: 18px;
}

.cookie-consent__actions,
.cookie-consent__prefs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cookie-consent__prefs {
  margin-top: 18px;
  padding-top: 18px;
  min-width: 0;
  border-top: 1px solid var(--silver-line);
}

.cookie-consent__pref {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(184, 192, 208, 0.08);
}

.cookie-consent__pref:last-of-type {
  border-bottom: none;
}

.cookie-consent__pref h3 {
  font-family: var(--font);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.cookie-consent__pref p {
  font-size: 0.84rem;
  color: var(--silver-dim);
  line-height: 1.6;
  max-width: 100%;
}

.cookie-consent__pref--locked h3::after {
  content: ' Sempre attivi';
  color: var(--violet-light);
  font-size: 0.74rem;
  font-weight: 600;
}

.cookie-consent__prefs-actions {
  margin-top: 18px;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.cookie-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-switch__slider {
  width: 54px;
  height: 31px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(184, 192, 208, 0.16);
  transition: background 0.25s, border-color 0.25s;
  position: relative;
}

.cookie-switch__slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.25s var(--ease);
}

.cookie-switch input:checked + .cookie-switch__slider {
  background: linear-gradient(135deg, rgba(59,108,244,0.95) 0%, rgba(124,58,237,0.95) 100%);
  border-color: transparent;
}

.cookie-switch input:checked + .cookie-switch__slider::after {
  transform: translateX(22px);
}

.cookie-switch input:disabled + .cookie-switch__slider {
  background: linear-gradient(135deg, rgba(59,108,244,0.8) 0%, rgba(124,58,237,0.8) 100%);
  opacity: 0.9;
}

.cookie-fab {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 10010;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(12, 12, 20, 0.94);
  border: 1px solid var(--glass-border);
  color: var(--white);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}

.cookie-fab[hidden] { display: none !important; }

.cookie-fab:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.35);
  background: rgba(18, 18, 28, 0.98);
}

.cookie-fab__icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--violet-light);
  font-size: 0.95rem;
  line-height: 1;
}

.cookie-fab__label {
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---- Stats ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.stat {
  padding: 28px 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  text-align: center;
}

.stat__num {
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--silver-dim);
}

/* ---- Process ---- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.process__item {
  padding: 28px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  position: relative;
}

.process__item::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--violet-light);
  display: block;
  margin-bottom: 14px;
}

.process__item h3 {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.process__item p {
  font-size: 0.86rem;
  color: var(--silver-dim);
  line-height: 1.6;
}

/* ---- Tech strip ---- */
.tech-strip {
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--silver-line);
  border-bottom: 1px solid var(--silver-line);
  background: rgba(255,255,255,0.02);
}

.tech-strip__track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.tech-strip__track span {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--silver-dim);
  padding-right: 40px;
  white-space: nowrap;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---- Service detail ---- */
.service-detail {
  display: grid;
  gap: 32px;
}

.service-detail__block {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  padding: 40px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  align-items: start;
}

.service-detail__block h3 {
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
}

.service-detail__lead {
  font-size: 0.92rem;
  color: var(--silver-dim);
}

.service-detail__list {
  display: grid;
  gap: 10px;
}

.service-detail__list li {
  font-size: 0.9rem;
  color: var(--silver);
  padding-left: 18px;
  position: relative;
}

.service-detail__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--violet-light);
  font-size: 0.8rem;
}

/* ---- FAQ ---- */
.faq { display: grid; gap: 12px; max-width: 720px; margin-inline: auto; }

.faq__item {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--glass);
}

.faq__q {
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq__q span { color: var(--violet-light); font-size: 1.2rem; transition: transform 0.3s; }
.faq__item.open .faq__q span { transform: rotate(45deg); }

.faq__a {
  height: 0;
  overflow: hidden;
  transition: height 0.4s var(--ease);
}

.faq__a p {
  padding: 0 22px 18px;
  font-size: 0.88rem;
  color: var(--silver-dim);
  line-height: 1.65;
}

/* ---- Values ---- */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.value {
  padding: 28px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
}

.value h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.value p { font-size: 0.88rem; color: var(--silver-dim); }

/* ---- GSAP reveal base ---- */
.gs-reveal {
  opacity: 0;
  transform: translateY(40px);
  will-change: opacity, transform;
}

.gs-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.no-js .gs-reveal {
  opacity: 1;
  transform: none;
}

/* section divider animation */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), var(--blue), transparent);
  transform: scaleX(0);
  transform-origin: left;
  margin: 0 auto;
  max-width: 200px;
}

.section-divider.is-visible {
  transform: scaleX(1);
  transition: transform 1.2s var(--ease);
}

/* floating animation utility */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.anim-float { animation: floatY 5s ease-in-out infinite; }

/* glow pulse on cards */
.service:hover .service__icon,
.home-card:hover .home-card__icon {
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.35);
}

/* subtle card shimmer */
@keyframes cardShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.service::after,
.home-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.04) 50%, transparent 60%);
  background-size: 200% 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.service:hover::after,
.home-card:hover::after {
  opacity: 1;
  animation: cardShimmer 1.2s ease forwards;
}

.service,
.home-card { position: relative; overflow: hidden; }

/* btn subtle lift */
.btn:active { transform: scale(0.98); }

/* tech strip pause on hover */
.tech-strip:hover .tech-strip__track { animation-play-state: paused; }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__copy { order: 1; text-align: center; }
  .hero__visual { order: 2; max-width: 520px; margin-inline: auto; width: 100%; }
  .hero__card-inner { transform: none !important; }
  .hero__card:hover .hero__card-inner { transform: none !important; }
  .hero__text { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .who-grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 48px; }
  .about__visual { min-height: 300px; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 1024px) {
  .section { padding: 72px 0; }
  .portfolio { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
  .home-cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: repeat(2, 1fr); }
  .home-portfolio { grid-template-columns: repeat(2, 1fr); }
  .service-detail__block { grid-template-columns: 1fr; gap: 24px; }
  .values { grid-template-columns: 1fr; }
  .services { grid-template-columns: repeat(2, 1fr); }

  /* Mobile nav */
  .nav__burger { display: flex; }

  .nav__inner > .nav__links {
    display: none;
  }

  .nav__links--portal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: calc(var(--nav-h) + 20px) 28px 40px;
    list-style: none;
    background: rgba(5, 5, 8, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav__links--portal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav__links--portal li { width: 100%; max-width: 320px; }

  .nav__links--portal a {
    display: block;
    width: 100%;
    font-size: 1.15rem;
    font-weight: 500;
    text-align: center;
    padding: 16px 20px;
    border-radius: 12px;
    transition: background 0.25s, color 0.25s;
  }

  .nav__links--portal a::after { display: none; }

  .nav__links--portal a:hover,
  .nav__links--portal a.active {
    background: rgba(124, 58, 237, 0.15);
    color: var(--white);
  }

  .nav { z-index: 9999; }
  .nav__brand, .nav__burger { z-index: 10000; }

  .bio-block__content { padding: 28px 24px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  .wrap { width: calc(100% - 32px); }

  .cta-band__inner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .cta-band__actions { align-items: center; width: 100%; }
  .cta-band__text { margin-inline: auto; }
  .cta-band { margin-top: 0; padding-bottom: 32px; }

  .hero {
    min-height: auto;
    padding: calc(var(--nav-h) + 32px) 0 48px;
  }
  .hero__scroll { display: none; }
  .hero__title { font-size: clamp(2rem, 8vw, 2.8rem); }
  .page-hero { padding: calc(var(--nav-h) + 40px) 0 36px; }
  .page-hero__title { font-size: clamp(1.9rem, 7vw, 2.6rem); }
  .page-breadcrumb { justify-content: flex-start; gap: 8px; margin-bottom: 16px; }

  .services { grid-template-columns: 1fr; }
  .portfolio { grid-template-columns: 1fr; }
  .home-portfolio { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; }
  .about .sec-head__label, .about .sec-head__title { text-align: center; }
  .about__content { text-align: center; }
  .about__badge { font-size: 0.7rem; padding: 8px 12px; white-space: normal; max-width: 120px; text-align: center; }
  .about__badge--1 { top: 5%; right: 0; }
  .about__badge--2 { bottom: 15%; left: 0; }
  .about__badge--3 { top: 50%; right: 0; }
  .about__ring { width: 200px; height: 200px; }
  .about__avatar { font-size: 2.6rem; }
  .tags { justify-content: center; }
  .contact .sec-head__title { text-align: left; }
  .form { padding: 24px 20px; }
  .form__row { grid-template-columns: 1fr; }
  .service { padding: 28px 24px; }
  .service-detail__block { padding: 28px 24px; }
  .page-cta { padding: 28px 20px; margin-top: 40px; }
  .footer__top { text-align: center; }
  .footer__brand-block { margin-inline: auto; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__tagline { margin-inline: auto; }
  .footer__pill { justify-content: center; }
  .footer__col { align-items: center; }
  .footer__bar-inner { flex-direction: column; text-align: center; }
  .stats, .process { grid-template-columns: 1fr; }
  .footer-cta { padding: 48px 0; }
  .footer-cta__inner { flex-direction: column; text-align: center; }
  .footer-cta__actions { align-items: center; width: 100%; }
  .footer-cta__text h2, .footer-cta__text p { margin-inline: auto; }
  .home-teaser { flex-direction: column; text-align: center; }
  .bg-glow__orb--1 { width: 280px; height: 280px; }
  .bg-glow__orb--2 { width: 240px; height: 240px; }
  .bg-glow__orb--3 { width: 200px; height: 200px; }
  .sec-head { margin-bottom: 40px; }
  .modal { width: calc(100% - 24px); max-height: 90vh; }
  .cookie-consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-height: calc(100dvh - 12px);
  }
  .cookie-consent__card {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 20px;
    border-radius: 20px 20px 18px 18px;
  }
  .cookie-consent.is-expanded .cookie-consent__card {
    width: 100%;
    max-height: calc(100dvh - 24px);
  }
  .cookie-consent__actions,
  .cookie-consent__prefs-actions { flex-direction: column; }
  .cookie-consent__actions .btn,
  .cookie-consent__prefs-actions .btn { width: 100%; }
  .cookie-consent__pref {
    align-items: flex-start;
    flex-direction: column;
  }
  .cookie-switch { align-self: flex-end; }
  .cookie-fab { left: 12px; bottom: 12px; padding: 11px 14px; }
}

@media (max-width: 480px) {
  .wrap { width: calc(100% - 24px); }
  .section { padding: 56px 0; }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
  .home-teaser .btn { width: 100%; }
  .cta-band__actions .btn { width: 100%; }
  .featured-more .btn { width: 100%; max-width: 320px; }
  .footer-cta__actions .btn { width: 100%; }
  .page-cta .btn { width: 100%; }
  .stat { padding: 22px 18px; }
  .stat__num { font-size: 1.6rem; }
  .code-window__body { padding: 16px; font-size: 0.75rem; }
  .pill { font-size: 0.76rem; margin-bottom: 20px; }
  .cookie-consent__title { font-size: 1.18rem; }
  .cookie-consent__text { font-size: 0.84rem; }
  .cookie-consent__pref { gap: 14px; }
  .cookie-consent__card { padding: 18px 16px; }
  .cookie-fab__label { display: none; }
}

@media (pointer: coarse) {
  .hero__card-inner,
  .hero__card:hover .hero__card-inner { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .gs-reveal { opacity: 1; transform: none; }
}
