/* Header: compact proportions and a single, centered navigation group. */
.site-header {
  height: 82px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, #0f13192e 0%, #0f131918 56%, #0f131900 100%);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid #c4c8cf08;
  box-shadow: none;
  transition: background .26s ease, box-shadow .26s ease, border-color .26s ease, backdrop-filter .26s ease;
}
.site-header:not(.is-scrolled) nav {
  background: #ffffff00;
  border-color: #ffffff14;
}
.site-header:not(.is-scrolled) #account {
  background: #c4c8cf06;
  border-color: #c4c8cf30;
}
.site-header.is-scrolled {
  background: linear-gradient(180deg, #0f1319f5 0%, #0f1319e9 55%, #0f1319de 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: #c4c8cf16;
  box-shadow: 0 10px 28px #00000047;
}
.site-header .nav-shell {
  width: min(1160px, calc(100% - 64px));
  max-width: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
}
.site-header .header-brand { gap: 12px; justify-self: start; }
.header-wordmark { display: flex; align-items: center; }
/* Il fulmine della N scende sotto le altre lettere: si abbassa il logo così che sia la scritta, non il riquadro, a stare in asse col menu. */
.header-logo { display: block; height: 50px; width: auto; transform: translateY(10.8%); }
.header-wordmark b {
  display: inline-block;
  vertical-align: middle;
  margin-left: 5px;
  border: 1px solid #c4c8cf30;
  border-radius: 4px;
  padding: 4px 5px;
  font: 600 11px/1 'Segoe UI', Arial, sans-serif;
  letter-spacing: 1px;
}
.site-header nav {
  align-self: center;
  align-items: center;
  gap: 3px;
  border: 1px solid #ffffff0a;
  background: #ffffff03;
  border-radius: 9px;
  padding: 4px;
}
.site-header nav a {
  padding: 9px 16px;
  border-radius: 5px;
  color: #9da8a5;
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.site-header nav a:hover { color: var(--text); background: #ffffff05; }
.site-header nav a.active { color: #eef0f3; background: #c4c8cf12; box-shadow: inset 0 0 0 1px #c4c8cf14; }
.site-header nav a.active::after { display: none; }
.site-header #account {
  justify-self: end;
  gap: 9px;
  margin: 0;
  min-height: 40px;
  padding: 10px 15px;
  border: 1px solid #c4c8cf45;
  border-radius: 6px;
  background: #c4c8cf0e;
  color: #eef0f3;
}
.site-header #account:hover { background: #c4c8cf1c; border-color: #c4c8cf88; transform: none; }
.site-header #account .account-label { font-size: 11px; white-space: nowrap; }
.discord-icon { width: 16px; height: 16px; flex-shrink: 0; }
.site-header .menu-button { width: 36px; height: 36px; border: 1px solid #ffffff16; border-radius: 6px; padding: 10px 8px; }
.menu-button span { display: block; height: 1px; background: #d4d9d3; margin: 4px 0; transition: transform .2s; }
.menu-button[aria-expanded=true] span:first-child { transform: translateY(2.5px) rotate(45deg); }
.menu-button[aria-expanded=true] span:last-child { transform: translateY(-2.5px) rotate(-45deg); }
@media (max-width: 1000px) {
  .site-header .nav-shell { gap: 15px; width: calc(100% - 40px); }
  .site-header nav a { padding-inline: 11px; }
  .site-header #account { padding-inline: 11px; }
}
@media (max-width: 1050px) {
  .site-header { height: 72px; }
  .site-header .nav-shell { grid-template-columns: 1fr auto auto; gap: 12px; }
  .site-header .header-brand { gap: 9px; }
  .header-logo { height: 42px; }
  .site-header .menu-button { display: block; }
  .site-header nav {
    display: none;
    position: absolute;
    top: 71px;
    left: 0;
    right: 0;
    padding: 14px 20px 20px;
    border: 0;
    border-bottom: 1px solid #c4c8cf25;
    border-radius: 0;
    background: #0f1319f7;
    box-shadow: 0 18px 25px #0003;
  }
  .site-header nav.open { display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
  .site-header nav a { padding: 12px 15px; font-size: 13px; }
  .site-header #account .account-label { font-size: 10px; }
}
@media (max-width: 420px) {
  .site-header .nav-shell { width: calc(100% - 32px); gap: 9px; }
  .site-header .header-brand { gap: 7px; }
  .header-logo { height: 36px; }
  .header-wordmark b { margin-left: 2px; font-size: 10px; padding: 3px 4px; }
  .site-header #account { min-height: 36px; gap: 6px; padding: 8px; }
  .site-header #account .account-label { font-size: 9px; }
  .site-header #account.signed-in .account-label { max-width: 105px; overflow: hidden; text-overflow: ellipsis; }
  .discord-icon { width: 14px; height: 14px; }
  .site-header .menu-button { width: 32px; height: 34px; padding: 9px 7px; }
}

/* In cima alla pagina l'intestazione è trasparente: nella home l'immagine del castello sale sotto logo e menu.
   Lo sfondo scuro torna appena si scorre (classe is-scrolled). */
:root { --header-h: 82px; }
@media (max-width: 1050px) { :root { --header-h: 72px; } }
.site-header:not(.is-scrolled) { background: transparent; border-bottom-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* senza filtro sull'intestazione i pulsanti "a vetro" sfocano davvero l'immagine che sta dietro */
main > .hero:first-child { margin-top: calc(-1 * var(--header-h)); height: calc(650px + var(--header-h)); }
main > .hero:first-child .hero-content { padding-top: calc(76px + var(--header-h)); }
@media (min-width: 1500px) {
  main > .hero:first-child { height: calc(710px + var(--header-h)); }
  main > .hero:first-child .hero-content { padding-top: calc(100px + var(--header-h)); }
}
@media (max-width: 760px) {
  main > .hero:first-child { height: calc(670px + var(--header-h)); }
  main > .hero:first-child .hero-content { padding-top: calc(70px + var(--header-h)); }
}

/* Vetro fumé: vetro scuro e caldo con bordo dorato appena accennato (menu, pulsante account, pulsante ☰) */
.site-header .nav-shell nav,
.site-header .nav-shell #account,
.site-header .nav-shell .menu-button {
  background: linear-gradient(180deg, #0e1218a6, #0e121880);
  border: 1px solid #c4c8cf2e;
  border-radius: 12px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px #00000059, inset 0 1px 0 #ffffff12;
}
.site-header .nav-shell #account { border-color: #c4c8cf47; }
.site-header .nav-shell #account:hover { background: linear-gradient(180deg, #1a1e25b3, #14181ea6); border-color: #c4c8cf80; }
.site-header .nav-shell .menu-button:hover { background: linear-gradient(180deg, #1a1e25b3, #14181ea6); }
.site-header nav a:hover { background: #ffffff0d; color: #fff; }
.site-header nav a.active { color: #eef0f3; background: #c4c8cf1f; box-shadow: inset 0 0 0 1px #c4c8cf40; }
/* angoli concentrici: raggio del pulsante = raggio del menu (12px) - spazio interno (4px) - bordo (1px) */
.site-header nav a { border-radius: calc(12px - 4px - 1px); }
/* menu a tendina (schermi stretti): stesso vetro fumé ma più coprente per leggere bene le voci */
@media (max-width: 1050px) {
  .site-header .nav-shell nav { background: linear-gradient(180deg, #12161df0, #0e1218eb); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
}
/* chi preferisce meno trasparenze (impostazione del sistema) vede pulsanti pieni */
@media (prefers-reduced-transparency: reduce) {
  .site-header .nav-shell nav, .site-header .nav-shell #account, .site-header .nav-shell .menu-button { -webkit-backdrop-filter: none; backdrop-filter: none; background: #12161d; }
}

/* Schermi molto larghi: la sezione del castello cresce in altezza insieme alla larghezza (circa 40% della larghezza),
   così l'immagine 2:1 non viene tagliata sopra e sotto e il castello si vede intero. Il testo resta centrato in verticale. */
@media (min-width: 1500px) {
  main > .hero:first-child { height: calc(clamp(710px, 40vw, 1100px) + var(--header-h)); display: flex; align-items: center; }
  main > .hero:first-child .hero-content { padding-top: var(--header-h); padding-bottom: 40px; }
}
