:root {
  --bg: #050505;
  --paper: #dedbd2;
  --muted: #8c8982;
  --red: #8f1717;
  --red-bright: #d32121;
  --line: rgba(222, 219, 210, .72);
  --line-soft: rgba(222, 219, 210, .16);
  --font-display: "Barlow Condensed", sans-serif;
  --font-mono: "Space Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--paper);
}

body {
  overflow: hidden;
  font-family: var(--font-mono);
  letter-spacing: .08em;
}

button, a { font: inherit; }

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(rgba(0,0,0,.78), rgba(0,0,0,.84)),
    url("../assets/mortecattiva-bg.png") center / cover no-repeat;
  filter: grayscale(1) contrast(1.18);
  transform: scale(1.04);
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 20;
  pointer-events: none;
  opacity: .13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  animation: grain .22s steps(2) infinite;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 19;
  pointer-events: none;
  background: radial-gradient(circle, transparent 38%, rgba(0,0,0,.78) 100%);
}

.site-header, .site-footer {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 34px;
  font-size: 9px;
  text-transform: uppercase;
}

.site-header { top: 0; }
.site-footer { bottom: 0; align-items: center; }

.micro-brand {
  display: grid;
  gap: 3px;
  color: var(--paper);
  line-height: 1.1;
}

.micro-brand span:first-child {
  letter-spacing: .35em;
  font-weight: 700;
}

.micro-brand span:not(:first-child) { color: var(--muted); }

.header-status {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--red-bright);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--red-bright);
  animation: pulse 1.8s infinite;
}

.portal {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.coordinates, .side-copy {
  position: absolute;
  color: rgba(222,219,210,.48);
  font-size: 8px;
  line-height: 1.9;
  text-transform: uppercase;
}

.coordinates { top: 112px; left: 50%; transform: translateX(-50%); }
.side-copy.left { left: 34px; top: 50%; transform: translateY(-50%); }

.sigil {
  position: relative;
  width: min(74vh, 720px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.sigil-ring {
  position: absolute;
  inset: 4%;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  pointer-events: none;
}

.ring-a {
  border: 2px solid rgba(211,33,33,.94);
  box-shadow: 0 0 24px rgba(211,33,33,.24);
}

.ring-b {
  inset: 7%;
  border: 1.5px dashed rgba(211,33,33,.62);
}

.sigil-logo {
  position: absolute;
  inset: 9%;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(211,33,33,.28));
  transition: filter .4s;
}

.sigil-stroke {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--length);
  height: clamp(1px, .18vw, 1.8px);
  border-radius: 2px;
  background: var(--red-bright);
  transform: rotate(var(--angle));
  transform-origin: left center;
}

/* Tracciato CSS del simbolo: conserva l'intreccio, senza il bordo circolare. */
.line-a { --x: 28%; --y: 6%; --length: 75.3%; --angle: 100.7deg; }
.line-b { --x: 28%; --y: 6%; --length: 94.6%; --angle: 76.6deg; }
.line-c { --x: 72%; --y: 6%; --length: 94.6%; --angle: 103.4deg; }
.line-d { --x: 72%; --y: 6%; --length: 75.3%; --angle: 79.3deg; }
.line-e { --x: 4%; --y: 34%; --length: 92%; --angle: 0deg; }
.line-f { --x: 4%; --y: 34%; --length: 94%; --angle: 29.3deg; }
.line-g { --x: 96%; --y: 34%; --length: 94%; --angle: 150.7deg; }

.sigil:has(.menu-node:hover) .sigil-logo {
  filter: drop-shadow(0 0 7px rgba(211,33,33,.4));
}

.portal-menu { position: absolute; inset: 0; }

.menu-node {
  position: absolute;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: rgba(5,5,5,.76);
  border: 1px solid rgba(222,219,210,.52);
  border-radius: 50%;
  transition: transform .35s ease, border-color .35s, background .35s, box-shadow .35s;
  z-index: 5;
}

.menu-node::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: border-color .35s;
}

.menu-node:hover,
.menu-node:focus-visible {
  background: var(--red);
  border-color: var(--paper);
  box-shadow: 0 0 28px rgba(143,23,23,.6);
  outline: none;
}

.menu-node:hover::before,
.menu-node:focus-visible::before { border-color: rgba(211,33,33,.7); }

.node-symbol {
  color: var(--red-bright);
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", serif;
  font-size: 23px;
  line-height: 1;
  text-shadow: 0 0 9px rgba(211,33,33,.46);
}
.menu-node:hover .node-symbol,
.menu-node:focus-visible .node-symbol { color: var(--paper); }
.node-label {
  position: absolute;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: .25em;
  font-weight: 700;
  opacity: .9;
  transition: opacity .25s ease;
}

@media (min-width: 701px) {
  .node-label { opacity: 0; }
  .menu-node:hover .node-label,
  .menu-node:focus-visible .node-label { opacity: .9; }
}

.node-musica {
  left: 50%;
  top: 89.36%;
  transform: translate(-50%, -50%);
}
.node-musica .node-label {
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
}

/* Centri dei pulsanti allineati ai cinque vertici del tracciato CSS. */
.node-video {
  left: 12.28%;
  top: 36.88%;
  transform: translate(-50%, -50%);
}
.node-video .node-label {
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
}

.node-progetti {
  left: 31.96%;
  top: 13.92%;
  transform: translate(-50%, -50%);
}
.node-progetti .node-label {
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
}

.node-contatti {
  left: 68.04%;
  top: 13.92%;
  transform: translate(-50%, -50%);
}
.node-contatti .node-label {
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
}

.node-bio {
  left: 87.72%;
  top: 36.88%;
  transform: translate(-50%, -50%);
}
.node-bio .node-label {
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
}

.menu-node { backdrop-filter: blur(5px); }
.menu-node:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 5px; }

.drawer {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3,3,3,.93);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, visibility .45s;
}

.drawer.open {
  opacity: 1;
  visibility: visible;
}

.drawer[aria-hidden="true"] { pointer-events: none; }

.drawer-inner {
  width: min(760px, 82vw);
  max-height: 78vh;
  overflow: auto;
  padding: 50px;
  border: 1px solid rgba(222,219,210,.2);
  background: rgba(10,10,10,.72);
  box-shadow: 0 0 80px rgba(0,0,0,.75);
  transform: translateY(25px);
  transition: transform .55s cubic-bezier(.2,.8,.2,1);
}

.drawer.open .drawer-inner { transform: translateY(0); }

.drawer-close {
  position: fixed;
  top: 25px;
  right: 30px;
  background: transparent;
  color: var(--paper);
  font-size: 36px;
  font-weight: 200;
}

.drawer-kicker {
  color: var(--red-bright);
  font-size: 8px;
  letter-spacing: .3em;
}

.drawer h1 {
  margin: 14px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(58px, 9vw, 120px);
  line-height: .78;
  text-transform: uppercase;
  letter-spacing: -.04em;
}

.drawer-line {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, var(--red), transparent);
  margin-bottom: 28px;
}

.drawer-copy {
  color: #aaa79f;
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: .06em;
}

.drawer-copy a {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: rgba(211,33,33,.7);
  text-underline-offset: .22em;
  transition: color .2s, text-decoration-color .2s;
}

.drawer-copy a:hover,
.drawer-copy a:focus-visible {
  color: var(--red-bright);
  text-decoration-color: currentColor;
}

.drawer-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 30px auto 0;
  border: 1px solid rgba(222,219,210,.2);
}

.music-services {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 30px;
}

.music-services a {
  padding: 11px 14px;
  border: 1px solid rgba(222,219,210,.34);
  color: var(--paper);
  font-size: 9px;
  letter-spacing: .16em;
  transition: border-color .2s, color .2s, background .2s;
}

.music-services a:hover {
  border-color: var(--red-bright);
  color: var(--red-bright);
  background: rgba(143,23,23,.12);
}

.discography-kicker {
  margin: 26px 0 0;
  color: var(--red-bright);
  font-size: 9px;
  letter-spacing: .24em;
}

.release {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  text-transform: uppercase;
}

.release strong { min-width: 0; overflow-wrap: anywhere; font-family: var(--font-display); font-size: 25px; letter-spacing: .02em; }
.release span { color: var(--muted); font-size: 9px; align-self: center; }
.release a { color: var(--paper); font-size: 9px; align-self: center; letter-spacing: .04em; }
.release a:hover { color: var(--red-bright); }
.release-actions { display: flex; align-items: center; justify-self: end; gap: 8px; white-space: nowrap; }
.release-actions .release-action-separator { color: var(--muted); font-size: 9px; }

.video-embed { margin-top: 24px; }
.video-embed-heading { grid-template-columns: 1fr; margin: 0; }
.video-embed-frame {
  position: relative;
  width: 100%;
  max-width: min(100%, 560px);
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(222,219,210,.2);
  background: #050505;
}
.video-embed-frame iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  border: 0;
}

.contact-mail-row { grid-template-columns: 1fr; gap: 10px; }
.contact-mail-row a { justify-self: start; font-size: 13px; }
.contact-social-row { grid-template-columns: 1fr; gap: 10px; }
.contact-social-links { display: flex; flex-wrap: wrap; gap: 16px 38px; }
.contact-social-links a { color: var(--muted); font-size: 11px; transition: color .2s; }
.contact-social-links a:hover { color: var(--red-bright); }

.project-heading { margin-top: 20px; }
.gallery-artwork a:focus-visible { outline: 1px solid var(--red-bright); outline-offset: 4px; }

.cazzavaggio-gallery {
  columns: 2 180px;
  column-gap: 12px;
  margin-top: 22px;
}

.gallery-artwork {
  break-inside: avoid;
  margin: 0 0 12px;
  padding: 6px;
  border: 1px solid rgba(222,219,210,.18);
  background: rgba(222,219,210,.035);
}

.gallery-artwork a { display: block; }
.gallery-artwork img { display: block; width: 100%; height: auto; }
.gallery-artwork figcaption {
  padding-top: 8px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .16em;
}

.socials { display: flex; gap: 15px; }
.site-footer .socials { gap: 20px; }
.site-footer .socials a { font-size: 12px; }
.socials a {
  color: var(--muted);
  transition: color .2s;
}
.socials a:hover { color: var(--paper); }

[hidden] { display: none !important; }

.cookie-settings-link {
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .12em;
  transition: color .2s;
}

.cookie-settings-link:hover,
.cookie-settings-link:focus-visible { color: var(--paper); }

.cookie-panel {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 26px;
  width: min(680px, calc(100vw - 36px));
  max-height: min(82vh, 620px);
  overflow: auto;
  padding: 24px 26px 20px;
  transform: translateX(-50%);
  border: 1px solid rgba(211,33,33,.72);
  background: rgba(8,8,8,.97);
  box-shadow: 0 14px 70px rgba(0,0,0,.8), 0 0 30px rgba(143,23,23,.12);
  color: var(--paper);
}

.cookie-feedback {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 24px;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 12px 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(211,33,33,.72);
  background: rgba(8,8,8,.97);
  box-shadow: 0 10px 40px rgba(0,0,0,.75);
  color: var(--paper);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: .12em;
  text-align: center;
}

.cookie-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--red-bright);
  font-size: 8px;
  letter-spacing: .2em;
}

.cookie-panel-heading span:last-child { color: var(--muted); }

.cookie-panel h2 {
  margin: 13px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(27px, 4vw, 38px);
  line-height: .95;
  letter-spacing: .01em;
}

.cookie-copy {
  max-width: 76ch;
  margin: 0;
  color: #aaa79f;
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: .035em;
}

.cookie-options {
  margin-top: 15px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.cookie-toggle {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 4px 10px;
  cursor: pointer;
}

.cookie-toggle input {
  grid-row: span 2;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--red-bright);
}

.cookie-toggle-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
}

.cookie-toggle-description {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: .035em;
}

.cookie-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.cookie-button,
.video-consent-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(222,219,210,.32);
  background: transparent;
  color: var(--paper);
  font-size: 8px;
  letter-spacing: .1em;
  transition: border-color .2s, color .2s, background .2s;
}

.cookie-button:hover,
.cookie-button:focus-visible,
.video-consent-button:hover,
.video-consent-button:focus-visible {
  border-color: var(--red-bright);
  color: var(--paper);
  outline: 1px solid var(--red-bright);
  outline-offset: 2px;
}

.cookie-button-primary {
  border-color: var(--red-bright);
  background: var(--red);
}

.cookie-button-primary:hover,
.cookie-button-primary:focus-visible { background: var(--red-bright); }

.video-consent-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  background: radial-gradient(ellipse, rgba(143,23,23,.16), transparent 72%), #080808;
}

.video-consent-placeholder p {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: .06em;
}

@keyframes pulse {
  50% { opacity: .35; transform: scale(.75); }
}
@keyframes grain {
  0% { transform: translate(0,0); }
  25% { transform: translate(2%,-1%); }
  50% { transform: translate(-1%,2%); }
  75% { transform: translate(1%,1%); }
  100% { transform: translate(0,0); }
}
@media (max-width: 700px) {
  body::before {
    background-position: 55% center;
  }

  .site-header, .site-footer {
    padding: 18px;
  }

  .site-footer .socials { gap: 15px; }
  .site-footer .socials a { font-size: 9px; }
  .cookie-settings-link { font-size: 8px; }

  .cookie-panel {
    bottom: 14px;
    width: calc(100vw - 24px);
    max-height: 86vh;
    padding: 19px 18px 16px;
  }

  .cookie-feedback { bottom: 14px; }

  .cookie-panel-heading { font-size: 7px; }
  .cookie-copy { font-size: 9px; }
  .cookie-actions { justify-content: stretch; }
  .cookie-button { flex: 1 1 auto; padding-inline: 9px; }

  .header-status { display: none; }
  .coordinates, .side-copy { display: none; }

  .sigil {
    width: min(94vw, 560px);
  }

  .menu-node {
    width: 54px;
    height: 54px;
  }

  .node-symbol { font-size: 21px; }

  .node-label { font-size: 9px; }

  .node-musica .node-label {
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
  }

  .node-video .node-label {
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
  }

  .node-progetti .node-label {
    bottom: 71px;
    left: 50%;
    transform: translateX(-50%);
  }

  .node-contatti .node-label {
    bottom: 71px;
    left: 50%;
    transform: translateX(-50%);
  }

  .node-bio .node-label {
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
  }

  .drawer-inner {
    width: 90vw;
    padding: 28px;
  }

  .release { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .release-actions { justify-self: start; }

  .drawer h1 { font-size: 70px; }
}

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