/* ==========================================================================
   Yuri Biasi — landing page
   Palette: blu profondo + oro. Font: Fraunces (titoli), Manrope (testo),
   JetBrains Mono (etichette).
   ========================================================================== */

:root {
  --navy-950: #040a1a;
  --navy-900: #07112a;
  --navy-850: #0a1736;
  --navy-800: #0d1d43;
  --navy-700: #132a5e;
  --ink: #f5f1e8;
  --ink-soft: #cdd4e4;
  --muted: #9aa7c4;
  --gold: #c9a24a;
  --gold-hi: #ebd391;
  --gold-lo: #a07c2d;
  --line: rgba(201, 162, 74, 0.24);
  --line-soft: rgba(233, 225, 205, 0.1);
  --ivory: #f4efe4;
  --ivory-2: #ebe4d4;
  --ivory-ink: #0b1630;
  --ivory-muted: #4a5672;
  --gold-on-ivory: #7d5f1c;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --sec: clamp(56px, 7vw, 96px);
  --radius: 4px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--navy-900);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Le due lingue stanno una accanto all'altra nell'HTML: si mostra quella di <html data-lang>.
   Non html[lang]: i traduttori del browser lo riscrivono e i testi uscirebbero doppi. */
html:not([data-lang="en"]) [lang="en"],
html[data-lang="en"] [lang="it"] {
  display: none !important;
}

/* Senza JavaScript i controlli che dipendono dallo script non si mostrano. */
html:not(.js) .burger,
html:not(.js) .lang,
html:not(.js) .viewer__chips,
html:not(.js) .compare input,
html:not(.js) .compare__handle {
  display: none;
}

html.menu-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h3 {
  text-wrap: balance;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--gold);
  color: var(--navy-900);
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--navy-900);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip:focus {
  top: 12px;
}

/* ---------- Tipografia ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--gold);
  flex: none;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin-top: 18px;
  text-wrap: balance;
}

.h2 em,
.hero h1 em,
.cta h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
  background: linear-gradient(120deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  margin-top: 20px;
  max-width: 62ch;
  font-size: clamp(1.06rem, 1.5vw, 1.2rem);
  color: var(--ink-soft);
}

.sec {
  position: relative;
  padding-block: var(--sec);
}

/* Dopo le tre schede «Perché un freelance» la sezione successiva parte più vicina. */
.why + .sec {
  padding-top: clamp(32px, 4vw, 48px);
}

.sec__head {
  max-width: 780px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

/* ---------- Pulsanti ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s;
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold-hi) 0%, var(--gold) 52%, var(--gold-lo) 100%);
  color: var(--navy-900);
  box-shadow: 0 10px 30px -12px rgba(201, 162, 74, 0.55);
}

.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px rgba(201, 162, 74, 0.7);
}

.btn--ghost {
  border-color: rgba(245, 241, 232, 0.28);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
}

.btn--sm {
  min-height: 42px;
  padding: 9px 18px;
  font-size: 0.9rem;
}

.btn .arrow {
  transition: transform 0.25s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Navigazione ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.nav.is-stuck,
.nav.is-open {
  background: rgba(6, 14, 36, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}

.nav__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: none;
}

.brand__mark {
  width: 30px;
  height: 30px;
  color: var(--gold);
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.24rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 34px);
}

.nav__links a {
  position: relative;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.2s;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--ink);
}

.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__links .nav__cta {
  display: none;
}

.nav__side {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 3px;
}

.lang button {
  min-width: 38px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.lang button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--navy-900);
  font-weight: 500;
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), background-color 0.2s;
}

.burger span {
  position: relative;
}

.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger span::before {
  top: -6px;
}

.burger span::after {
  top: 6px;
}

.nav.is-open .burger span {
  background: transparent;
}

.nav.is-open .burger span::before {
  transform: translateY(6px) rotate(45deg);
}

.nav.is-open .burger span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 96px));
  padding-bottom: clamp(56px, 8vw, 104px);
  overflow: hidden;
  background:
    radial-gradient(58% 52% at 82% 8%, rgba(38, 78, 170, 0.42), transparent 70%),
    radial-gradient(40% 40% at 6% 92%, rgba(201, 162, 74, 0.1), transparent 70%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900));
}

/* Griglia prospettica: richiama lo spazio 3D senza diventare decorazione. */
.hero::before {
  content: "";
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: -6%;
  height: 62%;
  background-image:
    linear-gradient(to right, rgba(201, 162, 74, 0.13) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(201, 162, 74, 0.13) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(760px) rotateX(64deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 82%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 82%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  margin-top: 26px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
}

.hero h1 .line {
  display: block;
}

.hero h1 .line + .line {
  margin-top: 0.14em;
  color: var(--ink-soft);
}

.hero__sub {
  margin-top: 28px;
  max-width: 54ch;
  font-size: clamp(1.06rem, 1.45vw, 1.2rem);
  color: var(--ink-soft);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero__media {
  position: relative;
  perspective: 1200px;
}

.frame {
  position: relative;
  padding: 14px;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease);
  will-change: transform;
}

.frame img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(201, 162, 74, 0.28);
}

.frame__c {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--gold);
  pointer-events: none;
}

.frame__c:nth-of-type(1) {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}

.frame__c:nth-of-type(2) {
  top: 0;
  right: 0;
  border-left: 0;
  border-bottom: 0;
}

.frame__c:nth-of-type(3) {
  bottom: 0;
  left: 0;
  border-right: 0;
  border-top: 0;
}

.frame__c:nth-of-type(4) {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
}

.chip-float {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(6, 14, 36, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}

.chip-float::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 74, 0.18);
}

.chip-float--a {
  left: -18px;
  bottom: 14%;
}

.chip-float--b {
  right: -10px;
  top: 9%;
}

.trust {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--line);
}

.trust li {
  padding: 22px 24px 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.trust li + li {
  padding-left: 24px;
  border-left: 1px solid var(--line-soft);
}

.trust b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Ti riconosci ---------- */

.pain {
  background: var(--navy-950);
  border-block: 1px solid var(--line-soft);
}

.pain__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.pain__card {
  padding: clamp(26px, 3.4vw, 44px);
  background: linear-gradient(180deg, rgba(19, 42, 94, 0.3), rgba(13, 29, 67, 0.12));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.pain__label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.pain__card ul {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.pain__card li {
  position: relative;
  padding-left: 30px;
  font-family: var(--font-display);
  font-size: clamp(1.14rem, 1.7vw, 1.36rem);
  line-height: 1.38;
  color: var(--ink);
}

.pain__card li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.pain__close {
  margin-top: clamp(36px, 5vw, 60px);
  max-width: 30em;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.28;
  color: var(--ink);
}

.pain__close em {
  font-style: italic;
  color: var(--gold-hi);
}

/* ---------- Risultati ---------- */

.results__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.result {
  padding: 34px 28px 8px 0;
}

.result + .result {
  padding-left: 28px;
  border-left: 1px solid var(--line-soft);
}

.result__n {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 300;
  line-height: 1;
  color: var(--gold);
}

.result h3 {
  margin-top: 22px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.36rem;
  line-height: 1.22;
}

.result p {
  margin-top: 12px;
  font-size: 0.98rem;
  color: var(--muted);
}

/* ---------- Servizi ---------- */

.ticks {
  display: grid;
  gap: 11px;
}

.ticks li {
  position: relative;
  padding-left: 24px;
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 12px;
  height: 1px;
  background: var(--gold);
}

/* ---------- Demo ---------- */

.demo {
  background: var(--navy-950);
  border-block: 1px solid var(--line-soft);
}

.viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.viewer__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--navy-850);
}

.viewer__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

.viewer__stage img.is-on {
  opacity: 1;
}

.viewer__ui {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(19, 42, 94, 0.28), rgba(13, 29, 67, 0.1));
}

.viewer__chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.vchip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.vchip i {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.vchip:hover {
  border-color: var(--line);
}

.vchip[aria-pressed="true"] {
  border-color: var(--gold);
  background: rgba(201, 162, 74, 0.1);
}

.spec {
  display: grid;
  gap: 0;
  margin: 0;
}

.spec div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 0.9rem;
}

.spec dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
  flex: none;
}

.spec dd {
  margin: 0;
  text-align: right;
  color: var(--ink);
}

.viewer__note {
  margin-top: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

.compare-block {
  margin-top: clamp(48px, 7vw, 88px);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
}

.compare-block h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.16;
}

.compare-block p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.96rem;
}

.compare {
  --pos: 50%;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--navy-850);
  user-select: none;
}

.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.compare__top {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--gold);
  pointer-events: none;
}

.compare__handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--navy-900) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ebd391' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 22px no-repeat;
  border: 1.5px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.compare input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}

.compare input:focus-visible ~ .compare__handle::after {
  outline: 2px solid var(--gold-hi);
  outline-offset: 4px;
}

.compare__tag {
  position: absolute;
  bottom: 14px;
  padding: 6px 10px;
  background: rgba(6, 14, 36, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}

.compare__tag--a {
  left: 14px;
}

.compare__tag--b {
  right: 14px;
}

/* ---------- Lavori (sezione chiara) ---------- */

.work {
  background: var(--ivory);
  color: var(--ivory-ink);
}

.work .eyebrow {
  color: var(--gold-on-ivory);
}

.work .eyebrow::before {
  background: var(--gold-on-ivory);
}

.work .lead {
  color: var(--ivory-muted);
}

.work :focus-visible {
  outline-color: var(--ivory-ink);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(150px, 19vw, 250px);
  gap: 10px;
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--ivory-2);
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.tile:hover img {
  transform: scale(1.04);
}

.tile figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(6, 14, 36, 0.86);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tile--a {
  grid-column: span 8;
  grid-row: span 2;
}

.tile--b,
.tile--c {
  grid-column: span 4;
}

.tile--d,
.tile--e {
  grid-column: span 6;
}

.cases {
  margin-top: clamp(48px, 7vw, 88px);
  border-top: 1px solid rgba(11, 22, 48, 0.85);
}

.case {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(16px, 4vw, 56px);
  padding-block: clamp(24px, 3.4vw, 40px);
  border-bottom: 1px solid rgba(11, 22, 48, 0.16);
}

.case__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-on-ivory);
  padding-top: 8px;
}

.case h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.3vw, 1.72rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.case p {
  margin-top: 10px;
  max-width: 68ch;
  color: var(--ivory-muted);
}

/* ---------- Metodo ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.step {
  position: relative;
  padding-top: 34px;
}

.step::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  right: calc(-1 * clamp(20px, 3vw, 40px));
  height: 1px;
  background: var(--line);
}

.step:last-child::before {
  right: 0;
}

.step::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 11px;
  height: 11px;
  background: var(--navy-900);
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
}

.step__n {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.step h3 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.2;
}

.step p {
  margin-top: 10px;
  font-size: 0.98rem;
  color: var(--muted);
}

/* ---------- Perché ---------- */

.why {
  background: linear-gradient(180deg, var(--navy-850), var(--navy-900));
  border-top: 1px solid var(--line-soft);
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
}

.why__card {
  padding: 30px 28px 32px;
  border: 1px solid var(--line-soft);
  border-top: 1px solid var(--gold);
  border-radius: 2px;
  background: rgba(13, 29, 67, 0.35);
  transition: translate 0.35s var(--ease), border-color 0.3s, background-color 0.3s;
}

.js .why__card.reveal {
  transition: opacity 0.8s var(--ease) var(--d, 0s), transform 0.8s var(--ease) var(--d, 0s), translate 0.35s var(--ease), border-color 0.3s, background-color 0.3s;
}

.why__card:hover {
  translate: 0 -4px;
  border-color: var(--line);
  border-top-color: var(--gold-hi);
  background: rgba(19, 42, 94, 0.4);
}

.why__card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.32rem;
  line-height: 1.2;
}

.why__card p {
  margin-top: 10px;
  font-size: 0.98rem;
  color: var(--muted);
}

/* ---------- Chi sono ---------- */

.about {
  border-top: 1px solid var(--line-soft);
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.portrait {
  position: relative;
  max-width: 440px;
}

.portrait::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--gold);
  border-radius: 2px;
}

.portrait img {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  filter: saturate(0.92) contrast(1.04);
}

.about__role {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.about__text {
  margin-top: 26px;
  display: grid;
  gap: 16px;
  max-width: 60ch;
  color: var(--ink-soft);
}

.about__text p:first-child {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.9vw, 1.46rem);
  line-height: 1.42;
  color: var(--ink);
}

/* ---------- FAQ ---------- */

.faq {
  background: var(--navy-950);
  border-top: 1px solid var(--line-soft);
}

.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: start;
}

.faq__list {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line-soft);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-family: var(--font-display);
  font-size: clamp(1.14rem, 1.8vw, 1.34rem);
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--gold), var(--gold)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) center / 1.5px 100% no-repeat;
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 40px 24px 0;
  max-width: 64ch;
  color: var(--ink-soft);
}

/* ---------- CTA finale ---------- */

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(50% 70% at 50% 0%, rgba(38, 78, 170, 0.4), transparent 70%),
    var(--navy-900);
  border-top: 1px solid var(--line);
}

.cta .eyebrow {
  justify-content: center;
}

.cta .eyebrow::after {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--gold);
}

.cta h2 {
  margin: 22px auto 0;
  max-width: 16em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.3rem, 5.4vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.cta p {
  margin: 22px auto 0;
  max-width: 50ch;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.cta .btn {
  margin-top: 36px;
}


.cta__alt {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  margin-top: 30px;
  font-size: 0.95rem;
  color: var(--muted);
}

.cta__alt a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s, border-color 0.2s;
}

.cta__alt a:hover {
  color: var(--gold-hi);
  border-color: var(--gold);
}

/* ---------- Footer ---------- */

.footer {
  padding-block: 30px;
  background: var(--navy-950);
  border-top: 1px solid var(--line-soft);
  font-size: 0.86rem;
  color: var(--muted);
}

.footer__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
}

.footer a {
  text-decoration: none;
  color: var(--ink-soft);
}

.footer a:hover {
  color: var(--gold-hi);
}

/* ---------- Le tre porte ---------- */

.doors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
}

.doors--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.door {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-top: 1px solid var(--gold);
  border-radius: 2px;
  background: rgba(13, 29, 67, 0.35);
  transition: translate 0.4s var(--ease), border-color 0.3s, background-color 0.3s, box-shadow 0.4s var(--ease);
}

/* Il sollevamento usa translate: transform resta alla comparsa allo scroll. */
.door:hover {
  translate: 0 -6px;
  border-color: var(--line);
  border-top-color: var(--gold-hi);
  background: rgba(19, 42, 94, 0.42);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}

/* .js .reveal ha specificità più alta di .door e ne sostituirebbe le transizioni. */
.js .door.reveal {
  transition: opacity 0.8s var(--ease) var(--d, 0s), transform 0.8s var(--ease) var(--d, 0s), translate 0.4s var(--ease), border-color 0.3s, background-color 0.3s, box-shadow 0.4s var(--ease);
}

/* Il contorno va sulla scheda intera, ma solo con il focus da tastiera. */
.door:has(.door__link:focus-visible) {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}

.door__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy-950);
  border-bottom: 1px solid var(--line-soft);
}

.door__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.door:hover .door__media img {
  transform: scale(1.04);
}

.door__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px 28px 30px;
}

.door__tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--gold);
}

.door h3 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.4vw, 2.05rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
}

.door__link {
  color: inherit;
  text-decoration: none;
}

/* Tutta la scheda è cliccabile. */
.door__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

@supports selector(:has(a)) {
  .door__link:focus-visible {
    outline: none;
  }
}

.door p {
  margin-top: 12px;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.door__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 26px;
  font-weight: 600;
  color: var(--gold-hi);
  transition: gap 0.25s var(--ease);
}

.door:hover .door__go {
  gap: 14px;
}

.others {
  background: var(--navy-950);
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(56px, 7vw, 96px);
}

.others__title {
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Pagine interne ---------- */

.hero--page {
  padding-top: calc(var(--nav-h) + clamp(32px, 5vw, 72px));
  padding-bottom: clamp(48px, 7vw, 88px);
}

.hero--page h1 {
  font-size: clamp(2.4rem, 5vw, 4.1rem);
}

.versus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
}

.versus__col {
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
}

.versus__col--new {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(201, 162, 74, 0.1), rgba(13, 29, 67, 0.2));
}

.versus__col h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  line-height: 1.15;
}

.versus__col--old h3 {
  color: var(--muted);
}

.versus ul {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.versus li {
  position: relative;
  padding-left: 32px;
  color: var(--ink-soft);
}

.versus li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 18px;
  height: 18px;
  background: center / contain no-repeat;
}

.versus__col--old li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%239aa7c4' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M5 5l8 8M13 5l-8 8'/%3E%3C/svg%3E");
}

.versus__col--new li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23ebd391' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 9.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E");
}

.versus__col--new li {
  color: var(--ink);
}

.versus__note {
  margin-top: 26px;
  max-width: 72ch;
  font-size: 0.92rem;
  color: var(--muted);
}

.results__grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.results__grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fit {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(16px, 4vw, 56px);
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--line-soft);
}

.fit h3 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 4px;
}

.ticks--cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 40px;
}

.cases--first {
  margin-top: 0;
}

/* ---------- Comparsa allo scroll (solo con JS attivo) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Sopra la piega la comparsa non aspetta l'IntersectionObserver. */
.js .hero .reveal {
  transition: none;
  animation: rise 0.9s var(--ease) var(--d, 0s) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .results__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .result:nth-child(n + 3) {
    border-top: 1px solid var(--line-soft);
  }

  .viewer {
    grid-template-columns: minmax(0, 1fr);
  }

  .viewer__chips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .compare-block {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 940px) {
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 32px;
    background: var(--navy-950);
    height: calc(100vh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
  }

  .nav.is-open .nav__links {
    display: flex;
  }

  .nav__links a {
    padding: 15px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav__links a::after {
    display: none;
  }

  .nav__links .nav__cta,
  .nav__links .nav__cta:hover {
    display: inline-flex;
    margin-top: 20px;
    border-bottom: 0;
    padding: 14px 28px;
    color: var(--navy-900);
    font-weight: 700;
  }

  .burger {
    display: inline-flex;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__media {
    max-width: 640px;
  }

  .chip-float--a {
    left: 8px;
  }

  .chip-float--b {
    right: 8px;
  }

  .about__grid,
  .faq__grid,
  .why__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  

  

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 44px;
  }

  .step:nth-child(2)::before {
    right: 0;
  }

  .portrait {
    max-width: min(340px, 100% - 18px);
  }
}

@media (max-width: 720px) {
  body {
    font-size: 1rem;
  }

  .nav__side > .btn {
    display: none;
  }

  .trust {
    grid-template-columns: minmax(0, 1fr);
  }

  .trust li {
    padding: 16px 0;
  }

  .trust li + li {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }

  .pain__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .results__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .result,
  .result + .result {
    padding: 28px 0 22px;
    border-left: 0;
  }

  .result + .result {
    border-top: 1px solid var(--line-soft);
  }

  .viewer__chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
  }

  .tile,
  .tile--a,
  .tile--b,
  .tile--c,
  .tile--d,
  .tile--e {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 16 / 10;
  }

  .case {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .case__tag {
    padding-top: 0;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .step::before {
    right: 0;
  }

  .faq details p {
    padding-right: 0;
  }

  .hero__cta .btn,
  .cta .btn {
    width: 100%;
  }

  .chip-float {
    font-size: 0.62rem;
    padding: 8px 10px;
  }
}

@media (max-width: 360px) {
  .nav__in {
    gap: 10px;
  }

  .nav__side {
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand__name {
    font-size: 1.08rem;
  }

  .viewer__ui {
    padding: 18px;
  }

  .vchip {
    gap: 8px;
    padding: 8px 10px;
    font-size: 0.84rem;
  }
}

/* Una sola scheda «ti riconosci?»: occupa tutta la larghezza e mette le tre situazioni in fila. */
.pain__grid--one {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 941px) {
  .pain__grid--one .pain__card ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 40px);
  }
}

/* Con le porte affiancate le etichette occupano la stessa altezza, così i titoli restano allineati. */
@media (min-width: 941px) {
  .doors:not(.doors--two) .door__tag {
    min-height: 4.5em;
  }
}

@media (min-width: 721px) {
  .doors--two .door__tag {
    min-height: 3em;
  }
}

/* Nel menu mobile la sottolineatura è spenta: la pagina corrente si distingue dal colore. */
@media (max-width: 940px) {
  .nav__links a[aria-current="page"] {
    color: var(--gold-hi);
  }
}

/* Responsive dei componenti aggiunti con le tre porte. */
@media (max-width: 1080px) {
  .results__grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .doors {
    grid-template-columns: minmax(0, 1fr);
  }

  .doors--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .door__media {
    aspect-ratio: 16 / 8;
  }
}

@media (max-width: 720px) {
  .doors--two,
  .versus,
  .fit,
  .ticks--cols,
  .results__grid--2,
  .results__grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .door__body {
    padding: 24px 22px 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal,
  .js .hero .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

@media print {
  .nav,
  .hero::before,
  .chip-float {
    display: none;
  }

  .js .reveal,
  .js .hero .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Apertura dell'hub compatta, con le azioni subito dopo il testo. */
.hero--hub {
  padding-top: calc(var(--nav-h) + clamp(32px, 3.5vw, 48px));
}

.hero--hub h1 {
  font-size: clamp(2.5rem, 4.7vw, 4rem);
}

.hero--hub .hero__cta {
  margin-top: 24px;
}

/* Quattro contenuti training in due righe sul desktop. */
@media (min-width: 721px) {
  .why__grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Footer: collegamenti e pagina legale ---------- */

.footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}

.sec.legal {
  padding-top: calc(var(--nav-h) + clamp(32px, 5vw, 72px));
}

.legal__body {
  max-width: 72ch;
}

.legal__body h2 {
  margin-top: 40px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.25;
}

.legal__body p,
.legal__body li {
  margin-top: 12px;
  color: var(--ink-soft);
}

.legal__body ul {
  margin-top: 8px;
  padding-left: 1.2em;
  list-style: disc;
}

.legal__body a {
  color: var(--gold-hi);
}

.legal__date {
  margin-top: 40px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Schede in preparazione e pagina «Work in progress» ---------- */

.door__media {
  position: relative;
}

.door__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 2px;
  background: var(--gold);
  color: var(--navy-950);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.door .door__tag--accent {
  color: var(--gold);
}

.sec.wip {
  padding-top: calc(var(--nav-h) + clamp(56px, 9vw, 140px));
  padding-bottom: clamp(72px, 10vw, 160px);
  text-align: center;
}

.wip .eyebrow {
  justify-content: center;
}

.wip h1 {
  margin-top: 22px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.3rem, 5.4vw, 4.2rem);
  line-height: 1.08;
}

.wip .lead {
  max-width: 46ch;
  margin: 20px auto 0;
}

.wip__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}
