/* ================================================
   nam-style.css  —  Note al Margine shared styles
   ================================================ */

/* ── Local fonts ── */
@font-face {
  font-family: 'VT323';
  src: url('../fonts/vt323.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'Share Tech Mono';
  src: url('../fonts/share-tech-mono.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-400i.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

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

:root {
  --red:      #cc0000;
  --red-dark: #880000;
  --white:    #ffffff;
  --grey:     #999999;
  --grey-dark:#2a2a2a;
  --black:    #0a0a0a;
  --card:     #111111;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Share Tech Mono', monospace;
  min-height: 100vh;
}

/* Scanlines overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.13) 2px,
    rgba(0,0,0,0.13) 4px
  );
  pointer-events: none;
  z-index: 200;
}

/* ── Logo glitch ── */
.logo-wrap {
  position: relative;
  display: inline-block;
}

.logo-wrap img {
  display: block;
  position: relative;
  z-index: 2;
}

.logo-wrap::before,
.logo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--logo-url);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  z-index: 3;
  pointer-events: none;
}

.logo-wrap::before {
  mix-blend-mode: screen;
  filter: hue-rotate(180deg) saturate(3);
}

.logo-wrap::after {
  mix-blend-mode: screen;
  filter: hue-rotate(270deg) saturate(5) brightness(1.5);
}

/* ── REC / LIVE dot ── */
.rec {
  position: fixed;
  top: 20px; right: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .65rem;
  color: rgba(255,255,255,.4);
  letter-spacing: .2em;
  font-family: 'Share Tech Mono', monospace;
  z-index: 300;
}

.rec-dot {
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: rec-blink 1s step-end infinite;
}

@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes fade-in {
  to { opacity: 1; }
}

/* ── Shared nav (tutte le pagine interne) ── */
.nam-nav {
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: sticky;
  top: 0;
  background: rgba(10,10,10,.92);
  backdrop-filter: blur(4px);
  z-index: 250;
}

.nam-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 110px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo {
  height: 100px;
  width: auto;
  display: block;
  opacity: .85;
  transition: opacity .2s;
}

.nav-logo-link:hover .nav-logo { opacity: 1; }

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  align-items: center;
  flex: 1;
}

.nav-links a {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  text-decoration: none;
  padding: 8px 14px;
  transition: color .15s;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover  { color: rgba(255,255,255,.8); }
.nav-links a.active { color: var(--white); border-bottom-color: var(--red); }

/* ── Hamburger ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,.6);
  transition: transform .2s, opacity .2s, background .2s;
}

.nav-toggle:hover span { background: var(--white); }

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

/* ── Shared footer ── */
.nam-footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .70rem;
  color: rgba(255,255,255,.4);
  letter-spacing: .2em;
  text-transform: uppercase;
  font-family: 'Share Tech Mono', monospace;
}

.nam-footer a {
  color: rgba(255,255,255,.3);
  text-decoration: none;
  transition: color .15s;
}

.nam-footer a:hover { color: var(--red); }
.footer-sep { margin: 0 8px; }

@media (max-width: 700px) {
  .nam-nav-inner {
    padding: 0 16px;
    height: 64px;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
  }

  .nav-logo { height: 44px; }

  .nav-toggle { display: flex; }
  .nav-toggle { display: flex; position: absolute; left: 50%; transform: translateX(-50%); }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background: rgba(10,10,10,.97);
    border-top: 1px solid rgba(255,255,255,.06);
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    z-index: 300;
    padding: 8px 0 16px;
    box-sizing: border-box;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 10px 16px;
    font-size: .72rem;
    width: 100%;
    border-bottom: none;
    border-left: 2px solid transparent;
    white-space: nowrap;
    box-sizing: border-box;
    text-align: center;
  }

  .nav-links a.active { border-left-color: var(--red); }
  .nav-links { align-items: center; }
  .nav-links.open { border-bottom: 2px solid rgba(255,255,255,.07); }
}
