/* ===== Tokens ===== */
:root {
  --bg: #060708;
  --bg-2: #0a0b0d;
  --surface: #11161a;
  --surface-2: #161c22;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #e9eef2;
  --ink-dim: #F5F5F5;
  --ink-mute: #E7E8F3;
  --primary: #007A99;
  --primary-soft: #0a8fb0;
  --primary-glow: rgba(0, 122, 153, 0.35);
  --accent: #e9eef2;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
}

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

/* ===== WebGL canvas (fixed, behind everything) ===== */
#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

/* ===== Scanlines / grain overlay ===== */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  background: transparent;
}
.site-header > * { pointer-events: auto; }

.logo-mark {
  width: 44px;
  height: 48px;
  display: block;
}

.profile-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  position: relative;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}
.profile-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1), filter 0.6s;
}
.profile-mark:hover img,
.profile-mark.active img {
  transform: scale(1.06);
  filter: grayscale(0) contrast(1);
}
/* Pulsing ring around the profile button — draws attention that it's clickable. */
.profile-mark.pulse-ring::before,
.profile-mark.pulse-ring::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  opacity: 0;
  animation: profile-pulse 2.6s cubic-bezier(.2,.7,.2,1) infinite;
  pointer-events: none;
}
.profile-mark.pulse-ring::after { animation-delay: 1.3s; }
@keyframes profile-pulse {
  0%   { transform: scale(0.92); opacity: 0.65; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.4);  opacity: 0; }
}
.profile-mark:focus-visible {
  box-shadow: 0 0 0 3px rgba(0,122,153,0.45);
}

/* ===== Bottom Nav — minimal, uppercase, no chrome ===== */
.bottom-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  gap: 28px;
  padding: 14px 28px;
  background: #0d1216;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.nav-item {
  position: relative;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.3s;
  white-space: nowrap;
  background: transparent;
  border: none;
  border-radius: 0;
}
.nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.nav-item:hover { color: #fff; }
.nav-item:hover::after { transform: scaleX(1); }
.nav-item.active {
  color: #fff;
  background: transparent;
  box-shadow: none;
}
.nav-item.active::after { transform: scaleX(1); }
.nav-item .dot { display: none; }

/* ===== Sections ===== */
section {
  position: relative;
  z-index: 2;
  background: transparent;
  padding: 140px 32px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
/* Alternating section backgrounds.
   Hero stays transparent (lets the WebGL arcs read against the page bg).
   01 Myself = light, Collaboration / Partner = dark, 03 Help = light.
   Light sections use a translucent paper tone so the WebGL arcs (which sit
   behind everything) remain visible through the panel. */
:root {
  --paper: #f5f1ea;       /* warm light surface */
  --paper-soft: #F7F8F0;
  --ink-on-paper: #11181f;
  --muted-on-paper: #5a6470;
}

#myself {
  background: var(--paper-soft);
  color: var(--ink-on-paper);
}
#help {
  background: var(--paper-soft);
  color: var(--ink-on-paper);
}
#partner {
  /* dark section — leave the page bg show through with a faint teal wash */
  background: linear-gradient(180deg, rgba(0,18,24,0.55), rgba(0,18,24,0.55));
}

/* Type & helper colour overrides on light sections */
#myself .eyebrow, #help .eyebrow,
#myself .section-label, #help .section-label { color: var(--muted-on-paper); }
#myself .section-label .num, #help .section-label .num { color: var(--ink-on-paper); }
#myself .section-title, #help .section-title { color: var(--ink-on-paper); }
#myself p, #help p,
#myself .myself-bio, #help .myself-bio { color: #2c343c; }
#myself .skills-list li,
#help .skills-list li { color: var(--ink-on-paper); border-color: rgba(17,24,31,0.12); }
#myself .skills-list li span,
#help .skills-list li span { color: var(--muted-on-paper); }
#myself .stat,
#help .stat { background: rgba(17,24,31,0.04); border-color: rgba(17,24,31,0.08); }
#myself .stat-num,
#help .stat-num { color: var(--ink-on-paper); }
#myself .stat-label,
#help .stat-label { color: var(--muted-on-paper); }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-soft);
  margin-bottom: 28px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--primary-soft);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 0;
}
.hero .container { max-width: 1400px; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 7.5vw, 90px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 36px;
  text-wrap: balance;
}
.hero h1 .accent {
  color: var(--primary-soft);
  font-style: italic;
  font-weight: 400;
}
.hero .lede {
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 540px;
  text-wrap: pretty;
}
.hero .lede strong { color: var(--ink); font-weight: 500; }

.hero-meta {
  position: absolute;
  bottom: 120px;
  left: 32px;
  right: 32px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.hero-meta span { display: flex; align-items: center; gap: 10px; }
.hero-meta .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary-soft);
  box-shadow: 0 0 12px var(--primary-soft);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* ===== Section headings ===== */
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 5.5vw, 75px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
  text-wrap: balance;
}
.section-title .accent {
  color: var(--primary-soft);
  font-style: italic;
  font-weight: 400;
}

/* ===== Myself section ===== */
.myself-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: start;
}
.myself-bio p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-dim);
  margin-bottom: 20px;
  text-wrap: pretty;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 48px;
}
.stat {
  padding: 28px 24px;
  background: rgba(10, 11, 13, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  color: var(--primary-soft);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-mute);
  margin-top: 10px;
}

.skills-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--line);
}
.skills-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 2px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  transition: padding 0.3s, color 0.3s;
}
.skills-list li:hover {
  padding-left: 12px;
  color: var(--primary-soft);
}
.skills-list li span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--ink-mute);
}

/* ===== Collaboration / Form ===== */
.collab-wrap {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}
.collab-intro p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-dim);
  margin-bottom: 20px;
  text-wrap: pretty;
}
.collab-form-col {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
/* Step-track now sits BELOW the form, horizontal, left-aligned. */
.step-track {
  list-style: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 28px 36px;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: flex-start;
}
.step-track-item {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  transition: color 0.3s;
  white-space: nowrap;
}
.step-track-item.active { color: var(--ink); }
.step-track-item.done { color: var(--primary-soft); }
.step-track-item .num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 10px;
  transition: all 0.3s;
  flex-shrink: 0;
}
.step-track-item.active .num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.step-track-item.done .num {
  background: var(--primary-soft);
  border-color: var(--primary-soft);
  color: #fff;
}

.form-card {
  background: rgba(17, 22, 26, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.form-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.5s cubic-bezier(.2,.7,.2,1);
}
.form-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.form-step-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--ink);
}
.form-step-sub {
  font-size: 14px;
  color: var(--ink-dim);
  margin-bottom: 32px;
}
.form-row { margin-bottom: 20px; }
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
}
.form-input, .form-textarea {
  width: 100%;
  padding: 14px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}
.form-input:focus, .form-textarea:focus {
  border-bottom-color: var(--primary-soft);
}
.form-textarea { min-height: 90px; resize: vertical; }
.form-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.chip:hover { color: var(--ink); border-color: var(--ink-dim); }
.chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  transition: all 0.25s;
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}
.btn-primary:hover {
  background: var(--primary-soft);
  box-shadow: 0 0 24px -4px var(--primary-glow);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-dim); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}
.cta-primary,
.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  transition: all 0.25s;
  cursor: pointer;
}
.cta-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}
.cta-primary:hover {
  background: var(--primary-soft);
  box-shadow: 0 0 24px -4px var(--primary-glow);
  transform: translateY(-1px);
}
.cta-secondary {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--line-strong);
}
.cta-secondary:hover {
  color: var(--ink);
  border-color: var(--ink-dim);
}

.form-success {
  text-align: center;
  padding: 32px 16px;
}
.form-success .check {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  margin: 0 auto 24px;
  font-size: 26px;
}

/* ===== Partner ===== */
.partner-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}
.partner-card {
  position: relative;
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(14, 19, 23, 0.6);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.partner-card:hover { border-color: var(--primary-soft); transform: translateY(-4px); }
.partner-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  pointer-events: none;
  background:
    linear-gradient(135deg, transparent 40%, rgba(0, 122, 153, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.4s;
}
.partner-card:hover::after { opacity: 1; }

.partner-tag {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary-soft);
  margin-bottom: 28px;
}
.partner-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.partner-card p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-dim);
  margin-bottom: 16px;
  text-wrap: pretty;
}
.partner-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.stack-chip {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
}

/* ===== Help / CTA ===== */
.help {
  text-align: center;
  padding: 180px 32px;
}
.help-copy {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 1000px;
  margin: 0 auto 48px;
  text-wrap: balance;
  color: var(--ink);
}
.help-copy .mute { color: var(--ink-mute); }
.help-copy .accent { color: var(--primary-soft); font-style: italic; font-weight: 400; }
.help-cta-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.help-btn {
  padding: 18px 32px;
  font-size: 15px;
}
.help-note {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 80px 32px 140px;
  border-top: 1px solid var(--line);
  background: rgba(10, 11, 13, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.footer-brand img { width: 28px; height: 32px; }
.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.footer-tag {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.55;
  max-width: 320px;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 20px;
  font-weight: 400;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col li {
  font-size: 14px;
  color: var(--ink-dim);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--primary-soft); }
.footer-bottom {
  max-width: 1280px;
  margin: 64px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 100;
  box-shadow: 0 0 10px var(--primary-glow);
}

.word-reveal { display: inline-block; }

/* Section dividers */
.section-label {
  position: absolute;
  top: 80px;
  left: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label .num {
  color: var(--primary-soft);
}

/* Reveal anim utility */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .myself-grid, .collab-wrap, .partner-split { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .form-card { padding: 28px; }
  .site-header { padding: 14px 18px; }
  section { padding: 100px 20px; }
  .hero { padding-top: 110px; }
  .hero-meta { left: 20px; right: 20px; bottom: 110px; font-size: 10px; }
  .nav-item { padding: 8px 0; font-size: 10px; letter-spacing: 0.18em; }
  .nav-item .dot { display: none; }
  /* Bottom-nav su mobile: occupa ~90% da sinistra, scorrevole orizzontalmente.
     Il restante ~10% a destra è riservato al lang-switcher (vedi sotto). */
  .bottom-nav {
    bottom: 18px;
    left: 16px;
    right: 80px;
    transform: none;
    max-width: none;
    gap: 18px;
    padding: 12px 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;      /* IE/Edge legacy */
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  .bottom-nav::-webkit-scrollbar { display: none; } /* Chrome/Safari */

  /* Fade gradient ai lati per indicare che la nav è scrollabile orizzontalmente.
     Pseudo-elementi position:fixed → restano fissi sui bordi della pillola
     anche durante lo scroll interno del contenuto.
     Le coordinate (left/right/bottom) DEVONO combaciare con quelle di .bottom-nav
     qui sopra, altrimenti i fade si disallineano. */
  .bottom-nav::before,
  .bottom-nav::after {
    content: '';
    position: fixed;
    bottom: 18px;
    width: 28px;
    height: 50px; /* corrisponde all'altezza della pillola su mobile */
    pointer-events: none;
    z-index: 31; /* sopra la nav (30), sotto il banner cookie (200) */
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .bottom-nav::before {
    left: 16px; /* = left della nav */
    background: linear-gradient(to right, #0d1216 30%, rgba(13, 18, 22, 0));
    border-radius: 999px 0 0 999px;
  }
  .bottom-nav::after {
    right: 80px; /* = right della nav */
    background: linear-gradient(to left, #0d1216 30%, rgba(13, 18, 22, 0));
    border-radius: 0 999px 999px 0;
  }
  .bottom-nav.fade-left::before  { opacity: 1; }
  .bottom-nav.fade-right::after { opacity: 1; }

  .footer-bottom { flex-direction: column; gap: 12px; }
  .step-track { gap: 16px 24px; }
  .step-track-item { font-size: 10px; }
  .bio-drawer { width: 100%; max-width: 100%; }
}

/* ===== Bio Drawer (offset sidebar) ===== */
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 4, 6, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  pointer-events: none;
  transition: background 0.45s ease, backdrop-filter 0.45s ease;
}
.drawer-scrim.open {
  background: rgba(2, 4, 6, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
}

.bio-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 92vw);
  z-index: 100;
  background: #0d1216;
  border-left: 1px solid var(--line-strong);
  box-shadow: -40px 0 80px rgba(0, 0, 0, 0.55);
  transform: translateX(105%);
  transition: transform 0.55s cubic-bezier(.2,.75,.2,1);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.bio-drawer.open { transform: translateX(0); }

.bio-drawer-inner {
  padding: 36px 40px 56px;
  position: relative;
}
.drawer-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.25s, transform 0.3s;
}
.drawer-close:hover {
  background: rgba(255,255,255,0.06);
  transform: rotate(90deg);
}

.cal-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100;
  width: min(560px, 94vw);
  height: min(720px, 88vh);
  background: #0d1216;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.2,.75,.2,1), visibility 0.35s;
}
.cal-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.cal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(13, 18, 22, 0.7);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.25s, transform 0.3s;
}
.cal-close:hover {
  background: rgba(255,255,255,0.06);
  transform: rotate(90deg);
}
.cal-iframe-wrap {
  width: 100%;
  height: 100%;
}
.cal-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.bio-portrait {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  margin: 12px 0 28px;
}
.bio-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2);
}

.bio-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 14px;
}
.bio-name {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--ink);
}
.bio-role {
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 28px;
}
.bio-body p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-dim);
  margin-bottom: 14px;
  text-wrap: pretty;
}
.bio-body p strong { color: var(--ink); }

.bio-meta {
  margin: 28px 0 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}
.bio-meta div { display: flex; flex-direction: column; gap: 4px; }
.bio-meta dt {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}
.bio-meta dd {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
}

/* ===== Bio drawer — Notes card (link a /it/notes/ o /en/notes/) ===== */
.bio-notes-card {
  display: block;
  margin: 0 0 28px;
  padding: 20px 22px;
  background: rgba(0, 122, 153, 0.08);
  border: 1px solid rgba(10, 143, 176, 0.4);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.bio-notes-card:hover {
  background: rgba(0, 122, 153, 0.14);
  border-color: var(--primary);
  transform: translateX(2px);
}
.bio-notes-card .bio-notes-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary-soft);
  margin-bottom: 8px;
}
.bio-notes-card .bio-notes-text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 10px;
}
.bio-notes-card .bio-notes-cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-soft);
  transition: color 0.25s;
}
.bio-notes-card:hover .bio-notes-cta {
  color: var(--ink);
}

.bio-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.bio-footer a {
  color: var(--primary-soft);
  text-decoration: none;
  transition: color 0.25s;
}
.bio-footer a:hover { color: var(--primary); }
/* ===== Language Switcher ===== */
.lang-switcher {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #0d1216;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.lang-switcher:hover {
  color: #fff;
  border-color: var(--ink-dim);
}
.lang-flag {
  font-size: 15px;
  line-height: 1;
}
.lang-label {
  display: inline-block;
}

/* ===== Scroll button (inside hero container) ===== */
.scroll-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.3s;
}
.scroll-btn:hover {
  color: var(--ink);
}

/* ===== Privacy box (form step 3) ===== */
.privacy-box {
  max-height: 210px;
  overflow-y: auto;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
.privacy-box::-webkit-scrollbar { width: 6px; }
.privacy-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
.privacy-box-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 12px;
  font-weight: 400;
}
.privacy-box p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-dim);
  white-space: pre-line;
}

.privacy-check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.privacy-check-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ===== Form error message ===== */
.form-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(220, 50, 50, 0.08);
  border: 1px solid rgba(220, 50, 50, 0.2);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #ff8080;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 900px) {
  /* Lang-switcher su mobile: cerchio 50x50 allineato verticalmente alla bottom-nav.
     Stesso bottom (18px) e stessa altezza ⇒ bordi superiore e inferiore allineati. */
  .lang-switcher {
    bottom: 18px;
    right: 16px;
    left: auto;
    width: 50px;
    height: 50px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    justify-content: center;
    font-size: 10px;
  }
  .lang-flag {
    font-size: 18px;
  }
  .lang-label {
    display: none; /* show only flag on mobile */
  }
}
/* ===== Autocomplete — override browser autofill styling ===== */
/* L'inset box-shadow copre il background giallo/blu del browser */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #060708 inset !important;
  -webkit-text-fill-color: #e9eef2 !important;
  transition: background-color 9999s ease 0s;
  caret-color: #e9eef2;
  border-bottom-color: rgba(255, 255, 255, 0.16) !important;
}
.form-input:-webkit-autofill:focus {
  border-bottom-color: #0a8fb0 !important;
}

/* ===== Preloader ===== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #060708;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), visibility 0.7s;
}
.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-img {
  width: 72px;
  height: 72px;
  animation: preloader-pulse 1.4s ease-in-out infinite;
  filter: grayscale(0.2);
}
@keyframes preloader-pulse {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%       { opacity: 0.1; transform: scale(0.92); }
}
/* ===== FAQ section ===== */
#faq {
  background: var(--paper-soft);
  color: var(--ink-on-paper);
}
#faq .eyebrow,
#faq .section-label        { color: var(--muted-on-paper); }
#faq .section-label .num   { color: var(--ink-on-paper); }
#faq .section-title        { color: var(--ink-on-paper); }

.faq-wrap {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
}

.faq-list {
  list-style: none;
  border-top: 1px solid rgba(17, 24, 31, 0.12);
}

.faq-item {
  border-bottom: 1px solid rgba(17, 24, 31, 0.12);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-on-paper);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--primary); }

.faq-icon {
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 300;
  color: var(--primary);
  line-height: 1;
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1);
}
.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(.2,.7,.2,1), opacity 0.3s;
  opacity: 0;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  opacity: 1;
}
.faq-answer p {
  padding-bottom: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted-on-paper);
}

@media (max-width: 900px) {
  .faq-wrap { grid-template-columns: 1fr; gap: 32px; }
}
/* ============================================================
   PATCH — section backgrounds, color overrides, .mute fix
   Aggiungere in fondo a styles.css (sovrascrive le regole precedenti)
   ============================================================ */

/* ── Sezione 03 Partner — ora CHIARA ─────────────────────────────────── */
#partner {
  background: var(--paper-soft);
  color: var(--ink-on-paper);
}
#partner .eyebrow,
#partner .section-label           { color: var(--muted-on-paper); }
#partner .section-label .num      { color: var(--ink-on-paper); }
#partner .section-title            { color: var(--ink-on-paper); }
#partner .partner-card             { background: rgba(17,24,31,0.05); border-color: rgba(17,24,31,0.12); }
#partner .partner-card:hover       { border-color: var(--primary); }
#partner .partner-card h3          { color: var(--ink-on-paper); }
#partner .partner-card p           { color: #2c343c; }
#partner .partner-tag              { color: var(--primary); border-color: rgba(17,24,31,0.15); }
#partner .stack-chip               { background: rgba(17,24,31,0.05); border-color: rgba(17,24,31,0.10); color: #2c343c; }
#partner .partner-stack            { border-color: rgba(17,24,31,0.12); }

/* ── Sezione 04 FAQ — ora SCURA (sovrascrive styles-additions-3.css) ── */
#faq {
  background: transparent;
  color: var(--ink);
}
#faq .eyebrow,
#faq .section-label           { color: var(--ink-mute); }
#faq .section-label .num      { color: var(--primary-soft); }
#faq .section-title            { color: var(--ink); }
#faq .faq-list                 { border-top-color: var(--line); }
#faq .faq-item                 { border-bottom-color: var(--line); }
#faq .faq-question             { color: var(--ink); }
#faq .faq-answer p             { color: var(--ink-dim); }

/* ── Sezione 05 Help — resta CHIARA, fix .mute ───────────────────────── */
#help .help-copy .mute { color: #2c343c; }

/* ── .mute su tutte le sezioni chiare (myself, partner, help) ─────────── */
#myself .mute,
#partner .mute { color: #2c343c; }
/* ===== Myself bio paragraph (replaces stats-grid) ===== */
.myself-bio-para {
  font-size: 17px;
  line-height: 1.75;
  color: #2c343c;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(17,24,31,0.10);
  text-wrap: pretty;
}
#myself .myself-bio-para { color: #2c343c; }

/* ===== Ghost button fix on light sections (Help, Partner) ===== */
#help .btn-ghost,
#partner .btn-ghost {
  color: var(--ink-on-paper);
  border-color: rgba(17,24,31,0.25);
}
#help .btn-ghost:hover,
#partner .btn-ghost:hover {
  border-color: var(--ink-on-paper);
  color: var(--ink-on-paper);
}
/* ===== Preloader statico HTML — sovrascrive la versione React ===== */

/* Rimuovi le vecchie classi .preloader se presenti */
.preloader { display: none !important; }

/* Nuovo preloader statico */
#static-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #060708;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1);
}
#static-preloader.hidden {
  opacity: 0;
  pointer-events: none;
}
#static-preloader img {
  width: 72px;
  height: 72px;
  animation: static-preloader-pulse 1.4s ease-in-out infinite;
}
@keyframes static-preloader-pulse {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%       { opacity: 0.1; transform: scale(0.92); }
}
/* ===== Bio drawer: dt labels more readable ===== */
.bio-meta dt {
  color: var(--ink-dim); /* was ink-mute (#5d6770), now dimmer but legible */
}

/* ===== Help note: "Basato in Italia" on light bg ===== */
.help-note {
  color: var(--ink-on-paper);
  opacity: 0.55;
}
#help .help-note {
  color: #2c343c;
  opacity: 0.65;
}

/* ===== CTA buttons: opacity fallback if GSAP trigger never fires ===== */
/* GSAP from() sets opacity:0 and animates to natural state on scroll.
   If trigger never fires, this ensures buttons stay visible. */
.help-cta-row .btn {
  opacity: 1;
}

/* ===== Bio drawer: meta labels more readable ===== */
.bio-meta dt {
  color: var(--ink-dim);
}

/* ===== Artera badge in footer-bottom ===== */
.artera-badge {
  display: inline-flex;
  align-items: center;
  opacity: 0.55;
  transition: opacity 0.25s;
}
.artera-badge:hover {
  opacity: 1;
}
.artera-badge img {
  display: block;
}
/* ===== Footer links: animated underline on hover (same as bottom nav) ===== */

.footer-col a,
.footer-col li {
  position: relative;
  display: inline-block; /* needed for ::after to size correctly */
}

.footer-col a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--ink-dim);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}

.footer-col a:hover::after {
  transform: scaleX(1);
}

/* Keep the color transition from existing styles */
.footer-col a {
  transition: color 0.2s;
}