/* =========================================================
   Alberto Garlaschi — Bitcoin, Sicurezza e Privacy
   Palette brand: #2B2D42 #8D99AE #EDF2F4 #EF233C #D90429
   Font: Space Grotesk (display) · Inter (body) · JetBrains Mono (dati)
   ========================================================= */

:root {
  --navy:        #2B2D42;
  --navy-900:    #1c1e2e;
  --navy-850:    #212338;
  --navy-800:    #262842;
  --navy-card:   #31344f;
  --navy-line:   #3d4062;
  --grey:        #8d99ae;
  --grey-soft:   #a9b3c3;
  --white:       #edf2f4;
  --red:         #ef233c;
  --red-dark:    #d90429;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1180px;
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--navy-900);
  color: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(64px, 9vw, 120px); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--red);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: .5ch;
}
.eyebrow::before { content: "//"; color: var(--grey); }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.28rem; letter-spacing: -.01em; }
p { color: var(--grey-soft); }
strong { color: var(--white); font-weight: 600; }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--grey-soft); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6ch;
  padding: .85em 1.5em;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { border-color: var(--navy-line); color: var(--white); background: transparent; }
.btn-ghost:hover { border-color: var(--grey); background: rgba(141,153,174,.08); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--navy-900) 80%, transparent);
  border-bottom: 1px solid var(--navy-line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.nav-menu { display: contents; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
.brand img { width: 38px; height: 38px; border-radius: 50%; }
.brand span small { display: block; font-family: var(--font-mono); font-size: .6rem; color: var(--grey); letter-spacing: .12em; text-transform: uppercase; font-weight: 400; margin-top: 1px; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; padding: 0; }
.nav-links a { font-size: .96rem; color: var(--grey-soft); transition: color .18s; position: relative; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--white); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--red); border-radius: 2px;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--navy-line); border-radius: 10px; width: 44px; height: 44px; align-items: center; justify-content: center; }
.nav-toggle span { width: 20px; height: 2px; background: var(--white); position: relative; display: block; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--white); }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(48px, 7vw, 90px); padding-bottom: clamp(48px, 7vw, 90px); overflow: hidden; }
.hero::before { /* red diagonal, echoing the profile photo */
  content: ""; position: absolute; top: -30%; right: -8%; width: 60%; height: 160%;
  background: linear-gradient(200deg, transparent 45%, var(--red-dark) 46%, var(--red) 52%, transparent 53%);
  opacity: .12; pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; position: relative; }
.hero h1 { margin: 18px 0 20px; }
.hero h1 .accent { color: var(--red); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* Portrait with monogram ring, derived from brand assets */
.portrait { position: relative; justify-self: center; width: min(420px, 100%); aspect-ratio: 1; }
.portrait .ring {
  position: absolute; inset: -6%; border-radius: 50%;
  border: 2px solid var(--navy-line);
}
.portrait .ring::after {
  content: ""; position: absolute; inset: 7%; border-radius: 50%; border: 1px solid rgba(141,153,174,.25);
}
.portrait .photo {
  position: absolute; inset: 6%; border-radius: 50%; overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.7);
  border: 1px solid var(--navy-line);
}
.portrait .photo img { width: 100%; height: 100%; object-fit: cover; }
.portrait .chip {
  position: absolute; bottom: 4%; left: -6%;
  background: var(--navy-card); border: 1px solid var(--navy-line);
  border-radius: 12px; padding: 10px 14px; font-family: var(--font-mono);
  font-size: .72rem; color: var(--grey-soft); display: flex; align-items: center; gap: 8px;
  box-shadow: 0 16px 40px -20px rgba(0,0,0,.8);
}
.portrait .chip b { color: var(--white); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(239,35,60,.18); }

/* ---------- Stats strip ---------- */
.stats { border-top: 1px solid var(--navy-line); border-bottom: 1px solid var(--navy-line); background: var(--navy-850); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 34px 24px; text-align: center; border-right: 1px solid var(--navy-line); }
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; color: var(--white); letter-spacing: -.02em; }
.stat .num .u { color: var(--red); }
.stat .label { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--grey); margin-top: 6px; }

/* ---------- Mission ---------- */
.mission-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.mission-body p + p { margin-top: 18px; }
.rule {
  margin-top: 28px; padding: 18px 22px; border-radius: var(--radius);
  background: var(--navy-850); border: 1px solid var(--navy-line);
  border-left: 3px solid var(--red);
  font-family: var(--font-display); font-size: 1.1rem; color: var(--white);
}

/* ---------- Card grid (pillars / services) ---------- */
.section-head { max-width: 62ch; margin-bottom: 44px; }
.section-head h2 { margin-top: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card {
  background: var(--navy-850); border: 1px solid var(--navy-line);
  border-radius: var(--radius-lg); padding: 30px 26px;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
  position: relative;
}
.card:hover { transform: translateY(-4px); border-color: var(--grey); }
.card .ic {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(239,35,60,.12); color: var(--red); margin-bottom: 20px;
}
.card .ic svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: .96rem; }
.card ul { list-style: none; padding: 0; margin: 16px 0 0; }
.card li { font-size: .93rem; color: var(--grey-soft); padding-left: 22px; position: relative; margin-bottom: 8px; }
.card li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border: 1.5px solid var(--red); border-radius: 2px; transform: rotate(45deg); }
.tag { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--grey); }

/* ---------- CTA banner ---------- */
.cta-band { background: linear-gradient(120deg, var(--navy-800), var(--navy-card)); border: 1px solid var(--navy-line); border-radius: var(--radius-lg); padding: clamp(36px, 5vw, 60px); text-align: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% -20%, rgba(239,35,60,.18), transparent 40%); pointer-events: none; }
.cta-band h2 { position: relative; }
.cta-band p { max-width: 52ch; margin: 14px auto 0; position: relative; }
.cta-band .hero-cta { justify-content: center; position: relative; }

/* ---------- Social row ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 12px; }
.soc {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-radius: 12px;
  background: var(--navy-850); border: 1px solid var(--navy-line);
  font-size: .92rem; color: var(--grey-soft);
  transition: border-color .2s, color .2s, transform .2s;
}
.soc:hover { color: var(--white); border-color: var(--grey); transform: translateY(-2px); }
.soc svg { width: 18px; height: 18px; flex: none; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(20px, 3vw, 30px); }
.page-hero h1 { margin-top: 14px; max-width: 18ch; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 52px; align-items: start; }
.about-photo { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--navy-line); position: sticky; top: 100px; }
.prose p { margin-bottom: 18px; }
.prose h3 { color: var(--white); margin: 34px 0 12px; }
.values { display: grid; gap: 14px; margin-top: 26px; }
.value { display: flex; gap: 16px; padding: 18px 20px; background: var(--navy-850); border: 1px solid var(--navy-line); border-radius: var(--radius); }
.value .n { font-family: var(--font-mono); color: var(--red); font-size: .85rem; padding-top: 3px; }
.value b { display: block; color: var(--white); font-family: var(--font-display); margin-bottom: 3px; }
.value p { font-size: .94rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-card { background: var(--navy-850); border: 1px solid var(--navy-line); border-radius: var(--radius-lg); padding: 32px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--grey); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 10px;
  background: var(--navy-900); border: 1px solid var(--navy-line);
  color: var(--white); font: inherit; font-size: .96rem;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
.field textarea { min-height: 130px; resize: vertical; }
.contact-line { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--navy-line); }
.contact-line:last-child { border-bottom: none; }
.contact-line .ic { width: 42px; height: 42px; border-radius: 10px; background: rgba(239,35,60,.12); color: var(--red); display: grid; place-items: center; flex: none; }
.contact-line .ic svg { width: 20px; height: 20px; }
.contact-line b { display: block; font-size: .78rem; color: var(--grey); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; }
.contact-line a, .contact-line span { color: var(--white); font-size: .98rem; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--navy-line); background: var(--navy-900); padding-block: 56px 30px; margin-top: 20px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-brand p { font-size: .95rem; max-width: 34ch; margin-top: 14px; }
.foot-col h4 { font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--grey); margin-bottom: 16px; font-weight: 500; }
.foot-col ul { list-style: none; padding: 0; display: grid; gap: 11px; }
.foot-col a { color: var(--grey-soft); font-size: .95rem; }
.foot-col a:hover { color: var(--white); }
.foot-social { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.foot-social a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-850); border: 1px solid var(--navy-line); color: var(--grey-soft); transition: color .2s, border-color .2s; }
.foot-social a:hover { color: var(--white); border-color: var(--grey); }
.foot-social svg { width: 18px; height: 18px; }
.foot-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--navy-line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; align-items: center; }
.foot-bottom p, .disclaimer { font-size: .82rem; color: var(--grey); }
.disclaimer { max-width: 60ch; margin-top: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .mission-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .portrait { margin: 8px auto 0; width: min(320px, 80%); }
  .about-photo { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none; position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--navy-850); border-bottom: 1px solid var(--navy-line);
    padding: 12px 24px 22px; z-index: 50;
  }
  .nav.open .nav-menu { display: flex; }
  .nav-menu .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-menu .nav-links a { padding: 13px 4px; border-bottom: 1px solid var(--navy-line); }
  .nav-menu .nav-links a[aria-current="page"]::after { display: none; }
  .nav-menu .nav-right { margin-top: 14px; }
  .nav-menu .nav-right .btn { width: 100%; justify-content: center; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--navy-line); }
  .stat:last-child { border-bottom: none; }
  .foot-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

/* ---------- A11y ---------- */
a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
/* Senza JavaScript i contenuti restano sempre visibili e cliccabili */
.reveal { opacity: 1; transform: none; }

/* ---------- Affiliazioni ---------- */
.aff-note {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--navy-850); border: 1px solid var(--navy-line);
  border-left: 3px solid var(--red); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 12px;
}
.aff-note .ic { flex: none; width: 40px; height: 40px; border-radius: 10px; background: rgba(239,35,60,.12); color: var(--red); display: grid; place-items: center; }
.aff-note .ic svg { width: 20px; height: 20px; }
.aff-note p { font-size: .95rem; margin: 0; }
.aff-note b { color: var(--white); }

.aff-section { margin-top: 54px; }
.aff-section .head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.aff-section .head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.aff-section .head .count { font-family: var(--font-mono); font-size: .75rem; color: var(--grey); }

.aff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.aff-card {
  display: flex; flex-direction: column;
  background: var(--navy-850); border: 1px solid var(--navy-line);
  border-radius: var(--radius-lg); padding: 24px;
  transition: transform .22s var(--ease), border-color .22s var(--ease);
}
.aff-card:hover { transform: translateY(-3px); border-color: var(--grey); }
.aff-card h3 { font-size: 1.14rem; }
.aff-card .desc { font-size: .92rem; margin: 9px 0 16px; }
.aff-badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .74rem; color: var(--white);
  background: var(--navy-900); border: 1px solid rgba(239,35,60,.45);
  padding: 6px 11px; border-radius: 8px; margin-bottom: 18px;
}
.aff-badge .dot { width: 7px; height: 7px; }
.aff-card .btn { margin-top: auto; align-self: flex-start; }
.aff-card .btn svg { width: 15px; height: 15px; }

/* ---------- Partner callout (on Servizi) ---------- */
.partner-callout {
  margin-top: 28px; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  background: var(--navy-850); border: 1px solid var(--navy-line);
  border-left: 3px solid var(--red); border-radius: var(--radius-lg);
  padding: 24px 28px;
}
.partner-callout h3 { font-size: 1.2rem; }
.partner-callout p { font-size: .95rem; margin: 0; }
.partner-callout .btn { flex: none; }
