/* ═══════════════════════════════════════════════════════════════════════
   FG.Web — Design System v2 (Editorial Refinement)
   ─────────────────────────────────────────────────────────────────────
   Materials:  Damask™ (logo + hero + CTA only) · Crystal Matter™ · Neural Mesh™
   Background: pure #FFFFFF + Quantum Canvas™ micro-grain (always)
   ═══════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   ────────────────────────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --fg-bg:           #FFFFFF;
  --fg-surface:      #FBFBFC;
  --fg-line:         rgba(10, 12, 20, 0.07);
  --fg-line-strong:  rgba(10, 12, 20, 0.12);
  --fg-line-soft:    rgba(10, 12, 20, 0.04);

  /* Ink (intentionally near-monochrome — color lives only in Damask) */
  --fg-ink-1:        #06080F;
  --fg-ink-2:        #14171F;
  --fg-ink-3:        #2A2E38;
  --fg-ink-4:        #5A5F6B;
  --fg-ink-5:        #8A8F9A;
  --fg-ink-6:        #B8BCC4;

  /* Damask accent (echoes the texture: blues, magenta, copper) */
  --fg-damask-1:     #1E3CC4;
  --fg-damask-2:     #6F35E0;
  --fg-damask-3:     #B83AB6;
  --fg-damask-4:     #E94B3C;
  --fg-damask-5:     #FFB347;

  /* Neural node colors */
  --fg-node-core:    #0A0D18;
  --fg-node-ai:      #4338CA;
  --fg-node-sci:     #B83AB6;
  --fg-node-eng:     #E94B3C;

  /* Typography — Apple San Francisco system stack
     SF Pro Display → titoli, hero, headings, CTA
     SF Pro Text    → UI, descrizioni, pulsanti
     SF Mono        → elementi tecnici (ONLINE, CET, metadata) */
  --fg-font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Helvetica Neue', sans-serif;
  --fg-font-body:    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Helvetica Neue', sans-serif;
  --fg-font-mono:    ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Monaco, monospace;

  /* Type scale (modular, perfect-fourth-ish) */
  --fg-fs-mono:      11px;    /* meta · index · code labels */
  --fg-fs-eyebrow:   13px;    /* eyebrow + nav */
  --fg-fs-body-sm:   14px;    /* card body · tags */
  --fg-fs-body:      16px;    /* default body */
  --fg-fs-lead:      clamp(20px, 1.6vw, 24px);
  --fg-fs-lead-lg:   clamp(22px, 2.2vw, 30px);
  --fg-fs-h3:        clamp(22px, 2.2vw, 28px);
  --fg-fs-h2:        clamp(40px, 5.6vw, 88px);
  --fg-fs-h1:        clamp(72px, 16vw, 240px);

  /* Spacing — 4-based scale */
  --fg-s-1: 4px; --fg-s-2: 8px; --fg-s-3: 12px; --fg-s-4: 16px;
  --fg-s-5: 20px; --fg-s-6: 24px; --fg-s-7: 32px; --fg-s-8: 40px;
  --fg-s-9: 56px; --fg-s-10: 72px; --fg-s-11: 96px; --fg-s-12: 128px;

  /* Radius — unified scale */
  --fg-rad-xs: 8px;
  --fg-rad-sm: 12px;
  --fg-rad-md: 18px;
  --fg-rad-lg: 24px;
  --fg-rad-xl: 32px;
  --fg-rad-pill: 999px;

  /* Elevation — unified shadow scale */
  --fg-shadow-1:
    0 1px 2px rgba(10, 12, 30, 0.04),
    0 2px 6px -2px rgba(10, 12, 30, 0.06);
  --fg-shadow-2:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 0 0 1px rgba(255,255,255,0.4) inset,
    0 12px 32px -18px rgba(10, 12, 30, 0.18),
    0 2px 6px -2px rgba(10, 12, 30, 0.06);
  --fg-shadow-3:
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 0 0 1px rgba(255,255,255,0.5) inset,
    0 24px 56px -28px rgba(10, 12, 30, 0.22),
    0 4px 12px -4px rgba(10, 12, 30, 0.08);

  /* Motion */
  --fg-ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --fg-ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --fg-ease-soft:  cubic-bezier(0.4, 0, 0.2, 1);
  --fg-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --fg-d-fast:     220ms;
  --fg-d-base:     420ms;
  --fg-d-slow:     760ms;

  /* Container */
  --fg-max:        1440px;
  --fg-pad-x:      clamp(24px, 5vw, 88px);
}

/* ──────────────────────────────────────────────────────────────────
   2. RESET
   ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "kern", "liga", "calt";
  scroll-behavior: auto;
  background: var(--fg-bg);
}

body {
  font-family: var(--fg-font-body);
  font-size: var(--fg-fs-body);
  line-height: 1.55;
  color: var(--fg-ink-2);
  background: var(--fg-bg);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: oldstyle-nums proportional-nums;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
img, svg, canvas { display: block; max-width: 100%; }
::selection { background: rgba(30, 60, 196, 0.16); color: var(--fg-ink-1); }
.fg-svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ──────────────────────────────────────────────────────────────────
   3. QUANTUM CANVAS™ — almost-invisible micro-grain
   ────────────────────────────────────────────────────────────────── */
.quantum-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(30, 60, 196, 0.020) 0%, transparent 60%),
    radial-gradient(80% 60% at 100% 100%, rgba(184, 58, 182, 0.015) 0%, transparent 65%),
    radial-gradient(70% 50% at 0% 80%, rgba(233, 75, 60, 0.012) 0%, transparent 70%);
}
.quantum-canvas::before {
  content: "";
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
  background-size: 240px 240px;
  opacity: 0.018;
  mix-blend-mode: multiply;
  animation: grain-shift 8s steps(8) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-2%, 1%); }
  50%  { transform: translate(1%, -2%); }
  75%  { transform: translate(-1%, 2%); }
  100% { transform: translate(0,0); }
}

/* ──────────────────────────────────────────────────────────────────
   4. DYNAMIC CURSOR
   ────────────────────────────────────────────────────────────────── */
.fg-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
.fg-cursor__dot {
  position: absolute;
  top: 0; left: 0;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: width 240ms var(--fg-ease), height 240ms var(--fg-ease), margin 240ms var(--fg-ease);
}
.fg-cursor__ring {
  position: absolute;
  top: 0; left: 0;
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 50%;
  transition: width 320ms var(--fg-ease), height 320ms var(--fg-ease),
              margin 320ms var(--fg-ease), border-color 320ms var(--fg-ease);
}
.fg-cursor.is-hovering .fg-cursor__dot { width: 0; height: 0; margin: 0; }
.fg-cursor.is-hovering .fg-cursor__ring {
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-color: rgba(255,255,255,0.95);
}
@media (hover: none) { .fg-cursor { display: none; } }

/* ──────────────────────────────────────────────────────────────────
   5. FG SIGNATURE DAMASK™ — Premium luxury material
   Used ONLY for: FG logo · Hero monumental title · primary CTA
   Multi-layer composition for true physical depth.
   ────────────────────────────────────────────────────────────────── */

/* Base damask text — used at any size
   ─────────────────────────────────────────────────────────────────
   Composizione (dal basso verso l'alto):
     · LAYER 3 (base): texture damascata — POSIZIONE FISSA, niente scroll
                       → il colore è "scolpito" nella lettera, mai
                         si vede il bordo dell'immagine
     · LAYER 2 (medio): sheen diagonale animato — scorre dolcemente,
                        ma è un gradient puro CSS (perfettamente seamless)
     · LAYER 1 (alto): luce verticale fissa — top-light + ombra di base
   ───────────────────────────────────────────────────────────────── */
.damask-text {
  position: relative;
  display: inline-block;
  isolation: isolate;
  background-image:
    /* Layer 1 — verticale: highlight in alto + ombra in basso */
    linear-gradient(180deg,
      rgba(255,255,255,0.55) 0%,
      rgba(255,255,255,0.0)  35%,
      rgba(255,255,255,0.0)  65%,
      rgba(10,12,20,0.10)    100%),
    /* Layer 2 — sheen animato (gradient puro: seamless) */
    linear-gradient(115deg,
      rgba(255,255,255,0)    30%,
      rgba(255,255,255,0.42) 48%,
      rgba(255,255,255,0)    66%),
    /* Layer 3 — texture damascata FISSA · cover · centrata */
    url("/static/damask-texture-2k.jpg");
  background-size:
    100% 100%,
    220% 100%,
    cover;            /* la texture copre completamente la box */
  background-position:
    0% 0%,
    -50% 0%,
    center center;    /* fissa al centro: nessuna ripetizione visibile */
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-blend-mode: overlay, soft-light, normal;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  /* Soft physical shadow + atmospheric bloom — no aggressive bevel */
  filter:
    drop-shadow(0 1px 0 rgba(10, 12, 20, 0.10))
    drop-shadow(0 2px 1px rgba(10, 12, 20, 0.06))
    drop-shadow(0 10px 24px rgba(30, 60, 196, 0.14));
  /* Anima SOLO lo sheen (Layer 2): texture rimane fissa */
  animation: damask-sheen-text 9s var(--fg-ease) infinite;
  will-change: background-position;
}
@keyframes damask-sheen-text {
  /* La texture (3°) e il gradient verticale (1°) restano fermi.
     Lo sheen diagonale (2°) scorre da -50% a +150% e poi ricomincia
     fuori vista — non si vede mai un "salto". */
  0%   { background-position: 0% 0%,  -60% 0%, center center; }
  60%  { background-position: 0% 0%,  160% 0%, center center; }
  100% { background-position: 0% 0%,  160% 0%, center center; }
}

/* Use the 4K source at monumental sizes \u2014 UNIFORM texture across
   FG and Horizon: la texture \u00e8 dimensionata in base al VIEWPORT,
   non al singolo span, quindi entrambe le parole vedono la stessa
   "scala" di damascatura (niente texture pi\u00f9 grande in Horizon). */
.damask-text--monumental {
  background-image:
    linear-gradient(180deg,
      rgba(255,255,255,0.62) 0%,
      rgba(255,255,255,0.0)  32%,
      rgba(255,255,255,0.0)  62%,
      rgba(10,12,20,0.14)    100%),
    linear-gradient(115deg,
      rgba(255,255,255,0)    28%,
      rgba(255,255,255,0.48) 50%,
      rgba(255,255,255,0)    72%),
    url("/static/damask-texture-4k.jpg");
  /* La texture di base si scala alla DIMENSIONE DEL VIEWPORT (90vw),
     non alla dimensione del singolo span. Risultato: FG e Horizon
     mostrano la stessa scala di Timascus, come se fossero "ritagliate"
     da un unico piano metallico. */
  background-size:
    100% 100%,
    220% 100%,
    90vw auto;
  background-position:
    0% 0%,
    -60% 0%,
    center center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  filter:
    drop-shadow(0 2px 0 rgba(10, 12, 20, 0.10))
    drop-shadow(0 8px 6px rgba(10, 12, 20, 0.08))
    drop-shadow(0 32px 56px rgba(30, 60, 196, 0.20))
    drop-shadow(0 4px 14px rgba(184, 58, 182, 0.14));
}

/* Su mobile il viewport \u00e8 stretto: la texture sar\u00e0 troppo zoomata.
   Compensiamo con una scala assoluta basata sull'altezza del testo. */
@media (max-width: 920px) {
  .damask-text--monumental {
    background-size: 100% 100%, 220% 100%, 180vw auto;
  }
}
@media (max-width: 560px) {
  .damask-text--monumental {
    background-size: 100% 100%, 220% 100%, 220vw auto;
  }
}

/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n   5b. LIQUID GLASS OVERLAY (Apple HIG \u2014 thin glass plate on top)\n   Applicato come ::after sopra la texture damask (titolo monumentale)\n   e come ::before sui section title.\n   \u2500 trasparenza altissima (~5\u20138%)\n   \u2500 bordo bianco brillante su top/left (1\u20131.5px)\n   \u2500 specular highlight diagonale\n   \u2500 ombra interna delicata bottom/right\n   \u2500 nessun blur sotto al testo \u2014 simulazione tramite gradient\n   \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.hero__title-line {\n  position: relative;\n  display: inline-block;\n  isolation: isolate;\n}\n/* Vetro Apple sopra la Timascus texture (monumental).\n   Non copre mai del tutto: opacit\u00e0 max 0.10 sul gradient body.\n   Bordo brillante top-left + bagliore specular crescente. */\n.hero__title-line::after {\n  content: \"\";\n  position: absolute;\n  inset: -6% -2% -6% -2%;\n  pointer-events: none;\n  z-index: 3;\n  border-radius: 24px;\n  /* Body del vetro: gradiente molto trasparente con leggero tilt */\n  background:\n    /* highlight specular diagonale (in alto a sinistra) */\n    radial-gradient(120% 60% at 18% 12%,\n      rgba(255,255,255,0.42) 0%,\n      rgba(255,255,255,0.08) 32%,\n      rgba(255,255,255,0) 60%),\n    /* riflesso secondario in basso destra */\n    radial-gradient(80% 40% at 88% 92%,\n      rgba(255,255,255,0.18) 0%,\n      rgba(255,255,255,0) 60%),\n    /* tinta neutra del vetro */\n    linear-gradient(135deg,\n      rgba(255,255,255,0.10) 0%,\n      rgba(255,255,255,0.02) 50%,\n      rgba(255,255,255,0.06) 100%);\n  border: 1px solid transparent;\n  /* Bordo simulato \"a doppia linea\": bright top-left, soft bottom-right */\n  box-shadow:\n    inset  1px  1px 0 rgba(255,255,255,0.55),\n    inset  2px  2px 1px rgba(255,255,255,0.18),\n    inset -1px -1px 0 rgba(10,12,20,0.04),\n    inset -2px -2px 4px rgba(10,12,20,0.025),\n    0 20px 40px -28px rgba(130,135,150,0.20),\n    0 40px 80px -40px rgba(130,135,150,0.18);\n  mix-blend-mode: normal;\n  opacity: 0.92;\n  animation: liquid-glass-breathe 11s var(--fg-ease) infinite;\n}\n@keyframes liquid-glass-breathe {\n  0%, 100% { opacity: 0.90; transform: translateY(0) scale(1); }\n  50%      { opacity: 0.96; transform: translateY(-0.4px) scale(1.001); }\n}\n\n/* Liquid Glass overlay sui section title \u2014 versione pi\u00f9 sottile */\n.section__title {\n  position: relative;\n  isolation: isolate;\n}\n.section__title::before {\n  content: \"\";\n  position: absolute;\n  /* Si estende leggermente oltre il testo per simulare la lastra di vetro */\n  inset: -0.18em -0.4em -0.18em -0.4em;\n  pointer-events: none;\n  z-index: -1;\n  border-radius: 18px;\n  background:\n    radial-gradient(100% 80% at 20% 15%,\n      rgba(255,255,255,0.55) 0%,\n      rgba(255,255,255,0.08) 40%,\n      rgba(255,255,255,0) 70%),\n    linear-gradient(140deg,\n      rgba(255,255,255,0.06) 0%,\n      rgba(255,255,255,0.01) 50%,\n      rgba(255,255,255,0.04) 100%);\n  border: 1px solid rgba(255,255,255,0.5);\n  box-shadow:\n    inset 1px 1px 0 rgba(255,255,255,0.7),\n    inset -1px -1px 0 rgba(10,12,20,0.03),\n    0 8px 24px -16px rgba(130,135,150,0.18),\n    0 18px 40px -24px rgba(130,135,150,0.14);\n  backdrop-filter: blur(0.5px) saturate(105%);\n  -webkit-backdrop-filter: blur(0.5px) saturate(105%);\n  opacity: 0.85;\n  transition: opacity 600ms var(--fg-ease);\n}\n.section__title:hover::before { opacity: 1; }\n\n/* Headings minori dentro alle card \u2014 micro-glass, opzionale & soft */\n.card__title,\n.project__title,\n.vision__node-title {\n  position: relative;\n}"}]

/* ──────────────────────────────────────────────────────────────────
   6. BRAND MARK (FG.Web composite)
   ────────────────────────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--fg-font-display);
  letter-spacing: -0.028em;
  line-height: 1;
  font-variation-settings: "opsz" 36;
}
.brand--sm { font-size: 22px; }
.brand--md { font-size: 28px; }

.brand__fg  { font-weight: 700; }
.brand__dot { color: #000000; font-weight: 700; margin: 0 -0.02em 0 -0.01em; }
.brand__web { color: var(--fg-ink-1); font-weight: 500; }

/* ──────────────────────────────────────────────────────────────────
   7. FG CRYSTAL MATTER™ — refined adaptive surface
   ────────────────────────────────────────────────────────────────── */
.crystal-matter {
  position: relative;
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.86) 0%,
      rgba(251, 251, 253, 0.66) 100%);
  border: 1px solid var(--fg-line);
  border-radius: var(--fg-rad-lg);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--fg-shadow-2);
  transition:
    transform 560ms var(--fg-ease),
    box-shadow 560ms var(--fg-ease),
    border-color 560ms var(--fg-ease);
}
/* Refined edge — extremely subtle prism */
.crystal-matter::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(30, 60, 196, 0.10),
    rgba(184, 58, 182, 0.06) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(233, 75, 60, 0.07));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}
/* Cursor-tracking soft highlight */
.crystal-matter::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(50% 80% at var(--mx, 50%) var(--my, 0%),
    rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 60%);
  opacity: 0;
  transition: opacity 480ms var(--fg-ease);
  pointer-events: none;
  mix-blend-mode: screen;
}
.crystal-matter:hover {
  border-color: rgba(10, 12, 20, 0.09);
  box-shadow: var(--fg-shadow-3);
}
.crystal-matter:hover::after { opacity: 1; }

/* ──────────────────────────────────────────────────────────────────
   8. SECTION PRIMITIVES
   ────────────────────────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 2;
  max-width: var(--fg-max);
  margin: 0 auto;
  padding: clamp(120px, 16vw, 220px) var(--fg-pad-x) clamp(80px, 10vw, 140px);
}

.section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  column-gap: clamp(24px, 3vw, 40px);
  row-gap: 16px;
  margin-bottom: clamp(56px, 7vw, 96px);
}
/* Section index badge — Apple minimal: più piccolo, bordo sottile,
   ombre ridotte, spaziatura interna ariosa */
.section__index {
  font-family: var(--fg-font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--fg-ink-4);
  padding: 4px 10px;
  border: 0.5px solid rgba(10,12,20,0.10);
  border-radius: var(--fg-rad-pill);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,0.8),
    0 1px 2px rgba(10,12,20,0.025);
  align-self: end;
  margin-bottom: 6px;
}
.section__title-line {
  grid-column: 2;
  grid-row: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--fg-line), transparent);
  align-self: end;
  margin-bottom: 22px;
}
.section__title {
  grid-column: 1 / -1;
  font-family: var(--fg-font-display);
  font-size: var(--fg-fs-h2);
  font-weight: 400;
  letter-spacing: -0.038em;
  line-height: 0.96;
  color: var(--fg-ink-1);
  font-variation-settings: "opsz" 144;
  margin-top: 8px;
}
.section__lead {
  max-width: 64ch;
  margin: 0 0 clamp(48px, 6vw, 72px);
  font-family: var(--fg-font-display);
  font-weight: 300;
  font-size: var(--fg-fs-lead-lg);
  line-height: 1.42;
  color: var(--fg-ink-3);
  letter-spacing: -0.013em;
  font-variation-settings: "opsz" 72;
}

/* ──────────────────────────────────────────────────────────────────
   9. NAVIGATION
   ────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: clamp(16px, 1.8vw, 24px);
  left: 50%;
  transform: translate3d(-50%, -120%, 0);
  width: min(1280px, calc(100vw - 32px));
  z-index: 100;
  transition: transform 760ms var(--fg-ease) 200ms;
}
.nav.is-revealed { transform: translate3d(-50%, 0, 0); }

.nav__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 12px 16px 12px 22px;
  border-radius: var(--fg-rad-pill);
}

.nav__brand-link {
  display: inline-flex;
  padding: 4px 6px;
}

.nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: var(--fg-fs-eyebrow);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg-ink-3);
  border-radius: var(--fg-rad-pill);
  transition: color var(--fg-d-fast) var(--fg-ease), background var(--fg-d-fast) var(--fg-ease);
  position: relative;
}
.nav__link-index {
  font-family: var(--fg-font-mono);
  font-size: 10px;
  color: var(--fg-ink-5);
  letter-spacing: 0.12em;
}
.nav__link:hover { color: var(--fg-ink-1); background: rgba(10,12,20,0.04); }
.nav__link.is-active { color: var(--fg-ink-1); background: rgba(10,12,20,0.06); }

.nav__meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 6px 14px 6px 12px;
  border-left: 1px solid var(--fg-line);
}
.nav__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-family: var(--fg-font-mono);
  letter-spacing: 0.08em;
  color: var(--fg-ink-3);
}
.nav__status-pulse {
  width: 7px; height: 7px;
  background: #25C26A;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37, 194, 106, 0.6);
  animation: pulse 2.2s var(--fg-ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 194, 106, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(37, 194, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 194, 106, 0); }
}
.nav__time {
  font-family: var(--fg-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-ink-4);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 920px) {
  .nav__links { display: none; }
  .nav__meta { border-left: 0; padding-left: 0; }
}

/* ──────────────────────────────────────────────────────────────────
   10. BUTTONS
   ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  position: relative;
  isolation: isolate;
  border-radius: var(--fg-rad-pill);
  transition: transform 480ms var(--fg-ease);
  will-change: transform;
}
.btn__inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 19px 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: inherit;
}
.btn__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--fg-d-base) var(--fg-ease);
}
.btn:hover .btn__arrow { transform: translate(3px, -3px); }

/* Primary CTA — full damask material
   Stessa logica del titolo: texture FISSA · cover · centrata.
   Il "movimento" è dato solo dallo sheen luminoso (gradient puro). */
/* Primary CTA — Apple-refined: vetro più leggero, gerarchia maggiore */
.btn--damask {
  color: #ffffff;
  background: #0a0d18;
  box-shadow:
    0 0.5px 0 rgba(255,255,255,0.22) inset,
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 14px 32px -14px rgba(10,12,20,0.32),
    0 4px 12px -6px rgba(30, 60, 196, 0.28),
    0 2px 6px -2px rgba(184, 58, 182, 0.18);
  overflow: hidden;
  transition: transform 480ms var(--fg-ease), box-shadow 480ms var(--fg-ease);
}
.btn--damask:hover {
  box-shadow:
    0 0.5px 0 rgba(255,255,255,0.28) inset,
    0 1px 0 rgba(255,255,255,0.1) inset,
    0 18px 40px -14px rgba(10,12,20,0.36),
    0 6px 16px -6px rgba(30, 60, 196, 0.34),
    0 3px 8px -2px rgba(184, 58, 182, 0.22);
}
/* Liquid glass overlay sul CTA primario — thin glass sopra damask */
.btn--damask .btn__inner {
  position: relative;
  z-index: 2;
}
.btn--damask .btn__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(100% 80% at 20% 15%,
      rgba(255,255,255,0.30) 0%,
      rgba(255,255,255,0.04) 45%,
      rgba(255,255,255,0) 70%),
    linear-gradient(180deg,
      rgba(255,255,255,0.10) 0%,
      rgba(255,255,255,0) 50%,
      rgba(10,12,20,0.06) 100%);
  box-shadow:
    inset 0.5px 0.5px 0 rgba(255,255,255,0.35),
    inset -0.5px -0.5px 0 rgba(10,12,20,0.10);
  z-index: 1;
}
.btn--damask::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("/static/damask-texture-2k.jpg");
  /* cover + center: niente ripetizione, niente bordi visibili */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: saturate(1.05) contrast(1.04);
  z-index: -1;
  /* Nessuna animazione sulla texture — è fissa e seamless per definizione */
}
.btn--damask::after {
  /* Sheen luminoso che attraversa il bottone — gradient puro CSS,
     scivola da fuori-sinistra a fuori-destra: nessun salto. */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg,
    rgba(255,255,255,0)    35%,
    rgba(255,255,255,0.38) 50%,
    rgba(255,255,255,0)    65%);
  background-size: 240% 100%;
  background-position: -120% 0;
  background-repeat: no-repeat;
  z-index: -1;
  animation: damask-btn-sheen 7s var(--fg-ease) infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}
@keyframes damask-btn-sheen {
  0%   { background-position: -120% 0; }
  55%  { background-position:  220% 0; }
  100% { background-position:  220% 0; }
}

/* Secondary CTA — Apple ghost: bordo più sottile, hover più elegante */
.btn--ghost {
  color: var(--fg-ink-1);
  background: transparent;
  border: 0.5px solid rgba(10,12,20,0.18);
  transition:
    transform 480ms var(--fg-ease),
    background 320ms var(--fg-ease),
    border-color 320ms var(--fg-ease),
    box-shadow 320ms var(--fg-ease);
}
.btn--ghost .btn__inner { padding: 18px 26px; }
.btn--ghost:hover {
  background: rgba(10,12,20,0.035);
  border-color: rgba(10,12,20,0.32);
  box-shadow: 0 1px 2px rgba(10,12,20,0.04);
}

/* ──────────────────────────────────────────────────────────────────
   11. HERO
   ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(130px, 16vh, 200px) var(--fg-pad-x) clamp(60px, 8vh, 100px);
  overflow: hidden;
  z-index: 2;
}

.hero__webgl,
.hero__three {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.hero__three { z-index: 1; opacity: 0.85; }

.hero__grid {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--fg-max);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto auto;
  row-gap: clamp(22px, 3.2vh, 44px);
}

.hero__topline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--fg-font-mono);
  font-size: var(--fg-fs-mono);
  letter-spacing: 0.2em;
  color: var(--fg-ink-4);
  opacity: 0;
  text-transform: uppercase;
}
.hero__topline-mark { color: var(--fg-damask-1); font-size: 10px; }
.hero__topline-bar {
  flex: 0 0 80px;
  height: 1px;
  background: linear-gradient(90deg, var(--fg-line), transparent);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: var(--fg-fs-eyebrow);
  color: var(--fg-ink-4);
  opacity: 0;
}
.hero__eyebrow-label { letter-spacing: -0.005em; }
.hero__eyebrow-name {
  font-family: var(--fg-font-display);
  font-weight: 500;
  font-style: italic;
  font-size: 17px;
  color: var(--fg-ink-1);
  font-variation-settings: "opsz" 36;
}

/* Monumental title */
.hero__title {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vh, 38px);
  font-family: var(--fg-font-display);
  font-weight: 700;
  font-size: var(--fg-fs-h1);
  line-height: 0.84;
  letter-spacing: -0.052em;
  color: var(--fg-ink-1);
  font-variation-settings: "opsz" 144;
  /* Strong optical centering */
  margin-left: -0.04em;
}
.hero__title-line {
  display: inline-flex;
  align-items: baseline;
  gap: 0.02em;
}
.hero__title-word {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 0.22em, 0);
}
.hero__title-dot {
  display: inline-block;
  color: #000000;
  opacity: 0;
  transform: scale(0.4);
  font-weight: 700;
  /* Optical alignment for the dot */
  margin: 0 -0.02em 0 -0.02em;
  /* Subtle physical depth even on this single character */
  text-shadow:
    0 2px 1px rgba(10, 12, 20, 0.08),
    0 8px 18px rgba(10, 12, 20, 0.12);
}
.hero__title-sub {
  font-family: var(--fg-font-display);
  font-weight: 300;
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1.32;
  letter-spacing: -0.018em;
  color: var(--fg-ink-3);
  max-width: 22ch;
  font-variation-settings: "opsz" 48;
  opacity: 0;
  margin-left: 0.04em;
}
.hero__title-sub em {
  font-style: italic;
  color: var(--fg-ink-1);
  font-weight: 400;
}

.hero__tagline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: var(--fg-fs-eyebrow);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg-ink-2);
  opacity: 0;
}
.hero__tagline-item {
  padding: 9px 16px;
  border: 1px solid var(--fg-line);
  border-radius: var(--fg-rad-pill);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(8px);
  transition: border-color var(--fg-d-base) var(--fg-ease), background var(--fg-d-base) var(--fg-ease);
}
.hero__tagline-item:hover {
  border-color: var(--fg-line-strong);
  background: rgba(255,255,255,0.92);
}
.hero__tagline-sep { color: var(--fg-ink-6); }

.hero__cta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
}

.hero__rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--fg-line);
  opacity: 0;
}
.hero__rail-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero__rail-k {
  font-family: var(--fg-font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-ink-5);
}
.hero__rail-v {
  font-size: var(--fg-fs-eyebrow);
  color: var(--fg-ink-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero__scroll-line {
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--fg-ink-3);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--fg-damask-1), transparent);
  animation: scroll-line 2.4s var(--fg-ease) infinite;
}
@keyframes scroll-line {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@media (max-width: 720px) {
  .hero__rail { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .hero__title { font-size: clamp(64px, 19vw, 130px); }
}

/* ──────────────────────────────────────────────────────────────────
   12. IDENTITY
   ────────────────────────────────────────────────────────────────── */
.identity__grid {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 960px) { .identity__grid { grid-template-columns: 1fr; gap: 56px; } }

.identity__lead-text {
  font-family: var(--fg-font-display);
  font-weight: 300;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.28;
  letter-spacing: -0.022em;
  color: var(--fg-ink-2);
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}
.identity__lead-em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--fg-ink-1);
  margin-bottom: 0.4em;
}

.identity__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 560px) { .identity__cards { grid-template-columns: 1fr; } }

.card {
  padding: clamp(24px, 2.8vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 240px;
  transform-style: preserve-3d;
}
.card__num {
  font-family: var(--fg-font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--fg-damask-1);
  font-variation-settings: "opsz" 36;
}
.card__title {
  font-family: var(--fg-font-display);
  font-weight: 500;
  font-size: var(--fg-fs-h3);
  letter-spacing: -0.022em;
  color: var(--fg-ink-1);
  line-height: 1.08;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
}
.card__body {
  font-size: var(--fg-fs-body-sm);
  line-height: 1.65;
  color: var(--fg-ink-4);
  flex: 1;
  text-wrap: pretty;
}
.card__line {
  height: 1px;
  background: linear-gradient(90deg, var(--fg-line), transparent);
}
.card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--fg-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--fg-ink-5);
  text-transform: uppercase;
}
.card__meta span:last-child { color: var(--fg-ink-2); letter-spacing: 0.08em; }

/* ──────────────────────────────────────────────────────────────────
   13. KNOWLEDGE NETWORK
   ────────────────────────────────────────────────────────────────── */
.knowledge__stage {
  position: relative;
  height: clamp(540px, 70vh, 740px);
  border-radius: var(--fg-rad-xl);
  background:
    radial-gradient(80% 60% at 50% 50%, rgba(30, 60, 196, 0.035), transparent 70%),
    linear-gradient(180deg, #FCFCFE, #F6F7FB);
  border: 1px solid var(--fg-line);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 24px 80px -40px rgba(30, 60, 196, 0.14);
}
.knowledge__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.knowledge__legend {
  position: absolute;
  top: 20px; left: 20px;
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--fg-line);
  border-radius: var(--fg-rad-pill);
  font-family: var(--fg-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--fg-ink-3);
  text-transform: uppercase;
}
.knowledge__legend-item { display: inline-flex; align-items: center; gap: 7px; }
.knowledge__dot { width: 8px; height: 8px; border-radius: 50%; }
.knowledge__dot--core { background: var(--fg-node-core); }
.knowledge__dot--ai   { background: var(--fg-node-ai); }
.knowledge__dot--sci  { background: var(--fg-node-sci); }
.knowledge__dot--eng  { background: var(--fg-node-eng); }

.knowledge__readout {
  position: absolute;
  bottom: 20px; right: 20px;
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(10px);
  border: 1px solid var(--fg-line);
  border-radius: var(--fg-rad-sm);
  min-width: 200px;
  text-align: right;
}
.knowledge__readout-k {
  font-family: var(--fg-font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--fg-ink-5);
  text-transform: uppercase;
}
.knowledge__readout-v {
  font-family: var(--fg-font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--fg-ink-1);
  letter-spacing: -0.012em;
  font-variation-settings: "opsz" 48;
}

.knowledge__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(32px, 4vw, 64px);
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--fg-line);
}
@media (max-width: 760px) { .knowledge__list { grid-template-columns: 1fr; } }

.knowledge__list-title {
  font-family: var(--fg-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-ink-5);
  margin-bottom: 18px;
  font-weight: 500;
}
.knowledge__list ul { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.knowledge__list li {
  font-family: var(--fg-font-display);
  font-weight: 400;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.4;
  color: var(--fg-ink-2);
  letter-spacing: -0.014em;
  position: relative;
  padding-left: 26px;
  font-variation-settings: "opsz" 36;
}
.knowledge__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 12px; height: 1px;
  background: var(--fg-damask-1);
}

/* ──────────────────────────────────────────────────────────────────
   14. PROJECTS
   ────────────────────────────────────────────────────────────────── */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
}
@media (max-width: 820px) { .projects { grid-template-columns: 1fr; } }

.project {
  padding: clamp(22px, 2.6vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform-style: preserve-3d;
}
.project__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--fg-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--fg-ink-5);
  text-transform: uppercase;
}

.project__visual {
  position: relative;
  height: clamp(220px, 28vh, 320px);
  border-radius: var(--fg-rad-md);
  overflow: hidden;
  background: #F4F5F9;
  border: 1px solid var(--fg-line-soft);
  isolation: isolate;
}
.project__visual-inner {
  position: absolute;
  inset: 0;
  transition: transform 1200ms var(--fg-ease);
}
.project:hover .project__visual-inner { transform: scale(1.04); }

/* PRJ 001 — Orbital Notes */
.project__visual--001 {
  background:
    radial-gradient(circle at 50% 50%, rgba(30,60,196,0.16), transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, #F5F7FB 100%);
}
.project__visual--001::before,
.project__visual--001::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(30, 60, 196, 0.22);
  border-radius: 50%;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  animation: orbit 18s linear infinite;
}
.project__visual--001::before { width: 80%; height: 80%; border-style: dashed; }
.project__visual--001::after {
  width: 50%; height: 50%;
  border-color: rgba(184, 58, 182, 0.28);
  animation-duration: 12s;
  animation-direction: reverse;
}
@keyframes orbit { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* PRJ 002 — Neural Atlas */
.project__visual--002 {
  background:
    radial-gradient(circle at 30% 30%, rgba(67, 56, 202, 0.14), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(184, 58, 182, 0.10), transparent 55%),
    linear-gradient(180deg, #FCFCFE, #F4F5F9);
}
.project__visual--002::before {
  content: "";
  position: absolute;
  inset: 12%;
  background-image:
    linear-gradient(rgba(10,12,20,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,12,20,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask: radial-gradient(circle at center, #000 30%, transparent 75%);
  animation: mesh-pan 14s var(--fg-ease) infinite alternate;
}
@keyframes mesh-pan { to { background-position: 22px 22px; } }

/* PRJ 003 — Trajectory Lab */
.project__visual--003 { background: linear-gradient(180deg, #FCFCFE, #F4F5F9); }
.project__visual--003::before {
  content: "";
  position: absolute;
  left: -10%; right: -10%; top: 60%;
  height: 200%;
  border-radius: 50%;
  border: 1px solid rgba(233, 75, 60, 0.4);
}
.project__visual--003::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--fg-damask-4);
  box-shadow: 0 0 0 6px rgba(233, 75, 60, 0.15), 0 0 30px rgba(233, 75, 60, 0.45);
  animation: traj 6s var(--fg-ease) infinite;
}
@keyframes traj {
  0%   { left: 8%;  top: 70%; }
  50%  { left: 50%; top: 18%; }
  100% { left: 92%; top: 70%; }
}

/* PRJ 004 — Quiet Compiler */
.project__visual--004 {
  background: linear-gradient(180deg, #FCFCFE, #F4F5F9);
  font-family: var(--fg-font-mono);
}
.project__visual--004::before {
  content: "▌ let x = fn(): orbit → trajectory\nA  type Star<T> = { mass: T }\n│  module quiet { return ascend(0) }\n   ─ compile · 0 errors";
  white-space: pre;
  position: absolute;
  inset: 22px;
  font-size: 11px;
  line-height: 1.9;
  color: var(--fg-ink-3);
}
.project__visual--004::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(30,60,196,0.08) 50%, transparent 60%);
  background-size: 220% 220%;
  animation: code-shimmer 4s var(--fg-ease) infinite;
}
@keyframes code-shimmer { 0% { background-position: -100% 0; } 100% { background-position: 200% 0; } }

.project__title {
  font-family: var(--fg-font-display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.026em;
  color: var(--fg-ink-1);
  line-height: 1.05;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}
.project__desc {
  font-size: var(--fg-fs-body-sm);
  line-height: 1.65;
  color: var(--fg-ink-4);
  text-wrap: pretty;
}
.project__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.project__tags span {
  font-family: var(--fg-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 11px;
  border: 1px solid var(--fg-line);
  border-radius: var(--fg-rad-pill);
  color: var(--fg-ink-3);
  background: rgba(255,255,255,0.6);
}
.project__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-ink-1);
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--fg-line);
}
.project__cta svg { transition: transform var(--fg-d-base) var(--fg-ease); }
.project__cta:hover svg { transform: translate(3px, -3px); }

/* ──────────────────────────────────────────────────────────────────
   15. VISION
   ────────────────────────────────────────────────────────────────── */
.vision__layout {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: clamp(48px, 5vw, 88px);
  align-items: start;
}
@media (max-width: 960px) { .vision__layout { grid-template-columns: 1fr; gap: 48px; } }

.vision__statement {
  font-family: var(--fg-font-display);
  font-weight: 300;
  font-size: clamp(28px, 3.1vw, 46px);
  line-height: 1.26;
  letter-spacing: -0.024em;
  color: var(--fg-ink-2);
  font-variation-settings: "opsz" 96;
  position: sticky;
  top: 140px;
  text-wrap: balance;
}
.vision__statement em { font-style: italic; color: var(--fg-ink-1); font-weight: 400; }

.vision__timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
  list-style: none;
}

.vision__node {
  padding: clamp(22px, 2.6vw, 32px);
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 28px;
  align-items: start;
}
.vision__node-year {
  font-family: var(--fg-font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-damask-1);
  padding-top: 6px;
  font-weight: 500;
}
.vision__node-content { display: flex; flex-direction: column; gap: 8px; }
.vision__node-title {
  font-family: var(--fg-font-display);
  font-weight: 500;
  font-size: var(--fg-fs-h3);
  letter-spacing: -0.022em;
  color: var(--fg-ink-1);
  font-variation-settings: "opsz" 72;
}
.vision__node p {
  font-size: var(--fg-fs-body-sm);
  color: var(--fg-ink-4);
  line-height: 1.65;
  text-wrap: pretty;
}
@media (max-width: 560px) {
  .vision__node { grid-template-columns: 1fr; gap: 10px; }
}

/* ──────────────────────────────────────────────────────────────────
   16. FOOTER (replaces Contact section)
   ────────────────────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 2;
  max-width: var(--fg-max);
  margin: clamp(40px, 6vw, 80px) auto 0;
  padding: clamp(40px, 5vw, 56px) var(--fg-pad-x) clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--fg-line);
}
.footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}
@media (max-width: 760px) {
  .footer__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 24px; }
}

.footer__brand {
  display: inline-flex;
  align-items: baseline;
}
.footer__meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  justify-content: center;
  font-size: 12px;
  font-family: var(--fg-font-mono);
  letter-spacing: 0.1em;
  color: var(--fg-ink-4);
}
.footer__signature {
  display: flex; flex-direction: column;
  font-family: var(--fg-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--fg-ink-5);
  text-align: right;
}
@media (max-width: 760px) { .footer__signature { text-align: center; } }
.footer__signature-v { color: var(--fg-ink-3); margin-top: 4px; }

/* ──────────────────────────────────────────────────────────────────
   17. REVEAL & MOTION UTILITIES
   ────────────────────────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition: opacity 1000ms var(--fg-ease), transform 1000ms var(--fg-ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ──────────────────────────────────────────────────────────────────
   18. RESPONSIVE FINE-TUNING (ultrawide & 4K)
   ────────────────────────────────────────────────────────────────── */
@media (min-width: 1920px) {
  :root { --fg-max: 1600px; }
}
@media (min-width: 2400px) {
  :root { --fg-max: 1800px; --fg-pad-x: 120px; }
  html { font-size: 17px; }
}
@media (min-width: 3200px) {
  :root { --fg-max: 2100px; }
  html { font-size: 18px; }
}

/* ══════════════════════════════════════════════════════════════════
   19. FG.HORIZON PATCH — Apple HIG refinement layer
   ═════════════════════════════════════════════════════════════════ */

/* 19.1 — Knowledge Network: rimossa completamente */
.section--knowledge,
#knowledge {
  display: none !important;
}

/* 19.2 — Empty Project Skeleton (struttura solo UI, niente contenuto)
   Mantiene perfect-square ratio coerente con le card reali. */
.project--empty {
  aspect-ratio: 5 / 6;
  min-height: 360px;
  position: relative;
  overflow: hidden;
  border: 0.5px solid rgba(10,12,20,0.08);
}
.project--empty::before {
  /* Inner panel "vuoto strutturale": una griglia luminosa minima
     che suggerisce dove andrà il contenuto, senza inventare nulla. */
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: calc(var(--fg-rad-lg) - 6px);
  background:
    /* Top zone: visual area */
    linear-gradient(180deg,
      rgba(10,12,20,0.022) 0%,
      rgba(10,12,20,0.012) 55%,
      rgba(10,12,20,0) 56%,
      rgba(10,12,20,0) 100%);
  pointer-events: none;
}
.project--empty::after {
  /* Diagonal subtle sweep: respiro Apple */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.4) 0%,
    rgba(255,255,255,0) 40%);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 600ms var(--fg-ease);
}
.project--empty:hover::after { opacity: 0.8; }

/* 19.3 — Project tag/badges più piccoli e Apple-style minimal */
.project__tags span,
.project__head .project__code,
.project__head .project__year {
  font-family: var(--fg-font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.project__tags span {
  padding: 4px 10px;
  border: 0.5px solid rgba(10,12,20,0.10);
  background: rgba(255,255,255,0.6);
  border-radius: var(--fg-rad-pill);
  color: var(--fg-ink-4);
  box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.6);
}

/* 19.4 — Nav link index: SF Mono refinement (più discreto) */
.nav__link-index {
  font-family: var(--fg-font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--fg-ink-6);
}

/* 19.5 — Brand mark: dot resta nero, ma fixiamo la spaziatura
   per il nuovo testo "Horizon" (più largo di "Web") */
.brand__web { letter-spacing: -0.025em; }

/* 19.6 — Headings: SF Pro Display variation settings (no opsz on SF) */
.section__title,
.hero__title,
.brand,
.card__title,
.project__title,
.vision__node-title {
  font-variation-settings: normal;
  /* SF Pro Display si rende meglio con un letter-spacing leggermente negativo */
}

/* 19.7 — Damask text: SF non ha opsz, rimuoviamo per evitare warn */
.damask-text { font-variation-settings: normal; }
.damask-text--monumental { font-variation-settings: normal; }

/* 19.8 — Hero title weight refinement per SF Pro Display
   SF lavora bene a 700 con tracking stretto */
.hero__title-word {
  font-weight: 700;
  letter-spacing: -0.045em;
}

/* 19.9 — Brand: tipografia SF + dot nero pieno */
.brand {
  font-variation-settings: normal;
  font-weight: 600;
  letter-spacing: -0.022em;
}
.brand__fg { font-weight: 700; }
.brand__dot { font-weight: 700; color: #000000; }
.brand__web { font-weight: 500; color: var(--fg-ink-1); }

/* 19.10 — Status pulse: leggermente più piccolo e più discreto (Apple-like) */
.nav__status-pulse {
  width: 6px; height: 6px;
}

/* 19.11 — Hover su section title: il glass si "respira" */
.section__title {
  transition: transform 600ms var(--fg-ease);
}

/* 19.12 — Card hover: motion più sottile, più Apple */
.crystal-matter {
  transition:
    transform 600ms var(--fg-ease),
    box-shadow 600ms var(--fg-ease),
    border-color 600ms var(--fg-ease);
}

/* 19.13 — Section lead più leggera (SF Pro Display 300) */
.section__lead {
  font-weight: 300;
  letter-spacing: -0.011em;
  font-variation-settings: normal;
}

/* 19.14 — Project visuals (le placeholder visualKey--001/002/...) restano
   ma per le card vuote non vengono renderizzati: solo struttura. */

/* ══════════════════════════════════════════════════════════════════
   20. MOBILE & RESPONSIVE OVERHAUL (organic, device-aware)
   Strategia:
   · ≥1280px → desktop pieno (default già definito sopra)
   · ≤1024px → tablet landscape: padding ridotti, font scalano
   · ≤920px  → tablet portrait: nav compatta, hero verticale
   · ≤720px  → mobile large: tutto a 1 colonna, CTA stack
   · ≤480px  → mobile small: ulteriore raffinamento, hero 80vh
   ════════════════════════════════════════════════════════════════ */

/* ─── 20.1 NAV — mobile compatta, centrata, glass ─── */
@media (max-width: 920px) {
  .nav {
    top: 12px;
    width: min(calc(100vw - 16px), 720px);
  }
  .nav__inner {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 8px 14px 8px 14px;
  }
  .nav__links { display: none; }
  .nav__meta {
    border-left: 0;
    padding: 4px 0 4px 0;
    gap: 10px;
    justify-self: end;
  }
  .nav__status-label { display: none; }
  .nav__time { font-size: 10px; letter-spacing: 0.04em; }
  .brand--sm { font-size: 19px; }
}

@media (max-width: 480px) {
  .nav { top: 8px; width: calc(100vw - 12px); }
  .nav__inner { padding: 7px 12px; gap: 8px; }
  .nav__time { font-size: 9.5px; }
  .nav__status { gap: 6px; }
  .brand--sm { font-size: 17px; }
}

/* ─── 20.2 SECTION padding & heading ─── */
@media (max-width: 920px) {
  :root { --fg-pad-x: 22px; }
  .section {
    padding: clamp(80px, 12vw, 120px) var(--fg-pad-x) clamp(56px, 8vw, 80px);
  }
  .section__head {
    column-gap: 16px;
    row-gap: 12px;
    margin-bottom: clamp(36px, 6vw, 56px);
  }
  .section__title-line { margin-bottom: 14px; }
  .section__title {
    font-size: clamp(34px, 8vw, 56px);
    letter-spacing: -0.03em;
    line-height: 1.02;
  }
  .section__title::before {
    inset: -0.12em -0.25em -0.12em -0.25em;
    border-radius: 12px;
  }
  .section__lead {
    font-size: clamp(17px, 4vw, 22px);
    line-height: 1.45;
    max-width: 100%;
    margin: 0 0 clamp(32px, 5vw, 48px);
  }
}

@media (max-width: 480px) {
  :root { --fg-pad-x: 18px; }
  .section { padding: 72px var(--fg-pad-x) 48px; }
  .section__title { font-size: clamp(30px, 9vw, 44px); }
}

/* ─── 20.3 HERO — verticale ariosa, leggibile, niente overflow ─── */
@media (max-width: 920px) {
  .hero {
    min-height: auto;
    padding: clamp(110px, 22vh, 160px) var(--fg-pad-x) clamp(48px, 8vh, 80px);
  }
  .hero__grid {
    grid-template-rows: auto auto auto auto auto auto auto;
    row-gap: clamp(18px, 3vh, 28px);
  }
  .hero__title {
    font-size: clamp(56px, 18vw, 110px);
    line-height: 0.92;
    letter-spacing: -0.04em;
  }
  .hero__title-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.04em;
  }
  .hero__title-word { display: inline-block; }
  .hero__title-sub {
    font-size: clamp(18px, 4.4vw, 26px);
    line-height: 1.3;
    margin-top: 6px;
  }
  .hero__tagline {
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 12px;
  }
  .hero__tagline-sep { display: none; }
  .hero__cta {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
  }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .hero__cta .btn__inner {
    justify-content: center;
    width: 100%;
    padding: 16px 22px;
    font-size: 15px;
  }
  .hero__rail {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 20px;
    margin-top: 8px;
  }
  .hero__topline { font-size: 10px; gap: 10px; }
  .hero__topline-bar { display: none; }
  .hero__eyebrow {
    flex-wrap: wrap;
    font-size: 12px;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 100px var(--fg-pad-x) 40px;
  }
  .hero__title { font-size: clamp(52px, 19vw, 92px); }
  .hero__rail { grid-template-columns: 1fr 1fr; gap: 16px; }
  .hero__rail-block { gap: 4px; }
  .hero__rail-k { font-size: 9.5px; }
  .hero__rail-v { font-size: 12px; line-height: 1.35; }
}

/* ─── 20.4 IDENTITY — 1 colonna, lead centrato, card stack ─── */
@media (max-width: 920px) {
  .identity__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .identity__lead-text {
    font-size: clamp(22px, 5.2vw, 30px);
    line-height: 1.32;
  }
  .identity__cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .card {
    padding: 22px 22px 20px;
    gap: 12px;
    border-radius: var(--fg-rad-md);
  }
  .card__title { font-size: 19px; }
  .card__body { font-size: 14.5px; line-height: 1.55; }
}

/* ─── 20.5 PROJECTS — 1 colonna su mobile, card aspect più morbida ─── */
@media (max-width: 920px) {
  .projects {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .project {
    padding: 22px;
    border-radius: var(--fg-rad-md);
  }
  .project--empty {
    aspect-ratio: 4 / 3;
    min-height: 220px;
  }
  .project--empty::before { inset: 12px; }
  .project__visual { aspect-ratio: 5 / 3; }
  .project__title { font-size: 20px; }
  .project__desc { font-size: 14.5px; }
}

/* ─── 20.6 VISION — timeline verticale, leggibile ─── */
@media (max-width: 920px) {
  .vision__layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .vision__statement {
    font-size: clamp(20px, 5vw, 28px);
    line-height: 1.36;
  }
  .vision__timeline { gap: 14px; }
  .vision__node {
    grid-template-columns: 1fr;
    padding: 22px;
    gap: 6px;
    border-radius: var(--fg-rad-md);
  }
  .vision__node-year {
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--fg-ink-4);
  }
  .vision__node-title { font-size: 19px; }
  .vision__node p { font-size: 14.5px; line-height: 1.55; }
}

/* ─── 20.7 FOOTER — wrapping pulito su mobile ─── */
@media (max-width: 720px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
    padding: 32px var(--fg-pad-x);
  }
  .footer__brand { justify-content: center; }
  .footer__meta { align-items: center; gap: 6px; font-size: 12px; }
  .footer__signature {
    text-align: center;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    font-size: 10px;
  }
  .footer__signature-v { margin-top: 0; }
  .brand--md { font-size: 24px; }
}

/* ─── 20.8 Disabilita cursor custom + tilt + magnetic su touch ─── */
@media (hover: none), (pointer: coarse) {
  .fg-cursor { display: none !important; }
  /* Su touch i tilt 3D possono dare problemi; lasciamo solo hover semplici */
  [data-tilt] { transform: none !important; }
}

/* ─── 20.9 SafeArea iOS notch / dynamic island ─── */
@supports (padding: max(0px)) {
  .nav { top: max(12px, env(safe-area-inset-top)); }
  .footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}

/* ─── 20.10 Anti-overflow guard ─── */
html, body { max-width: 100vw; overflow-x: hidden; }
.hero, .section, .footer { max-width: 100vw; overflow-x: clip; }

/* ─── 20.11 Liquid Glass overlay del titolo: scala su mobile ─── */
@media (max-width: 920px) {
  .hero__title-line::after {
    inset: -4% -1% -4% -1%;
    border-radius: 18px;
    box-shadow:
      inset 1px 1px 0 rgba(255,255,255,0.55),
      inset -1px -1px 0 rgba(10,12,20,0.04),
      0 10px 24px -18px rgba(130,135,150,0.18),
      0 22px 48px -28px rgba(130,135,150,0.14);
  }
}
