/* ================================================
   nam-index.css  —  index / coming soon page
   ================================================ */

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* TV noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  opacity: 0.08;
  pointer-events: none;
  z-index: 99;
}

@keyframes flicker {
  0%, 97%, 100% { opacity: 1; }
  98% { opacity: 0.85; }
  99% { opacity: 0.95; }
}

body::before { animation: flicker 8s infinite; }

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 24px;
  position: relative;
  z-index: 10;
  margin-top: -40px;
}

@media (max-width: 700px) {
  .container { margin-top: 0; }
}

.logo-wrap img  { width: min(700px, 90vw); animation: glitch-base 4s infinite; }
.logo-wrap::before { animation: glitch-r 4s infinite; }
.logo-wrap::after  { animation: glitch-b 4s infinite; }

.logo-wrap .tear {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: rgba(255,50,50,0.9);
  z-index: 4;
  animation: tear-move 4s infinite;
  opacity: 0;
}

@keyframes glitch-base {
  0%, 90%, 100% { transform: none; filter: none; }
  91% { transform: skewX(-2deg) translateX(2px);  filter: brightness(1.1); }
  92% { transform: skewX(2deg)  translateX(-2px); }
  93% { transform: none; }
  94% { transform: skewX(-1deg) translateX(4px);  filter: brightness(0.9); }
  95% { transform: none; filter: none; }
}

@keyframes glitch-r {
  0%, 89%, 100% { opacity: 0; transform: none; }
  90% { opacity: .7; transform: translateX(-6px) translateY(2px);  clip-path: inset(20% 0 60% 0); }
  91% { opacity: .5; transform: translateX(4px)  translateY(-1px); clip-path: inset(50% 0 10% 0); }
  92% { opacity: .8; transform: translateX(-3px);                  clip-path: inset(10% 0 80% 0); }
  93% { opacity: 0; }
  95% { opacity: .6; transform: translateX(8px);                   clip-path: inset(70% 0  5% 0); }
  96% { opacity: 0; }
}

@keyframes glitch-b {
  0%, 89%, 100% { opacity: 0; transform: none; }
  90% { opacity: .5; transform: translateX(6px)  translateY(-2px); clip-path: inset(60% 0 10% 0); }
  91% { opacity: .6; transform: translateX(-4px);                  clip-path: inset(10% 0 60% 0); }
  92% { opacity: 0; }
  94% { opacity: .7; transform: translateX(-8px) translateY(3px);  clip-path: inset(40% 0 40% 0); }
  95% { opacity: 0; }
}

@keyframes tear-move {
  0%, 89%, 100% { opacity: 0; }
  90% { opacity: 1;   top: 30%; }
  91% { opacity: 0;   top: 60%; }
  93% { opacity: 0.8; top: 15%; }
  94% { opacity: 0; }
}

/* ── Typewriter ── */
.message { text-align: center; line-height: 1.4; margin-top: -20px; }

.typewriter-line {
  font-family: 'VT323', monospace;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: #fff;
  letter-spacing: .1em;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  border-right: 3px solid transparent;
  animation:
    typing-main   1.8s steps(20) 0.8s forwards,
    blink-caret   0.75s step-end 0.8s 3,
    caret-shrink  0.45s ease     3.1s forwards;
}

.typewriter-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.65rem, 1.6vw, .85rem);
  color: rgba(255,255,255,.45);
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: 0;
  animation: sub-pulse 7s ease-in-out 4s infinite;
  margin-top: 4px;
}

@keyframes sub-pulse {
  0%, 100% { color: rgba(255,255,255,.35); }
  50%       { color: rgba(255,255,255,.75); }
}

@keyframes typing-main  { from { width: 0; } to { width: 100%; } }

@keyframes blink-caret  {
  from, to { border-color: transparent; }
  50%      { border-color: var(--red); }
}

@keyframes caret-shrink {
  0%   { border-right: 3px solid var(--red); }
  50%  { border-right: 2px solid rgba(220,0,0,.5); }
  100% { border-right: 0px solid transparent; }
}

/* ── Signal bars ── */
.signal {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 20px;
  opacity: 0;
  animation: fade-in .5s ease 3.5s forwards;
}

.signal span {
  width: 6px;
  background: var(--red);
  border-radius: 1px;
  animation: signal-pulse 1.5s ease-in-out infinite;
}

.signal span:nth-child(1) { height: 4px;  animation-delay: 0s; }
.signal span:nth-child(2) { height: 8px;  animation-delay: .15s; }
.signal span:nth-child(3) { height: 12px; animation-delay: .3s; }
.signal span:nth-child(4) { height: 16px; animation-delay: .45s; }
.signal span:nth-child(5) { height: 20px; animation-delay: .6s; }

@keyframes signal-pulse {
  0%, 100% { opacity: .3; }
  50%       { opacity: 1; }
}

.signal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fade-in .5s ease 3.5s forwards;
  margin-top: 16px;
}

.signal-label {
  font-size: .65rem;
  letter-spacing: .2em;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
}

/* ── Archive link ── */
.archive-link {
  display: inline-block;
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(.65rem, 1.6vw, .8rem);
  color: rgba(255,255,255,.3);
  text-decoration: none;
  letter-spacing: .25em;
  text-transform: uppercase;
  margin-top: 18px;
  padding: 8px 20px 8px 16px;
  border: none;
  position: relative;
  opacity: 1;
  transition: color .2s;
  overflow: hidden;
  isolation: isolate;
}

.archive-link .scanline {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: rgba(255,60,60,.6);
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}

@keyframes link-pulse {
  0%, 100% { color: rgba(255,255,255,.25); }
  50%       { color: rgba(255,255,255,.65); }
}

.archive-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
  z-index: -1;
}

.archive-link:hover {
  color: #fff !important;
  text-shadow: 0 0 8px rgba(255,50,50,.8);
  animation: link-glitch .3s steps(1) forwards;
  opacity: 1;
}

.archive-link:hover::before { transform: scaleX(1); }

@keyframes link-glitch {
  0%   { transform: none; }
  20%  { transform: skewX(-4deg) translateX(3px); }
  40%  { transform: skewX(3deg)  translateX(-2px); }
  60%  { transform: translateX(2px); }
  80%  { transform: skewX(-1deg); }
  100% { transform: none; }
}

/* ── Timestamp ── */
.timestamp {
  position: fixed;
  bottom: 20px; right: 24px;
  font-size: .65rem;
  color: rgba(255,255,255,.2);
  letter-spacing: .15em;
  font-family: 'Share Tech Mono', monospace;
  z-index: 10;
}

/* ── Nav in home ── */
.home-nav {
  position: relative;
  z-index: 20;
  width: 100%;
  background: rgba(10,10,10,.95);
  border-bottom: none;
}

.home-nav .nam-nav-inner {
  justify-content: center;
  height: auto;
  padding: 12px 40px;
}

@media (max-width: 700px) {
  .home-nav .nam-nav-inner {
    padding: 25px 20px;
  }
}

.home-nav .nav-links {
  flex: 0 0 auto;
  justify-content: center;
}

/* Riga rossa sotto nav — larga come il contenuto, 1px */
.home-nav-separator {
  width: min(700px, 90vw);
  height: 1px;
  background: var(--red-dark);
  margin: 0 auto 20px;
}

/* ── Home news block extra padding ── */
.home-news-block {
  padding-bottom: 40px;
}
