/* ============================================================
   Starfed.org: under construction
   Built on the Starfed / Constellation design tokens.
   No build step. No framework. No tracking.
   ============================================================ */

/* ---- Self-hosted brand fonts (latin subset) ---- */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Reset & base ---- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--sf-font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg { display: block; max-width: 100%; }

a { color: inherit; }

button,
input { font: inherit; }

::selection {
  background: var(--brand);
  color: #fff;
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-glow);
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--text-primary);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: top 150ms var(--sf-ease-default);
}
.skip-link:focus { top: 12px; }

/* ---- Header ---- */
.site-header {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1220px;
  min-height: 78px;
  margin: 0 auto;
  padding: 18px clamp(20px, 4vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}
.brand img {
  width: 40px;
  height: 40px;
  flex: none;
  filter: drop-shadow(0 0 10px rgba(130, 30, 126, 0.35));
}
.brand-name {
  font-family: var(--sf-font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-sub {
  align-self: center;
  padding-left: 10px;
  border-left: 1px solid var(--border);
  color: var(--text-faint);
  font-family: var(--sf-font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms var(--sf-ease-default);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link .arrow {
  color: var(--text-faint);
  transition: transform 150ms var(--sf-ease-default), color 150ms var(--sf-ease-default);
}
.nav-link:hover .arrow {
  color: var(--accent-glow);
  transform: translate(1px, -1px);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1220px;
  min-height: calc(100vh - 78px);
  min-height: calc(100svh - 78px);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 52px) clamp(20px, 4vw, 36px) clamp(52px, 7vw, 84px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-copy { max-width: 560px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--text-muted);
  font-family: var(--sf-font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--brand-light);
  opacity: 0.7;
}

.hero h1 {
  margin-bottom: 18px;
  font-family: var(--sf-font-display);
  font-size: clamp(2.9rem, 5.3vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.96;
}
.hero h1 .grad {
  color: var(--brand-light);
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[lang="it"] .hero h1 {
  font-size: clamp(2.6rem, 4.8vw, 4.8rem);
}

.hero .sub {
  margin-bottom: 22px;
  color: var(--text-secondary);
  font-family: var(--sf-font-display);
  font-size: clamp(1.08rem, 1.55vw, 1.32rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.hero .lead {
  max-width: 48ch;
  margin-bottom: 26px;
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.75;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sf-font-display);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms var(--sf-ease-out), box-shadow 180ms var(--sf-ease-out),
              background 180ms var(--sf-ease-out), border-color 180ms var(--sf-ease-out);
}
.btn .arrow { transition: transform 180ms var(--sf-ease-out); }
.btn:hover .arrow { transform: translate(2px, -2px); }
.btn-primary {
  border-color: rgba(232, 93, 158, 0.3);
  background: linear-gradient(135deg, #4E117B 0%, #821E7E 50%, #C94B9E 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 6px 20px rgba(0, 0, 0, 0.25);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 24px rgba(201, 75, 158, 0.25);
}
.btn-ghost {
  border-color: var(--border);
  background: rgba(20, 24, 48, 0.45);
  color: var(--text-primary);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--brand-light);
  background: var(--bg-card);
}

.access-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--text-faint);
  font-size: 0.78rem;
  line-height: 1.5;
}
.access-note .icon {
  color: var(--brand-light);
  font-size: 0.9em;
}

/* ---- Constellation ---- */
.constellation {
  min-width: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.constellation-field {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 680px;
  aspect-ratio: 100 / 88;
}

.constellation-field::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(26, 5, 120, 0.34) 0%, rgba(11, 14, 26, 0) 66%);
  filter: blur(18px);
}

.constellation-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.constellation-lines line {
  stroke: rgba(201, 75, 158, 0.38);
  stroke-linecap: round;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: stroke 200ms var(--sf-ease-default);
}
.constellation-lines line.mesh-chord { stroke: rgba(201, 75, 158, 0.22); }
.constellation-lines line.mesh-faint { stroke: rgba(201, 75, 158, 0.13); }
.constellation-field:has(.star-sso:hover) line:is([data-a="sso"], [data-b="sso"]),
.constellation-field:has(.star-odessy:hover) line:is([data-a="odessy"], [data-b="odessy"]),
.constellation-field:has(.star-matrix:hover) line:is([data-a="matrix"], [data-b="matrix"]),
.constellation-field:has(.star-vault:hover) line:is([data-a="vault"], [data-b="vault"]),
.constellation-field:has(.star-files:hover) line:is([data-a="files"], [data-b="files"]),
.constellation-field:has(.star-email:hover) line:is([data-a="email"], [data-b="email"]),
.constellation-field:has(.star-git:hover) line:is([data-a="git"], [data-b="git"]),
.constellation-field:has(.star-odessy:focus-within) line:is([data-a="odessy"], [data-b="odessy"]),
.constellation-field:has(.star-git:focus-within) line:is([data-a="git"], [data-b="git"]) {
  stroke: rgba(232, 93, 158, 0.72);
}

.spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-glow);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(232, 93, 158, 0.65);
  animation: spark-twinkle 4.5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  pointer-events: none;
}
@keyframes spark-twinkle {
  0%, 100% { opacity: 0.25; transform: translate(-50%, -50%) scale(0.8); }
  50%      { opacity: 0.85; transform: translate(-50%, -50%) scale(1.25); }
}

/* Service stars */
.star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 3;
}
.star-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--grad-brand);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(201, 75, 158, 0.75);
  transition: box-shadow 200ms var(--sf-ease-default), transform 200ms var(--sf-ease-default);
}
.star-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(201, 75, 158, 0.28);
  border-radius: 50%;
  animation: star-pulse 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes star-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50%      { opacity: 1;    transform: scale(1.4); }
}

.star-text {
  position: absolute;
  left: 0;
  top: 15px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: max-content;
  max-width: 132px;
  transform: translateX(-50%);
  text-align: center;
  text-decoration: none;
}
.star-text .nm {
  color: var(--text-primary);
  font-family: var(--sf-font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-shadow: 0 1px 12px rgba(11, 14, 26, 0.95);
  transition: color 150ms var(--sf-ease-default);
}
.star-text .rl {
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.3;
  text-shadow: 0 1px 12px rgba(11, 14, 26, 0.95);
}
a.star-text:hover .nm { color: var(--accent-glow); }
a.star-text:hover .star-ext { color: var(--accent-glow); }
.star-ext {
  color: var(--text-faint);
  font-size: 0.74em;
  transition: color 150ms var(--sf-ease-default);
}
.star:has(a.star-text:hover) .star-dot {
  box-shadow: 0 0 20px rgba(232, 93, 158, 0.95);
  transform: translate(-50%, -50%) scale(1.2);
}

/* Star coordinates (percentages of the constellation field) */
.star-sso    { --x: 22%; --y: 28%; }
.star-odessy { --x: 47%; --y: 9%; }
.star-matrix { --x: 76%; --y: 22%; }
.star-vault  { --x: 88%; --y: 55%; }
.star-files  { --x: 68%; --y: 84%; }
.star-email  { --x: 30%; --y: 78%; }
.star-git    { --x: 11%; --y: 54%; }

/* Small unlabelled stars that make the shape feel less regular */
.spark-a { --x: 42%; --y: 40%; --d: 0.4s; }
.spark-b { --x: 63%; --y: 43%; --d: 1.1s; }
.spark-c { --x: 52%; --y: 66%; --d: 1.8s; }
.spark-d { --x: 20%; --y: 66%; --d: 2.5s; }
.spark-e { --x: 84%; --y: 76%; --d: 3.2s; }
.spark-f { --x: 93%; --y: 30%; --d: 3.9s; }
.spark-g { --x: 8%; --y: 36%; --d: 4.6s; }

.star-sso   .star-dot::after { animation-delay: 0.2s; }
.star-odessy .star-dot::after { animation-delay: 0.9s; }
.star-matrix .star-dot::after { animation-delay: 1.6s; }
.star-vault .star-dot::after { animation-delay: 2.3s; }
.star-files .star-dot::after { animation-delay: 3.0s; }
.star-email .star-dot::after { animation-delay: 3.7s; }
.star-git   .star-dot::after { animation-delay: 4.4s; }

/* ---- Section labels ---- */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-family: var(--sf-font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.section-kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brand-light);
  opacity: 0.7;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.staff-card {
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  background: rgba(20, 24, 48, 0.5);
}
.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 22px rgba(130, 30, 126, 0.3);
  color: #fff;
  font-family: var(--sf-font-display);
  font-size: 1.1rem;
  font-weight: 700;
}
.staff-card h3 {
  font-family: var(--sf-font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.staff-card p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}
.section-note {
  margin-top: 20px;
  color: var(--text-faint);
  font-size: 0.82rem;
  line-height: 1.6;
}
.section-note a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 150ms var(--sf-ease-default), border-color 150ms var(--sf-ease-default);
}
.section-note a:hover {
  border-bottom-color: var(--border);
  color: var(--text-primary);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  background: rgba(20, 24, 48, 0.5);
  text-decoration: none;
  transition: transform 180ms var(--sf-ease-out), border-color 180ms var(--sf-ease-out),
              background 180ms var(--sf-ease-out);
}
.contact-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-light);
  background: var(--bg-card);
}
.contact-label {
  color: var(--text-muted);
  font-family: var(--sf-font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.contact-value {
  color: var(--text-primary);
  font-family: var(--sf-font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  word-break: break-word;
}

/* ---- Staff and contact pages ---- */
body.subpage {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.subpage .site-footer { margin-top: auto; }

.subpage-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 36px) clamp(56px, 8vw, 96px);
}
.subpage-title {
  max-width: 720px;
  margin-bottom: 12px;
  font-family: var(--sf-font-display);
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
}
.subpage-lead {
  max-width: 60ch;
  margin-bottom: 36px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ---- Error pages ---- */
body.error-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.error-page .site-footer { margin-top: auto; }

.error-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) clamp(20px, 4vw, 36px) clamp(64px, 8vw, 96px);
  text-align: center;
}
.error-main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(130, 30, 126, 0.16), transparent 58%);
}
.error-content {
  position: relative;
  z-index: 1;
  max-width: 660px;
}
.error-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-family: var(--sf-font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.error-kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brand-light);
  opacity: 0.7;
}
.error-code {
  margin: 8px 0 20px;
  color: var(--brand-light);
  background: linear-gradient(135deg, #6A187D 0%, #942280 38%, #C22D83 72%, #E85D9E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--sf-font-display);
  font-size: clamp(5rem, 16vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.8;
}
.error-content h1 {
  margin-bottom: 12px;
  font-family: var(--sf-font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.error-content p {
  max-width: 52ch;
  margin: 0 auto 26px;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.error-note {
  margin-top: 24px;
  color: var(--text-faint);
  font-size: 0.8rem;
  line-height: 1.6;
}
.error-note a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 150ms var(--sf-ease-default), border-color 150ms var(--sf-ease-default);
}
.error-note a:hover {
  border-bottom-color: var(--border);
  color: var(--text-primary);
}

/* ---- Footer ---- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 6, 15, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 28px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 22px clamp(20px, 4vw, 36px);
}
.footer-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-secondary);
  font-family: var(--sf-font-display);
  font-size: 0.85rem;
  font-weight: 600;
}
.footer-brand img { width: 18px; height: 18px; }
.footer-tagline {
  color: var(--text-faint);
  font-size: 0.78rem;
}
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 150ms var(--sf-ease-default);
}
.footer-links a:hover { color: var(--text-primary); }
.copyright {
  color: var(--text-faint);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* ---- Legal pages ---- */
body.legal {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.legal .site-footer { margin-top: auto; }

.legal-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 36px) clamp(56px, 8vw, 96px);
}
.back-link {
  display: flex;
  align-items: center;
  width: fit-content;
  gap: 6px;
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 150ms var(--sf-ease-default);
}
.back-link:hover { color: var(--text-primary); }

.legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-family: var(--sf-font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.legal-kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brand-light);
  opacity: 0.7;
}
.legal-main h1 {
  margin-bottom: 10px;
  font-family: var(--sf-font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.legal-meta {
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.legal-card {
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--border-subtle);
  border-radius: 26px;
  background: rgba(20, 24, 48, 0.55);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.legal-card section + section { margin-top: 30px; }
.legal-card h2 {
  margin: 34px 0 10px;
  color: var(--text-primary);
  font-family: var(--sf-font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.legal-card h2:first-child { margin-top: 0; }
.legal-card h3 {
  margin: 24px 0 8px;
  color: var(--text-primary);
  font-family: var(--sf-font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.legal-card p {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.75;
}
.legal-card p + p { margin-top: 10px; }
.legal-card ul,
.legal-card ol {
  margin: 8px 0 0;
  padding-left: 22px;
  color: var(--text-secondary);
}
.legal-card li {
  margin-bottom: 6px;
  font-size: 0.94rem;
  line-height: 1.7;
}
.legal-card li > ul,
.legal-card li > ol { margin-top: 6px; }
.legal-card li::marker { color: var(--brand-light); }
.legal-card a {
  color: var(--brand-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-card a:hover { color: var(--accent-glow); }
.legal-card strong {
  color: var(--text-primary);
  font-weight: 600;
}
.legal-card code {
  padding: 1px 5px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: rgba(11, 14, 26, 0.6);
  color: var(--text-secondary);
  font-family: var(--sf-font-mono);
  font-size: 0.82em;
}
.legal-card hr {
  margin: 30px 0;
  border: 0;
  border-top: 1px solid var(--border-subtle);
}
.legal-card table {
  width: 100%;
  margin: 16px 0 24px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.legal-card th,
.legal-card td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.legal-card th {
  background: rgba(130, 30, 126, 0.14);
  color: var(--text-primary);
  font-family: var(--sf-font-display);
  font-weight: 600;
}
.legal-card tbody tr:nth-child(even) td { background: rgba(11, 14, 26, 0.35); }
@media (max-width: 760px) {
  .legal-card table {
    display: block;
    overflow-x: auto;
    font-size: 0.85rem;
  }
  .legal-card th,
  .legal-card td { min-width: 140px; }
}
.legal-note {
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(11, 14, 26, 0.45);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ---- Responsive ---- */
@media (max-width: 1020px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    padding-top: 24px;
  }
  .hero-copy { margin: 0 auto; }
  .kicker { justify-content: center; }
  .hero .lead { margin-right: auto; margin-left: auto; }
  .actions { justify-content: center; }
  .access-note { justify-content: center; text-align: center; }
  .constellation { margin-top: 8px; }
}

@media (max-width: 900px) {
  .nav-section { display: none; }
  .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .nav-page { display: none; }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 68px;
    padding: 14px 20px;
    gap: 12px;
  }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 1.05rem; }
  .brand-sub { display: none; }
  .nav { gap: 14px; }

  .hero {
    gap: 32px;
    padding: 20px 20px 56px;
  }
  .hero h1 { font-size: clamp(2.5rem, 10vw, 3.6rem); }
  html[lang="it"] .hero h1 { font-size: clamp(2.2rem, 9vw, 3.4rem); }
  .hero .lead { font-size: 0.93rem; }
  .actions {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    flex-direction: column;
  }
  .btn { width: 100%; }

  .star-text {
    top: 12px;
    max-width: 104px;
  }
  .star-text .nm { font-size: 0.76rem; }
  .star-text .rl { display: none; }

  .error-actions {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .footer-left {
    flex-direction: column;
    gap: 6px;
  }
  .footer-links { justify-content: center; }

  .staff-grid,
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .brand img { width: 30px; height: 30px; }
  .nav-link { font-size: 0.75rem; }
  .hero h1 { font-size: clamp(2.35rem, 11vw, 3rem); }
  html[lang="it"] .hero h1 { font-size: clamp(2.2rem, 9vw, 2.8rem); }
  .star-text { max-width: 84px; }
  .star-text .nm { font-size: 0.7rem; }
  .legal-main,
  .subpage-main { padding-right: 16px; padding-left: 16px; }
  .legal-card { padding: 22px 18px; border-radius: 20px; }
  .error-main { padding-right: 16px; padding-left: 16px; }
  .error-code { font-size: clamp(4.5rem, 20vw, 6rem); }
}

@media (max-width: 380px) {
  .nav-home { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
