/* =========================================================
   Emanuele Sargeni — Personal site
   Styles: design tokens, layout, components, mockups
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Brand palette */
  --bg:         #F8FAFC;
  --bg-alt:     #F1F5F9;
  --bg-soft:    #EEF2F7;
  --surface:    #FFFFFF;
  --ink:        #011028;
  --ink-2:      #1E293B;
  --ink-mute:   #475569;
  --ink-soft:   #64748B;
  --border:     #E2E8F0;
  --border-2:   #CBD5E1;

  --blue:       #1E3A8A;
  --blue-2:     #2540A0;
  --blue-soft:  #EEF2FF;
  --cyan:       #06B6D4;
  --cyan-2:     #22D3EE;
  --green:      #10B981;
  --amber:      #F59E0B;

  /* Effects */
  --radius-sm:  10px;
  --radius:     16px;
  --radius-lg:  22px;
  --radius-xl:  28px;

  --shadow-sm:  0 1px 2px rgba(15, 23, 42, .04), 0 1px 1px rgba(15, 23, 42, .03);
  --shadow:     0 12px 30px -12px rgba(15, 23, 42, .12), 0 4px 10px -4px rgba(15, 23, 42, .06);
  --shadow-lg:  0 28px 60px -24px rgba(15, 23, 42, .22), 0 8px 18px -6px rgba(15, 23, 42, .08);

  --container:  1200px;
  --gutter:     clamp(20px, 4vw, 36px);

  /* Type */
  --font-sans:  "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --t-h1:       clamp(1.9rem, 1.2rem + 2.6vw, 3.2rem);
  --t-h2:       clamp(1.65rem, 1.2rem + 1.8vw, 2.5rem);
  --t-h3:       clamp(1.15rem, 1rem + .5vw, 1.35rem);
  --t-lead:     clamp(1.05rem, .98rem + .35vw, 1.18rem);
  --t-body:     1rem;
  --t-sm:       .9rem;
  --t-xs:       .8rem;

  --header-h:   72px;
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
/* Garantisce che l'attributo hidden vinca su display:flex/grid */
[hidden] { display: none !important; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* overflow-x su html è necessario per bloccare lo scroll orizzontale su iOS Safari */
html { scroll-padding-top: calc(var(--header-h) + 12px); overflow-x: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4 { margin: 0; color: var(--ink); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: var(--t-h1); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: var(--t-h2); font-weight: 700; }
h3 { font-size: var(--t-h3); font-weight: 700; }
p  { margin: 0; color: var(--ink-mute); }

/* Utilities */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; clip: rect(0 0 0 0); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.text-grad {
  background: linear-gradient(95deg, var(--blue) 10%, var(--cyan) 55%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: #fff; padding: .6rem .9rem; border-radius: 8px; z-index: 999;
}
.skip-link:focus { left: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.1rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn-sm { padding: .65rem .95rem; font-size: .88rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, #2A52C7 70%, #1B78B8 130%);
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(30, 58, 138, .55), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(30, 58, 138, .6); }
.btn-primary:focus-visible { outline: 3px solid rgba(6, 182, 212, .45); outline-offset: 2px; }
.btn-ghost {
  background: var(--surface); color: var(--ink); border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--border-2); transform: translateY(-1px); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  background: rgba(248, 250, 252, .78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
/* Compensa lo spazio dell'header fixed che non occupa più posto nel flusso */
main { padding-top: var(--header-h); }
.site-header.scrolled {
  background: rgba(255,255,255,.86);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 24px -18px rgba(15,23,42,.15);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 700; color: var(--ink); }
.brand-text { letter-spacing: -.01em; }
.brand-logo { height: 36px; width: auto; display: block; }
/* Icona navbar: sfondo bianco del logo-mark diventa trasparente sulla navbar chiara */
.site-header .brand-logo { mix-blend-mode: multiply; }
/* Logo footer: mix-blend-mode screen rende lo sfondo navy del logo-dark trasparente sul footer scuro */
.brand-logo-footer {
  height: 44px; width: auto; display: block;
  mix-blend-mode: screen;
}
/* .brand-dot usato solo nei mock interni (MarketSync sidebar) */
.brand-dot.small { width: 7px; height: 7px; border-radius: 50%; box-shadow: none; background: var(--cyan); }

.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links > ul {
  display: flex; align-items: center; gap: .25rem;
}
.nav-links a {
  color: var(--ink-mute); font-weight: 500; font-size: .92rem;
  padding: .55rem .75rem; border-radius: 10px;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-alt); }
.nav-links a.is-active { color: var(--blue); background: var(--blue-soft); }
/* Sovrascrive il color: ink-mute ereditato da nav-links a — il btn-primary vuole sempre testo bianco */
.nav-links .btn-primary { color: #fff; }
.nav-links .btn-primary:hover { color: #294fbe; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(20px, 3vw, 40px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
}
.hero-blob-1 { width: 520px; height: 520px; left: -160px; top: -120px;
  background: radial-gradient(circle at 30% 30%, #DBEAFE, transparent 65%); }
.hero-blob-2 { width: 560px; height: 560px; right: -200px; top: 30%;
  background: radial-gradient(circle at 60% 50%, #CFFAFE, transparent 65%); }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(15,23,42,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,23,42,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 30%, #000 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 30%, #000 35%, transparent 75%);
  opacity: .9;
}

.hero-grid-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .82rem; font-weight: 600; color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid #DDE5FF;
  padding: .45rem .75rem; border-radius: 999px;
  letter-spacing: .01em;
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6,182,212,.18);
}

.hero-copy h1 { margin: .8rem 0 .8rem; max-width: 18ch; text-wrap: balance; line-height: 1.1; }
.hero-copy .lead { font-size: var(--t-lead); color: var(--ink-mute); max-width: 52ch; text-wrap: pretty; }

.hero-ctas { display: flex; gap: .75rem; margin: 1.2rem 0 .9rem; flex-wrap: wrap; }

.micro-proof {
  display: flex; flex-wrap: nowrap; gap: .5rem .7rem;
  margin-top: .9rem;
}
/* Su desktop nascondi il bottone primary (resta solo Scrivimi su WhatsApp + Guarda i progetti) */
@media (min-width: 961px) {
  .hero-primary-mobile { display: none; }
}
.micro-proof li {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--ink-2);
  padding: .35rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 500;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.micro-proof svg { width: 14px; height: 14px; stroke: var(--cyan); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Hero foto */
.hero-photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.hero-photo {
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: var(--radius-xl);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: block;
}

/* Hero mockup (usato ancora nei progetti) */
.hero-mockup { position: relative; min-height: 360px; }
.mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* Dashboard mock */
.mock-dashboard { transform: rotate(-1.2deg); }
.mock-dashboard:hover { transform: rotate(-1.2deg) translateY(-4px); }
.mock-dashboard { transition: transform .4s ease; }

.mock-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(to bottom, #F8FAFC, #F1F5F9);
  border-bottom: 1px solid var(--border);
}
.mock-chrome > span {
  width: 10px; height: 10px; border-radius: 50%; background: #E2E8F0;
}
.mock-chrome > span:nth-child(1) { background: #F87171; }
.mock-chrome > span:nth-child(2) { background: #FBBF24; }
.mock-chrome > span:nth-child(3) { background: #34D399; }
.mock-url {
  margin-left: 14px;
  font-size: .72rem; color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: .25rem .65rem; border-radius: 999px;
  font-family: var(--font-mono);
}

.mock-body { display: grid; grid-template-columns: 138px 1fr; min-height: 280px; }
.mock-side {
  background: linear-gradient(180deg, #F8FAFC, #FFFFFF);
  border-right: 1px solid var(--border);
  padding: .9rem .75rem;
  font-size: .78rem;
}
.mock-side-logo { display: flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--ink); font-size: .8rem; margin-bottom: .8rem; }
.mock-side ul { display: grid; gap: .15rem; }
.mock-side li {
  padding: .4rem .55rem; border-radius: 8px; color: var(--ink-soft);
}
.mock-side li.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.mock-side-tag {
  margin-top: 1rem;
  font-size: .7rem; color: var(--green);
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .5rem; border-radius: 6px; background: #ECFDF5;
}
.mock-side-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,.18); }

.mock-main { padding: 1rem; display: grid; gap: .85rem; }
.mock-row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; }
.mock-h { font-weight: 700; font-size: .92rem; color: var(--ink); }
.mock-sub { font-size: .72rem; color: var(--ink-soft); margin-top: 2px; }
.mock-pill { font-size: .68rem; padding: .25rem .55rem; border-radius: 999px; background: var(--bg-alt); color: var(--ink-mute); border: 1px solid var(--border); }

.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.mock-kpis.four { grid-template-columns: repeat(4, 1fr); }
.mock-kpi {
  background: linear-gradient(180deg, #fff, #FAFCFE);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .55rem .65rem;
}
.mock-kpi-label { font-size: .68rem; color: var(--ink-soft); }
.mock-kpi-value { font-weight: 700; color: var(--ink); font-size: .98rem; margin-top: 2px; letter-spacing: -.01em; }
.mock-kpi-delta { font-size: .68rem; margin-top: 2px; display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.mock-kpi-delta.up   { color: var(--green); }
.mock-kpi-delta.down { color: #EF4444; }
.mock-kpi-delta.up::before  { content: "▲"; font-size: .55rem; }
.mock-kpi-delta.down::before{ content: "▼"; font-size: .55rem; }

.mock-chart {
  background: #FAFCFE;
  border: 1px solid var(--border);
  border-radius: 12px;
  height: 110px; padding: .25rem;
}
.mock-chart.tall { height: 140px; }
.mock-chart svg { width: 100%; height: 100%; display: block; }

.mock-providers { display: flex; flex-wrap: wrap; gap: .45rem; }
.provider {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; color: var(--ink-mute);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: .3rem .55rem; border-radius: 999px;
}
.provider i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.provider.muted { color: var(--ink-soft); border-style: dashed; }

/* Float chips on hero mockup */
.mock-card-float {
  position: absolute; left: -10px; bottom: 22px;
  padding: .75rem .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: grid; gap: .5rem;
  transform: rotate(3deg);
  animation: floaty 6s ease-in-out infinite;
}
.float-row { display: grid; gap: 4px; min-width: 140px; }
.float-bar { height: 6px; border-radius: 4px; background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.float-bar.w70 { width: 70%; opacity: .7; }
.float-bar.w50 { width: 50%; opacity: .45; }
.float-tag { font-size: .72rem; font-weight: 600; color: var(--green); display: inline-flex; align-items: center; gap: .35rem; }
.float-tag::before { content: "●"; font-size: .55rem; }

.mock-code-float {
  position: absolute; right: -4px; top: -10px;
  padding: .55rem .8rem;
  border-radius: 12px;
  background: #011028; color: #E2E8F0;
  border: 1px solid #1E293B;
  font-family: var(--font-mono);
  font-size: .74rem;
  box-shadow: 0 12px 28px -10px rgba(15,23,42,.4);
  transform: rotate(2deg);
  animation: floaty 7s ease-in-out -1s infinite;
}
.mock-code-float .ln { color: #93C5FD; }
.mock-code-float .lv { color: #F1F5F9; }
.mock-code-float .lf { color: #C4B5FD; }
.mock-code-float .ls { color: #6EE7B7; }

@keyframes floaty {
  0%,100% { transform: translateY(0) rotate(var(--r, 3deg)); }
  50%     { transform: translateY(-6px) rotate(var(--r, 3deg)); }
}
.mock-code-float { --r: 2deg; }
.mock-card-float { --r: 3deg; }

/* ---------- Sections ---------- */
.section { padding: clamp(70px, 8vw, 120px) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--bg-soft), var(--bg)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 760px; margin: 0 auto clamp(36px, 4vw, 60px); text-align: center; }
.section-head h2 { margin: .55rem 0 .7rem; text-wrap: balance; }
.section-lead { font-size: var(--t-lead); color: var(--ink-mute); text-wrap: pretty; }
.kicker {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan);
}

/* ---------- Cards (Cosa faccio) ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-2); }
.card h3 { margin-bottom: .5rem; }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-soft), #E0F2FE);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
  color: var(--blue);
}
.card-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Servizi ---------- */
.cards-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--blue), var(--cyan));
  opacity: 0; transition: opacity .25s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-2); }
.service-card:hover::before { opacity: 1; }

.service-num {
  font-family: var(--font-mono);
  font-size: .82rem; font-weight: 600;
  color: var(--cyan);
  margin-bottom: .5rem;
}
.service-card h3 { margin-bottom: .55rem; }
.service-card p { margin-bottom: 1rem; }

.check-list { display: grid; gap: .4rem; }
.check-list li {
  position: relative; padding-left: 1.5rem; color: var(--ink-2); font-size: .92rem;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 16px; height: 16px; border-radius: 50%;
  background: #ECFDF5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: 10px 10px;
  transform: translateY(-4px);
}

/* ---------- Progetti ---------- */
.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
  padding: clamp(36px, 4vw, 56px) 0;
}
.project + .project { border-top: 1px dashed var(--border); }
.project-reverse .project-copy { order: 2; }
.project-reverse .project-visual { order: 1; }

.project-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.badge {
  font-size: .72rem; font-weight: 600;
  color: var(--blue); background: var(--blue-soft);
  border: 1px solid #DDE5FF;
  padding: .3rem .6rem; border-radius: 999px;
  letter-spacing: .01em;
}
.project h3 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); margin-bottom: .8rem; letter-spacing: -.02em; }
.project-lead { font-size: var(--t-lead); color: var(--ink-mute); margin-bottom: 1.2rem; text-wrap: pretty; }
.project-points { display: grid; gap: .55rem; margin-bottom: 1.2rem; }
.project-points li {
  position: relative; padding-left: 1.6rem; color: var(--ink-2);
}
.project-points li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}
.project-tech { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.2rem; }
.project-tech span {
  font-family: var(--font-mono);
  font-size: .72rem; color: var(--ink-mute);
  background: var(--bg-alt); border: 1px solid var(--border);
  padding: .25rem .55rem; border-radius: 8px;
}
.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; color: var(--blue);
}
.link-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(3px); }
.link-arrow[aria-disabled="true"] { color: var(--ink-soft); cursor: default; }

/* Visuals shells */
.project-visual { position: relative; min-width: 0; }
.mock-dashboard-lg { transform: none; }
.mock-dashboard-lg .mock-body { grid-template-columns: 160px 1fr; min-height: 360px; }

/* Phone mock */
.mock-phone-wrap { position: relative; display: flex; justify-content: center; }
.mock-phone {
  width: 280px; height: 570px;
  background: #011028;
  border-radius: 42px;
  padding: 12px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #1E293B;
  position: relative;
}
.phone-notch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px; background: #011028;
  border-radius: 14px;
  z-index: 2;
}
.phone-screen {
  background: #fff;
  border-radius: 32px; height: 100%;
  padding: 16px 14px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.phone-status {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .72rem; color: var(--ink-2); font-weight: 600;
  margin-bottom: .8rem; padding: 0 6px;
}
.phone-status-icons { display: inline-flex; gap: 3px; }
.phone-status-icons .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }

.phone-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 0 4px; margin-bottom: .8rem;
}
.phone-eyebrow { font-size: .65rem; font-weight: 600; color: var(--cyan); text-transform: uppercase; letter-spacing: .12em; }
.phone-title { font-size: 1rem; font-weight: 700; color: var(--ink); }
.phone-pill {
  font-size: .68rem; font-weight: 700; color: var(--blue);
  background: var(--blue-soft); padding: .25rem .55rem; border-radius: 999px;
}

.exercise-list { display: grid; gap: .45rem; flex: 1; }
.ex {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem .7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ex-name { font-weight: 600; color: var(--ink); font-size: .82rem; }
.ex-sets { color: var(--ink-soft); font-size: .72rem; margin-top: 2px; }
.ex-note { font-size: .65rem; color: var(--blue); margin-top: 4px; font-style: italic; }
.ex.done { background: #F0FDF4; border-color: #BBF7D0; }
.ex.done .ex-check { color: var(--green); font-weight: 700; }
.ex.active { background: linear-gradient(180deg, #ECFEFF, #F0F9FF); border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(6,182,212,.12); }
.ex.active .ex-play { color: var(--cyan); font-weight: 700; }
.ex-check, .ex-play {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(15,23,42,.04); font-size: .7rem; color: var(--ink-soft);
}
.ex.done .ex-check { background: #DCFCE7; }
.ex.active .ex-play { background: rgba(6,182,212,.18); }

.phone-cta {
  margin-top: .8rem;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff; text-align: center; font-weight: 600; font-size: .85rem;
  padding: .7rem; border-radius: 12px;
}

.mock-streak-float {
  position: absolute; right: -2px; bottom: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .75rem .9rem;
  box-shadow: var(--shadow-lg);
  transform: rotate(3deg);
  animation: floaty 7s ease-in-out infinite;
  --r: 3deg;
}
.streak-label { font-size: .68rem; color: var(--ink-soft); font-weight: 600; margin-bottom: .45rem; }
.streak-days { display: flex; gap: 4px; }
.streak-days .d {
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .65rem; color: var(--ink-soft); background: var(--bg-alt);
  font-weight: 600;
}
.streak-days .d.done { background: #D1FAE5; color: var(--green); }
.streak-days .d.active { background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff; }
.streak-meta { font-size: .68rem; color: var(--ink-mute); margin-top: .5rem; font-weight: 500; }

/* Shop mock */
.mock-shop { padding-bottom: 1rem; }
.shop-hero {
  display: grid; grid-template-columns: 1.2fr 1fr; align-items: center;
  padding: 1.4rem 1.4rem 1.2rem;
  background: linear-gradient(135deg, #011028 0%, #1E3A8A 100%);
  color: #F1F5F9;
  position: relative; overflow: hidden;
}
.shop-hero::before {
  content: ""; position: absolute; right: -50px; top: -50px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(6,182,212,.25), transparent 60%);
}
.shop-eyebrow { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); font-weight: 600; }
.shop-h { font-family: "Plus Jakarta Sans", serif; font-size: 1.4rem; font-weight: 700; margin: .35rem 0 .8rem; letter-spacing: -.01em; line-height: 1.15; }
.shop-btn {
  display: inline-block; padding: .55rem .9rem;
  background: #fff; color: var(--ink); border-radius: 999px;
  font-size: .8rem; font-weight: 600;
}
.shop-hero-art { position: relative; height: 130px; display: flex; align-items: center; justify-content: center; }
.watch {
  width: 90px; height: 90px; position: relative;
}
.watch-face {
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #F8FAFC 0%, #CBD5E1 70%, #94A3B8 100%);
  border: 4px solid #1E293B;
  position: relative; box-shadow: 0 8px 22px -8px rgba(0,0,0,.5);
}
.watch-face .hand {
  position: absolute; background: var(--ink); border-radius: 2px;
  left: 50%; bottom: 50%;
  transform-origin: bottom center;
}
.watch-face .hand.h { width: 3px; height: 22px; transform: translateX(-50%) rotate(40deg); }
.watch-face .hand.m { width: 2px; height: 32px; transform: translateX(-50%) rotate(160deg); background: var(--cyan); }
.watch-dot { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 6px; height: 6px; border-radius: 50%; background: #F59E0B; }
.watch-band {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 28px; height: 22px; background: linear-gradient(180deg, #475569, #1E293B);
}
.watch-band.top    { top: -16px; clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%); }
.watch-band.bottom { bottom: -16px; clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%); }

.shop-cats {
  display: flex; gap: .35rem; padding: .9rem 1rem; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.cat {
  font-size: .76rem; color: var(--ink-mute); font-weight: 500;
  padding: .35rem .7rem; border-radius: 999px; background: var(--bg-alt);
}
.cat.active { background: var(--ink); color: #fff; }

.shop-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem;
  padding: 1rem;
}
.shop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.shop-img {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.shop-img-1 { background: linear-gradient(135deg, #FEF3C7, #FDE68A); }
.shop-img-2 { background: linear-gradient(135deg, #E0F2FE, #DBEAFE); }
.shop-img-3 { background: linear-gradient(135deg, #F1F5F9, #E2E8F0); }
.shop-img .ring {
  width: 38px; height: 38px; border-radius: 50%; border: 6px solid #B45309; box-shadow: inset 0 0 0 2px #FBBF24;
}
.shop-img .necklace {
  width: 50px; height: 50px; border-radius: 50%; border: 2px solid #64748B;
  position: relative;
}
.shop-img .necklace::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: var(--cyan);
}
.shop-img .watch-small {
  width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #F1F5F9, #94A3B8);
  border: 3px solid #011028;
  position: relative;
}
.shop-img .watch-small::before, .shop-img .watch-small::after {
  content: ""; position: absolute; left: 50%; bottom: 50%; background: var(--ink); transform-origin: bottom center;
  border-radius: 1px;
}
.shop-img .watch-small::before { width: 2px; height: 10px; transform: translateX(-50%) rotate(30deg); }
.shop-img .watch-small::after  { width: 1.5px; height: 14px; transform: translateX(-50%) rotate(170deg); background: var(--cyan); }

.shop-meta { padding: .6rem .7rem .75rem; }
.shop-name { font-size: .76rem; color: var(--ink-2); font-weight: 600; }
.shop-price { font-size: .8rem; color: var(--blue); font-weight: 700; margin-top: 2px; }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 880px; margin: 0 auto;
  display: grid; gap: 1.5rem;
}
.timeline::before {
  content: ""; position: absolute; left: 27px; top: 12px; bottom: 12px;
  width: 2px; background: linear-gradient(180deg, var(--cyan), var(--blue), transparent);
  border-radius: 2px;
}
.t-step {
  display: grid; grid-template-columns: 60px 1fr; gap: 1.2rem;
  align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.4rem; box-shadow: var(--shadow-sm);
  position: relative;
}
.t-marker {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 20px -10px rgba(30,58,138,.5);
  font-family: var(--font-mono); font-size: .95rem;
  z-index: 1;
}
.t-body h3 { margin-bottom: .4rem; }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.skill-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.skill-head { display: flex; align-items: center; gap: .65rem; margin-bottom: 1rem; }
.skill-dot { width: 10px; height: 10px; border-radius: 50%; }
.skill-head h3 { font-size: 1.05rem; }

.pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pills li {
  font-size: .8rem; color: var(--ink-2); font-weight: 500;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: .35rem .65rem; border-radius: 999px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.pills li:hover { background: var(--blue-soft); color: var(--blue); border-color: #DDE5FF; }

/* ---------- Chi sono ---------- */
.chi-sono-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
}
.chi-sono-copy .kicker { margin-bottom: .55rem; }
.chi-sono-copy h2 { margin-bottom: 1rem; }
.chi-sono-copy p { margin-bottom: 1rem; max-width: 60ch; text-wrap: pretty; }

.bio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  position: relative;
}
.bio-avatar {
  width: 72px; height: 72px; border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  position: relative;
}
.bio-avatar img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block;
  border-radius: 20px;
}
.bio-status {
  position: absolute; bottom: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--bg);
}
.bio-name { font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.bio-role { color: var(--ink-soft); font-size: .9rem; margin-bottom: 1rem; }
.bio-list { display: grid; gap: .55rem; margin-bottom: 1.2rem; }
.bio-list li {
  display: flex; align-items: flex-start; gap: .55rem;
  color: var(--ink-2); font-size: .92rem;
}
.bio-list svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: .3rem; stroke: var(--green); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Contatti ---------- */
.contact-grid {
  display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.contact-copy h2 { margin: .55rem 0 1rem; }
.contact-copy .section-lead { margin-bottom: 1rem; text-align: left; }
.contact-copy p { color: var(--ink-mute); margin-bottom: 1.5rem; }

.contact-list { display: grid; gap: .65rem; }
.contact-line {
  display: flex; align-items: center; gap: .9rem;
  padding: .9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.contact-line:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: var(--shadow); }
.contact-ic {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--blue-soft); color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-label { font-size: .72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; display: block; }
.contact-value { color: var(--ink); font-weight: 600; }

/* Form */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem;
  position: relative;
}
.field { display: grid; gap: .4rem; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: .85rem; font-weight: 600; color: var(--ink-2);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: .8rem .95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font: inherit;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(6,182,212,.18);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-error { font-size: .78rem; color: #EF4444; min-height: 1em; font-weight: 500; }
.field-hint  { font-size: .78rem; color: var(--ink-soft); }
.field-required { color: #EF4444; font-weight: 700; margin-left: .1em; }
.field-optional {
  font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-soft); background: var(--surface-2, rgba(0,0,0,.06));
  border: 1px solid var(--border); border-radius: 4px;
  padding: .1em .45em; margin-left: .45em; vertical-align: middle;
}
.field.has-error input, .field.has-error select, .field.has-error textarea {
  border-color: #EF4444; box-shadow: 0 0 0 4px rgba(239,68,68,.14);
}

.checkbox {
  display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; color: var(--ink-2); font-size: .92rem;
}
.checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox-box {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-2);
  background: var(--surface); flex-shrink: 0; position: relative; transition: all .15s ease;
}
.checkbox input:checked + .checkbox-box {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-color: transparent;
}
.checkbox input:checked + .checkbox-box::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg);
}
.checkbox input:focus-visible + .checkbox-box { box-shadow: 0 0 0 4px rgba(6,182,212,.2); }
.checkbox > span:last-child { line-height: 1.45; }
.field-check { margin-top: .25rem; }

/* reCAPTCHA Netlify-provided (widget iniettato da Netlify a runtime) */
.recaptcha-field { margin-top: .25rem; }
.recaptcha-field > div {
  display: flex;
  justify-content: flex-start;
}
@media (max-width: 480px) {
  .recaptcha-field {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: flex-start; }
.form-actions .btn { display: inline-flex; align-items: center; gap: .55rem; }
.form-actions .btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.form-micro { font-size: .8rem; color: var(--ink-soft); margin: 0; }

/* Honeypot (anti-spam) — completamente invisibile */
.hp-field { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Box messaggi (successo / errore) */
.form-message {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: 1rem 1.1rem; border-radius: var(--radius);
  border: 1px solid transparent;
}
.form-message strong { font-size: 1rem; display: block; }
.form-message p { font-size: .9rem; margin-top: 2px; }
.form-message a { font-weight: 600; text-decoration: underline; }
.form-message-ic {
  width: 36px; height: 36px; border-radius: 50%; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.form-message-ic svg { width: 18px; height: 18px; }

.form-message--success { background: #ECFDF5; border-color: #A7F3D0; }
.form-message--success strong { color: #065F46; }
.form-message--success p { color: #047857; }
.form-message--success .form-message-ic { background: var(--green, #10B981); }
.form-message--success a { color: #047857; }

.form-message--error { background: #FEF2F2; border-color: #FECACA; }
.form-message--error strong { color: #991B1B; }
.form-message--error p { color: #B91C1C; }
.form-message--error .form-message-ic { background: #EF4444; }
.form-message--error a { color: #991B1B; }

/* ---------- Footer ---------- */
.site-footer {
  background: #011028;
  color: #CBD5E1;
  padding: clamp(48px, 6vw, 72px) 0 1.2rem;
  margin-top: clamp(40px, 6vw, 80px);
}
.site-footer .brand { color: #fff; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: .8rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem;
  padding-bottom: 2rem; border-bottom: 1px solid #1E293B;
}
.footer-brand p { color: #94A3B8; margin-top: .8rem; max-width: 38ch; }
.footer-nav ul { display: grid; gap: .45rem; }
.footer-nav a {
  color: #94A3B8; font-size: .92rem;
  transition: color .15s ease;
}
.footer-nav a:hover { color: var(--cyan); }

/* Footer social list */
.footer-social-list { display: grid; gap: .55rem; list-style: none; padding: 0; margin: 0; }
.footer-social-link {
  display: inline-flex; align-items: center; gap: .55rem;
  color: #94A3B8; font-size: .92rem; text-decoration: none;
  transition: color .15s ease;
}
.footer-social-link:hover { color: #fff; }
.footer-social-ic {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s ease;
}
.footer-social-link:hover .footer-social-ic { background: rgba(255,255,255,.15); }
.footer-social-ic--ig { color: #E1306C; }
.footer-social-link:hover .footer-social-ic--ig { background: rgba(225,48,108,.15); }
.footer-social-ic--fb { color: #1877F2; }
.footer-social-link:hover .footer-social-ic--fb { background: rgba(24,119,242,.15); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem;
  padding-top: 1.75rem;
  font-size: .93rem; color: #94A3B8;
}
.footer-bottom p { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.footer-bottom p .footer-sep { opacity: .4; }
.footer-legal { display: flex; align-items: center; gap: 1.2rem; }
.footer-legal a { color: #94A3B8; text-decoration: none; transition: color .15s; }
.footer-legal a:hover { color: #fff; }
.footer-mini { color: #475569; }

/* ---------- Back to top ---------- */
/* ---------- WhatsApp FAB ---------- */
.whatsapp-fab {
  position: fixed; left: 22px; bottom: 22px; z-index: 70;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, .45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(37, 211, 102, .6); }
@media (max-width: 960px) {
  .whatsapp-fab--hidden { opacity: 0; pointer-events: none; transform: scale(0.85); }
}

/* Bottone WhatsApp verde nel hero */
.btn-whatsapp {
  background: #25D366; color: #fff;
  display: inline-flex; align-items: center; gap: .5rem;
  box-shadow: 0 6px 18px -6px rgba(37, 211, 102, .55);
}
.btn-whatsapp:hover { background: #20BA5A; color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(37, 211, 102, .7); }
.btn-whatsapp svg { flex-shrink: 0; }

/* Icona WhatsApp nella contact-list */
.contact-ic-wa { background: rgba(37, 211, 102, .12) !important; color: #25D366 !important; }
.contact-line-wa:hover .contact-ic-wa { background: rgba(37, 211, 102, .22) !important; }

/* Link inline nel testo */
.inline-link { color: var(--blue); font-weight: 600; text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

/* Back to top si sposta a destra per non sovrapporsi */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: #fff; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
}
.back-to-top svg { width: 18px; height: 18px; }
.back-to-top.is-visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--blue); }

/* ---------- Reveal on scroll (intentionally minimal) ----------
   The .reveal class has NO hidden state — content is always visible at rest.
   When JS adds .is-visible we trigger a tiny one-shot transform animation
   (translateY only, opacity stays at 1). This guarantees: no-JS users see
   content, screenshot tools see content, and slow first frames see content.
*/
@keyframes reveal-rise {
  0%   { transform: translateY(10px); }
  100% { transform: none; }
}
html.js .reveal.is-visible {
  animation: reveal-rise .55s cubic-bezier(.2,.7,.2,1) var(--reveal-delay, 0ms) both;
}

/* Focus ring */
:focus-visible {
  outline: 3px solid rgba(6,182,212,.45);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .hero-grid-row { grid-template-columns: 1fr; }
  /* Su mobile: foto prima del testo */
  .hero-copy { order: 2; }
  .hero-photo-wrap { order: 1; margin-bottom: .8rem; justify-content: center; }
  .hero-photo { max-width: 180px; max-height: 200px; object-fit: cover; object-position: center top; }
  .hero .micro-proof { display: none; }
  .hero-whatsapp-btn { display: none; }
  .hero-copy h1 { margin: .5rem 0 .6rem; }
  .hero-ctas { margin: .9rem 0 .5rem; }
  .hero-grid-row { gap: 0; }
  .hero-mockup { margin-top: 1.5rem; }
  .mock-dashboard { transform: none; }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .project, .project-reverse { grid-template-columns: 1fr; }
  .project-reverse .project-copy { order: 0; }
  .project-reverse .project-visual { order: 0; }
  .chi-sono-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(14px);
    flex-direction: column; align-items: stretch;
    padding: 1.2rem var(--gutter) 1.6rem;
    gap: .8rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 40px -28px rgba(15,23,42,.25);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav-links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links > ul { flex-direction: column; align-items: stretch; gap: .15rem; }
  .nav-links a {
    padding: .85rem 1rem; font-size: 1rem;
    border-radius: 12px;
  }
  .nav-links a.is-active { background: none; }
  .nav-cta { margin-top: .6rem; justify-content: center; }
}

@media (max-width: 720px) {
  .mock-phone { height: 460px; }
  .cards-3 { grid-template-columns: 1fr; }
  .cards-4 { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .mock-kpis { grid-template-columns: repeat(3, 1fr); }
  .mock-kpis.four { grid-template-columns: repeat(2, 1fr); }
  .mock-body { grid-template-columns: 110px 1fr; min-height: 250px; }
  .mock-dashboard-lg .mock-body { grid-template-columns: 110px 1fr; }
  .shop-hero { grid-template-columns: 1fr; gap: 1rem; padding: 1.2rem; }
  .shop-hero-art { height: 100px; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-grid .shop-card:last-child { grid-column: 1 / -1; }
  .timeline::before { left: 22px; }
  .t-step { grid-template-columns: 46px 1fr; padding: 1.1rem; gap: 1rem; }
  .t-marker { width: 44px; height: 44px; font-size: .82rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: .6rem; padding-right: 56px; font-size: .82rem; }
  .footer-bottom p { flex-wrap: wrap; gap: .4rem; }
  .footer-bottom p > span.nowrap { white-space: nowrap; }
  .mock-code-float, .mock-card-float { display: none; }
  .mock-streak-float { right: 4px; }
}

@media (max-width: 480px) {
  .mock-kpis { grid-template-columns: 1fr 1fr; }
  .mock-kpis.four { grid-template-columns: 1fr 1fr; }
  .mock-body { grid-template-columns: 90px 1fr; }
  .mock-dashboard-lg .mock-body { grid-template-columns: 90px 1fr; }
  .mock-side { font-size: .65rem; padding: .6rem .4rem; }
  .mock-side-logo { font-size: .68rem; }
  .mock-phone { width: min(240px, 80vw); height: 460px; min-height: unset; }
  .project-visual { overflow: hidden; }
}

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

/* Print */
@media print {
  .site-header, .back-to-top, .hero-bg, .mock-card-float, .mock-code-float, .mock-streak-float { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 24px 0; page-break-inside: avoid; }
}
