:root {
  --navy: #101B2D;
  --navy-2: #18263D;
  --navy-3: #22324D;
  --red: #C8102E;
  --red-2: #A50D26;
  --slate: #4A5568;
  --silver: #E6E9EE;
  --paper: #F6F7F9;
  --white: #FFFFFF;
  --line: #D5DAE1;
  --on-dark: #C9D1DC;
  --ok: #1F7A4D;
  --display: 'Red Hat Display', ui-sans-serif, system-ui, sans-serif;
  --text: 'Red Hat Text', ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--white); color: var(--navy); font: 400 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.04; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 900; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0; }
section { padding: clamp(72px, 10vw, 128px) var(--gutter); }
section > * { max-width: var(--max); margin-inline: auto; }
.eyebrow { font: 600 .78rem/1 var(--text); letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }

/* ---------- logo ---------- */
.mark { width: 34px; height: 34px; flex: none; overflow: visible; }
.mark .q, .mini .q { fill: currentColor; }
.mark .q2, .mini .q2, .bigmark .q2 { fill: var(--red); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.wm { font: 400 1.05rem/1 var(--display); letter-spacing: .05em; white-space: nowrap; }
.wm b { font-weight: 900; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--navy) 92%, transparent);
  backdrop-filter: blur(10px);
  color: var(--white);
  border-bottom: 1px solid rgb(255 255 255 / .08);
}
.top nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 32px); font-weight: 500; font-size: .95rem; }
.top nav a { text-decoration: none; color: var(--on-dark); transition: color .2s; }
.top nav a:hover { color: var(--white); }
.top nav .nav-cta { color: var(--white); background: var(--red); padding: 10px 16px; border-radius: 10px; transition: background .2s, transform .2s var(--ease); }
.top nav .nav-cta:hover { background: var(--red-2); transform: translateY(-1px); }
@media (max-width: 760px) { .top nav a:not(.nav-cta) { display: none; } .wm { font-size: .95rem; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 12px 22px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--red); color: var(--white); font: 600 1rem/1 var(--text); text-decoration: none;
  transition: background .2s, transform .25s var(--ease), box-shadow .25s;
}
.btn:hover { background: var(--red-2); transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgb(200 16 46 / .6); }
.btn-ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .35); }
.btn-ghost:hover { background: rgb(255 255 255 / .08); box-shadow: inset 0 0 0 1.5px var(--white); }
.btn-light { background: var(--navy); }
.btn-light:hover { background: var(--navy-3); box-shadow: 0 10px 24px -12px rgb(16 27 45 / .6); }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--navy); color: var(--white);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-top: clamp(56px, 8vw, 104px);
  max-width: none;
}
.hero > .hero-copy, .hero > .hero-window { max-width: 620px; margin: 0; }
.hero > .hero-copy { justify-self: end; }
.hero-bg { position: absolute; inset: 0; z-index: -1; max-width: none; pointer-events: none; }
.bigmark { position: absolute; width: min(78vw, 980px); right: -22%; top: 50%; translate: 0 -50%; opacity: .07; animation: spin 90s linear infinite; }
.bigmark .q { fill: var(--white); }
.bigmark .q2 { opacity: 1; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 900; letter-spacing: -0.03em; }
.hero .ln { display: inline-block; }
.hero .lead { margin-top: 24px; font-size: 1.15rem; color: var(--on-dark); max-width: 52ch; }
.hero .eyebrow { color: #FF6B7F; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .hero > .hero-copy, .hero > .hero-window { justify-self: stretch; max-width: none; }
}

/* finestra applicazione */
.hero-window { margin: 0; perspective: 1200px; }
.hero-window .chrome, .hero-window .app { transform-style: preserve-3d; }
.chrome { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--navy-3); border-radius: 14px 14px 0 0; }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / .25); }
.dots i:first-child { background: var(--red); }
.addr { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--on-dark); background: rgb(0 0 0 / .25); padding: 4px 10px; border-radius: 8px; }
.addr svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tilt { transition: transform .4s var(--ease); will-change: transform; }
.app { display: grid; grid-template-columns: 150px 1fr; background: var(--white); color: var(--navy); border-radius: 0 0 14px 14px; overflow: hidden; box-shadow: 0 40px 80px -30px rgb(0 0 0 / .6); }
.app aside { background: var(--silver); padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: var(--slate); }
.app aside b { font-family: var(--display); font-size: 1rem; color: var(--navy); margin-bottom: 8px; }
.app aside span { padding: 6px 10px; border-radius: 8px; }
.app aside .on { background: var(--navy); color: var(--white); }
.app-main { padding: 18px; }
.app-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.app-head b { font: 900 1.25rem/1 var(--display); }
.app-head span { font-size: .82rem; color: var(--slate); }
.app ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.app li { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .88rem; }
.app li time { font-weight: 600; color: var(--slate); }
.app li span { display: flex; flex-direction: column; line-height: 1.25; }
.app li small { color: var(--slate); }
.st { font-style: normal; font-size: .74rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; }
.st.ok { background: #DDF1E6; color: var(--ok); }
.st.wait { background: #FDF0D5; color: #8A5A00; }
.st.todo { background: #FBE0E4; color: var(--red-2); }
.tip { margin-top: 12px; display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--slate); background: var(--paper); border: 1px dashed var(--line); padding: 8px 10px; border-radius: 10px; }
.tip span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: var(--white); font-weight: 700; font-size: .75rem; }
.hero-window figcaption { margin-top: 14px; font-size: .88rem; color: var(--on-dark); }
@media (max-width: 520px) { .app { grid-template-columns: 1fr; } .app aside { display: none; } }

/* ---------- demo ---------- */
.demos { background: var(--paper); }
.demos-head { max-width: var(--max); }
.demos-head p:not(.eyebrow), .plan-head p:not(.eyebrow) { margin-top: 16px; max-width: 60ch; color: var(--slate); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.filters button { min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--navy); font: 600 .92rem/1 var(--text); cursor: pointer; transition: all .2s; }
.filters button:hover { border-color: var(--navy); }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; margin-top: 32px; }
.demo { background: var(--white); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s; }
.demo:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -24px rgb(16 27 45 / .35); }
.demo .chrome { border-radius: 0; background: var(--navy); }
.demo-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.demo-cat { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.demo-body p:not(.demo-cat) { color: var(--slate); }
.demo-body .btn { margin-top: 8px; }
.empty { margin-top: 32px; padding: 32px; border-radius: 16px; background: var(--white); border: 1.5px dashed var(--line); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.empty p { max-width: 56ch; color: var(--slate); }

/* ---------- abbonamento ---------- */
.plan { background: var(--navy); color: var(--white); }
.plan-head p:not(.eyebrow) { color: var(--on-dark); }
.plan-list { list-style: none; padding: 0; margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.plan-list li { background: var(--navy-2); border: 1px solid rgb(255 255 255 / .08); border-radius: 16px; padding: 26px; transition: border-color .3s, transform .35s var(--ease); }
.plan-list li:hover { border-color: var(--red); transform: translateY(-4px); }
.plan-list p { margin-top: 8px; color: var(--on-dark); font-size: .96rem; }
.mini { width: 32px; height: 32px; margin-bottom: 18px; color: var(--white); }
.mini .q { transition: translate .4s var(--ease); }
.plan-list li:hover .mini .q1 { translate: -2px -2px; }
.plan-list li:hover .mini .q2 { translate: 2px -2px; }
.plan-list li:hover .mini .q3 { translate: 2px 2px; }
.plan-list li:hover .mini .q4 { translate: -2px 2px; }

/* ---------- servizi ---------- */
.service-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0; margin-top: 48px; border-top: 1px solid var(--line); }
.service { position: relative; padding: 32px 28px 32px 0; border-bottom: 1px solid var(--line); }
.service::before { content: ""; position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: var(--red); transition: width .6s var(--ease); }
.service:hover::before, .service.in::before { width: 48px; }
.num { display: block; font: 900 .9rem/1 var(--display); color: var(--red); margin-bottom: 18px; }
.service p { margin-top: 10px; color: var(--slate); }
.service .uses { font-size: .86rem; font-weight: 600; color: var(--navy); }

/* ---------- metodo ---------- */
.method { background: var(--paper); }
.steps { list-style: none; padding: 0; margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px; counter-reset: s; position: relative; --p: 0; }
.steps::before { content: ""; position: absolute; top: 21px; left: 0; right: 0; height: 2px; background: var(--line); }
.steps::after { content: ""; position: absolute; top: 21px; left: 0; height: 2px; width: calc(var(--p) * 100%); background: var(--red); transition: width .15s linear; }
.steps li { position: relative; z-index: 1; counter-increment: s; }
.steps li::before { content: counter(s, decimal-leading-zero); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--navy); color: var(--white); font: 900 .95rem/1 var(--display); margin-bottom: 20px; }
.steps p { margin-top: 8px; color: var(--slate); }
@media (max-width: 940px) { .steps::before, .steps::after { display: none; } }

/* ---------- contatti ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.contact > * { margin: 0; }
.contact-copy p:not(.direct) { margin-top: 16px; color: var(--slate); }
.direct { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
.direct a { text-decoration-color: var(--red); text-underline-offset: 4px; }
.form, .form-done { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 3vw, 32px); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; }
.form .wide, .form .btn, .form-error { grid-column: 1 / -1; }
.form input, .form select, .form textarea { font: 400 1rem/1.4 var(--text); color: var(--navy); background: var(--white); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; min-height: 48px; transition: border-color .2s, box-shadow .2s; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgb(16 27 45 / .1); }
.form .hp { position: absolute; left: -9999px; }
.form-error { background: #FBE0E4; color: var(--red-2); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.form-done p { margin-top: 8px; color: var(--slate); }
@media (max-width: 820px) { .contact, .form { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding: 32px var(--gutter); background: var(--navy); color: var(--on-dark); font-size: .9rem; }
.foot .brand { color: var(--white); margin-right: auto; }

/* ---------- movimento ---------- */
@keyframes spin { to { rotate: 360deg; } }
@keyframes rise { from { opacity: 0; translate: 0 110%; } to { opacity: 1; translate: 0 0; } }
@keyframes fade-up { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
@keyframes slide-in { from { opacity: 0; translate: 24px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes pop { 0% { scale: .6; opacity: 0; } 70% { scale: 1.08; } 100% { scale: 1; opacity: 1; } }
@keyframes q1 { from { translate: -10px -10px; opacity: 0; } }
@keyframes q2 { from { translate: 10px -10px; opacity: 0; } }
@keyframes q3 { from { translate: 10px 10px; opacity: 0; } }
@keyframes q4 { from { translate: -10px 10px; opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  .top .mark .q { animation: q1 .7s var(--ease) both; }
  .top .mark .q2 { animation-name: q2; animation-delay: .45s; }
  .top .mark .q3 { animation-name: q3; animation-delay: .15s; }
  .top .mark .q4 { animation-name: q4; animation-delay: .3s; }
  .hero .eyebrow, .hero .lead, .hero .actions { animation: fade-up .8s var(--ease) both; }
  .hero .eyebrow { animation-delay: .1s; }
  .hero h1 .ln { animation: rise .9s var(--ease) both; }
  .hero h1 .ln:nth-child(1) { animation-delay: .2s; }
  .hero h1 .ln:nth-child(2) { animation-delay: .32s; }
  .hero h1 .ln:nth-child(3) { animation-delay: .44s; }
  .hero .lead { animation-delay: .6s; }
  .hero .actions { animation-delay: .72s; }
  .hero-window { animation: fade-up 1s var(--ease) .4s both; }
  .app li { animation: slide-in .6s var(--ease) both; }
  .app li:nth-child(1) { animation-delay: .9s; }
  .app li:nth-child(2) { animation-delay: 1.02s; }
  .app li:nth-child(3) { animation-delay: 1.14s; }
  .app li:nth-child(4) { animation-delay: 1.26s; }
  .app .st { animation: pop .5s var(--ease) both; }
  .app li:nth-child(1) .st { animation-delay: 1.3s; }
  .app li:nth-child(2) .st { animation-delay: 1.42s; }
  .app li:nth-child(3) .st { animation-delay: 1.54s; }
  .app li:nth-child(4) .st { animation-delay: 1.66s; }
  .tip { animation: fade-up .6s var(--ease) 1.9s both; }
}
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; translate: 0 32px; transition: opacity .8s var(--ease), translate .8s var(--ease); }
  .reveal.in { opacity: 1; translate: 0 0; }
  :is(.plan-list, .service-list, .steps, .demo-grid) > .reveal:nth-child(2) { transition-delay: .1s; }
  :is(.plan-list, .service-list, .steps, .demo-grid) > .reveal:nth-child(3) { transition-delay: .2s; }
  :is(.plan-list, .service-list, .steps, .demo-grid) > .reveal:nth-child(4) { transition-delay: .3s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bigmark { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
