/* ═══════════════════════════════════════════════
   DESIGN SYSTEM — sandroprioloai.com
   Ambient Premium — tutti i breakpoint
   ════════════════════════════════════════════ */

/* ── PREMIUM FONTS ── */
@font-face {
  font-family: 'GT-Sectra-Fine';
  src: url('fonts/GT-Sectra-Fine-Book.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GT-Sectra-Fine';
  src: url('fonts/GT-Sectra-Fine-Medium.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'nb_akademie';
  src: url('fonts/nb_akademie_light-webfont.woff2') format('woff2');
  font-weight: 300 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'nb_akademie';
  src: url('fonts/nb_akademie_medium-webfont.woff2') format('woff2');
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --navy:   #0a0a1a;
  --violet: #1a0a2e;
  --accent: #00d4ff;
  --accent-soft: #4ce0ff;
  --purple: #7b2fff;
  --text:   #ffffff;
  --t2:     #a4adc0;        /* +10% luminosità per body — passa WCAG AA su navy */
  --t3:     rgba(255,255,255,.58);  /* da .3 → .58: meta info ora leggibile (≈4.8:1) */
  --t4:     rgba(255,255,255,.38);  /* riservato a decor non-essenziali */
  --line:   rgba(255,255,255,.08);
  --line-hi: rgba(255,255,255,.16);
  --fd:     'GT-Sectra-Fine', 'Playfair Display', serif;
  --fb:     'nb_akademie', 'Inter', sans-serif;
  --nav-h:  72px;
}

html {
  background: var(--navy);
  color: var(--text);
  font-family: var(--fb);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  cursor: none;
  scroll-behavior: auto;
}
body {
  background: transparent;
  overflow-x: hidden;
  min-height: 100vh;
  font-size: 1rem;
  line-height: 1.6;
}
::selection { background: rgba(0,212,255,.28); color: #fff; }

/* ── CANVAS bg fisso ── */
#ambient-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; width: 100%; height: 100%;
}

/* ── NEURAL NETWORK CANVAS (hero) ── */
#neural-canvas {
  position: absolute; inset: 0;
  width: 100% !important; height: 100% !important;
  z-index: 1; pointer-events: none;
}
@media (max-width: 767px) { #neural-canvas { display: none; } }

/* Layer per etichette dei nodi (proiettate da JS) */
.neural-overlay {
  position: absolute; inset: 0;
  z-index: 2; pointer-events: none;
  overflow: hidden;
}
.neural-label {
  position: absolute; top: 0; left: 0;
  font-family: var(--fb);
  font-size: .62rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
  background: rgba(10,10,26,.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0,212,255,.4);
  padding: .25rem .55rem .25rem 1.6rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s, transform .35s cubic-bezier(.16,1,.3,1);
  transform: translate(0, 0) scale(.92);
  pointer-events: none;
  will-change: transform, opacity;
}
/* Linea connettrice verso il nodo */
.neural-label::before {
  content: ''; position: absolute; left: -14px; top: 50%;
  width: 22px; height: 1px;
  background: linear-gradient(to right, rgba(0,212,255,0), rgba(0,212,255,.65));
  transform: translateY(-.5px);
}
/* Dot luminoso all'estremità del label (lato nodo) */
.neural-label-dot {
  position: absolute;
  left: .55rem; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 14px rgba(0,212,255,.4);
  transform: translateY(-50%);
}
/* Echo concentrico — uno o due anelli che escono dal dot */
.neural-label-dot::after,
.neural-label-dot::before {
  content: '';
  position: absolute; inset: -2px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}
.neural-label.show .neural-label-dot::after {
  animation: labelEcho 1.6s cubic-bezier(.16,1,.3,1) infinite;
}
.neural-label.show .neural-label-dot::before {
  animation: labelEcho 1.6s cubic-bezier(.16,1,.3,1) .55s infinite;
}
@keyframes labelEcho {
  0%   { transform: scale(1);   opacity: .9; }
  70%  { opacity: .15; }
  100% { transform: scale(5.4); opacity: 0; }
}
.neural-label.show { opacity: 1; transform: translate(0, 0) scale(1); }

/* Shockwave su click */
.neural-shock {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,212,255,.85);
  pointer-events: none;
  z-index: 3;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  box-shadow: 0 0 12px rgba(0,212,255,.6);
  animation: neuralShock 720ms cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes neuralShock {
  0%   { width: 4px;   height: 4px;   opacity: 1;   border-width: 1.5px; }
  60%  { opacity: .6; }
  100% { width: 380px; height: 380px; opacity: 0;   border-width: .5px; }
}
.neural-shock.purple { border-color: rgba(123,47,255,.85); box-shadow: 0 0 12px rgba(123,47,255,.6); }

/* ── PRELOADER ── */
#preloader {
  position: fixed; inset: 0; z-index: 99000;
  background: #0a0a1a;
  display: flex; align-items: center; justify-content: center;
}
#preloader-canvas { display: block; }

/* Fallback mobile (canvas nascosto) */
@media (max-width: 767px) {
  #ambient-canvas { display: none; }
  html { background: linear-gradient(145deg, #0a0a1a 0%, #1a0a2e 55%, #0a0a1a 100%); }
}

/* ── GRAIN ── */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 2;
  pointer-events: none; opacity: .02; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── PAGE TRANSITION OVERLAY ── */
.pg-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--navy); pointer-events: none;
}

/* ── CURSOR ── */
.cursor {
  position: fixed; z-index: 9999; pointer-events: none;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 5px var(--accent), 0 0 12px rgba(0,212,255,.5);
  transform: translate(-50%,-50%);
  transition: width .15s, height .15s, opacity .2s;
  will-change: transform;
}
.cursor-ring {
  position: fixed; z-index: 9998; pointer-events: none;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid rgba(0,212,255,.55);
  transform: translate(-50%,-50%);
  transition: width .28s cubic-bezier(.16,1,.3,1),
              height .28s cubic-bezier(.16,1,.3,1),
              border-color .28s, opacity .2s;
  will-change: transform;
}
/* Hover states */
.cursor.on-link    { width: 8px; height: 8px; }
.cursor-ring.on-link { width: 64px; height: 64px; border-color: rgba(0,212,255,.85); }
.cursor.on-text    { width: 2px; height: 22px; border-radius: 1px; }
.cursor-ring.on-text { width: 0; height: 0; opacity: 0; border-width: 0; }
.cursor-ring.on-button {
  width: 56px; height: 56px;
  background: rgba(0,212,255,.1);
  border-color: rgba(0,212,255,.6);
}
@media (max-width: 767px) { .cursor, .cursor-ring { display: none; } html { cursor: auto; } }
@media (hover: none) { .cursor, .cursor-ring { display: none !important; } html { cursor: auto; } }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem,4vw,3.5rem);
  transition: background .5s, backdrop-filter .5s, border-color .5s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10,10,26,.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-color: rgba(0,212,255,.1);
  box-shadow: 0 1px 24px -8px rgba(0,0,0,.45);
}
.nav-logo {
  display: flex; align-items: center;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo img {
  height: 38px; width: auto; display: block;
  border-radius: 6px;
}
.nav-links {
  display: flex; align-items: center;
  gap: clamp(1.2rem,2.2vw,2.2rem);
}
.nav-links a {
  font-size: .74rem; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.72); text-decoration: none;
  transition: color .25s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 1px; background: var(--accent); transition: width .28s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--accent); }

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--t2); transition: all .3s;
}
.nav-burger.open span:nth-child(1) { transform: rotate(45deg) translate(4px,5px); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px,-5px); }

@media (max-width: 768px) {
  .nav-links {
    /* display resta sempre 'flex': niente più display:none/flex a ogni toggle.
       Su alcuni mobile (Android soprattutto) ricreare/distruggere il layer di
       compositing di un elemento position:fixed + backdrop-filter ad ogni
       apertura può corrompere il repaint dopo alcuni cicli, facendo sparire
       sfondo e prime voci finché non arriva un repaint forzato (es. scroll).
       Tenendo il layer sempre vivo e animando solo opacity/visibility si evita. */
    display: flex; position: fixed; inset: 0;
    flex-direction: column; align-items: center; justify-content: center;
    background: rgba(10,10,26,.97);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    gap: 2.2rem; z-index: 9500;
    visibility: hidden; opacity: 0; pointer-events: none;
    transition: opacity .25s ease, visibility 0s linear .25s;
    transform: translateZ(0); -webkit-transform: translateZ(0);
    will-change: opacity;
  }
  .nav-links.open {
    visibility: visible; opacity: 1; pointer-events: auto;
    transition: opacity .25s ease, visibility 0s linear;
  }
  .nav-links a { font-size: .95rem; }
  .nav-burger { display: flex; z-index: 9600; }
}

/* ── CONTENT LAYER ── */
.above { position: relative; z-index: 10; }

/* ── HERO ── */
.hero {
  position: relative; z-index: 10;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: var(--nav-h) clamp(1.25rem,5vw,4rem) 4rem;
}
.hero-inner {
  width: 100%; max-width: 1200px; margin: 0 auto;
  position: relative; z-index: 2;
}
.hero-text { max-width: 680px; }

.hero-label {
  font-size: .74rem; font-weight: 500; letter-spacing: .26em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 1.8rem; opacity: 0;
  display: flex; align-items: center; gap: .75rem;
}
.hero-label::before {
  content: ''; display: block; width: 30px; height: 1px;
  background: var(--accent);
}

.hero-title {
  font-family: var(--fd);
  font-size: clamp(3.2rem,8vw,8.5rem);
  font-weight: 700; line-height: .95;
  letter-spacing: -.03em; color: var(--text);
  margin-bottom: 2.2rem;
  position: relative;
  perspective: 800px;
  perspective-origin: 50% 100%;
}
.hero-title .line { display: block; overflow: hidden; padding: .08em 0 .12em; }
.hero-title .word {
  display: inline-block;
  transform-style: preserve-3d;
}
.hero-title .ch {
  display: inline-block;
  transform-style: preserve-3d;
  transform-origin: 50% 60%;
  will-change: transform, opacity, filter;
  opacity: 0;                  /* nascoste fino a GSAP */
  position: relative;
}
.hero-title .ch-cap {
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, var(--accent-soft) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Flash all'atterraggio — aggiunto via JS sul carattere singolo */
.hero-title .ch.landing {
  animation: chLand 600ms cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes chLand {
  0%   { text-shadow: 0 0 0px rgba(0,212,255,0); }
  18%  { text-shadow: 0 0 18px rgba(0,212,255,.95), 0 0 36px rgba(0,212,255,.45); }
  100% { text-shadow: 0 0 0px rgba(0,212,255,0); }
}

/* Linea sottostante che si disegna dopo l'atterraggio */
.hero-title-line {
  display: block;
  width: 0; height: 2px;
  background: linear-gradient(to right, var(--accent), rgba(0,212,255,0));
  margin-top: .65rem;
  border-radius: 1px;
  box-shadow: 0 0 12px rgba(0,212,255,.35);
}

.hero-sub {
  font-size: clamp(1.02rem,1.55vw,1.18rem); font-weight: 400;
  color: rgba(255,255,255,.82); line-height: 1.7;
  max-width: 480px; margin-bottom: 2.4rem; opacity: 0;
}
.hero-sub-line {
  display: block; position: relative;
  min-height: 1.7em;
  white-space: pre-wrap;
}
/* Cursore lampeggiante alla fine della riga in fase di digitazione */
.hero-sub-line.typing::after {
  content: '';
  display: inline-block;
  width: 1px; height: 1em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: -0.12em;
  animation: subTypeBlink 1s steps(2) infinite;
}
@keyframes subTypeBlink { 0%,49%{opacity:1} 50%,100%{opacity:0} }

.hero-tagline {
  font-size: clamp(.95rem,1.35vw,1.08rem); color: var(--t2);
  font-weight: 400; margin-bottom: 3rem; opacity: 0;
  white-space: nowrap; overflow: visible; width: 100%;
}
@media (max-width: 767px) { .hero-tagline { white-space: normal; } }
.tw-acc { color: var(--accent); font-weight: 500; }
.tw-cur {
  display: inline-block; width: 2px; height: .85em;
  background: var(--accent); margin-left: 1px;
  vertical-align: middle; animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.scroll-cue {
  display: inline-flex; align-items: center;
  gap: .75rem; opacity: 0;
  position: relative;
}
.scroll-cue-line {
  width: 46px; height: 1px;
  background: linear-gradient(to right, var(--accent), transparent);
  position: relative; overflow: hidden;
}
.scroll-cue-line::after {
  content: ''; position: absolute; top: 0; left: -30%;
  width: 30%; height: 100%;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  animation: scrollPulse 2.4s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%   { left: -30%; opacity: 0; }
  50%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
.scroll-cue span {
  font-size: .68rem; letter-spacing: .22em;
  text-transform: uppercase; color: rgba(255,255,255,.6);
}

/* ── HOLOGRAPHIC SPHERE ── */
.hero-sphere-col {
  display: flex; align-items: center; justify-content: center; opacity: 0;
}
#sphere-canvas {
  display: block;
  width: clamp(220px, 26vw, 360px);
  height: clamp(220px, 26vw, 360px);
}
@media (max-width: 820px) {
  #sphere-canvas {
    width: clamp(180px, 52vw, 280px);
    height: clamp(180px, 52vw, 280px);
  }
}

/* ── PAGE HEADER (sub-pages) ── */
.page-header {
  position: relative; z-index: 10;
  padding: calc(var(--nav-h) + 5rem) clamp(1.25rem,5vw,4rem) 5rem;
  max-width: 1200px; margin: 0 auto;
}
.ph-label {
  font-size: .74rem; font-weight: 500; letter-spacing: .26em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 1.2rem; opacity: 0;
  display: flex; align-items: center; gap: .75rem;
}
.ph-label::before { content:''; display:block; width:28px; height:1px; background:var(--accent); }
.ph-title {
  font-family: var(--fd);
  font-size: clamp(2.8rem,6.5vw,7rem);
  font-weight: 700; line-height: 1;
  letter-spacing: -.03em;
  position: relative;
  perspective: 700px;
  perspective-origin: 50% 100%;
  --ph-line-w: 0%;
  padding-bottom: .25em;
}
.ph-title .char {
  display: inline-block;
  transform-style: preserve-3d;
  transform-origin: 50% 60%;
  will-change: transform, opacity, filter;
  opacity: 0;
}
.ph-title .word { display: inline-block; }
/* Linea cyan sotto il titolo — disegnata via JS animando --ph-line-w */
.ph-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: var(--ph-line-w);
  height: 2px;
  background: linear-gradient(to right, var(--accent), rgba(0,212,255,0));
  border-radius: 1px;
  box-shadow: 0 0 10px rgba(0,212,255,.3);
  pointer-events: none;
}
.ph-sub {
  font-size: clamp(1.05rem,1.4vw,1.18rem); color: rgba(255,255,255,.78);
  line-height: 1.7; max-width: 580px;
  margin-top: 1.5rem; opacity: 0;
}

/* hero/header → content fade */
.fade-to-bg {
  height: 120px; position: relative; z-index: 10;
  background: linear-gradient(to bottom, transparent, var(--navy));
  pointer-events: none;
}

/* ── SECTIONS ── */
.section {
  position: relative; z-index: 10;
  background: var(--navy);
  padding: 7rem clamp(1.25rem,5vw,4rem);
}
@media (max-width: 768px) { .section { padding: 4.5rem clamp(1.25rem,5vw,2rem); } }
.section-inner { max-width: 1080px; margin: 0 auto; }

.sec-label {
  font-size: .74rem; font-weight: 500; letter-spacing: .26em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 1rem; opacity: 0; transform: translateY(8px);
  display: flex; align-items: center; gap: .65rem;
}
.sec-label::before { content:''; display:block; width:22px; height:1px; background:var(--accent); }

.sec-title {
  font-family: var(--fd);
  font-size: clamp(2rem,3.8vw,3.2rem);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 3rem;
  position: relative;
  perspective: 600px;
  perspective-origin: 50% 100%;
  --sec-line-w: 0%;
  padding-bottom: .25em;
}
.sec-title .char {
  display: inline-block;
  transform-style: preserve-3d;
  transform-origin: 50% 60%;
  will-change: transform, opacity, filter;
  opacity: 0;
}
.sec-title .word { display: inline-block; }
.sec-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: var(--sec-line-w);
  height: 1px;
  background: linear-gradient(to right, var(--accent), rgba(0,212,255,0));
  box-shadow: 0 0 6px rgba(0,212,255,.25);
  pointer-events: none;
}

.divider {
  height: 1px; position: relative; z-index: 10; background: var(--navy);
  background: linear-gradient(to right, transparent, rgba(0,212,255,.14), transparent);
}

/* ── PORTAL CARDS (index) ── */
.portal-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1px; background: rgba(255,255,255,.04);
}
@media (max-width: 900px)  { .portal-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px)  { .portal-grid { grid-template-columns: 1fr; } }

.portal-card {
  background: var(--navy); padding: 2.6rem clamp(1.3rem,2.4vw,2.4rem);
  text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; gap: 1.1rem;
  position: relative; overflow: hidden;
  opacity: 0; transform: translateY(18px);
  transition: background .4s, transform .4s cubic-bezier(.16,1,.3,1);
  isolation: isolate;
}
.portal-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(to right, var(--accent), var(--purple));
  transform: scaleX(0); transform-origin: left;
  transition: transform .55s cubic-bezier(.16,1,.3,1);
  z-index: 1;
}
.portal-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(0,212,255,.08), transparent 50%);
  opacity: 0; transition: opacity .5s;
  pointer-events: none; z-index: 0;
}
.portal-card > * { position: relative; z-index: 1; }
.portal-card:hover { background: rgba(255,255,255,.03); }
.portal-card:hover::before { transform: scaleX(1); }
.portal-card:hover::after { opacity: 1; }
.portal-card:hover .pc-num { color: var(--accent); }

.pc-num  { font-size: .72rem; font-weight: 500; letter-spacing: .22em; color: var(--t3); font-family: var(--fd); }
.pc-title { font-family: var(--fd); font-size: 1.52rem; font-weight: 700; line-height: 1.2; }
.pc-desc  { font-size: .92rem; color: var(--t2); line-height: 1.65; flex: 1; }
.pc-arrow {
  font-size: 1.15rem; color: var(--accent);
  transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .3s;
  align-self: flex-start;
  display: inline-block;
  opacity: .55;
}
.portal-card:hover .pc-arrow { transform: translateX(8px); opacity: 1; }

/* ── BIO ── */
.bio-grid {
  display: grid; grid-template-columns: 3fr 2fr;
  gap: 5rem; align-items: start;
}
@media (max-width: 820px) { .bio-grid { grid-template-columns: 1fr; gap: 3rem; } }

.bio-text p {
  font-size: 1.06rem; line-height: 1.82;
  color: rgba(255,255,255,.78); margin-bottom: 1.4rem;
  opacity: 0; transform: translateY(12px);
}
.bio-text strong { color: var(--text); font-weight: 600; }

.bio-quote {
  font-family: var(--fd); font-style: italic;
  font-size: 1.06rem; line-height: 1.78;
  color: rgba(0,212,255,.85);
  border-left: 1.5px solid rgba(0,212,255,.5);
  padding-left: 1.35rem; margin-top: 2rem;
  opacity: 0;
}

/* ── TIMELINE ── */
.timeline { position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 4px; top: 12px; bottom: 0;
  width: 1px; background: linear-gradient(to bottom, rgba(0,212,255,.38), transparent);
}
.tl-item {
  position: relative; padding-left: 1.85rem;
  margin-bottom: 2rem; opacity: 0; transform: translateX(-10px);
}
.tl-item::before {
  content: ''; position: absolute; left: 0; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--navy); border: 1.5px solid var(--accent);
  box-shadow: 0 0 7px rgba(0,212,255,.5);
}
.tl-year {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em;
  color: var(--accent); margin-bottom: .25rem;
}
.tl-cert {
  font-weight: 500; font-size: .95rem;
  color: var(--text); line-height: 1.4; margin-bottom: .25rem;
}
.tl-org { font-size: .82rem; color: var(--t2); }

/* ── PROJET CARDS ── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(315px,1fr));
  gap: 1.2rem;
}

.proj-card {
  background: rgba(255,255,255,.022);
  border: 1px solid rgba(255,255,255,.07);
  padding: 2rem; position: relative; overflow: hidden;
  opacity: 0; transform: translateY(18px);
  transition: background .35s, border-color .35s, transform .35s;
}
.proj-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 20% 80%, rgba(0,212,255,.04), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(123,47,255,.04), transparent 55%);
  opacity: 0; transition: opacity .4s;
}
.proj-card:hover {
  background: rgba(255,255,255,.038);
  border-color: rgba(0,212,255,.22);
  transform: translateY(-3px);
}
.proj-card:hover::after { opacity: 1; }

.proj-tag {
  display: inline-block;
  font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(0,212,255,.32);
  padding: .28rem .7rem; margin-bottom: .9rem;
}
.proj-num { font-size: .72rem; font-weight: 500; letter-spacing: .2em; color: var(--t3); margin-bottom: .4rem; font-family: var(--fd); }
.proj-title {
  font-family: var(--fd); font-size: 1.32rem;
  font-weight: 700; line-height: 1.25; margin-bottom: .8rem;
}
.proj-problem {
  font-size: .92rem; color: var(--t2);
  line-height: 1.7; margin-bottom: 1.4rem;
}
.proj-stats {
  display: flex; gap: 1.4rem; flex-wrap: wrap;
  padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.06);
}
.stat-val {
  font-family: var(--fd); font-size: 1.42rem;
  font-weight: 700; color: var(--accent);
  line-height: 1; display: block;
}
.stat-lbl { font-size: .7rem; letter-spacing: .08em; color: var(--t2); display: block; margin-top: 4px; font-weight: 500; }

/* ── BLOG ── */
.blog-filters {
  display: flex; flex-wrap: wrap; gap: .65rem;
  margin-bottom: 2.8rem; opacity: 0;
}
.filt-btn {
  font-size: .7rem; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--t2);
  border: 1px solid rgba(255,255,255,.12);
  padding: .45rem 1rem; background: transparent;
  cursor: pointer; transition: color .22s, border-color .22s, background .22s;
}
.filt-btn:hover, .filt-btn.active { color: var(--accent); border-color: rgba(0,212,255,.5); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(275px,1fr));
  gap: 1.2rem;
}
.blog-card {
  padding: 1.7rem;
  background: rgba(255,255,255,.018);
  border: 1px solid rgba(255,255,255,.055);
  transition: border-color .28s, background .28s, transform .28s;
  opacity: 0; transform: translateY(14px);
}
.blog-card:hover {
  border-color: rgba(0,212,255,.2);
  background: rgba(0,212,255,.024);
  transform: translateY(-2px);
}
.bl-cat {
  font-size: .7rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: .7rem;
}
.bl-title {
  font-family: var(--fd); font-size: 1.08rem;
  font-weight: 600; line-height: 1.4; margin-bottom: .8rem;
}
.bl-meta { font-size: .76rem; color: var(--t3); letter-spacing: .08em; }
.bl-arrow {
  display: block; margin-top: .85rem; font-size: .74rem;
  color: var(--accent); letter-spacing: .12em; font-weight: 500;
  opacity: 0; transition: opacity .22s;
}
.blog-card:hover .bl-arrow { opacity: 1; }

/* ── CONTACT ── */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5rem; align-items: start;
}
@media (max-width: 768px) { .contact-layout { grid-template-columns: 1fr; gap: 3rem; } }

.contact-intro p {
  font-size: 1.04rem; line-height: 1.88;
  color: var(--t2); margin-bottom: 1.3rem;
  opacity: 0;
}
.contact-email {
  display: inline-block; font-family: var(--fd);
  font-size: 1.35rem; font-weight: 700;
  color: var(--accent); text-decoration: none;
  margin-top: .75rem; opacity: 0;
  transition: color .2s;
}
.contact-email:hover { color: var(--text); }

.form-group { margin-bottom: 1.8rem; opacity: 0; transform: translateY(10px); position: relative; }
.form-group label {
  display: block; font-size: .7rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.72); margin-bottom: .6rem;
}
.form-group input,
.form-group textarea {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid rgba(255,255,255,.28);
  padding: .8rem 0; color: var(--text);
  font-family: var(--fb); font-size: 1rem; outline: none;
  cursor: text; transition: border-color .28s, padding-bottom .28s;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,.32); }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); border-bottom-width: 2px; padding-bottom: calc(.8rem - 1px); }
.form-group input:hover,
.form-group textarea:hover { border-color: rgba(255,255,255,.45); }
.form-group textarea { resize: none; height: 125px; }

.btn-submit {
  display: inline-flex; align-items: center; gap: .75rem;
  background: transparent; border: 1px solid var(--accent);
  color: var(--accent); padding: 1rem 2.4rem;
  font-family: var(--fb); font-size: .8rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  cursor: pointer; opacity: 0; position: relative; overflow: hidden;
  transition: background .28s, color .28s, transform .28s, box-shadow .28s;
}
.btn-submit:hover { box-shadow: 0 8px 28px -10px rgba(0,212,255,.6); transform: translateY(-2px); }
.btn-submit:hover { background: var(--accent); color: var(--navy); }
.btn-submit svg { transition: transform .28s; }
.btn-submit:hover svg { transform: translateX(4px); }

/* ── SITE FOOTER ── */
.site-footer {
  position: relative; z-index: 10; background: var(--navy);
  border-top: 1px solid rgba(0,212,255,.1);
  padding: 2.5rem clamp(1.25rem,5vw,4rem);
}
.sf-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 1.5rem;
}
.sf-logo {
  display: flex; align-items: center;
  text-decoration: none; flex-shrink: 0;
}
.sf-logo img {
  height: 30px; width: auto; display: block;
  border-radius: 4px;
}
.sf-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: center; }
.sf-nav a, .sf-nav .cookie-prefs-link {
  font-size: .76rem; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--t2); text-decoration: none;
  transition: color .22s;
}
.sf-nav a:hover, .sf-nav .cookie-prefs-link:hover { color: var(--accent); }
.sf-right { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.sf-email { font-size: .85rem; color: var(--t2); text-decoration: none; transition: color .22s; font-weight: 500; }
.sf-email:hover { color: var(--accent); }
.sf-copy { font-size: .72rem; color: var(--t3); letter-spacing: .08em; }
.sf-social { display: flex; gap: 1.1rem; }
.social-link { display: inline-flex; align-items: center; gap: .35rem; }
.social-icon { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
@media (max-width: 640px) {
  .sf-inner { flex-direction: column; align-items: flex-start; }
  .sf-right { align-items: flex-start; }
  .sf-social { gap: 1.4rem; }
}

/* ── SPLITTING ── */
[data-splitting] .char { display: inline-block; }

/* ── CARD TILT ── */
.proj-card, .blog-card, .guide-card, .lab-card {
  will-change: transform;
}

/* ── PROJ CARD hover: tighter scale + brighter border ── */
.proj-card:hover {
  background: rgba(255,255,255,.042) !important;
  border-color: rgba(0,212,255,.28) !important;
}

/* ── MARQUEE BAND ── */
.marquee-outer {
  overflow: hidden; width: 100%;
  position: relative; z-index: 10;
  background: var(--navy);
  border-top: 1px solid rgba(0,212,255,.09);
  border-bottom: 1px solid rgba(0,212,255,.09);
  padding: 1rem 0;
}
.marquee-track {
  display: flex; white-space: nowrap; width: max-content;
}
.marquee-item {
  font-family: var(--fd); font-size: clamp(.82rem, 1.2vw, .98rem);
  font-weight: 400; font-style: italic;
  color: rgba(255,255,255,.72); letter-spacing: .12em; text-transform: uppercase;
  padding: 0 3rem; flex-shrink: 0;
}
.marquee-sep {
  color: var(--accent); opacity: .55; padding: 0 .5rem;
}

/* ── KEYBOARD FOCUS ── */
*:focus { outline: none; }
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}
.btn-submit:focus-visible { outline-offset: 6px; }
input:focus-visible, textarea:focus-visible { outline: none; }
@supports selector(:focus-visible) {
  a:focus-visible, button:focus-visible {
    box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px var(--accent);
    outline: none;
  }
}

/* ── SKIP LINK (WCAG 2.4.1 bypass blocks) ── */
.skip-link {
  position: absolute; top: -100px; left: 12px; z-index: 10000;
  background: var(--navy); color: var(--text);
  border: 1px solid var(--accent);
  padding: .8rem 1.4rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .04em;
  text-decoration: none; border-radius: 3px;
  transition: top .2s ease;
}
.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--accent); outline-offset: 3px;
}

/* ── COOKIE NOTICE (minimal, GDPR-friendly) ── */
.cookie-bar {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  z-index: 9700; max-width: 540px; margin: 0 auto;
  background: rgba(10,10,26,.92); backdrop-filter: blur(14px);
  border: 1px solid rgba(0,212,255,.22);
  padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  transform: translateY(120%); opacity: 0;
  transition: transform .6s cubic-bezier(.16,1,.3,1), opacity .6s;
}
.cookie-bar.show { transform: translateY(0); opacity: 1; }
.cookie-bar p {
  font-size: .8rem; color: var(--t2); line-height: 1.55; flex: 1; min-width: 220px; margin: 0;
}
.cookie-bar p a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.cookie-bar-actions { display: flex; gap: .6rem; flex-shrink: 0; }
.cookie-bar-btn {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  background: var(--accent); color: var(--navy);
  border: none; padding: .55rem 1.1rem; cursor: pointer;
  transition: background .22s, transform .22s;
  font-family: var(--fb);
}
.cookie-bar-btn:hover { background: var(--accent-soft); transform: translateY(-1px); }
.cookie-bar-btn-ghost {
  background: transparent; color: var(--t2);
  border: 1px solid rgba(255,255,255,.18);
}
.cookie-bar-btn-ghost:hover { background: rgba(255,255,255,.06); color: var(--text); }
.cookie-prefs-link {
  cursor: pointer; background: none; border: none; padding: 0; margin: 0;
  font: inherit; display: inline;
}
@media (max-width: 480px) {
  .cookie-bar { padding: .85rem 1rem; gap: .7rem; }
  .cookie-bar p { font-size: .76rem; }
  .cookie-bar-actions { width: 100%; }
  .cookie-bar-btn { flex: 1; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  html { cursor: auto; }
  .cursor, .cursor-ring { display: none !important; }
}
