/*
  Metrics wireframe - global design controls.
  Change only the values in :root to restyle every shared component.
*/
:root {
  /* Positive section palette */
  --positive-background: #f3f3f3;
  --positive-surface: #ffffff;
  --positive-text: #111111;
  --positive-text-muted: #526075;
  --positive-border: #ccd5e1;
  --positive-accent: #60d83e;
  --positive-accent-contrast: #ffffff;
  --positive-placeholder: #e5eaf1;
  --positive-glass-background: rgb(255 255 255 / var(--glass-opacity));
  --positive-glass-border: rgba(82, 96, 117, 0.5);
  --positive-glass-highlight: rgba(255, 255, 255, 0.92);
  --positive-glass-shadow: 0 18px 44px rgba(17, 32, 51, 0.1);

  /* Negative section palette */
  --negative-background: #111111;
  --negative-surface: #111311;
  --negative-text: #ffffff;
  --negative-text-muted: #a8ada8;
  --negative-border: #273027;
  --negative-accent: #60d83e;
  --negative-accent-contrast: #000000;
  --negative-placeholder: #111511;
  --negative-glass-background: rgb(17 19 17 / var(--glass-opacity));
  --negative-glass-border: rgba(255, 255, 255, 0.16);
  --negative-glass-highlight: rgba(255, 255, 255, 0.18);
  --negative-glass-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);

  /* FONT: scegli qui il font dei titoli e quello dei paragrafi */
  --font-family-headings: Anton, sans-serif;
  --font-family-paragraphs: "IBM Plex Sans Condensed", Arial, sans-serif;
  --font-family-labels: "IBM Plex Sans Condensed", Arial, sans-serif;
  --font-weight-headings: 100;
  --font-weight-subtitles: 100;
  --font-weight-paragraphs: 100;
  --font-weight-labels: 100;
  --font-weight-interface: 100;
  --line-height-headings-large: 0.98;
  --line-height-headings: 1.05;
  --line-height-paragraphs: 1.55;
  --letter-spacing-headings: -0.015em;
  --letter-spacing-labels: 0.09em;
  --font-size-h1: clamp(3rem, 7vw, 6.5rem);
  --typography-h1-max-width: 24ch;
  --font-size-h2: clamp(2.2rem, 4.5vw, 4.75rem);
  --font-size-h3: clamp(1.25rem, 2vw, 1.75rem);
  --font-size-h4: 1rem;
  --font-size-h5: 0.75rem;
  --font-size-paragraph: 1rem;
  --font-size-paragraph-large: clamp(1.1rem, 1.4vw, 1.35rem);
  --font-size-label: 0.72rem;

  /* LAYOUT: larghezze, margini e spazi verticali */
  --layout-page-gutter: clamp(1.25rem, 4vw, 4.5rem);
  --layout-content-max-width: 70rem;
  --layout-section-padding: clamp(7rem, 11vw, 10rem);
  --layout-section-compact-padding: clamp(3rem, 6vw, 5rem);
  --layout-mobile-section-padding: 5rem;
  --layout-content-gap: clamp(2rem, 6vw, 6rem);
  --layout-grid-gap: clamp(1rem, 2.25vw, 2rem);
  --layout-header-height: 4.5rem;
  --layout-header-margin-block: 0.625rem;
  --layout-header-margin-inline: 1.5625rem;
  --layout-header-padding-inline: 0.92875rem;
  --layout-case-copy-max-width: 26.685rem;
  --layout-contact-copy-max-width: 25rem;

  /* Larghezze mirate per mantenere i testi leggibili e bilanciati */
  --typography-centered-heading-max-width: 41.25rem;
  --typography-centered-intro-max-width: 37.79rem;
  --typography-problem-heading-max-width: 42rem;
  --typography-process-heading-max-width: 46rem;
  --typography-fit-heading-max-width: 51.86rem;
  --typography-problem-intro-max-width: 30.79rem;
  --typography-process-intro-max-width: 32.92rem;
  --typography-team-intro-max-width: 37.79rem;
  --brand-logo-size: 4.225rem;

  /* FORME E CONTROLLI: card, bottoni, bordi e campi */
  --shape-card-radius: 1.875rem;
  --shape-header-radius: 90px;
  --shape-button-radius: 999px;
  --shape-border-width: 1px;
  --control-button-height: 3rem;
  --control-button-padding-inline: 1.25rem;
  --control-card-padding: clamp(1.25rem, 3vw, 2rem);
  --control-input-height: 3.25rem;
  --motion-transition-fast: 180ms ease;

  /* GLASSMORPHISM: controlli comuni a tutte le card */
  --glass-blur: 28px;
  --glass-saturation: 180%;
  --glass-opacity: 0.72;

  /* HEADER FLOTTANTE: vetro scuro e margine esterno */
  --header-background: rgb(0 0 0 / 0.78);
  --header-positive-background: #000000;
  --header-positive-border: #000000;
  --header-negative-background: var(--header-background);
  --header-negative-border: var(--header-border);
  --header-text: #ffffff;
  --header-text-muted: rgb(255 255 255 / 0.76);
  --header-border: rgb(255 255 255 / 0.2);
  --header-shadow: 0 18px 48px rgb(0 0 0 / 0.2);
  --header-blur: 20px;
  --header-saturation: 150%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--positive-background); color: var(--positive-text); font-family: var(--font-family-paragraphs); font-size: var(--font-size-paragraph); line-height: var(--line-height-paragraphs); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

/* Theme adapter: all components read these semantic variables. */
.theme-positive { --color-background: var(--positive-background); --color-surface: var(--positive-surface); --color-text: var(--positive-text); --color-text-muted: var(--positive-text-muted); --color-border: var(--positive-border); --color-accent: var(--positive-accent); --color-accent-contrast: var(--positive-accent-contrast); --color-placeholder: var(--positive-placeholder); --glass-background: var(--positive-glass-background); --glass-border: var(--positive-glass-border); --glass-highlight: var(--positive-glass-highlight); --glass-shadow: var(--positive-glass-shadow); }
.theme-negative { --color-background: var(--negative-background); --color-surface: var(--negative-surface); --color-text: var(--negative-text); --color-text-muted: var(--negative-text-muted); --color-border: var(--negative-border); --color-accent: var(--negative-accent); --color-accent-contrast: var(--negative-accent-contrast); --color-placeholder: var(--negative-placeholder); --glass-background: var(--negative-glass-background); --glass-border: var(--negative-glass-border); --glass-highlight: var(--negative-glass-highlight); --glass-shadow: var(--negative-glass-shadow); }

.container { width: min(100% - (var(--layout-page-gutter) * 2), var(--layout-content-max-width)); margin-inline: auto; }
.section { background: var(--color-background); color: var(--color-text); padding-block: var(--layout-section-padding); scroll-margin-top: calc(var(--layout-header-height) + 2rem); }
.section h1, .section h2, .section h3, .section h4, .section h5 { margin: 0; color: var(--color-text); }
h1, h2, h3, h4, h5 { font-family: var(--font-family-headings); }
h1 { max-width: min(100%, var(--typography-h1-max-width)); font-size: var(--font-size-h1); font-weight: var(--font-weight-headings); letter-spacing: var(--letter-spacing-headings); line-height: var(--line-height-headings-large); }
h2 { max-width: 15ch; font-size: var(--font-size-h2); font-weight: var(--font-weight-headings); letter-spacing: var(--letter-spacing-headings); line-height: var(--line-height-headings); }
h3 { font-size: var(--font-size-h3); font-weight: var(--font-weight-headings); letter-spacing: -0.025em; line-height: 1.15; }
h4 { font-size: var(--font-size-h4); font-weight: var(--font-weight-subtitles); line-height: 1.3; }
h5 { color: var(--color-text-muted) !important; font-size: var(--font-size-h5); font-weight: var(--font-weight-labels); letter-spacing: var(--letter-spacing-labels); text-transform: uppercase; }
p { margin: 0; }
.eyebrow, .card-kicker { color: var(--color-accent); font-family: var(--font-family-labels); font-size: var(--font-size-label); font-weight: var(--font-weight-labels); letter-spacing: var(--letter-spacing-labels); line-height: 1.3; text-transform: uppercase; }
.section-intro { max-width: 59ch; color: var(--color-text-muted); font-size: var(--font-size-paragraph-large); margin-top: 1.5rem; }
.title-line { display: block; }
.lede { max-width: 48ch; color: var(--color-text-muted); font-size: var(--font-size-paragraph-large); margin-top: 1.5rem; }
.hero-microcopy { color: var(--color-text-muted); font-size: 0.9rem; margin: 1rem 0 0; max-width: 42ch; }
.section--centered > .container > h2,
.section--centered > .container > .section-intro { max-width: var(--typography-centered-intro-max-width); margin-inline: auto; text-align: center; }
.section--centered > .container > h2 { max-width: var(--typography-centered-heading-max-width); margin-inline: auto; text-align: center; }
#problem-title { max-width: min(100%, var(--typography-problem-heading-max-width)); }
#process-title { max-width: min(100%, var(--typography-process-heading-max-width)); }
#authority-title { max-width: min(100%, 28.945rem); }
#team-title { max-width: min(100%, 34.25rem); }
#fit-title { max-width: min(100%, var(--typography-fit-heading-max-width)); }
#problema > .container > .section-intro { max-width: min(100%, var(--typography-problem-intro-max-width)); }
#cosa-ottieni > .container > .section-intro { max-width: min(100%, var(--typography-process-intro-max-width)); }
#team > .container > .section-intro { max-width: min(100%, var(--typography-team-intro-max-width)); }

.site-header { align-items: center; background: var(--header-positive-background); border: var(--shape-border-width) solid var(--header-positive-border); border-radius: var(--shape-header-radius); box-shadow: var(--header-shadow); color: var(--header-text); display: flex; height: var(--layout-header-height); justify-content: space-between; margin: var(--layout-header-margin-block) auto; padding-inline: var(--layout-header-padding-inline); position: sticky; top: var(--layout-header-margin-block); width: min(100% - (var(--layout-page-gutter) * 2), var(--layout-content-max-width)); z-index: 10; }
.site-header.header-on-negative { background: var(--header-negative-background); backdrop-filter: blur(var(--header-blur)) saturate(var(--header-saturation)); -webkit-backdrop-filter: blur(var(--header-blur)) saturate(var(--header-saturation)); border-color: var(--header-negative-border); }
.brand { align-items: center; display: inline-flex; font-size: 0.7rem; font-weight: var(--font-weight-interface); gap: 0.55rem; letter-spacing: 0.11em; }
.brand picture, .footer-layout picture { display: contents; }
.brand-logo { display: block; height: var(--brand-logo-size); object-fit: contain; width: var(--brand-logo-size); }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a, .site-footer a { color: var(--color-text-muted); font-size: 0.875rem; transition: color var(--motion-transition-fast); }
.site-header .site-nav a { color: var(--header-text-muted); }
.site-nav a:hover, .site-footer a:hover, .text-link:hover { color: var(--color-accent); }

.button { align-items: center; border: var(--shape-border-width) solid transparent; border-radius: var(--shape-button-radius); display: inline-flex; font-size: 0.875rem; font-weight: var(--font-weight-interface); height: var(--control-button-height); justify-content: center; padding-inline: var(--control-button-padding-inline); transition: transform var(--motion-transition-fast), background var(--motion-transition-fast), border-color var(--motion-transition-fast); white-space: nowrap; }
.button:active { transform: translateY(1px); }
.button--primary { background: var(--color-accent); color: var(--color-accent-contrast); }
.site-header .button--primary { color: #000000; }
.button--secondary { border-color: var(--color-border); color: var(--color-text); }
.button--secondary:hover { background: var(--color-surface); }
.button-group { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.section--hero { min-height: auto; padding-block: var(--layout-section-padding); display: grid; align-items: center; }
.hero-layout, .split-layout, .case-study-layout, .form-layout { align-items: center; display: grid; gap: var(--layout-content-gap); grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.9fr); }
.hero-layout, .split-layout, .case-study-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-copy { display: grid; justify-items: start; gap: 0; }
.hero-copy .eyebrow { margin-bottom: 1.25rem; }
.media-slot { align-items: center; background: repeating-linear-gradient(135deg, transparent 0 13px, color-mix(in srgb, var(--color-placeholder), var(--color-border) 28%) 13px 14px), var(--color-placeholder); border: var(--shape-border-width) dashed var(--color-border); border-radius: var(--shape-card-radius); color: var(--color-text-muted); display: flex; flex-direction: column; gap: 0.4rem; justify-content: center; min-height: 15rem; padding: var(--control-card-padding); text-align: center; }
.media-slot span, .document-slot { color: var(--color-text); font-size: var(--font-size-label); font-weight: var(--font-weight-labels); letter-spacing: var(--letter-spacing-labels); }
.media-slot small { font-size: 0.8rem; }
.media-slot--hero { min-height: clamp(20rem, 42vw, 35rem); }
.media-slot--portrait { min-height: 28rem; }
.media-slot--video { aspect-ratio: 1 / 1; min-height: 0; }
.media-slot--card, .media-slot--fit, .media-slot--comparison { aspect-ratio: 1 / 1; min-height: 0; }

.comparison-grid, .fit-grid { display: grid; gap: var(--layout-grid-gap); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--layout-section-compact-padding); }
.comparison-card, .fit-panel, .step-card, .person-card, .evidence-card, .stat-item, .wireframe-form { background: var(--glass-background); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)); border: var(--shape-border-width) solid var(--glass-border); border-radius: var(--shape-card-radius); box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow); }
.comparison-card, .fit-panel, .step-card, .evidence-card { padding: var(--control-card-padding); }
.comparison-card--muted, .fit-panel--muted { opacity: 0.7; }
.comparison-card h3, .fit-panel h3 { font-size: clamp(1.8rem, 2.7vw, 1.933rem); margin-top: 1rem; }
.check-list { display: grid; gap: 0.8rem; list-style: none; margin: 1.5rem 0 0; padding: 0; }
.check-list li { color: var(--color-text-muted); padding-left: 1.35rem; position: relative; }
.check-list li::before { color: var(--color-accent); content: "+"; font-weight: var(--font-weight-interface); left: 0; position: absolute; }
.check-list--negative li::before { content: "-"; }

.stat-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2rem; }
.stat-item { display: grid; gap: 0.35rem; padding: 1rem; }
.stat-item strong { color: var(--color-accent); font-size: 1.1rem; }
.stat-item span, .step-card p, .person-card p, .evidence-card p { color: var(--color-text-muted); font-size: 0.9rem; }

.steps-grid, .problem-grid { display: grid; gap: var(--layout-grid-gap); margin-top: var(--layout-section-compact-padding); }
.steps-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.problem-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step-card { min-height: 15rem; display: flex; flex-direction: column; justify-content: space-between; }
.step-card > span { color: var(--color-accent); font-size: var(--font-size-h2); font-weight: var(--font-weight-headings); letter-spacing: var(--letter-spacing-headings); line-height: 1; }
.problem-card > span { font-weight: 700; }
.step-card h3 { margin-top: 3rem; }
.problem-card, .steps-grid .step-card { justify-content: flex-start; min-height: 22rem; gap: 0.65rem; }
.problem-card h3, .steps-grid .step-card h3 { margin-top: 0.2rem; }
.card-illustration { aspect-ratio: 1 / 1; flex: 0 0 auto; min-height: 0; width: 100%; }
.metrics-classic #cosa-ottieni .step-card { border-radius: 1rem; padding: 1rem; }
.metrics-classic #cosa-ottieni .step-card > span { font-weight: 700; }

.people-grid { display: grid; gap: var(--layout-grid-gap); grid-template-columns: repeat(2, minmax(0, 1fr)); margin: var(--layout-section-compact-padding) auto 0; max-width: 64rem; }
.person-card { align-items: center; display: flex; flex-direction: column; gap: 1.5rem; overflow: hidden; padding: clamp(1.4rem, 3vw, 2.25rem); text-align: center; }
.person-portrait { aspect-ratio: 1 / 1; border: 2px solid color-mix(in srgb, var(--color-accent), transparent 32%); border-radius: 50%; box-shadow: 0 0 0 0.5rem rgb(96 216 62 / 0.04); margin: 0; max-width: 18rem; overflow: hidden; width: min(100%, 18rem); }
.person-portrait picture, .media-slot--illustrated picture { display: block; height: 100%; width: 100%; }
.person-portrait img { display: block; height: 100%; object-fit: cover; width: 100%; }
.person-card__copy { align-items: center; display: flex; flex-direction: column; width: 100%; }
.person-card h3 { font-size: clamp(2rem, 3.4vw, 3.15rem); margin-top: 0.45rem; }
.person-card h4 { color: var(--color-accent); margin-top: 0.35rem; }
.person-card .person-bio { font-size: 1rem; line-height: 1.55; margin-top: 1.15rem; max-width: 42ch; }
.linkedin-link { align-items: center; color: var(--color-text); display: inline-flex; font-size: 0.875rem; font-weight: 700; gap: 0.55rem; margin-top: 1.25rem; }
.linkedin-link:hover { color: var(--color-accent); }
.linkedin-mark { align-items: center; background: var(--color-accent); border-radius: 0.22rem; color: var(--color-accent-contrast); display: inline-flex; font-family: Arial, sans-serif; font-size: 0.8rem; font-weight: 700; height: 1.35rem; justify-content: center; letter-spacing: -0.04em; line-height: 1; width: 1.35rem; }
.text-link { border-bottom: var(--shape-border-width) solid currentColor; color: var(--color-text); display: inline-block; font-size: 0.9rem; font-weight: var(--font-weight-interface); margin-top: 2rem; padding-bottom: 0.2rem; }
.case-study-layout .button { margin-top: 2rem; }
.case-study-layout > div:first-child { max-width: min(100%, var(--layout-case-copy-max-width)); }

.evidence-grid { display: grid; gap: var(--layout-grid-gap); grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--layout-section-compact-padding); }
.document-slot { align-items: center; aspect-ratio: 1 / 1; background: var(--color-placeholder); border: var(--shape-border-width) dashed var(--color-border); border-radius: calc(var(--shape-card-radius) * 0.65); display: flex; justify-content: center; }
.evidence-card { display: grid; gap: 0.8rem; }
.evidence-card h3 { margin-top: 0.5rem; }
.evidence-intro { margin-inline: auto; text-align: center; }

.form-layout { align-items: start; }
.form-layout > div:first-child { align-self: center; max-width: min(100%, var(--layout-contact-copy-max-width)); }
.contact-title-line { display: block; white-space: nowrap; }
.wireframe-form { display: grid; gap: 1rem; padding: var(--control-card-padding); }
.form-intro, .form-microcopy { color: var(--color-text-muted); font-size: 0.9rem; }
.form-intro strong { color: var(--color-text); display: block; font-family: var(--font-family-headings); font-size: var(--font-size-h3); font-weight: var(--font-weight-headings); letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 0.55rem; }
.form-microcopy { margin: 0; }
.fit-closing { margin-top: 2rem; }
.field { display: grid; gap: 0.4rem; }
.field label { color: var(--color-text); font-family: var(--font-family-labels); font-size: 0.85rem; font-weight: var(--font-weight-labels); }
.field input, .field textarea { background: transparent; border: var(--shape-border-width) solid var(--color-border); border-radius: calc(var(--shape-card-radius) * 0.65); color: var(--color-text); min-height: var(--control-input-height); padding: 0.75rem; }
.field textarea { min-height: 7rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--color-text-muted); }
.field input:focus, .field textarea:focus { border-color: var(--color-accent); outline: 2px solid color-mix(in srgb, var(--color-accent), transparent 75%); outline-offset: 2px; }
.form-honeypot { height: 1px; left: -9999px; opacity: 0; position: absolute; top: auto; width: 1px; }
.stat-label { color: var(--color-accent); font-size: 0.72rem; font-weight: 700; letter-spacing: var(--letter-spacing-labels); text-transform: uppercase; }
.section-cta { align-items: center; display: flex; flex-direction: column; flex-wrap: wrap; gap: 0.85rem; justify-content: center; margin-top: 2.5rem; text-align: center; }
.section-cta p { color: var(--color-text-muted); font-size: 0.95rem; }

.site-footer { background: var(--color-background); color: var(--color-text); padding-block: 2rem; }
.footer-layout { align-items: end; display: flex; justify-content: space-between; }
.footer-layout p { color: var(--color-text-muted); font-size: 0.85rem; }
.footer-logo { display: block; height: 3.25rem; object-fit: contain; object-position: left center; width: 3.25rem; }
.footer-layout div { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* Preserve complete illustrated scenes at every screen size. */
.media-slot--illustrated { background: #000; border-style: solid; padding: 0; overflow: hidden; position: relative; }
.media-slot--illustrated img { display: block; width: 100%; height: 100%; object-fit: contain; }
.media-slot--hero.media-slot--illustrated, .media-slot--portrait.media-slot--illustrated { aspect-ratio: 1 / 1; }

/* Classic homepage: black artwork merges with its section, not a framed tile. */
.metrics-classic { --negative-background: #000000; background: #000000; }
.metrics-classic .media-slot--illustrated { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.metrics-classic .comparison-card,
.metrics-classic .fit-panel,
.metrics-classic .evidence-card { background: #000; isolation: isolate; }
.metrics-classic .media-slot--illustrated img { mix-blend-mode: screen; }
.metrics-classic .text-metrics { color: var(--negative-accent); }
.metrics-classic #risultati .section-intro { max-width: min(100%, 29rem); }
.metrics-classic #risultati .section-cta { align-items: flex-start; text-align: left; }
.metrics-classic .panel--metrics {
  --color-text: #ffffff;
  --color-text-muted: #dce8dc;
  --color-accent: var(--negative-accent);
  --color-surface: #061408;
  animation: metrics-panel-glow 2.8s ease-in-out infinite;
  background: #061408;
  border-color: var(--negative-accent);
  box-shadow:
    0 0 0 1px rgb(96 216 62 / 0.24),
    0 0 16px rgb(96 216 62 / 0.28),
    inset 0 0 18px rgb(96 216 62 / 0.05);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.metrics-classic .comparison-card.panel--metrics,
.metrics-classic .fit-panel.panel--metrics { border-width: 5px; }
.metrics-classic .evidence-card.panel--metrics { border-width: 3px; }

@keyframes metrics-panel-glow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgb(96 216 62 / 0.18),
      0 0 10px rgb(96 216 62 / 0.20),
      inset 0 0 14px rgb(96 216 62 / 0.04);
  }
  50% {
    box-shadow:
      0 0 0 2px rgb(96 216 62 / 0.52),
      0 0 28px rgb(96 216 62 / 0.50),
      inset 0 0 22px rgb(96 216 62 / 0.09);
  }
}
.metrics-classic .panel--metrics .media-slot--illustrated img {
  filter: none;
  mix-blend-mode: screen;
}
.metrics-classic #hero-title { font-size: clamp(3.15rem, 5.5vw, 4.25rem); }
.metrics-classic .media-slot--hero img { transform: scale(1.08); }
.metrics-classic .media-slot--portrait img,
.metrics-classic .media-slot--video img { transform: scale(1.15); }
.metrics-classic #prova { padding-top: var(--layout-section-padding); }
.metrics-classic #evidence-title { max-width: min(100%, 40rem); }

/* Thank-you page: immediate confirmation with the same Metrics visual language. */
.thank-you-page, .thank-you-main { min-height: 100dvh; }
.thank-you-section { display: grid; min-height: 100dvh; padding-block: clamp(2rem, 5vw, 4rem); }
.thank-you-stack { align-items: center; align-self: center; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.thank-you-stack h1 { font-size: clamp(3rem, 5vw, 4.4rem); max-width: 15ch; }
.thank-you-stack .lede { max-width: min(100%, 29.75rem); }
.thank-you-stack > .button { margin-top: 2rem; }
.thank-you-visual { aspect-ratio: 1 / 1; margin-top: 2rem; width: min(24rem, 32vh, 72vw); }
.thank-you-visual img { transform: scale(1.04); }

/* Restrained diagonal cuts keep the section transitions slightly angled. */
.metrics-classic #team,
.metrics-classic #contatto {
  overflow: hidden;
  padding-block: var(--layout-section-padding);
  position: relative;
}
.metrics-classic #team > .container,
.metrics-classic #contatto > .container { position: relative; z-index: 1; }
.metrics-classic #team::before,
.metrics-classic #team::after,
.metrics-classic #contatto::before,
.metrics-classic #contatto::after {
  background: #000000;
  content: "";
  height: clamp(2rem, 4vw, 3.5rem);
  left: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
}
.metrics-classic #team::before,
.metrics-classic #contatto::before {
  clip-path: polygon(0 0, 100% 0, 0 100%);
  top: 0;
}
.metrics-classic #team::after,
.metrics-classic #contatto::after {
  bottom: 0;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.wireframe-form button:disabled { cursor: not-allowed; opacity: 0.58; }
.metrics-classic .button { font-weight: 700; }

@media (max-width: 900px) {
  .steps-grid, .problem-grid, .evidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people-grid { grid-template-columns: 1fr; }
  .person-card { align-items: flex-start; text-align: left; }
  .person-portrait { align-self: center; }
  .person-card__copy { align-items: flex-start; }
  .section-cta { align-items: flex-start; text-align: left; }
}

@media (min-width: 721px) {
  .section--centered > .container > h2,
  .section--centered > .container > .section-intro {
    margin-inline: auto;
    text-align: center;
  }
  #problem-title,
  #comparison-title,
  #process-title,
  #team-title,
  #evidence-title,
  #fit-title {
    display: block;
    margin-inline: auto;
    text-align: center;
    width: 100%;
  }
  #problem-title > .title-line,
  #process-title > .title-line,
  #evidence-title > .title-line {
    display: block;
    margin-inline: auto;
    max-width: 100%;
    text-align: center;
    width: 100%;
  }
}

@media (min-width: 901px) {
  /* Standards-based desktop enlargement; avoids the layout side effects of CSS zoom. */
  html { font-size: 112.5%; }
  .site-header .site-nav {
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
  }
  .site-header .site-nav a { font-size: 1rem; }
  .title-line { white-space: nowrap; }
  .section--centered > .container > h2 .title-line {
    margin-inline: auto;
    max-width: 100%;
    text-align: center;
    width: 100%;
  }
  .metrics-classic #cosa-ottieni .card-illustration picture {
    align-items: center;
    display: flex;
    justify-content: center;
  }
  .metrics-classic #cosa-ottieni .card-illustration img { margin-inline: auto; }
  .metrics-classic #cosa-ottieni .step-card:nth-child(2) .card-illustration img {
    height: 184.88px;
    margin: -14px auto -15px;
    max-width: none;
    width: 184.88px;
  }
  .metrics-classic #cosa-ottieni .step-card:nth-child(4) .card-illustration img {
    height: 207px;
    margin: -23px auto -30px;
    max-width: none;
    width: 207px;
  }
  .metrics-classic #cosa-ottieni .step-card:nth-child(5) .card-illustration img {
    height: 218.9px;
    margin: -30px auto;
    max-width: none;
    width: 220px;
  }
}

@media (max-width: 720px) {
  .site-header { gap: 0.75rem; margin: 1rem auto; top: 1rem; }
  .site-nav { display: none; }
  .title-line { display: inline; }
  .section--centered > .container > h2,
  .section--centered > .container > .section-intro {
    margin-inline: 0;
    text-align: left;
  }
  .site-header .button { padding-inline: 0.85rem; }
  .brand small { display: none; }
  .section,
  .metrics-classic #team,
  .metrics-classic #contatto {
    padding-block: var(--layout-mobile-section-padding);
  }
  .metrics-classic #prova { padding-top: var(--layout-mobile-section-padding); }
  .hero-layout, .split-layout, .case-study-layout, .form-layout, .comparison-grid, .fit-grid, .steps-grid, .problem-grid, .evidence-grid { grid-template-columns: 1fr; }
  /* One mobile narrative: title, explanation, visual, then actions or supporting content. */
  .hero-layout,
  #risultati .split-layout,
  .case-study-layout {
    align-items: stretch;
    gap: 0;
  }
  .hero-copy,
  #risultati .split-layout > div:last-child,
  .case-study-layout > div:first-child {
    display: contents;
  }
  .hero-copy .eyebrow { order: 1; }
  .hero-copy h1 { order: 2; }
  .hero-copy .lede { order: 3; }
  .hero-layout > .media-slot--hero { margin-top: 2rem; order: 4; }
  .hero-copy .button-group {
    flex-direction: column;
    order: 5;
    width: 100%;
  }
  .hero-copy .button-group .button { width: 100%; }
  #risultati #authority-title { order: 1; }
  #risultati .section-intro { order: 2; }
  #risultati .media-slot--portrait { margin-top: 2rem; order: 3; }
  #risultati .stat-grid { order: 4; }
  #risultati .section-cta { order: 5; }
  .case-study-layout #case-study-title { order: 1; }
  .case-study-layout .section-intro { order: 2; }
  .case-study-layout > .media-slot--video { margin-top: 2rem; order: 3; }
  .case-study-layout .button { order: 4; width: 100%; }
  .section--hero { min-height: auto; }
  .media-slot--hero { min-height: 18rem; }
  .media-slot--portrait { min-height: 18rem; }
  .person-card { padding: 1.25rem; }
  .person-portrait { max-width: 15rem; }
  .steps-grid, .stat-grid { grid-template-columns: 1fr; }
  .section-cta { align-items: stretch; flex-direction: column; text-align: left; }
  .section-cta .button { width: 100%; }
  .footer-layout { align-items: start; flex-direction: column; gap: 1.5rem; }
  .thank-you-section { padding-block: 2rem; }
  .thank-you-stack h1 { font-size: clamp(2.6rem, 13vw, 3.75rem); max-width: 12ch; }
  .thank-you-stack .lede { margin-top: 1.25rem; }
  .thank-you-stack > .button { min-width: min(100%, 15rem); }
  .thank-you-visual { margin-top: 1.5rem; width: min(17rem, 76vw); }
}

@media (max-width: 340px) {
  .site-header .brand-logo { height: 3rem; width: 3rem; }
  .site-header .button { font-size: 0.75rem; padding-inline: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0ms !important; }
  .metrics-classic .panel--metrics { animation: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .comparison-card, .fit-panel, .step-card, .person-card, .evidence-card, .stat-item, .wireframe-form {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--color-surface);
    box-shadow: none;
  }
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #000000; box-shadow: none; }
}
