/* ==========================================================================
   Think Trade Finance — design system
   Minimal, stile Apple: sezioni chiare e blu notte alternate, oro come accento,
   un solo carattere (Inter), molto spazio, movimenti sobri.
   ========================================================================== */

:root {
  --navy: #070b16;
  --navy-2: #0f182c;
  --gold: #c9a55c;
  --gold-dark: #8a6a2e;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 56px;
  --radius: 12px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);

  --z-header: 50;
  --z-menu: 40;

  /* tema chiaro (predefinito) */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --fg: #1d1d1f;
  --fg-2: #5f5f66;
  --line: #d2d2d7;
  --card: #f5f5f7;
  --accent: var(--gold-dark);
  --btn-bg: var(--navy);
  --btn-fg: #ffffff;
  --btn-hover: #1c2742;
}

/* tema scuro: sezioni blu notte */
.section--dark, .page-hero, .city, .gp-content {
  --bg: var(--navy);
  --bg-alt: var(--navy-2);
  --fg: #f5f5f7;
  --fg-2: #a6a8b3;
  --line: rgba(255, 255, 255, 0.14);
  --card: var(--navy-2);
  --accent: var(--gold);
  --btn-bg: var(--gold);
  --btn-fg: var(--navy);
  --btn-hover: #dcbd7c;
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 64px); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.55; letter-spacing: -0.011em;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
::selection { background: rgba(201, 165, 92, 0.35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200; padding: 10px 18px; border-radius: 980px;
  background: var(--navy); color: #fff; font-size: .875rem; transform: translateY(-160%); transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------------------------------------------------------------- layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(88px, 11vw, 160px); background: var(--bg); color: var(--fg); }
.section--tight { padding-block: clamp(64px, 8vw, 104px); }
.section--surface { background: var(--bg-alt); }
.section--dark { background: var(--bg); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 96px); align-items: center; }
.align-start { align-items: start; }
.section-head { max-width: 780px; margin: 0 auto clamp(48px, 6vw, 80px); text-align: center; }
.section-head .lead { margin: 20px auto 0; }
.section-head .carousel-nav { justify-content: center; margin-top: 28px; }
.sticky-col { position: sticky; top: calc(var(--header-h) + 110px); }

.mt-sm { margin-top: 16px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 36px; }
.mt-xl { margin-top: clamp(48px, 6vw, 72px); }

/* ---------------------------------------------------------------- tipografia */
/* nei titoli si va a capo solo tra una parola e l'altra (niente sillabazione), con righe bilanciate;
   una parola si spezza solo se da sola è più larga dello schermo (succede solo con testo molto ingrandito) */
h1, h2, h3, .display, .h2, .h3 { color: var(--fg); font-weight: 600; overflow-wrap: anywhere; hyphens: manual; text-wrap: balance; }
/* le parole lunghe (o un testo ingrandito dal sistema) vanno a capo invece di allargare la pagina */
.lead, address, .value-text, .footer-list a, .scrub-text, .legal { overflow-wrap: anywhere; }
.grid-2 > *, .contact-grid > *, .steps-layout > *, .footer-grid > *, .timeline-item > *, .contact-card > *, .feature > *, .value > * { min-width: 0; }
.hero-inner > *, .page-hero .container > * { max-width: 100%; }
.display { font-size: clamp(2.3rem, 6.6vw, 5.5rem); line-height: 1.04; letter-spacing: -0.04em; }
h2, .h2 { font-size: clamp(2.1rem, 4.6vw, 3.75rem); line-height: 1.07; letter-spacing: -0.035em; }
h3, .h3 { font-size: clamp(1.3rem, 1.8vw, 1.6rem); line-height: 1.2; letter-spacing: -0.022em; }
h1 em, h2 em, h3 em, .display em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(1.15rem, 1.55vw, 1.4rem); line-height: 1.45; color: var(--fg-2); max-width: 40em; letter-spacing: -0.017em; }
.muted { color: var(--fg-2); }
.prose { max-width: 62ch; color: var(--fg-2); }
.prose .lead { color: var(--fg); }
.prose p + p { margin-top: 1.1em; }
.eyebrow { display: block; margin-bottom: 14px; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; color: var(--accent); }
.ph { outline: 1px dashed var(--accent); outline-offset: 3px; border-radius: 4px; background: rgba(201, 165, 92, .1); }

/* ---------------------------------------------------------------- pulsanti e link (statici: solo colore al passaggio) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 26px; border-radius: 980px; border: 1px solid transparent;
  font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; text-align: center; max-width: 100%;
  cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn .icon { display: none; }
.btn--gold { background: var(--btn-bg); color: var(--btn-fg); }
.btn--gold:hover { background: var(--btn-hover); }
.btn--outline { border-color: var(--accent); color: var(--accent); }
.btn--outline:hover { background: var(--accent); color: var(--bg); }
.btn--sm { min-height: 32px; padding: 0 16px; font-size: .8125rem; font-weight: 500; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .6; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

.link-line { display: inline-flex; align-items: center; gap: 2px; width: fit-content; color: var(--accent); font-weight: 500; cursor: pointer; }
.link-line .icon { width: 18px; height: 18px; stroke-width: 2; }
.link-line:hover { text-decoration: underline; text-underline-offset: 3px; }
.stretched::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.icon { width: 24px; height: 24px; flex: none; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-header); height: var(--header-h);
  display: flex; align-items: center; color: #1d1d1f;
  background: rgba(255, 255, 255, .78); border-bottom: 1px solid rgba(0, 0, 0, .08);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--gold-dark); cursor: pointer; }
.brand .brand-mark { width: 24px; height: 30px; }
.brand-word { display: inline-grid; line-height: 1; }
.brand-name { font-size: .9375rem; font-weight: 600; color: #1d1d1f; letter-spacing: -0.02em; }
/* La F di FINANCE parte esattamente sotto la T di Think: il margine compensa la diversa spalla delle due lettere */
.brand-sub { display: block; margin-top: 3px; margin-left: -0.02em; font-size: .5625rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-dark); }
.nav ul { display: flex; gap: clamp(20px, 2.6vw, 36px); }
.nav a { font-size: .8125rem; color: rgba(29, 29, 31, .8); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: #1d1d1f; }
.nav a[aria-current="page"] { font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-cta { --btn-bg: var(--navy); --btn-fg: #fff; --btn-hover: #1c2742; }
.lang { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 500; color: rgba(29, 29, 31, .55); }
.lang a { padding: 8px 2px; transition: color .2s; }
.lang a:hover, .lang a[aria-current] { color: #1d1d1f; }

.menu-toggle { display: none; position: relative; width: 44px; height: 44px; margin-right: -10px; }
.menu-toggle-line { position: absolute; left: 13px; right: 13px; height: 1.5px; border-radius: 2px; background: #1d1d1f; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-toggle-line:nth-child(1) { top: 18px; }
.menu-toggle-line:nth-child(2) { top: 25px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

.mobile-menu { position: fixed; inset: 0; z-index: var(--z-menu); background: #fff; opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s; }
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu-inner { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding-top: calc(var(--header-h) + 28px); padding-bottom: 36px; }
.mm-list li { border-bottom: 1px solid #e8e8ed; }
.mm-list a { display: flex; align-items: baseline; gap: 14px; padding-block: 16px; }
.mm-num { font-size: .75rem; color: var(--gold-dark); }
.mm-label { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; color: #1d1d1f; }
.mm-list a[aria-current="page"] .mm-label { color: var(--gold-dark); }
.mm-foot { display: grid; gap: 8px; padding-top: 28px; color: #5f5f66; font-size: .9375rem; }
.mm-foot .lang { margin-top: 6px; }
.menu-open { overflow: hidden; }

/* ---------------------------------------------------------------- hero home */
.hero { padding-top: calc(var(--header-h) + clamp(64px, 9vw, 120px)); background: var(--bg); text-align: center; overflow: hidden; }
.hero-inner { display: grid; justify-items: center; }
.hero .display { max-width: 15ch; }
.hero-lead { margin: 24px auto 0; max-width: 34em; }
.hero-ctas { justify-content: center; margin-top: 36px; }
.hero-media { margin: clamp(56px, 7vw, 88px) auto 0; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-width: 1440px; aspect-ratio: 16 / 8; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- Glyph Portal (hero home): si entra nella parola scorrendo */
.gp { --gp-paper: #fff; --gp-field: var(--navy); position: relative; isolation: isolate; background: var(--gp-paper); color: #1d1d1f; }
.gp-viewport { position: absolute; inset: 0 auto auto 0; width: 0; height: 100vh; height: 100svh; pointer-events: none; visibility: hidden; }
.gp-pin { position: relative; height: var(--gp-height, 100svh); overflow: clip; isolation: isolate; }
.gp-field { position: absolute; inset: 0; background: var(--gp-field); opacity: 0; pointer-events: none; }
.gp[data-gp-ready] .gp-field { opacity: 1; }
.gp-field-bg { position: absolute; inset: 0; transform: scale(var(--gp-field-scale, 1)); }
.gp-field-bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75); }
.gp-field-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 11, 22, .62), rgba(7, 11, 22, .86)); }
.gp-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gp-glyph { font-family: "Inter", Arial, sans-serif; }
.gp-fallback { position: absolute; inset: 0; display: none; place-items: center; font-weight: 700; font-size: min(calc(100vw / var(--gp-characters, 5) * 1.25), 38vh); line-height: 1; letter-spacing: -0.04em; color: var(--gp-field); }
.no-js .gp-fallback { display: grid; }
.gp-front { position: absolute; inset: 0; opacity: var(--gp-caption, 1); pointer-events: none; }
.gp-front a { pointer-events: var(--gp-caption-hit, auto); }
.gp-front:focus-within { opacity: 1; }
.gp-eyebrow { position: absolute; inset: auto var(--gutter) calc(100% - var(--gp-word-top, 32%) + 28px); margin: 0; text-align: center; font-size: 1rem; font-weight: 600; color: var(--gold-dark); }
.gp-support { position: absolute; inset: calc(var(--gp-word-bottom, 60%) + 28px) var(--gutter) auto; margin: 0; text-align: center; font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.4; letter-spacing: -0.017em; color: #5f5f66; }
.gp-hint { position: absolute; left: 50%; bottom: max(28px, 6%); transform: translateX(-50%); display: inline-flex; flex-direction: column; align-items: center; gap: 10px; min-height: 44px; font-size: .8125rem; color: #6e6e73; }
.gp-hint-line { width: 1px; height: 32px; background: linear-gradient(#c7c7cc, transparent); }
.gp-content { position: relative; min-height: var(--gp-height, 100svh); display: grid; align-content: center; padding: calc(var(--header-h) + 48px) 0 72px; background: var(--gp-field); color: var(--fg); text-align: center; }
.gp-content .hero-inner { display: grid; justify-items: center; }
.gp-content .display { max-width: 15ch; }
.gp[data-gp-motion="on"] .gp-pin { position: sticky; top: 0; }
.gp[data-gp-motion="on"] .gp-content { margin-top: calc((var(--gp-length) - 1) * var(--gp-height)); background: transparent; opacity: var(--gp-reveal, 0); pointer-events: none; }
.gp[data-gp-motion="on"][data-gp-entered="true"] .gp-content { pointer-events: auto; }
.gp[data-gp-motion="on"] .gp-content:focus-within { opacity: 1; pointer-events: auto; }
.gp[data-gp-motion="on"]:has(.gp-content:focus-within) .gp-field { clip-path: none !important; }
.gp[data-gp-motion="off"] .gp-hint { display: none; }
@media (prefers-reduced-motion: reduce) {
  .gp-pin { position: relative !important; }
  .gp-content { margin-top: 0 !important; opacity: 1 !important; background: var(--gp-field) !important; }
  .gp-front { opacity: 1 !important; }
}

/* ---------------------------------------------------------------- hero pagine interne (scuro, con foto) */
.page-hero {
  position: relative; min-height: 76vh; min-height: 76svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate;
  padding-top: calc(var(--header-h) + 80px); padding-bottom: clamp(56px, 7vw, 96px); background: var(--bg); color: var(--fg); text-align: center;
}
.page-hero .container { display: grid; justify-items: center; }
.page-hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.page-hero-media img { width: 100%; height: 112%; object-fit: cover; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 11, 22, .55) 0%, rgba(7, 11, 22, .5) 45%, rgba(7, 11, 22, .92) 100%); }
.page-hero .display { max-width: 16ch; }
.page-hero .lead { margin: 22px auto 0; color: rgba(245, 245, 247, .82); }
.breadcrumb { display: flex; gap: 8px; margin-bottom: 20px; font-size: .875rem; color: rgba(245, 245, 247, .7); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; }
.legal-page .breadcrumb { color: var(--fg-2); }
.legal-page .breadcrumb a:hover { color: var(--fg); }

/* ---------------------------------------------------------------- manifesto: testo che si illumina */
.manifesto { max-width: 980px; margin-inline: auto; }
.scrub-text { font-size: clamp(1.75rem, 3.6vw, 3rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.03em; color: var(--fg); }
.scrub-text .sw { opacity: .18; }
.no-js .scrub-text .sw, .reduced-motion .scrub-text .sw { opacity: 1; }
.manifesto-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 40px; }
.signature { font-weight: 600; color: var(--fg-2); }

/* ---------------------------------------------------------------- servizi */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.service-card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg); background: #fff; overflow: hidden; transition: box-shadow .3s var(--ease); }
.service-card:hover { box-shadow: 0 18px 50px rgba(0, 0, 0, .08); }
.service-media { aspect-ratio: 16 / 10; overflow: hidden; }
.service-media img { width: 100%; height: 100%; object-fit: cover; }
.service-num { position: absolute; top: 20px; left: 24px; z-index: 1; padding: 4px 10px; border-radius: 980px; background: rgba(255, 255, 255, .85); font-size: .75rem; font-weight: 600; color: #1d1d1f; }
.service-body { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: clamp(24px, 3vw, 40px); }
.service-body p { color: var(--fg-2); }
.service-body .link-line { margin-top: auto; padding-top: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 5px 12px; border-radius: 980px; background: var(--bg-alt); font-size: .8125rem; color: var(--fg-2); }

/* ---------------------------------------------------------------- metodo */
.steps-layout { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.steps-intro { grid-column: 1 / -1; max-width: 780px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.steps-intro .lead { margin: 20px auto 0; }
.step-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px 28px; border-radius: var(--radius-lg); background: var(--card); text-align: center; }
.step-num { font-size: .875rem; font-weight: 600; color: var(--accent); }
.step-card h3 { font-size: 1.25rem; }
.step-card p { color: var(--fg-2); font-size: 1rem; }
.step-card .icon-badge { order: -1; margin-bottom: 12px; }
.icon-badge { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--bg-alt); color: var(--accent); }
.section--surface .icon-badge, .step-card .icon-badge, .feature .icon-badge, .bento-item .icon-badge, .contact-card .icon-badge { background: var(--bg); }
.section--dark .step-card .icon-badge { background: rgba(255, 255, 255, .06); }
.icon-badge .icon { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- numeri */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stat { padding: 36px 28px; border-radius: var(--radius-lg); background: var(--card); text-align: center; }
.section--surface .stat { background: var(--bg); }
.stat-value { display: flex; justify-content: center; align-items: baseline; gap: 2px; font-size: clamp(2.5rem, 4.6vw, 4rem); font-weight: 600; line-height: 1; letter-spacing: -0.04em; color: var(--fg); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: .5em; color: var(--accent); letter-spacing: -0.02em; }
.stat-label { margin: 14px auto 0; color: var(--fg-2); font-size: .9375rem; max-width: 22ch; }

/* ---------------------------------------------------------------- media e partnership */
.media-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-alt); }
.media-frame img, .media-frame video { width: 100%; height: 108%; object-fit: cover; }
.media-frame video { display: block; }
.media-badge {
  position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-radius: 16px; background: rgba(255, 255, 255, .82); color: #1d1d1f;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.media-badge strong { font-size: 2rem; font-weight: 600; letter-spacing: -0.04em; color: var(--gold-dark); }
.media-badge span { font-size: .875rem; line-height: 1.4; color: #3a3a40; }
.check-list { display: grid; gap: 12px; margin-top: 28px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--fg); }
.check-list .icon { width: 20px; height: 20px; margin-top: 3px; color: var(--accent); stroke-width: 2; }
.partner-lockup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; font-size: .9375rem; font-weight: 600; color: var(--fg-2); }
.partner-lockup .amp { color: var(--accent); }

/* ---------------------------------------------------------------- clienti */
.section--tight .eyebrow { text-align: center; }
.marquee { overflow: hidden; padding-block: 8px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee-item { display: inline-flex; align-items: center; gap: 36px; padding-right: 36px; font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 600; letter-spacing: -0.02em; color: var(--fg-2); white-space: nowrap; }
.marquee-item::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- testimonianze */
.quotes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.quotes::-webkit-scrollbar { display: none; }
.quote-card { scroll-snap-align: start; display: flex; flex-direction: column; gap: 24px; padding: clamp(28px, 3vw, 40px); border-radius: var(--radius-lg); background: #fff; }
.quote-mark { font-size: 3.5rem; line-height: .6; height: 24px; font-weight: 600; color: var(--accent); }
.quote-card blockquote { font-size: clamp(1.15rem, 1.5vw, 1.35rem); line-height: 1.4; font-weight: 500; letter-spacing: -0.02em; color: var(--fg); }
.quote-card figcaption { margin-top: auto; display: grid; gap: 2px; font-size: .875rem; color: var(--fg-2); }
.quote-card figcaption strong { color: var(--fg); font-weight: 600; }
.carousel-nav { display: flex; gap: 12px; }
.carousel-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, .06); color: var(--fg); transition: background-color .2s; }
.carousel-btn:hover { background: rgba(0, 0, 0, .1); }
.carousel-btn .icon { width: 20px; height: 20px; stroke-width: 2; }

/* ---------------------------------------------------------------- Milano */
.city { position: relative; min-height: 86vh; min-height: 86svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; padding-block: clamp(56px, 7vw, 96px); background: var(--bg); color: var(--fg); }
.city-media { position: absolute; inset: 0; z-index: -2; }
.city-media img { width: 100%; height: 115%; object-fit: cover; }
.city::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 11, 22, .1) 30%, rgba(7, 11, 22, .8) 100%); }
.city-card {
  display: grid; gap: 12px; max-width: 420px; padding: 32px; border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .85); color: #1d1d1f; -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  --accent: var(--gold-dark); --fg: #1d1d1f; --fg-2: #5f5f66;
}
.city-card address { font-style: normal; font-size: 1.6rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.03em; }
.city-card p { color: #5f5f66; }
.coords { font-size: .875rem; font-weight: 600; color: var(--gold-dark) !important; }

/* ---------------------------------------------------------------- CTA */
.cta-block { text-align: center; }
.cta-block h2 { max-width: 18ch; margin-inline: auto; }
.cta-block .lead { margin: 20px auto 36px; }
.cta-block .btn-row { justify-content: center; }
.cta-arch { width: 40px; margin: 0 auto 28px; color: var(--accent); }

/* ---------------------------------------------------------------- ambiti (outsourcing) */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.bento-item { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 260px; padding: 28px; border-radius: var(--radius-lg); background: #fff; }
.bento-item h3 { margin-top: auto; font-size: 1.3rem; }
.bento-item p { font-size: .9375rem; color: var(--fg-2); }
.bento-item--feature { grid-column: span 2; grid-row: span 2; overflow: hidden; isolation: isolate; justify-content: flex-end; background: var(--navy); color: #f5f5f7; --fg: #f5f5f7; --fg-2: #c3c5cf; --accent: var(--gold); }
.bento-item--feature .icon-badge { position: absolute; top: 28px; left: 28px; background: rgba(255, 255, 255, .12); }
.bento-item--feature h3 { margin-top: 0; font-size: clamp(1.8rem, 2.6vw, 2.4rem); }
.bento-item--feature p { font-size: 1.0625rem; max-width: 40ch; }
.bento-bg { position: absolute; inset: 0; z-index: -1; }
.bento-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.bento-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 11, 22, .1) 0%, rgba(7, 11, 22, .92) 75%); }
.bento-item--wide { grid-column: span 2; }

/* ---------------------------------------------------------------- vantaggi */
.benefits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.benefit { padding: 32px 28px; border-radius: var(--radius-lg); background: var(--card); }
.benefit-num { display: block; margin-bottom: 28px; font-size: .875rem; font-weight: 600; color: var(--accent); }
.benefit h3 { margin-bottom: 10px; font-size: 1.3rem; }
.benefit p { font-size: 1rem; color: var(--fg-2); }

/* ---------------------------------------------------------------- processo */
.timeline { position: relative; display: grid; }
.timeline-line { position: absolute; left: 21px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.timeline-line span { position: absolute; inset: 0; background: var(--accent); transform-origin: top; transform: scaleY(0); border-radius: 2px; }
.no-js .timeline-line span, .reduced-motion .timeline-line span { transform: none; }
.timeline-item { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 24px; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); font-size: .8125rem; font-weight: 600; color: var(--accent); }
.timeline-item h3 { margin: 8px 0 6px; font-size: 1.3rem; }
.timeline-item p { color: var(--fg-2); }

/* ---------------------------------------------------------------- sotto-navigazione */
.subnav { position: sticky; top: var(--header-h); z-index: 30; background: rgba(255, 255, 255, .85); border-bottom: 1px solid rgba(0, 0, 0, .08); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
/* centrata quando c'è spazio; se le voci non stanno, scorre dall'inizio senza tagliare la prima */
.subnav ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav li { flex: none; scroll-snap-align: start; }
.subnav li:first-child { margin-left: auto; }
.subnav li:last-child { margin-right: auto; }
.subnav .sn-short { display: none; }
/* su mobile: griglia 2x2 di pulsanti, che si adatta a qualsiasi dimensione del testo (anche ingrandito dal sistema) */
@media (max-width: 834px) {
  .subnav { position: static; background: var(--bg); border-top: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .subnav .container { padding-block: 16px; }
  /* due colonne quando c'è spazio; con il testo ingrandito si passa da soli a una colonna */
  .subnav ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9em), 1fr)); gap: 8px; overflow: visible; }
  .subnav li:first-child, .subnav li:last-child { margin: 0; }
  .subnav a {
    justify-content: center; width: 100%; min-height: 48px; padding: 10px 12px; border: 0; border-radius: 14px;
    background: #f5f5f7; color: #1d1d1f; font-size: .9375rem; font-weight: 500; text-align: center; white-space: normal; line-height: 1.2;
  }
  .subnav a.is-active { background: #ece6d8; color: #1d1d1f; }
  .subnav .icon { display: inline-block; }
  .subnav .sn-long { display: none; }
  .subnav .sn-short { display: inline; }
}
.subnav a { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px; white-space: nowrap; font-size: .875rem; color: #5f5f66; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.subnav a:hover { color: #1d1d1f; }
.subnav a.is-active { color: #1d1d1f; border-bottom-color: var(--gold-dark); }
.subnav .icon { width: 16px; height: 16px; color: var(--gold-dark); }

/* ---------------------------------------------------------------- caratteristiche */
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.feature { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; padding: 28px; border-radius: var(--radius-lg); background: var(--card); }
.feature h3 { margin-bottom: 6px; font-size: 1.25rem; }
.feature p { font-size: 1rem; color: var(--fg-2); }

/* ---------------------------------------------------------------- FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.02em; color: var(--fg); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 20px; height: 20px; color: var(--fg-2); transition: transform .3s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq-body { padding: 0 0 24px; max-width: 70ch; color: var(--fg-2); }
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content { height: 0; overflow: clip; transition: height .35s var(--ease), content-visibility .35s allow-discrete; }
  .faq details[open]::details-content { height: auto; }
}

/* ---------------------------------------------------------------- per chi è */
.fit-list { display: grid; counter-reset: fit; }
.fit-list li { counter-increment: fit; display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--line); font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 600; line-height: 1.3; letter-spacing: -0.025em; color: var(--fg); }
.fit-list li:first-child { border-top: 1px solid var(--line); }
.fit-list li::before { content: "0" counter(fit); font-size: .875rem; color: var(--accent); }

/* ---------------------------------------------------------------- valori */
.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.value { display: grid; grid-template-columns: auto 1fr; gap: 20px; padding: 32px; border-radius: var(--radius-lg); background: var(--card); }
.value .icon-badge { background: rgba(255, 255, 255, .06); }
.value h3 { margin-bottom: 8px; font-size: 1.35rem; }
.value p { color: var(--fg-2); }

/* ---------------------------------------------------------------- contatti */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact-cards { display: grid; gap: 12px; }
.contact-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 18px; background: var(--card); transition: background-color .2s; cursor: pointer; }
a.contact-card:hover { background: #ececf0; }
.contact-card .label { display: block; font-size: .75rem; color: var(--fg-2); }
.contact-card .value-text { color: var(--fg); font-weight: 500; }
.meeting-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.meeting-option { padding: 22px; border-radius: 18px; border: 1px solid var(--line); }
.meeting-option .icon { color: var(--accent); margin-bottom: 10px; }
.meeting-option strong { display: block; margin-bottom: 2px; font-weight: 600; color: var(--fg); }
.meeting-option p { font-size: .9375rem; color: var(--fg-2); }
.meeting-option a { color: var(--accent); }

.form-card { padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-lg); background: var(--card); }
.form-intro { margin-bottom: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .875rem; font-weight: 500; color: var(--fg); }
.req { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: #1d1d1f; font-size: 1.0625rem; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field select { appearance: none; cursor: pointer; padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f5f66' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px; }
.field input::placeholder, .field textarea::placeholder { color: #8e8e93; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold-dark); box-shadow: 0 0 0 4px rgba(201, 165, 92, .22); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #d93025; }
.field-error { min-height: 1.1em; font-size: .8125rem; color: #c5221f; }
.consent { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: .9375rem; color: var(--fg-2); }
.consent input { appearance: none; width: 22px; height: 22px; margin-top: 1px; border: 1px solid #b0b0b8; border-radius: 6px; background: #fff; display: grid; place-items: center; cursor: pointer; }
.consent input:checked { background: var(--navy); border-color: var(--navy); }
.consent input:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.consent .field-error { display: block; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; }
.form-note { font-size: .8125rem; color: var(--fg-2); }
.form-status { grid-column: 1 / -1; display: none; padding: 14px 18px; border-radius: var(--radius); font-size: .9375rem; }
.form-status.is-success { display: block; background: #e8f5ec; color: #1d5b33; }
.form-status.is-error { display: block; background: #fdecea; color: #8c1d18; }
.hp { position: absolute; left: -9999px; }

/* ---------------------------------------------------------------- privacy / 404 */
.legal-page { padding-top: calc(var(--header-h) + 88px); }
.legal { max-width: 74ch; margin-inline: auto; }
.legal-page > .container > .display, .legal-page > .container > .breadcrumb { max-width: 74ch; margin-inline: auto; }
.legal h2 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); margin: 48px 0 14px; }
.legal p, .legal li { color: var(--fg-2); }
.legal ul { list-style: disc; padding-left: 1.2em; display: grid; gap: 8px; margin-top: 12px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal > .lead { max-width: none; }
.legal h3 { margin: 28px 0 8px; font-size: 1.125rem; letter-spacing: -0.015em; }
.legal ul ul { margin-top: 8px; list-style: circle; }
.legal-summary { margin: 32px 0; padding: 24px 28px; border-radius: var(--radius-lg); background: var(--bg-alt); }
.legal-summary h2 { margin: 0 0 12px; font-size: 1.25rem; }
.legal-summary li { color: var(--fg); }
.legal-toc { margin: 0 0 8px; padding: 22px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.legal-toc ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 24px; margin: 0; padding-left: 1.4em; list-style: decimal; }
.legal-toc li::marker { color: var(--accent); font-weight: 600; }
.legal-toc a { color: var(--fg); text-decoration: none; }
.legal-toc a:hover { color: var(--accent); text-decoration: underline; }
.legal h2[id] { scroll-margin-top: calc(var(--header-h) + 24px); }
.legal-table-wrap { margin: 16px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.legal-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.legal-table th { padding: 12px 16px; background: var(--bg-alt); text-align: left; font-weight: 600; color: var(--fg); }
.legal-table td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; color: var(--fg-2); }
.legal-table td:first-child { color: var(--fg); }
@media (max-width: 640px) {
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; }
  .legal-table thead { display: none; }
  .legal-table td { border-top: 0; padding: 4px 16px; }
  .legal-table td:first-child { padding-top: 14px; font-weight: 600; }
  .legal-table td:last-child { padding-bottom: 14px; }
  .legal-table tr + tr { border-top: 1px solid var(--line); }
}
.notice { padding: 18px 22px; border-radius: var(--radius); background: var(--bg-alt); color: var(--fg); }
.cta-block.legal-page .display { margin-inline: auto; }

/* ---------------------------------------------------------------- footer (chiaro, stile Apple) */
.site-footer { background: #f5f5f7; color: #5f5f66; font-size: .8125rem; padding-top: clamp(56px, 7vw, 88px); --accent: var(--gold-dark); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr .8fr; gap: 32px; padding-bottom: 40px; }
.footer-title { margin-bottom: 14px; font-size: .8125rem; font-weight: 600; color: #1d1d1f; }
.footer-list { display: grid; gap: 10px; }
.footer-list a { display: inline-flex; gap: 10px; align-items: flex-start; transition: color .2s; }
.footer-list a:hover { color: #1d1d1f; text-decoration: underline; text-underline-offset: 2px; }
.footer-contacts .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--gold-dark); }
.social { display: flex; gap: 8px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #e8e8ed; color: #1d1d1f; transition: background-color .2s; }
.social a:hover { background: #dcdce1; }
.social .icon { width: 17px; height: 17px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; padding-block: 20px 32px; border-top: 1px solid #d2d2d7; font-size: .75rem; }
.footer-bottom a:hover { color: #1d1d1f; text-decoration: underline; }
.brand--footer .brand-mark { width: 30px; height: 38px; }
.brand--footer .brand-name { font-size: 1.25rem; }

/* ---------------------------------------------------------------- stati iniziali delle animazioni (solo con JS) */
.motion-ok [data-reveal], .motion-ok [data-split] { opacity: 0; transform: translateY(24px); }
/* ingresso dell'hero in CSS puro: parte subito, anche se i primi fotogrammi sono lenti */
@keyframes ttf-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.motion-ok [data-hero], .motion-ok h1[data-split] { animation: ttf-rise 1s var(--ease) .1s both; }
.motion-ok .gp-support[data-hero], .motion-ok .page-hero .lead[data-hero] { animation-delay: .25s; }
.motion-ok [data-img-reveal] { opacity: 0; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1068px) {
  .nav, .header-actions .lang { display: none; }
  .menu-toggle { display: block; }
  .steps-layout, .benefits, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 834px) {
  .grid-2, .services, .feature-grid, .values { grid-template-columns: 1fr; }
  .sticky-col { position: static; }
  .media-frame { aspect-ratio: 4 / 3.6; }
  .hero-media { aspect-ratio: 4 / 3; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}
@media (max-width: 640px) {
  .header-cta { display: none; }
  .steps-layout, .benefits, .stats, .bento { grid-template-columns: 1fr; }
  .bento-item--feature, .bento-item--wide { grid-column: auto; grid-row: auto; }
  .bento-item { min-height: 0; }
  .bento-item--feature { min-height: 380px; }
  .form-grid, .meeting-options { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .quotes { grid-auto-columns: 86%; }
  .btn-row { gap: 12px 20px; }
}

/* ---------------------------------------------------------------- movimento ridotto */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-item[aria-hidden="true"] { display: none; }
}
