/* ============================================================
   WARACCADEMY — /links (i link ufficiali, ex Linktree)
   Stesso linguaggio di NovaMetro «Blocks» (Minecraft × Apple):
   superfici PIENE, niente vetro/glow/gradienti, angoli 4-6 px o a
   scalini, un solo accento (il rosso del logo), font pixel NovaPixel
   per occhielli e numeri, «Minecraft Dungeons» per il titolo, e una
   transizione su ogni passaggio del mouse (lift, press, saltello).
   ============================================================ */

@font-face {
  font-family: "NovaPixel";
  src: url("fonts/NovaPixel.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Minecraft Dungeons";
  src: url("fonts/MinecraftDungeons.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e0e10;
  --bg-2: #17171a;
  --surface: #1b1b1e;
  --surface-2: #26262a;
  --border: #2e2e33;
  --border-2: #3e3e45;
  --edge: #050506;
  --text: #f5f5f7;
  --text-2: #b8b8bf;
  --text-3: #8b8b93;
  --red: #fa4653;
  --red-hover: #ff5b66;
  --red-edge: #a8242e;
  --green: #2fb457;
  --green-edge: #1e7a3a;
  --pixel: "NovaPixel", "Courier New", monospace;
  --caps: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wordmark: "Minecraft Dungeons", "NovaPixel", "Courier New", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --fast: 150ms;
  --med: 280ms;
  color-scheme: dark;
}

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

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--caps);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ── Testata: foto della hub che si muove, chiusa da un bordo a scalini ── */
.lk-hero {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: #120d18;
  isolation: isolate;
}
@media (min-width: 640px) { .lk-hero { height: 360px; } }

.lk-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  animation: lk-kenburns 38s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes lk-kenburns {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to   { transform: scale(1.14) translate3d(-2.5%, -2%, 0); }
}
/* velo PIENO (non una sfumatura): la foto resta nitida, solo più scura */
.lk-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 12, 0.5);
  z-index: 1;
}

/* scintille pixel che salgono */
.lk-sparks { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.lk-sparks i {
  position: absolute;
  bottom: -12px;
  left: var(--l, 50%);
  width: var(--s, 4px);
  height: var(--s, 4px);
  background: var(--c, #fff);
  opacity: 0;
  animation: lk-spark var(--d, 16s) linear var(--delay, 0s) infinite;
}
@keyframes lk-spark {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  8%   { opacity: 0.8; }
  85%  { opacity: 0.45; }
  100% { transform: translate3d(var(--x, 0px), -420px, 0); opacity: 0; }
}

.lk-hero-logo {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 46%;
  width: min(230px, 58vw);
  height: auto;
  translate: -50% -50%;
  animation: lk-grow 0.9s var(--spring) backwards, lk-breathe 4.5s ease-in-out 0.9s infinite;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.45));
}
@media (min-width: 640px) { .lk-hero-logo { width: 260px; top: 44%; } }
@keyframes lk-grow { from { transform: scale(0.8); } to { transform: scale(1); } }
@keyframes lk-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }

/* il bordo a scalini (terreno di Minecraft) con la riga rossa sopra */
.lk-divider {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: -1px;
  display: block;
  width: 100%;
  height: 60px;
  color: var(--bg);
}

/* ── Colonna dei contenuti ── */
.lk-main {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 6px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ingresso a cascata (alzata + dissolvenza leggera) */
.lk-rise { animation: lk-rise 0.6s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
@keyframes lk-rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.lk-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }

.lk-eyebrow {
  font-family: var(--pixel);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
}

.lk-title {
  font-family: var(--wordmark);
  font-weight: 400;
  font-size: clamp(30px, 9.4vw, 46px);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  --ec: #45454b;
  /* estrusione stile logo Minecraft: copie nette impilate in basso a sinistra */
  text-shadow:
    -0.01em 0.02em 0 var(--ec), -0.02em 0.04em 0 var(--ec), -0.03em 0.06em 0 var(--ec),
    -0.04em 0.08em 0 var(--ec), -0.05em 0.10em 0 var(--ec), -0.06em 0.12em 0 var(--ec),
    -0.07em 0.14em 0 var(--ec), -0.08em 0.16em 0 var(--ec);
  padding-bottom: 0.16em;
}
.lk-title .lk-war { color: var(--red); --ec: var(--red-edge); }
.lk-title small {
  display: block;
  margin-top: 0.85em;
  font-family: var(--pixel);
  font-size: 0.36em;
  letter-spacing: 0.42em;
  color: var(--text-2);
  text-shadow: none;
  padding-left: 0.42em; /* compensa la spaziatura dell'ultima lettera */
}

.lk-tagline { font-size: 16px; color: var(--text-2); max-width: 34ch; }
.lk-tagline strong { color: var(--text); font-weight: 800; }
.lk-tagline em { font-style: normal; color: var(--red); font-weight: 800; }

/* ── Riquadro del server: pannello scuro pieno, spia quadrata ── */
.lk-server {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 0 var(--edge);
  padding: 16px;
  display: grid;
  gap: 14px;
}
.lk-server-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.lk-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
}
.lk-led { width: 10px; height: 10px; background: var(--text-3); box-shadow: 0 2px 0 var(--edge); flex-shrink: 0; }
.lk-server[data-stato="online"] .lk-led { background: var(--green); animation: lk-blink 1.6s linear infinite; }
.lk-server[data-stato="online"] .lk-state { color: #7ee2a0; }
.lk-server[data-stato="offline"] .lk-led { background: var(--red); }
.lk-server[data-stato="offline"] .lk-state { color: #ff8a93; }
/* spia a scatti (due stati netti, nessuna dissolvenza) */
@keyframes lk-blink { 0%, 59.9% { opacity: 1; } 60%, 100% { opacity: 0.35; } }

.lk-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  font-family: var(--pixel);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-2);
}

.lk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lk-stat {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 12px 10px;
  min-width: 0;
}
.lk-num {
  display: block;
  font-family: var(--pixel);
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lk-num-label {
  display: block;
  margin-top: 4px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* IP + copia */
.lk-ip { display: flex; gap: 10px; align-items: stretch; }
.lk-ip-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.lk-ip-box span { font-weight: 700; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); }
.lk-ip-box code {
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}

/* bottone a blocco (spigolo inferiore pieno che si alza e si "preme") */
.lk-btn {
  --btn-edge: var(--red-edge);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 128px;
  height: 52px;
  padding: 0 16px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 0 var(--btn-edge);
  transform: translateY(0);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background-color var(--fast);
  user-select: none;
}
.lk-btn:hover { background: var(--red-hover); transform: translateY(-2px); box-shadow: 0 6px 0 var(--btn-edge); }
.lk-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--btn-edge); transition-duration: 60ms; }
.lk-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.lk-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.lk-btn .lk-ico-ok { display: none; }
.lk-btn.is-copied { --btn-edge: var(--green-edge); background: var(--green); }
.lk-btn.is-copied .lk-ico-copy { display: none; }
.lk-btn.is-copied .lk-ico-ok { display: block; animation: lk-pop 0.45s var(--spring); }
@keyframes lk-pop { 0% { transform: scale(0.3); } 100% { transform: scale(1); } }

/* ── Elenco dei link ── */
.lk-section-head { display: flex; align-items: center; gap: 12px; }
.lk-section-head::after { content: ""; flex: 1; height: 2px; background: var(--border); }
.lk-down { width: 14px; height: 14px; color: var(--red); animation: lk-bob 1.2s steps(2, jump-none) infinite; flex-shrink: 0; }
@keyframes lk-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

.lk-list { display: flex; flex-direction: column; gap: 14px; list-style: none; }

.lk-link {
  --brand: var(--red);
  --brand-edge: var(--red-edge);
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 12px 16px 12px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 0 var(--edge);
  transform: translateY(0);
  transition: transform var(--med) var(--ease), box-shadow var(--med) var(--ease), border-color var(--med), background-color var(--med);
}
.lk-link:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: 0 7px 0 var(--brand-edge);
  background: var(--surface-2);
}
.lk-link:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--brand-edge); transition-duration: 60ms; }
.lk-link:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.lk-tile {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  background: var(--brand);
  color: #fff;
  border-radius: 4px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22);
}
.lk-tile svg { width: 26px; height: 26px; margin-top: -2px; }
.lk-link:hover .lk-tile svg { animation: lk-hop 0.5s var(--spring); }
@keyframes lk-hop { 0% { transform: translateY(0); } 40% { transform: translateY(-5px) scale(1.06); } 100% { transform: translateY(0); } }

.lk-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lk-name {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.25;
}
.lk-sub { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-sub b { color: var(--text-2); font-weight: 700; }
/* da telefono il numero dei membri basta: l'indirizzo verrebbe tagliato a metà */
@media (max-width: 430px) { .lk-host { display: none; } }

.lk-arrow {
  flex-shrink: 0;
  font-family: var(--pixel);
  font-size: 18px;
  color: var(--text-3);
  transition: transform var(--med) var(--spring), color var(--med);
}
.lk-link:hover .lk-arrow { transform: translateX(5px); color: var(--brand); }

/* colori dei marchi (pieni, nessuna sfumatura) */
.lk-link--sito      { --brand: var(--red);  --brand-edge: var(--red-edge); }
.lk-link--telegram  { --brand: #229ed9;     --brand-edge: #17729e; }
.lk-link--discord   { --brand: #5865f2;     --brand-edge: #3c45b5; }
.lk-link--tiktok    { --brand: #111111;     --brand-edge: #000000; }
.lk-link--instagram { --brand: #e1306c;     --brand-edge: #a11f4c; }
.lk-link--tiktok .lk-tile { border: 1px solid #34343a; }
.lk-link--tiktok:hover { border-color: #fe2c55; box-shadow: 0 7px 0 #25f4ee; }
/* il TikTok "sdoppiato" ma a ombre nette, senza bagliore */
.lk-link--tiktok .lk-tile svg { filter: drop-shadow(-1.5px -1.5px 0 #25f4ee) drop-shadow(1.5px 1.5px 0 #fe2c55); }

/* ── Piede ── */
.lk-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
}
.lk-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
.lk-foot nav a, .lk-foot nav button {
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: color var(--fast), background-size var(--med) var(--ease);
  padding-bottom: 2px;
}
.lk-foot nav a:hover, .lk-foot nav button:hover { color: var(--text); background-size: 100% 1px; }
.lk-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color var(--fast);
}
.lk-back span { font-family: var(--pixel); transition: transform var(--med) var(--spring); }
.lk-back:hover { color: var(--text); }
.lk-back:hover span { transform: translateX(-5px); }

@media (max-width: 380px) {
  .lk-ip { flex-direction: column; }
  .lk-btn { width: 100%; }
  .lk-num { font-size: 22px; }
}
