/* ═══════════════════════════════════════════════════════════
   CHINESE ROCKS — font locale
   Metti i file nella cartella assets/fonts/
   Download gratuito: https://www.dafont.com/chinese-rocks.font
   ═══════════════════════════════════════════════════════════ */
@font-face {
  font-family: 'Chinese Rocks';
  src: url('assets/fonts/ChineseRocksRg.woff2') format('woff2'),
       url('assets/fonts/ChineseRocksRg.woff')  format('woff'),
       url('assets/fonts/ChineseRocksRg.ttf')   format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ═══════════════════════════════════════════════════════════
   TOKEN DI DESIGN
   ═══════════════════════════════════════════════════════════ */
:root {
  --void:         #0a0a0a;      /* sfondo principale         */
  --void-2:       #0d0808;      /* sfondo card/fallback      */
  --crimson:      #9b0000;      /* rosso principale          */
  --blood:        #c01a00;      /* rosso hover / attivo      */
  --ember:        rgba(155, 0, 0, 0.55);
  --ember-faint:  rgba(155, 0, 0, 0.08);
  --bone:         #ececec;      /* testo principale          */
  --ash:          #ececec;      /* testo secondario muted    */
  --ash-light:    #ececec;      /* bio text                  */
  --border:       rgba(155, 0, 0, 0.20);
  --border-hot:   rgba(192, 26, 0, 0.65);

  --font-display: 'Chinese Rocks', 'Teko', 'Impact', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 3px;
  --ease:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur:    0.28s;
}

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; }
a   { text-decoration: none; }

/* ═══════════════════════════════════════════════════════════
   CANVAS STELLE
   ═══════════════════════════════════════════════════════════ */
#stars {
  position: sticky;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   GLOW AMBIENTALE
   ═══════════════════════════════════════════════════════════ */
.ambient-glow {
  position: fixed;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(72vw, 620px);
  height: min(72vw, 620px);
  background: radial-gradient(ellipse at center,
    rgba(120, 0, 0, 0.18) 0%,
    rgba(80, 0, 0, 0.07)  45%,
    transparent           72%);
  pointer-events: none;
  z-index: 0;
  animation: breathe 5.5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.65; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1;    transform: translate(-50%, -50%) scale(1.1); }
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT PAGINA
   ═══════════════════════════════════════════════════════════ */
.page {
  position: fixed;
  z-index: 1;
  max-width: 500px;
  margin: 0 auto;
  padding: 24px 24px 88px;
  display: relative;
  flex-direction: column;
  align-items: center;
}

/* ═══════════════════════════════════════════════════════════
   PROFILO
   ═══════════════════════════════════════════════════════════ */
.profile {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
}

/* Avatar ring con glow pulsante */
.avatar-ring {
  position: relative;
  width: 150px;
  height: 150px;
  margin-bottom: 10px;
}

.avatar-ring::before {
  content: '';
  position: relative;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155,0,0,0.6) 0%, transparent 68%);
  animation: breathe 3.8s ease-in-out infinite;
  z-index: 0;
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 1.5px solid var(--crimson);
  position: relative;
  z-index: 1;
  filter: saturate(0.82) contrast(1.06);
}

.avatar-fallback {
  display: none;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 1.5px solid var(--crimson);
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--crimson);
  background: var(--void-2);
  position: relative;
  z-index: 1;
}

/* Nome principale */
.name {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 10px;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
  text-shadow:
    0 0 22px rgba(200, 30, 0, 0.50),
    0 0 55px rgba(155, 0, 0, 0.22);
}

/* Tag brand */
.brand-tag {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--ash-light);
}

.brand-tag span {
  color: var(--blood);
}

/* Bio */
.bio {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 300;
  color: #fff;
  line-height: 1.70;
  max-width: 290px;
  letter-spacing: 0.01em;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   DIVISORE
   ═══════════════════════════════════════════════════════════ */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--crimson) 50%,
    transparent 100%);
  opacity: 0.30;
  margin: 4px 0 28px;
}

/* ═══════════════════════════════════════════════════════════
   LINK BUTTONS
   ═══════════════════════════════════════════════════════════ */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  background: var(--ember-faint);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--bone);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color var(--dur) var(--ease),
    background   var(--dur) var(--ease),
    transform    var(--dur) var(--ease),
    box-shadow   var(--dur) var(--ease);
}

/* Accent line sinistra */
.link-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: var(--blood);
  transform: scaleY(0);
  transform-origin: bottom center;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Sweep di luce al hover */
.link-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    rgba(155,0,0,0.14) 0%,
    transparent        60%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}

.link-btn:hover,
.link-btn:focus-visible {
  border-color: var(--border-hot);
  background: rgba(155, 0, 0, 0.12);
  box-shadow: 0 0 24px rgba(155, 0, 0, 0.14);
  transform: translateX(5px);
}

.link-btn:hover::before,
.link-btn:focus-visible::before {
  transform: scaleY(1);
}

.link-btn:hover::after {
  opacity: 1;
}

.link-btn:active {
  transform: translateX(3px) scale(0.99);
}

/* Variante featured (prima voce) */
.link-btn.featured {
  padding: 18px 20px;
  background: rgba(155, 0, 0, 0.13);
  border-color: rgba(192, 26, 0, 0.40);
}

.link-btn.featured:hover {
  background: rgba(155, 0, 0, 0.22);
  box-shadow: 0 0 32px rgba(155, 0, 0, 0.20);
}

/* Icona */
.link-icon {
  font-size: 0.95rem;
  color: var(--blood);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Label testo */
.link-label {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone);
  position: relative;
  z-index: 1;
}

/* Freccia */
.link-arrow {
  color: var(--crimson);
  opacity: 0.45;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.link-btn:hover .link-arrow {
  opacity: 1;
  transform: translate(3px, -2px);
}

/* ═══════════════════════════════════════════════════════════
   ICONE SOCIAL
   ═══════════════════════════════════════════════════════════ */
.socials {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: #fff;
  font-size: 1rem;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color var(--dur) var(--ease),
    color        var(--dur) var(--ease),
    box-shadow   var(--dur) var(--ease),
    transform    var(--dur) var(--ease);
}

.social-btn:hover,
.social-btn:focus-visible {
  border-color: var(--blood);
  color: var(--blood);
  box-shadow: 0 0 16px rgba(155, 0, 0, 0.28);
  transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════════════════
   BOTTONE SHARE
   ═══════════════════════════════════════════════════════════ */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.share-btn:hover,
.share-btn:focus-visible {
  border-color: var(--border-hot);
  color: var(--blood);
  box-shadow: 0 0 16px rgba(155,0,0,0.14);
}

.share-btn i {
  font-size: 0.9rem;
}

.share-feedback {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blood);
  height: 18px;
  margin-bottom: 24px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.share-feedback.show {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.page-footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-copy {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 1;
}

.footer-url {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--crimson);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   RIPPLE CLICK
   ═══════════════════════════════════════════════════════════ */
.ripple-fx {
  position: absolute;
  border-radius: 50%;
  background: rgba(200, 0, 0, 0.22);
  width: 130px;
  height: 130px;
  margin: -65px;
  pointer-events: none;
  z-index: 10;
  animation: ripple 0.7s ease-out forwards;
}

@keyframes ripple {
  0%   { transform: scale(0);   opacity: 0.85; }
  100% { transform: scale(4);   opacity: 0;    }
}

/* ═══════════════════════════════════════════════════════════
   FADE-IN ALL'ENTRATA
   ═══════════════════════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.58s ease, transform 0.58s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   SCROLLBAR PERSONALIZZATA
   ═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--crimson); border-radius: 2px; }

/* ═══════════════════════════════════════════════════════════
   FOCUS ACCESSIBILE
   ═══════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 1px solid var(--blood);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════
   RIDUZIONE MOVIMENTO
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .ambient-glow,
  .avatar-ring::before {
    animation: none;
  }
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .page {
    padding: 44px 16px 64px;
  }
  .link-label {
    font-size: 1rem;
    letter-spacing: 0.12em;
  }
  .socials {
    gap: 10px;
  }
  .social-btn {
    width: 40px;
    height: 40px;
  }
}
