/* =========================================================
   angelocapozzi.space — Coming soon
   Il preloader del sito diventa la pagina: "angelocapozzi.space"
   si compone lettera per lettera cambiando carattere, si ferma
   in Neue Montreal Bold minuscolo e resta interattivo.
   ========================================================= */

/* Neue Montreal — Pangram Pangram Foundry (verificare la licenza web prima della pubblicazione) */
@font-face { font-family: 'Neue Montreal'; font-weight: 500; font-display: swap; src: url(../fonts/neue-montreal-500.woff2) format('woff2'); }
@font-face { font-family: 'Neue Montreal'; font-weight: 700; font-display: swap; src: url(../fonts/neue-montreal-700.woff2) format('woff2'); }
@font-face { font-family: 'NM Fallback'; src: local('Helvetica Neue'), local('HelveticaNeue'), local('Arial'), local('ArialMT'), local('Liberation Sans');
  size-adjust: 97.3%; ascent-override: 100%; descent-override: 23.3%; line-gap-override: 0%; }
/* caratteri ospiti (Google Fonts, SIL Open Font License) */
@font-face { font-family: 'Days One'; font-display: swap; src: url(../fonts/days-one-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Abril Fatface'; font-display: swap; src: url(../fonts/abril-fatface-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Alfa Slab One'; font-display: swap; src: url(../fonts/alfa-slab-one-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo Black'; font-display: swap; src: url(../fonts/archivo-black-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Bebas Neue'; font-display: swap; src: url(../fonts/bebas-neue-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Bodoni Moda'; font-style: italic; font-weight: 900; font-display: swap; src: url(../fonts/bodoni-moda-latin-900-italic.woff2) format('woff2'); }
@font-face { font-family: 'Courier Prime'; font-weight: 700; font-display: swap; src: url(../fonts/courier-prime-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'DM Serif Display'; font-display: swap; src: url(../fonts/dm-serif-display-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'DM Serif Display'; font-style: italic; font-display: swap; src: url(../fonts/dm-serif-display-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 900; font-display: swap; src: url(../fonts/playfair-display-latin-900-italic.woff2) format('woff2'); }
@font-face { font-family: 'Rubik Mono One'; font-display: swap; src: url(../fonts/rubik-mono-one-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Ultra'; font-display: swap; src: url(../fonts/ultra-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Righteous'; font-display: swap; src: url(../fonts/righteous-latin-400-normal.woff2) format('woff2'); }

:root {
  --bg: #191a19;
  --ink: #e8e7e2;
  --accent: #ffffff;
  --muted: #a09f98;            /* 6,5:1 sul fondo */
  --line: rgba(232, 231, 226, .16);
  --segnale: #ff4a1c;          /* il punto: 5,2:1 sul fondo */
  --font: 'Neue Montreal', 'NM Fallback', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --margin: clamp(16px, 3.2vw, 48px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 500;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow: hidden;
}
p, h1, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: var(--bg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.label { font-size: 12px; line-height: 1.35; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }

/* ---------- impaginato: HUD in alto, nome al centro, contatti in basso ---------- */
.cs { position: relative; height: 100vh; height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: 0 var(--margin); }
.hud { display: flex; justify-content: space-between; gap: 24px; }
.hud--top { padding-top: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hud--top p { display: flex; flex-direction: column; color: var(--accent); }
.hud--top span { color: var(--muted); }
.hud-end { text-align: right; align-items: flex-end; }
.hud--bottom { align-items: flex-end; padding-top: 14px; padding-bottom: 28px; border-top: 1px solid var(--line); }
.links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.links a { color: var(--muted); transition: color .3s; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: color .3s, background-size .5s var(--ease); }
.links a:hover, .links a:focus-visible { color: var(--accent); background-size: 100% 1px; }
.links li:first-child a { color: var(--accent); }

.stage { display: grid; place-content: center; justify-items: center; text-align: center; min-height: 0; }
.word {
  font-weight: 700; text-transform: lowercase; color: var(--accent);
  font-size: min(9.4vw, 15vh); line-height: 1; letter-spacing: -.045em; white-space: nowrap;
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: pan-y;
  padding: .12em .2em; /* area di hover un po' più generosa */
}
.after { margin-top: clamp(18px, 3.4vh, 36px); display: grid; gap: 10px; justify-items: center; }
.lead { font-size: clamp(18px, 1.6vw, 26px); letter-spacing: -.02em; color: var(--ink); }
.cta { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s; }
.cta-a { display: inline-block; color: var(--segnale); font-size: 14px; transition: transform .6s var(--ease); }
.cta:hover, .cta:focus-visible { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.cta:hover .cta-a, .cta:focus-visible .cta-a { transform: rotate(180deg); }
.cta:active { transform: scale(.98); }
.style { color: var(--muted); min-height: 1.35em; text-transform: none; letter-spacing: .02em; font-size: 13px; }

/* ---------- lettere che cambiano carattere (stesso motore del sito) ---------- */
.kw { display: inline-block; white-space: nowrap; }
.kl { position: relative; display: inline-block; }
.kc {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  white-space: nowrap; line-height: 1; pointer-events: none; visibility: hidden; letter-spacing: 0; text-transform: none;
  -webkit-text-fill-color: currentColor; -webkit-text-stroke: 0;
}
.kl.is-cut { -webkit-text-fill-color: transparent; -webkit-text-stroke-color: transparent; }
.kl.is-cut > .kc { visibility: visible; }
/* il punto: Segnale, non cambia mai carattere e compare per primo */
.word .kl.is-pt { color: var(--segnale); }

/* ---------- intro: composizione ---------- */
.is-intro .word .kl { opacity: 0; }
.word .kl.is-on { opacity: 1; }
.load { position: absolute; right: var(--margin); bottom: 72px; color: var(--muted); font-variant-numeric: tabular-nums; transition: opacity .4s; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: opacity .6s; }
.after, .hud { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.is-intro .after, .is-intro .hud { opacity: 0; transform: translateY(12px); }
.is-intro .hud--top { transform: translateY(-12px); }
html:not(.is-intro) .load, html:not(.is-intro) .bar { opacity: 0; }
.hud--bottom { transition-delay: .12s; } .after { transition-delay: .06s; }

/* ---------- interruttore suono con piccolo vu-meter ---------- */
.sound { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); white-space: nowrap; padding: 6px 0 6px 12px; }
.meter { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.meter i { width: 2px; height: 100%; background: currentColor; transform-origin: bottom; transform: scaleY(.15); }
.sound[aria-pressed="true"] .meter i { background: var(--segnale); }
.sound:hover .sound-t, .sound:focus-visible .sound-t { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 760px) {
  .hud--top .hud-mid { display: none; }
  .hud--top { gap: 12px; letter-spacing: .05em; }
  .hud--top p, .hud--top span { white-space: nowrap; }
  .hud--bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
  .links { gap: 6px 16px; }
  .word { font-size: 9.6vw; padding: .12em .04em; }
  .sound { padding-left: 0; }
  .load { bottom: 120px; }
}
@media (max-height: 520px) { .after .style { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .after, .hud { transition: none; }
}
