/* HU Tech Italia — Nike DESIGN.md adattato al SaaS (awesome-design-md/nike):
   display maiuscolo condensato 0.9, nero unico "colore", soft-cloud, pillole, card a raggio zero senza ombre,
   ritmo verticale regolare; prodotto vero (screenshot Refertium) al posto della fotografia sportiva. */

.ht { background: var(--c-paper); color: var(--c-ink); font-size: 1rem; line-height: 1.55; }
.ht .wrap { max-width: 1440px; }
.ht-display { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; line-height: 0.9; letter-spacing: 0; margin: 0; }
.ht-display--xl { font-size: clamp(4rem, 2rem + 9vw, 11rem); }
.ht-display--l { font-size: clamp(3rem, 1.6rem + 6vw, 7.5rem); }
.ht-blue { color: var(--c-accent-deep); }
.ht-k { margin: 0 0 10px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); }

/* utility bar + nav bianca (Nike) */
.ht-util { background: var(--c-paper-2); font-size: 0.75rem; font-weight: 500; }
.ht-util .wrap { display: flex; justify-content: space-between; gap: 16px; min-height: 36px; align-items: center; }
.ht-util a { text-decoration: none; }
.ht-util a:hover { text-decoration: underline; }
.top.ht-nav, .top.ht-nav.is-scrolled {
  position: sticky; top: 0; background: var(--c-paper); color: var(--c-ink);
  border-bottom: 1px solid transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
.top.ht-nav.is-scrolled { border-bottom-color: var(--c-rule); }
.ht-nav .top__inner { min-height: 64px; gap: 24px; }
.ht-nav .top__links a { color: var(--c-ink); font-weight: 500; }
.ht-nav .top__links a:hover { border-bottom-color: var(--c-ink); }
.ht-brand { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; text-decoration: none; }
.ht-brand__mark { height: 30px; width: auto; }
.ht-brand__word { height: 24px; width: auto; }
.ht-brand--foot img { height: 120px; width: auto; }
@media (max-width: 400px) { .ht-brand__mark { height: 26px; } .ht-brand__word { height: 20px; } .ht-brand { gap: 10px; } }

/* pillole */
.ht-pill, .btn.ht-pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 24px;
  border-radius: 30px; border: 1.5px solid transparent; font: 600 0.9375rem/1.3 var(--font-body);
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.ht-pill--dark { background: var(--c-ink); color: var(--c-paper); }
.ht-pill--dark:hover { background: var(--c-dark-3); }
.ht-pill--blue, .btn.ht-pill--blue { background: var(--c-accent-deep); color: #fff; border-color: var(--c-accent-deep); }
.ht-pill--blue:hover { background: oklch(44% 0.24 265); }
.ht-pill--white { background: #fff; color: var(--c-ink); }
.ht-pill--white:hover { background: var(--c-paper-2); }
.ht-pill--line { border-color: var(--c-ink); color: var(--c-ink); }
.ht-pill--line:hover { background: var(--c-paper-2); }
.ht-pill--line-dark { border-color: var(--c-ink); color: var(--c-ink); }
.ht-pill--line-dark:hover { background: var(--c-paper-2); }
.ht-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* hero: titolo enorme su bianco + screenshot a tutta larghezza */
.ht-hero { padding-top: clamp(40px, 6vw, 88px); overflow: clip; }
.ht-hero h1 { font-size: clamp(3.75rem, 1.5rem + 10vw, 13rem); }
.ht-hero h1 .line { display: inline-block; overflow: clip; padding-bottom: 0.04em; }
.ht-hero h1 .line > span { display: inline-block; }
.ht-hero__foot { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: end; margin-top: clamp(24px, 3vw, 40px); }
.ht-hero__foot p { margin: 0; max-width: 52ch; font-size: 1.125rem; color: var(--c-ink-2); }
.ht-hero__foot .ht-actions { justify-content: flex-end; }
.ht-hero__shot { margin: clamp(40px, 5vw, 72px) auto 0; width: min(100% - 2 * clamp(16px, 4vw, 48px), 1340px); background: var(--c-paper-2); }
.ht-hero__shot img { width: 100%; border: 1px solid var(--c-rule); }

.ht-section { padding-block: clamp(64px, 8vw, 120px); }
.ht-head { display: flex; flex-direction: column; margin-bottom: clamp(24px, 3vw, 40px); }
.ht-head h2:not(.ht-display) { font-size: 1.5rem; font-weight: 500; margin: 0; }
.ht-narrow { max-width: 900px; }
.ht-cloud { background: var(--c-paper-2); }

/* tile (sport tiles) */
.ht-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ht-tile { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; min-height: clamp(280px, 30vw, 420px); padding: clamp(20px, 2vw, 32px); text-decoration: none; transition: transform .4s cubic-bezier(.22,1,.36,1); }
.ht-tile:hover { transform: translateY(-4px); }
.ht-tile--dark { background: var(--c-ink); color: #fff; }
.ht-tile--cloud { background: var(--c-paper-2); color: var(--c-ink); }
.ht-tile--blue { background: var(--c-accent-deep); color: #fff; }
.ht-tile__k { font-size: 0.75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.ht-tile__t { font-size: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.ht-tile__d { max-width: 32ch; }

/* prodotto */
.ht-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
.ht-split--text { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.ht-lead { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.45; margin: 0 0 24px; color: var(--c-ink); }
.ht-lead--wide { max-width: 60ch; }
.ht-list { list-style: none; margin: 0 0 28px; padding: 0; border-top: 1px solid var(--c-ink); }
.ht-list li { padding: 14px 0; border-bottom: 1px solid var(--c-rule); color: var(--c-ink-2); }
.ht-list strong { color: var(--c-ink); font-weight: 600; }
.ht-shot { margin: 0; background: var(--c-paper-2); }
.ht-shot img { width: 100%; border: 1px solid var(--c-rule); }

/* statement nero */
.ht-statement { background: var(--c-ink); color: #fff; }
.ht-statement .wrap { padding-block: clamp(72px, 9vw, 128px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: end; }
.ht-statement h2 { font-size: clamp(3rem, 1.5rem + 6vw, 8rem); }
.ht-statement p { margin: 0 0 24px; color: var(--c-on-dark-2); font-size: 1.0625rem; }

/* definizioni software */
.ht-defs { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--c-ink); }
.ht-defs div { padding: 18px 0; border-bottom: 1px solid var(--c-rule); }
.ht-defs dt { font-weight: 600; margin-bottom: 6px; }
.ht-defs dd { margin: 0; color: var(--c-ink-2); }

/* passi siti web */
.ht-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.ht-steps > div { background: var(--c-paper); padding: 24px; min-height: 220px; }
.ht-step { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--c-accent-deep); }
.ht-steps h3 { margin: 16px 0 8px; font-size: 1.25rem; font-weight: 600; }
.ht-steps p { margin: 0; color: var(--c-ink-2); }
.ht-checks { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--c-ink); }
.ht-checks li { padding: 14px 0 14px 28px; border-bottom: 1px solid var(--c-rule); position: relative; }
.ht-checks li::before { content: "✓"; position: absolute; left: 0; color: var(--c-accent-deep); font-weight: 700; }

/* FAQ su bianco */
.ht .faq summary h3 { font-family: var(--font-body); color: var(--c-ink); }
.ht .faq__icon { border-color: var(--c-ink); }
.ht .faq__item[open] .faq__icon { background: var(--c-ink); }

/* contatti */
.ht-call { background: var(--c-ink); color: #fff; padding-block: clamp(72px, 9vw, 128px); }
.ht-call h2 { font-size: clamp(3rem, 1.5rem + 6vw, 8rem); margin-bottom: 40px; }
.ht-call__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; }
.ht-call p { color: var(--c-on-dark-2); }
.ht-mail { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.ht-mail a { color: #fff; text-decoration-color: var(--c-accent); text-underline-offset: 6px; }
.ht-form h3 { font-family: var(--font-body); font-size: 1.25rem; font-weight: 600; color: #fff; margin: 0 0 12px; }
.ht-form .field input, .ht-form .field textarea { border-radius: 0; }

/* footer nero denso */
.ht-foot { background: var(--c-ink); color: var(--c-on-dark-2); border-top: 1px solid var(--c-rule-on-dark); }
.ht-foot__cols { display: grid; grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); gap: 24px; padding-bottom: 32px; margin-bottom: 16px; border-bottom: 1px solid var(--c-rule-on-dark); }
.ht-foot h3 { font: 600 0.8125rem/1.4 var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: #fff; margin: 0 0 12px; }
.ht-foot ul { list-style: none; margin: 0; padding: 0; }
.ht-foot li { margin-bottom: 8px; font-size: 0.875rem; }
.ht-foot a { color: var(--c-on-dark-2); text-decoration: none; }
.ht-foot a:hover { color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .ht-hero h1 .line > span { animation: line-up 900ms var(--ease-out) both; }
  .ht-hero h1 .line:nth-of-type(2) > span { animation-delay: 120ms; }
  .ht-hero h1 .line:nth-of-type(3) > span { animation-delay: 240ms; }
  .ht-hero .rise { animation: fade-up 700ms var(--ease-out) both; animation-delay: 480ms; }
}
@media (max-width: 960px) {
  .ht-tiles, .ht-split, .ht-split--text, .ht-hero__foot, .ht-statement .wrap, .ht-call__grid { grid-template-columns: minmax(0, 1fr); }
  .ht-hero__foot .ht-actions { justify-content: flex-start; }
  .ht-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ht-checks { grid-template-columns: minmax(0, 1fr); }
  .ht-foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ht-nav .top__links { display: none; }
}
@media (max-width: 560px) {
  .ht-defs, .ht-steps { grid-template-columns: minmax(0, 1fr); }
  .ht-util .wrap span { display: none; }
  .ht-util .wrap { justify-content: flex-end; }
}
.ht-mail a { overflow-wrap: anywhere; }

/* pagine interne */
.ht-pagehero { padding-block: clamp(48px, 7vw, 104px) clamp(40px, 5vw, 72px); border-bottom: 1px solid var(--c-rule); }
.ht-pagehero h1 { margin-bottom: 24px; }
.ht-crumbs { font-size: 0.875rem; color: var(--c-muted); margin-bottom: 24px; }
.ht-crumbs a { color: var(--c-ink); }
.ht-more { margin: 32px 0 0; }
.ht-pill--line-white { border-color: #fff; color: #fff; }
.ht-pill--line-white:hover { background: rgba(255,255,255,.1); }

/* menu mobile senza JS */
.ht-menu { display: none; position: relative; }
.ht-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--c-ink); border-radius: 30px; font-weight: 600; }
.ht-menu summary::-webkit-details-marker { display: none; }
.ht-menu ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; list-style: none; margin: 0; padding: 8px 0; background: var(--c-paper); border: 1px solid var(--c-rule); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.ht-menu a { display: flex; min-height: 44px; align-items: center; padding: 0 16px; text-decoration: none; font-weight: 500; }
.ht-menu a:hover { background: var(--c-paper-2); }

/* barra fissa mobile: Scrivici | Chiama */
@media (max-width: 52rem) {
  .ht-callbar { background: var(--c-ink); border-top: 3px solid var(--c-accent-deep); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .ht-callbar a { color: #fff; }
  .ht-callbar a + a { color: var(--c-accent); }
}
@media (max-width: 960px) {
  .ht-menu { display: block; }
  .ht-nav__cta { display: none; }
}
@media (max-width: 52rem) {
  .callbar--split { display: grid; grid-template-columns: 1fr 1fr; padding: 0 0 env(safe-area-inset-bottom); }
  .callbar--split a { display: flex; align-items: center; justify-content: center; min-height: 56px; text-decoration: none; font-weight: 600; letter-spacing: 0.02em; }
  .callbar--split a + a { border-left: 1px solid var(--c-rule-on-dark); }
}

/* hero v2: titolo + fascia di lavori che scorre (nessun link) */
.ht-hero .ht-k { margin-bottom: 18px; }
.ht-hero h1 { font-size: clamp(3rem, 1.2rem + 5.6vw, 8rem); }
.ht-marquee { margin-top: clamp(40px, 5vw, 72px); overflow: hidden; padding-bottom: 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ht-marquee__track { display: flex; gap: 20px; width: max-content; list-style: none; margin: 0; padding: 0; }
.ht-work figure { margin: 0; width: clamp(280px, 34vw, 520px); }
.ht-work img { width: 100%; height: auto; border: 1px solid var(--c-rule); box-shadow: 0 18px 40px -24px oklch(21% 0.04 255 / .45); }
.ht-work figcaption { margin-top: 12px; font-size: 0.9375rem; color: var(--c-ink-2); }
.ht-work figcaption span { display: inline-block; margin-right: 8px; font-size: 0.75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--c-accent-deep); }
@media (prefers-reduced-motion: no-preference) {
  .ht-marquee__track { animation: ht-marquee 48s linear infinite; }
  .ht-marquee:hover .ht-marquee__track, .ht-marquee:focus-within .ht-marquee__track { animation-play-state: paused; }
  @keyframes ht-marquee { to { transform: translateX(calc(-50% - 10px)); } }
}
@media (prefers-reduced-motion: reduce) {
  .ht-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .ht-work[aria-hidden="true"] { display: none; }
}

/* ---------- Loading (prima visita della sessione, ~1,3 s, solo CSS) ---------- */
.ht-loader { display: none; }
.ht-loading .ht-loader {
  display: flex; position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center;
  background: var(--c-paper);
  animation: ht-loader-out .45s cubic-bezier(.65,0,.35,1) 1.05s forwards;
}
.ht-loader__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.ht-loader img { width: 96px; height: auto; animation: ht-loader-mark .7s cubic-bezier(.22,1,.36,1) both; }
.ht-loader__bar { display: block; width: 140px; height: 2px; background: var(--c-rule); overflow: hidden; }
.ht-loader__bar span { display: block; height: 100%; width: 100%; background: var(--c-accent-deep); transform-origin: left; animation: ht-loader-bar .95s cubic-bezier(.65,0,.35,1) both; }
.ht-loader__label { font-size: .6875rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--c-muted); }
@keyframes ht-loader-mark { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ht-loader-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ht-loader-out { to { opacity: 0; visibility: hidden; transform: translateY(-2%); } }
/* le animazioni dell'hero partono dopo il loader */
.ht-loading .ht-hero h1 .line > span { animation-delay: 1.2s; }
.ht-loading .ht-hero h1 .line:nth-of-type(2) > span { animation-delay: 1.32s; }
.ht-loading .ht-hero h1 .line:nth-of-type(3) > span { animation-delay: 1.44s; }
.ht-loading .ht-hero .rise { animation-delay: 1.65s; }

/* ---------- 404 personalizzata ---------- */
.ht-nf__top { padding-block: clamp(48px, 7vw, 104px) clamp(40px, 5vw, 64px); }
.ht-nf__code { font-size: clamp(8rem, 4rem + 22vw, 22rem); line-height: .82; color: var(--c-ink); }
.ht-nf__code span { color: var(--c-accent-deep); display: inline-block; }
.ht-nf__title { font-family: var(--font-body); font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); font-weight: 600; margin: 24px 0 12px; }
.ht-nf__links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.ht-nf__links a { display: flex; flex-direction: column; gap: 6px; padding: 20px; min-height: 120px; justify-content: flex-end; background: var(--c-paper-2); text-decoration: none; transition: background-color .2s, color .2s; }
.ht-nf__links a:hover { background: var(--c-ink); color: #fff; }
.ht-nf__links a:hover .ht-k { color: var(--c-accent); }
.ht-nf__links strong { font-size: 1.125rem; }
.ht-nf__works { padding-bottom: clamp(48px, 6vw, 88px); }
.ht-nf__works .ht-marquee { margin-top: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .ht-nf__code span { animation: ht-nf-wobble 3.2s ease-in-out infinite; }
  @keyframes ht-nf-wobble { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-8deg) translateY(-4%); } }
}
@media (max-width: 960px) { .ht-nf__links { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ht-nf__links a:last-child { grid-column: 1 / -1; } }
