/* doppiap — visual system. A single responsive foundation, no legacy overrides. */
:root {
  --ink: #142d53;
  --navy: #162e5e;
  --orange: #e8521a;
  --orange-ink: #c44315;
  --paper: #faf7f1;
  --peach: #f9ded0;
  --blue: #dce8f3;
  --muted: #526176;
  --line: rgba(20,45,83,.16);
  --radius: 28px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 105px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'DM Sans', Arial, sans-serif; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { font-weight: 700; line-height: 1; letter-spacing: -.06em; }
h2 { font-size: clamp(40px, 5.5vw, 76px); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img, video { max-width: 100%; display: block; }
svg { display: block; }
button:focus-visible, a:focus-visible { outline: 3px solid #ed8b5c; outline-offset: 5px; }
::selection { background: var(--orange); color: white; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 200; background: var(--paper); padding: 12px 20px; border-radius: 30px; }
.skip-link:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.btn-hero-primary, .btn-primary-cta, .btn-hero-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; gap: 18px; border-radius: 60px; padding: 7px 8px 7px 20px; font-size: 12px; font-weight: 550; text-transform: uppercase; background: var(--paper); color: var(--ink); box-shadow: 0 5px 18px rgba(0,0,0,.1); }
.btn-hero-ghost { padding: 10px 6px; background: transparent; color: var(--paper); box-shadow: none; }

/* The page keeps its original content sequence. */
:is(.problemi-inner,.servizi-inner,.metodo-inner,.numeri-inner,.chi-inner,.cases-inner,.test-inner,.contatti-inner) { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
:is(.problemi-section,.servizi-section,.metodo-section,.numeri-section,.chi-section,.cases-section,.test-section,.contatti-section) { padding: 100px 0; }
.sec-eyebrow, .numeri-eyebrow, .chi-eyebrow { width: fit-content; display: table; margin: 0 auto 26px; padding: 8px 17px; border: 1px solid var(--line); border-radius: 40px; font-size: 11px; font-weight: 550; letter-spacing: .05em; text-transform: uppercase; }
.sec-header, .metodo-top { text-align: center; margin-bottom: 55px; }
.sec-header h2 { max-width: 850px; margin-inline: auto; }
.sec-header p { max-width: 530px; margin: 25px auto 0; color: var(--muted); font-size: 18px; line-height: 1.5; }
.sec-header h2 span, .metodo-top h2 span { color: var(--orange-ink); }

.loghi-section { padding: 40px 0 46px; border-bottom: 1px solid var(--line); overflow: hidden; }
.loghi-inner { position: relative; }
.loghi-title { text-align: center; font-size: 11px; letter-spacing: .1em; font-weight: 500; margin-bottom: 30px; }
.loghi-toggle { position: absolute; right: 32px; top: -11px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; min-height: 36px; color: var(--muted); background: transparent; font-size: 11px; }
.loghi-toggle[hidden] { display: none; }
.loghi-track-wrap { width: 100%; overflow: hidden; position: relative; }
.loghi-track { display: flex; width: max-content; }
.loghi-group { display: flex; flex-shrink: 0; align-items: center; gap: 64px; padding-right: 64px; }
.logo-item { width: 180px; flex: 0 0 180px; }
.logo-item img { width: 100%; height: 82px; object-fit: contain; filter: brightness(0); opacity: .8; }
.logo-item--large img { height: 98px; }
.loghi-section.is-animated .loghi-track { animation: client-logos 38s linear infinite; }
.loghi-section.is-paused .loghi-track, .loghi-track-wrap:hover .loghi-track { animation-play-state: paused; }
.loghi-fade { position: absolute; top: 0; bottom: 0; width: clamp(24px,5vw,90px); z-index: 1; pointer-events: none; }
.loghi-fade--left { left: 0; background: linear-gradient(90deg,var(--paper),transparent); }
.loghi-fade--right { right: 0; background: linear-gradient(-90deg,var(--paper),transparent); }
.loghi-section:not(.is-animated) .loghi-track-wrap { overflow-x: auto; }
.loghi-section:not(.is-animated) .loghi-group[aria-hidden] { display: none; }
.loghi-section:not(.is-animated) .loghi-fade { display: none; }
@keyframes client-logos { to { transform: translateX(-50%); } }

/* Progressive, letter-by-letter colour reveal, with the heading always readable. */
.title-accent .title-word { display: inline-block; white-space: nowrap; }
[data-colour-reveal] .title-accent.is-enhanced,
[data-colour-reveal] .title-accent.is-enhanced span { color: var(--ink); }

.problemi-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.problemi-grid:focus-visible { outline: 3px solid var(--orange-ink); outline-offset: 6px; border-radius: 12px; }
.problem-slider-controls { display: none; }
.problem-slider { position: relative; }
.problema-card { min-width: 0; }
.problema-num { height: 250px; margin-bottom: 26px; border-radius: var(--radius); display: grid; place-items: center; font-size: 90px; font-weight: 650; letter-spacing: -.08em; background: var(--orange); color: var(--paper); border: 4px solid rgba(255,255,255,.24); box-shadow: 0 12px 20px -14px rgba(28,40,61,.5); position: relative; isolation: isolate; }
.problema-num::before { content: ''; position: absolute; width: 150px; height: 150px; z-index: -1; background: rgba(20,45,83,.9); border-radius: 50%; transform: rotate(-10deg); }
.problema-card:nth-child(2) .problema-num { background: #b7cde7; color: var(--ink); }
.problema-card:nth-child(2) .problema-num::before { background: var(--paper); border-radius: 50%; clip-path: none; }
.problema-card:nth-child(3) .problema-num { background: #f3b48f; color: var(--paper); }
.problema-card:nth-child(3) .problema-num::before { background: var(--orange); transform: rotate(10deg); }
.problema-num > span { display: block; }
.problema-num.is-in-view::before { animation: problem-circle-enter 950ms cubic-bezier(.22,1,.36,1) both; }
.problema-num.is-in-view > span { animation: problem-number-enter 800ms cubic-bezier(.22,1,.36,1) both; }
@keyframes problem-circle-enter {
  0% { transform: translateY(8px) scale(.90); }
  65% { transform: translateY(-3px) scale(1.025); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes problem-number-enter {
  0% { transform: translateY(12px) rotate(-3deg); }
  65% { transform: translateY(-2px) rotate(1deg); }
  100% { transform: translateY(0) rotate(0); }
}
.problema-title { text-align: center; font-weight: 650; font-size: 24px; letter-spacing: -.04em; line-height: 1.12; margin: 0 15px 15px; }
.problema-desc { text-align: center; color: var(--muted); font-size: 16px; line-height: 1.65; padding-inline: 9px; }

.servizi-section { background: var(--blue); }
.srv-cards { max-width: 940px; margin-inline: auto; display: grid; gap: 12px; }
.srv-card { border-radius: 20px; background: rgba(250,247,241,.7); overflow: hidden; transition: background .2s; }
.srv-card.open { background: var(--paper); }
.srv-card.is-service-visible { animation: service-enter 650ms cubic-bezier(.22,1,.36,1) both; animation-delay: var(--service-delay,0ms); }
.srv-card:focus-within { animation: none; }
@keyframes service-enter {
  from { transform: translateY(26px); opacity: .55; }
  to { transform: translateY(0); opacity: 1; }
}
.srv-card-header { width: 100%; border: 0; background: transparent; color: var(--ink); display: flex; align-items: center; text-align: left; gap: 22px; padding: 23px 28px; }
.srv-card-num { font-size: 11px; display: grid; place-items: center; width: 38px; height: 38px; background: var(--blue); border-radius: 50%; flex: 0 0 38px; }
.srv-card.open .srv-card-num { background: var(--orange-ink); color: white; animation: problem-number-enter 700ms cubic-bezier(.22,1,.36,1); }
.srv-card-title { font-size: clamp(23px,2.6vw,36px); font-weight: 600; letter-spacing: -.055em; line-height: 1.2; flex: 1; }
.srv-card-arrow { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; transition: transform .2s; }
.srv-card-arrow svg { width: 17px; height: 17px; stroke: var(--ink); }
.srv-card.open .srv-card-arrow { transform: rotate(180deg); }
.srv-card-body { display: grid; grid-template-rows: 0fr; visibility: hidden; opacity: 0; color: var(--muted); transition: grid-template-rows .42s cubic-bezier(.22,1,.36,1), opacity .25s, visibility 0s .42s; }
.srv-card.open .srv-card-body { grid-template-rows: 1fr; visibility: visible; opacity: 1; transition-delay: 0s; }
.srv-card-content { min-height: 0; overflow: hidden; }
.srv-card-body p { margin-inline: 88px 76px; }
.srv-card-body p + p { margin-top: 12px; }
.srv-card-body p:last-child { padding-bottom: 28px; }
.services-cta { text-align: center; margin-top: 38px; }
.srv-link { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(20,45,83,.35); }
.srv-link:hover { text-decoration-color: currentColor; }


/* Consent remains independent of presentation and never auto-accepts. */
#cookie-banner { position: fixed; z-index: 100; left: 20px; bottom: 20px; width: min(400px,calc(100% - 40px)); padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 10px 50px rgba(11,28,52,.22); }
#cookie-banner.hidden { display: none; }
#cookie-banner p { font-size: 12px; line-height: 1.6; }
#cookie-banner p a { text-decoration: underline; }
.cookie-btns { display: flex; gap: 8px; margin-top: 16px; }
.cookie-btns button { flex: 1; border-radius: 30px; font-size: 11px; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.cookie-btns .btn-cookie-accept { background: var(--navy); color: white; }
.cookie-settings { font: inherit; color: inherit; border: 0; padding: 6px 0; background: transparent; text-decoration: underline; }

@media (max-width: 760px) {
  html { scroll-padding-top: 88px; }
  :is(.problemi-inner,.servizi-inner,.metodo-inner,.numeri-inner,.chi-inner,.cases-inner,.test-inner,.contatti-inner) { width: calc(100% - 40px); }
  :is(.problemi-section,.servizi-section,.metodo-section,.numeri-section,.chi-section,.cases-section,.test-section,.contatti-section) { padding: 72px 0; }
  h2 { font-size: clamp(36px,8.4vw,60px); }
  .sec-header, .metodo-top { margin-bottom: 36px; }
  .sec-header p { font-size: 16px; }
  .loghi-section { padding: 30px 0; }
  .loghi-title { margin-bottom: 26px; }
  .loghi-toggle { right: 20px; }
  .loghi-group { gap: 38px; padding-right: 38px; }
  .logo-item { width: 150px; flex-basis: 150px; }
  .logo-item img { height: 70px; }
  .logo-item--large img { height: 86px; }
  .problem-slider { margin-bottom: 34px; }
  .problem-slider-controls:not([hidden]) { display: block; position: absolute; inset: 3px -16px 18px; z-index: 2; pointer-events: none; }
  .problem-slider-count { position: absolute; bottom: -36px; left: 50%; transform: translateX(-50%); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .problem-current { font-weight: 700; }
  .problem-slider-arrows { position: sticky; top: max(108px,calc(50svh - 22px)); margin-top: clamp(76px,calc(29vw - 22px),108px); display: flex; justify-content: space-between; gap: 6px; }
  .problem-slider-arrows button { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 2px solid var(--paper); border-radius: 50%; background: var(--navy); color: var(--paper); font-size: 22px; box-shadow: 0 3px 12px rgba(20,45,83,.18); pointer-events: auto; }
  .problem-slider-arrows button:disabled { background: var(--paper); color: #8691a1; box-shadow: none; cursor: default; }
  .problemi-grid { display: flex; align-items: flex-start; gap: 16px; width: calc(100% + 40px); margin: 0 -20px; padding: 3px 20px 18px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: thin; scrollbar-color: var(--orange-ink) transparent; }
  .problemi-grid::after { content: ''; flex: 0 0 0; }
  .problema-card { flex: 0 0 calc(100% - 16px); scroll-snap-align: start; scroll-snap-stop: always; }
  .problema-num { height: clamp(195px,58vw,260px); margin-bottom: 20px; }
  .problema-title { font-size: 24px; margin-left: 32px; margin-right: 16px; }
  .problema-desc { padding-left: 32px; padding-right: 16px; }
  .srv-card-header { padding: 19px 16px; gap: 12px; }
  .srv-card-num { width: 30px; height: 30px; flex-basis: 30px; }
  .srv-card-title { font-size: 24px; }
  .srv-card-body { font-size: 15px; }
  .srv-card-body p { margin-inline: 20px; }
  .srv-card-body p:last-child { padding-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .loghi-track-wrap { overflow-x: auto; }
  .loghi-group[aria-hidden], .loghi-fade, .loghi-toggle { display: none; }
}
