/* ============================================================
   EasyClickSound — sistema di design
   Pop, saturato, tipografia grande. Nessuna emoji come icona.
   ============================================================ */

:root {
  /* Colori — tramonto caldo: rosa antico, corallo, ambra, oro.
     Fondo prugna scuro invece del nero: più intimo, meno tecnologico. */
  --ink:        #1A1018;
  --ink-2:      #241722;
  --ink-3:      #33212F;
  --paper:      #FFF4EA;
  --paper-2:    #FFFFFF;

  --rose:       #DC3F6E;
  --coral:      #EE6046;
  --amber:      #F5A03F;
  --gold:       #EBC078;
  --plum:       #7A3F6D;

  --grad:       linear-gradient(102deg, #DC3F6E 0%, #EE6046 52%, #F5A03F 100%);
  --grad-soft:  linear-gradient(102deg, rgba(220,63,110,.14), rgba(245,160,63,.14));

  /* Testo su chiaro */
  --tx:         #1A1018;
  --tx-mute:    #6F5C68;
  --tx-faint:   #A08E9A;
  /* Testo su scuro */
  --tx-inv:     #FFF4EA;
  --tx-inv-mute:#B09CA8;

  --line:       rgba(26,16,24,.13);
  --line-inv:   rgba(255,244,234,.15);

  /* Tipografia */
  --display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Ritmo */
  --wrap: 1280px;
  --gut: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.19,1,.22,1);
  --ease-2: cubic-bezier(.65,0,.35,1);

  --r: 18px;
  --r-lg: 28px;
}

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

/* L'attributo hidden deve battere qualsiasi display dichiarato in una classe. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--tx);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------- Grana su tutta la pagina: toglie l'aspetto "digitale piatto" ---------- */
body::after {
  content: '';
  position: fixed; inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: .92;
  letter-spacing: -.045em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--rose); color: #fff; }

:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 4px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* ============================================================
   TIPOGRAFIA D'IMPATTO
   ============================================================ */
.display {
  font-family: var(--display);
  font-weight: 800;
  line-height: .88;
  letter-spacing: -.05em;
  text-transform: uppercase;
}

/* Testo riempito col gradiente */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Testo a contorno: usato per alternare peso visivo nei titoli */
.outline-text {
  color: transparent;
  -webkit-text-stroke: 2px currentColor;
  paint-order: stroke fill;
}
@media (max-width: 700px) { .outline-text { -webkit-text-stroke-width: 1.4px; } }

.eyebrow {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rose);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 2px;
  background: var(--grad);
}

/* Numerazione editoriale delle sezioni */
.sec-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(64px, 12vw, 150px);
  line-height: .8;
  letter-spacing: -.06em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
  user-select: none;
}

/* ============================================================
   BOTTONI
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  cursor: pointer;
  font-family: var(--body);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.015em;
  padding: 20px 38px;
  border-radius: 100px;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  isolation: isolate;
}
.btn svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 24px rgba(220,63,110,.32), 0 20px 60px rgba(245,160,63,.22);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(220,63,110,.42), 0 28px 80px rgba(245,160,63,.3);
}
/* Riflesso che attraversa il bottone: dettaglio che "costa" ma pesa nulla */
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.32) 50%, transparent 80%);
  transform: translateX(-100%);
}
@media (prefers-reduced-motion: no-preference) {
  .btn-primary::after { animation: shine 4.5s var(--ease-2) infinite; }
  @keyframes shine {
    0%, 62% { transform: translateX(-100%); }
    100%    { transform: translateX(100%); }
  }
}

.btn-dark { background: var(--ink); color: var(--tx-inv); }
.btn-dark:hover { transform: translateY(-3px); background: var(--ink-3); }

.btn-outline {
  background: transparent;
  color: currentColor;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.btn-outline:hover { background: currentColor; }
.btn-outline:hover span { color: var(--paper); }

.btn-lg { padding: 24px 48px; font-size: 19px; }
.btn-block { width: 100%; }

/* ============================================================
   RIVELAZIONE ALLO SCROLL
   Attiva solo se il JS ha marcato <html class="js">: senza JS
   il contenuto resta visibile invece di sparire.
   ============================================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

/* Variante più ampia per i titoli.
   Niente clip-path: Chrome calcola l'intersezione dopo il ritaglio, quindi un
   elemento ritagliato a zero non verrebbe mai visto dall'IntersectionObserver
   e resterebbe invisibile per sempre. */
.js .reveal-up {
  opacity: 0;
  transform: translateY(46px) scale(.985);
  transform-origin: left bottom;
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
}
.js .reveal-up.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal-up { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ============================================================
   SEZIONI
   ============================================================ */
.section { padding: clamp(80px, 11vw, 160px) 0; position: relative; }
.section-dark { background: var(--ink); color: var(--tx-inv); }
/* Su fondo scuro il contorno va schiarito, altrimenti il numero sparisce.
   La sezione degli estratti usa la classe .demos, quindi va nominata anche
   lei: senza, il numero resterebbe col colore pensato per gli sfondi chiari. */
.section-dark .sec-num,
.demos .sec-num { -webkit-text-stroke-color: var(--line-inv); }

.sec-head { display: grid; gap: 22px; margin-bottom: clamp(48px, 6vw, 84px); }
.sec-head h2 { font-size: clamp(40px, 7.4vw, 96px); }
.sec-head p { color: var(--tx-mute); font-size: clamp(17px, 1.9vw, 21px); max-width: 46ch; }
.section-dark .sec-head p { color: var(--tx-inv-mute); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.section-dark .rule { background: var(--line-inv); }
