/* Fairquota, landing IT, sistema Duale Segnale, zero JS */

/* Font self-hosted (l'endpoint CSS di Fontshare risulta bloccato lato loro,
   l'endpoint di download diretto no: file scaricati una volta e serviti da qui) */
@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Black.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("fonts/GeneralSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("fonts/GeneralSans-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  /* Palette Duale Segnale (docs/superpowers/specs/2026-07-27-fairquota-brand-identity-design.md) */
  --ink:          #121316;
  --ink-raised:   #1B1C21;
  --ink-border:   #2A2C33;
  --bone:         #F5F1EA;
  --bone-border:  #E4DDCF;
  --stone:        #9A968D;   /* muted su Ink, contrasto 6.3:1 */
  --stone-on-bone:#6B675E;   /* Stone scurito per testo muted su Bone, 5:1 verificato */
  --coral:        #FF5A36;   /* segnale Effort */
  --teal:         #1FD8D8;   /* segnale Impact */
  --danger:       #FF4D4D;

  /* Tipografia */
  --f-display: "Satoshi", "Helvetica Neue", Arial, sans-serif;
  --f-body: "General Sans", "Helvetica Neue", Arial, sans-serif;

  --fs-display: clamp(2.4rem, 1.1rem + 6vw, 5.6rem);
  --fs-heading: clamp(1.7rem, 1.35rem + 1.6vw, 2.7rem);
  --fs-subheading: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --fs-lede: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;

  /* Spaziatura (DESIGN.md) */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
  --space-xxl: 120px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --measure: 68ch;
}

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

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  display: none;
}

.site-header, main > section, .site-footer {
  max-width: 1800px;
  margin: 0 auto;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html.smooth-active {
  scroll-behavior: auto;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--bone);
  line-height: 1.6;
  font-size: var(--fs-body);
  font-optical-sizing: auto;
}

::selection { background: var(--coral); color: var(--bone); }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--f-display);
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { text-wrap: pretty; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--coral);
  color: var(--ink);
  padding: 12px 20px;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section { padding: var(--space-xxl) 0; }

.section-bone {
  background:
    radial-gradient(ellipse 900px 480px at 12% -8%, rgba(255, 255, 255, 0.6), transparent 60%),
    var(--bone);
  color: var(--ink);
}
.section-ink { background: var(--ink); color: var(--bone); }
.section-ink-raised { background: var(--ink-raised); color: var(--bone); }

/* Grain, texture sottile su fondi Ink per dare peso senza fotografia */
.section-ink, .section-ink-raised, .hero {
  position: relative;
  overflow: clip;
}
.section-ink::before,
.section-ink-raised::before,
.hero .noise-overlay {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Campo ambientale, gli stessi blob coral/teal dell'hero ma vivi per tutta la sezione:
   niente filter:blur qui, il repaint ad ogni frame di scrub sarebbe costoso, il softening
   arriva dal fade-out del gradiente stesso (transparent 70%) */
.section-ink::after,
.section-ink-raised::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle 420px at var(--blob-x, 12%) var(--blob-y, 15%), rgba(255, 90, 54, 0.16), transparent 70%),
    radial-gradient(circle 460px at var(--blob-x2, 88%) var(--blob-y2, 85%), rgba(31, 216, 216, 0.14), transparent 70%);
}
.section-ink > *, .section-ink-raised > * {
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  border-bottom: 1px solid var(--ink-border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
  gap: var(--space-md);
}
.wordmark-text {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--bone);
  text-decoration: none;
}
.site-nav {
  display: flex;
  gap: var(--space-md);
}
.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--stone);
  transition: color 200ms var(--ease-out-quart);
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--teal); }

/* Hero */
.hero {
  background: var(--ink);
  color: var(--bone);
  padding: clamp(var(--space-xl), 14vw, var(--space-xxl)) 0;
  overflow: clip;
}
.hero-inner {
  position: relative;
}

/* Device diagonale coral/teal, sostituisce il vecchio glow ciclico infinito:
   entrata singola a carico pagina, poi ferma (bolder.md: un solo hero moment) */
.hero-inner::before,
.hero-inner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(70px);
}
.hero-inner::before {
  left: -100px;
  top: -160px;
  width: min(640px, 72vw);
  height: 640px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 90, 54, 0.4), transparent 70%);
  animation: heroFieldIn 1300ms var(--ease-out-expo) both;
}
.hero-inner::after {
  right: -140px;
  bottom: -240px;
  width: min(700px, 78vw);
  height: 700px;
  background: radial-gradient(circle at 70% 70%, rgba(31, 216, 216, 0.36), transparent 70%);
  animation: heroFieldIn 1300ms var(--ease-out-expo) 140ms both;
}
@keyframes heroFieldIn {
  from { opacity: 0; transform: scale(0.72); }
  to   { opacity: 1; transform: none; }
}

/* Wordmark fantasma, texture di marca dietro il contenuto, non un secondo logo */
.hero-ghost {
  position: absolute;
  top: -34px;
  left: -6px;
  margin: 0;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(4.5rem, 2rem + 14vw, 13rem);
  line-height: 0.82;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.75px rgba(245, 241, 234, 0.4);
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
html:not(.js-motion) .hero-ghost {
  animation: heroGhostIn 1100ms var(--ease-out-expo) both;
}
@keyframes heroGhostIn {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: none; }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
  padding-top: clamp(48px, 8vw, 96px);
}
.hero-headline {
  font-size: var(--fs-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
html:not(.js-motion) .hero-headline {
  animation: heroTextIn 800ms var(--ease-out-quint) 260ms both;
}
.hero-lead {
  font-family: var(--f-body);
  font-size: var(--fs-subheading);
  font-weight: 400;
  color: var(--stone);
  max-width: 52ch;
  line-height: 1.65;
  letter-spacing: 0.005em;
}
html:not(.js-motion) .hero-lead {
  animation: heroTextIn 700ms var(--ease-out-quint) 420ms both;
}
html:not(.js-motion) .hero .cta-row {
  animation: heroTextIn 600ms var(--ease-out-quint) 560ms both;
}

@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-ghost, .hero-headline, .hero-lead, .hero .cta-row,
  .hero-inner::before, .hero-inner::after { animation: none; }
  .btn-primary:hover { transform: none; }
}

/* Buttons */
.cta-row { margin-top: var(--space-xs); display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 15px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 180ms var(--ease-out-quart), transform 180ms var(--ease-out-quart);
}
.btn-primary {
  background: var(--coral);
  color: var(--ink);
}
.btn-primary:hover { background: #E64E2C; transform: scale(1.03); box-shadow: 0 0 28px rgba(255, 90, 54, 0.35); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* Il problema, un'affermazione grande, non un blocco a due colonne */
.problema h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--stone-on-bone);
  margin: 0 0 var(--space-md);
}
.problema-statement {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(1.9rem, 1.2rem + 3.4vw, 3.8rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
  max-width: 16ch;
  margin: 0 0 var(--space-lg);
}
.problema-body {
  max-width: var(--measure);
  color: var(--stone-on-bone);
  margin: 0;
}

/* Differenze, duale segnale */
.differenze h2 { font-size: var(--fs-heading); font-weight: 700; }
.differenze .section-intro {
  max-width: var(--measure);
  color: var(--stone);
  font-size: var(--fs-lede);
  margin: var(--space-sm) 0 0;
}

/* Full-bleed: il blocco esce dal wrap ed evade il contenitore, è il momento
   centrale della pagina (bolder.md: full-bleed elements per impatto) */
.duale {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--ink-border);
  overflow: clip;
  margin: var(--space-xl) 0;
}
.segnale {
  padding: clamp(var(--space-xl), 9vw, 140px) var(--space-lg);
}
/* Gradiente invece di tinta piatta, background-position scorre via scrub
   finché la sezione è a schermo (JS-tier, vedi buildSectionAnimations) */
.segnale-effort {
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral) 60%, #FF7A52 100%);
  background-size: 220% 220%;
  background-position: 0% 50%;
}
.segnale-impact {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal) 60%, #6FEAEA 100%);
  background-size: 220% 220%;
  background-position: 100% 50%;
}
.segnale-label {
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 1.5rem + 4vw, 4.8rem);
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: var(--space-sm);
}
.segnale p { color: var(--ink); margin: 0; max-width: 38ch; font-weight: 500; font-size: var(--fs-subheading); }
.duale-note {
  text-align: center;
  font-weight: 600;
  color: var(--bone);
  margin: 0 auto var(--space-lg);
}

/* Reveal non azzera mai l'opacita: contenuto sempre leggibile senza JS,
   scroll, o in render headless/crawler (impeccable: mai gate la visibilita) */
@supports (animation-timeline: view()) {
  html:not(.js-motion) .segnale-effort { animation: slideFromLeft 750ms var(--ease-out-quart) both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  html:not(.js-motion) .segnale-impact { animation: slideFromRight 750ms var(--ease-out-quart) 90ms both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
}
@keyframes slideFromLeft { from { transform: translateX(-36px) scale(0.94); } to { transform: none; } }
@keyframes slideFromRight { from { transform: translateX(36px) scale(0.94); } to { transform: none; } }

.differenze-extra {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  align-items: start;
}
.differenze-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.differenze-item p { color: var(--stone); margin: 0; }
.differenze-item--wide {
  padding-right: var(--space-lg);
  border-right: 1px solid var(--ink-border);
}

/* Come funziona */
.come h2 { font-size: var(--fs-heading); font-weight: 700; margin-bottom: var(--space-xl); }
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  counter-reset: flow;
}
.flow-step {
  position: relative;
  padding-top: var(--space-md);
  border-top: 2px solid var(--ink-border);
}
/* Scalinata discendente, riflette la progressione dei tre passi */
.flow-step:nth-child(2) { margin-top: clamp(0px, 4vw, 32px); }
.flow-step:nth-child(3) { margin-top: clamp(0px, 8vw, 64px); }
@supports (animation-timeline: view()) {
  html:not(.js-motion) .flow-step { animation: stepIn 650ms var(--ease-out-quart) both; animation-timeline: view(); animation-range: entry 0% entry 50%; }
  html:not(.js-motion) .flow-step:nth-child(2) { animation-delay: 90ms; }
  html:not(.js-motion) .flow-step:nth-child(3) { animation-delay: 180ms; }
  html:not(.js-motion) .flow-step-rule { animation: ruleGrow 650ms var(--ease-out-quart) both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
}
@keyframes stepIn { from { transform: translateY(24px) scale(0.96); } to { transform: none; } }

/* Riga che si disegna sopra il border-top statico, dettaglio secondario vivo
   durante l'attraversamento della sezione (JS-tier: scrub in buildSectionAnimations) */
.flow-step-rule {
  position: absolute;
  left: 0;
  top: -2px;
  height: 2px;
  width: 100%;
  transform: scaleX(1);
  transform-origin: left;
  background: linear-gradient(90deg, var(--coral), var(--teal));
  pointer-events: none;
}
html.js-motion .flow-step-rule { transform: scaleX(0); }
@keyframes ruleGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.flow-num {
  display: block;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(3.2rem, 2.2rem + 5vw, 7rem);
  letter-spacing: -0.02em;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
  margin-bottom: var(--space-sm);
}
.flow-step p { margin: 0; max-width: 32ch; }

/* Lenti di valutazione */
.lenti h2 { font-size: var(--fs-heading); font-weight: 700; margin-bottom: var(--space-sm); }

.lenti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}
.lente {
  padding: var(--space-md) 0;
  border-top: 2px solid var(--ink);
}
.lente h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--fs-subheading);
  margin: 0 0 var(--space-xs);
}
.lente p { margin: 0; color: var(--stone-on-bone); font-size: var(--fs-small); }

/* Per chi e */
.perchi .wrap { max-width: 860px; }
.perchi h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--stone);
  margin-bottom: var(--space-md);
}
.perchi-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.perchi-list li {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 1.05rem + 1.2vw, 2rem);
  letter-spacing: -0.02em;
  color: var(--bone);
  line-height: 1.3;
  max-width: 32ch;
  text-wrap: pretty;
}

/* Chi decide, alla fine (trasparenza IA, AI Act art. 50 e L. 132/2025 art. 13) */
.responsabilita h2 { font-size: var(--fs-heading); font-weight: 700; margin-bottom: var(--space-sm); }
.responsabilita .section-intro {
  color: var(--stone-on-bone);
  font-size: var(--fs-lede);
  max-width: 46ch;
  margin: 0;
  text-wrap: pretty;
}
.resp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}
.resp-item {
  position: relative;
  padding-top: var(--space-md);
  border-top: 2px solid var(--ink);
}
.resp-item h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--fs-subheading);
  margin: 0 0 var(--space-xs);
}
.resp-item p {
  margin: 0;
  color: var(--stone-on-bone);
  font-size: var(--fs-small);
  max-width: 36ch;
  text-wrap: pretty;
}
/* Stessa grammatica della riga dei flow-step: si disegna in scrub sopra il border */
.resp-rule {
  position: absolute;
  left: 0;
  top: -2px;
  height: 2px;
  width: 100%;
  transform: scaleX(1);
  transform-origin: left;
  background: linear-gradient(90deg, var(--coral), var(--teal));
  pointer-events: none;
}
html.js-motion .resp-rule { transform: scaleX(0); }
@supports (animation-timeline: view()) {
  html:not(.js-motion) .resp-item { animation: stepIn 650ms var(--ease-out-quart) both; animation-timeline: view(); animation-range: entry 0% entry 50%; }
  html:not(.js-motion) .resp-rule { animation: ruleGrow 650ms var(--ease-out-quart) both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
}
.resp-norma {
  margin: var(--space-xl) 0 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--bone-border);
  color: var(--stone-on-bone);
  font-size: var(--fs-small);
  max-width: var(--measure);
  text-wrap: pretty;
}

/* CTA finale */
.finalcta { text-align: center; }
.finalcta h2 { font-size: var(--fs-heading); font-weight: 700; }
.finalcta .cta-row { justify-content: center; margin-top: var(--space-md); }

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--stone);
  padding: var(--space-xl) 0;
  font-size: var(--fs-small);
  border-top: 1px solid var(--ink-border);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.site-footer p { margin: 0; }
.site-footer a {
  color: var(--teal);
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.footer-tagline {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--bone);
}
.footer-forme { color: var(--stone); }
.site-footer .legal {
  color: #6E6B64;
  font-size: 0.85rem;
  margin-top: var(--space-xs);
}

@media (prefers-reduced-motion: reduce) {
  .segnale-effort, .segnale-impact, .flow-step, .flow-step-rule {
    animation: none !important;
  }
  .flow-step-rule { transform: scaleX(1) !important; }
}

/* Responsive */
@media (max-width: 860px) {
  .differenze-extra { grid-template-columns: 1fr; }
  .differenze-item--wide { border-right: none; padding-right: 0; border-bottom: 1px solid var(--ink-border); padding-bottom: var(--space-lg); }
  .flow { grid-template-columns: 1fr; gap: var(--space-md); }
  .flow-step:nth-child(2), .flow-step:nth-child(3) { margin-top: 0; }
}

@media (max-width: 640px) {
  section { padding: var(--space-xl) 0; }
  .duale { grid-template-columns: 1fr; gap: var(--space-md); }
  .site-nav { display: none; }
  .hero-ghost { font-size: clamp(3.2rem, 2rem + 18vw, 6rem); top: -20px; }
}
