/* Link in Bio Lunaecom — stili comuni. Colori e font solo da tokens.css */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-background);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-brand-primary); text-underline-offset: 3px; }
h1, h2, h3 {
  font-family: var(--font-headings); font-weight: 500; line-height: 1.2;
  letter-spacing: var(--tracking-heading); color: var(--color-heading); margin: 0 0 .5em;
}
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--color-surface); padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

/* Fascia scura a tutta larghezza con la falce di luna del logo (richiamo a "C'è anche quando non la vedi") */
.band {
  position: relative; isolation: isolate; color: #fff;
}
.band::before {
  content: ""; position: absolute; z-index: -2; top: 0; bottom: 0; left: -100vmax; right: -100vmax;
  background:
    url("../img/sky-stars.svg") center top / 1600px auto repeat-x,
    radial-gradient(60% 80% at 50% 115%, rgba(130,160,181,.22), transparent 70%),
    linear-gradient(180deg, #00122a 0%, var(--color-brand-deep) 45%, var(--color-brand-primary) 100%);
}
/* Falce di luna luminosa con alone, nello spirito del logo */
.band::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 116px; height: 116px; right: -40px; top: -2px;
  background: url("../img/moon.svg") no-repeat center / contain;
}
.band h1, .band h2 { color: #fff; }
.payoff em { font-style: normal; font-weight: 600; color: #dbe6ee; }
.descriptor .dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--color-brand-secondary); vertical-align: middle; margin: 0 .7em; opacity: .8; }
.logo-on-dark { filter: brightness(0) invert(1); }

/* ---------- HUB ---------- */
.hub { max-width: var(--max-hub); margin: 0 auto; padding: 0 16px 8px; }
.hub__header { text-align: center; padding: 40px 4px 64px; }
.hub__logo { margin: 0 auto 26px; width: 210px; }
.hub__logo img { width: 100%; height: auto; }
.descriptor {
  font-size: .74rem; letter-spacing: .22em; text-transform: uppercase;
  color: #a9c0d0; font-weight: 600; margin: 0 0 16px;
}
.payoff {
  font-size: clamp(1.75rem, 7vw, 2.15rem); font-weight: 300; letter-spacing: .5px;
  line-height: 1.15; margin: 0 0 12px; text-wrap: balance;
}
.hub__subtitle { color: rgba(255,255,255,.72); margin: 0 auto; font-size: .98rem; max-width: 30ch; }

.cta-list {
  list-style: none; margin: -36px 0 0; padding: 0; display: grid; gap: 10px;
  position: relative; z-index: 1;
}
.cta {
  display: flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 14px 16px;
  background: var(--color-surface); color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  text-decoration: none; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cta:hover { box-shadow: var(--shadow-hover); border-color: var(--color-brand-secondary); transform: translateY(-2px); }
.cta:active { transform: translateY(0); box-shadow: var(--shadow); }
.cta__icon {
  flex: 0 0 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; background: var(--color-accent-soft); color: var(--color-brand-primary);
}
.cta__icon svg { width: 24px; height: 24px; }
.cta__body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cta__label { font-weight: 600; font-size: 1rem; line-height: 1.3; color: var(--color-heading); }
.cta__sub { font-size: .86rem; color: var(--color-text-muted); margin-top: 3px; line-height: 1.35; }
.cta__arrow {
  flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  color: var(--color-brand-primary); font-size: 1rem; transition: transform .18s ease, background .18s ease;
}
.cta:hover .cta__arrow { transform: translateX(3px); background: var(--color-accent-soft); }

.cta--primary {
  background: var(--color-brand-primary); border-color: var(--color-brand-primary);
  min-height: 92px; padding: 18px; box-shadow: 0 12px 32px rgba(0, 27, 58, .28);
}
.cta--primary:hover { background: var(--color-brand-primary-hover); border-color: var(--color-brand-primary-hover); }
.cta--primary .cta__label { color: #fff; font-size: 1.12rem; }
.cta--primary .cta__sub { color: rgba(255,255,255,.75); }
.cta--primary .cta__icon { background: rgba(255,255,255,.12); color: #fff; flex-basis: 52px; height: 52px; }
.cta--primary .cta__arrow { background: #fff; color: var(--color-brand-primary); }
.cta--primary:hover .cta__arrow { background: #fff; }

.copy-phone {
  display: none; margin: 6px auto 0; font: inherit; font-size: .85rem;
  background: none; border: 0; color: var(--color-text-muted); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; padding: 10px; min-height: 44px;
}
@media (hover: hover) and (pointer: fine) { .copy-phone { display: block; } }

.noscript-list { background: var(--color-surface); border-radius: var(--radius-lg); padding: 8px 18px; margin-top: -36px; position: relative; }
.noscript-list a { display: block; padding: 12px 0; }

/* ---------- FOOTER ---------- */
.site-footer {
  text-align: center; font-size: .82rem; color: var(--color-text-muted);
  padding: 32px 16px 40px;
}
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; margin-bottom: 6px; }
.site-footer a {
  color: var(--color-text-muted); padding: 10px 8px; display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.site-footer small { display: block; letter-spacing: .04em; }

/* ---------- LANDING ---------- */
.topbar { position: relative; isolation: isolate; }
.topbar::before {
  content: ""; position: absolute; inset: 0 -100vmax; z-index: -1; background: var(--color-brand-deep);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar__inner {
  max-width: var(--max-landing); margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.topbar__logo { width: 150px; display: block; }
.topbar__logo img { width: 100%; height: auto; }
.back-link {
  font-size: .82rem; text-decoration: none; font-weight: 600; color: #fff;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 10px 4px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
}
.back-link:hover { text-decoration: underline; }

.landing { max-width: var(--max-landing); margin: 0 auto; padding: 0 16px; }
.section { padding: 44px 0; }
.section + .section { border-top: 1px solid var(--color-border); }
.band + .section { border-top: 0; }
.eyebrow {
  display: inline-block; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 600; color: var(--color-brand-secondary); margin-bottom: 12px;
}
.hero { padding: 40px 0 52px; }
.hero h1 { font-size: clamp(1.7rem, 5.6vw, 2.5rem); font-weight: 400; letter-spacing: .5px; max-width: 22ch; text-wrap: balance; }
.hero .lead { font-size: 1.12rem; color: rgba(255,255,255,.78); max-width: 52ch; font-weight: 300; }
.section h2 { font-size: clamp(1.3rem, 3.8vw, 1.65rem); }
.section > p { max-width: 62ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 24px; border-radius: var(--radius);
  background: var(--color-brand-primary); color: #fff; text-decoration: none;
  border: 1px solid var(--color-brand-primary); font: inherit; font-weight: 600; font-size: .92rem;
  text-transform: uppercase; letter-spacing: .06em; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--color-brand-primary-hover); border-color: var(--color-brand-primary-hover); }
.btn svg { width: 20px; height: 20px; flex: 0 0 auto; }
.btn--ghost { background: transparent; color: var(--color-brand-primary); }
.btn--ghost:hover { background: var(--color-accent-soft); color: var(--color-brand-primary); }
.band .btn { background: #fff; color: var(--color-brand-primary); border-color: #fff; }
.band .btn:hover { background: var(--color-accent-soft); border-color: var(--color-accent-soft); }
.band .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.band .btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }

.offer {
  margin: 24px 0 8px; padding: 18px 20px; border-radius: var(--radius-lg);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap;
  max-width: 560px;
}
.offer__title { font-weight: 600; }
.offer__price { font-size: 1.9rem; font-weight: 300; white-space: nowrap; }
.offer__note { flex-basis: 100%; font-size: .85rem; color: rgba(255,255,255,.7); margin: 0; }

.cards { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 20px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow);
  border-top: 3px solid var(--color-brand-secondary);
}
.card h3 { font-size: 1.05rem; margin-bottom: 6px; letter-spacing: .3px; font-weight: 600; }
.card p { margin: 0; color: var(--color-text-muted); font-size: .95rem; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 20px 0 0; display: grid; gap: 18px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.steps li::before {
  content: counter(step, decimal-leading-zero); width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; font-size: .9rem;
  border: 1.5px solid var(--color-brand-primary); color: var(--color-brand-primary);
}
.steps strong { display: block; color: var(--color-heading); font-weight: 600; padding-top: 2px; }
.steps span { color: var(--color-text-muted); font-size: .95rem; }

/* Galleria Training Center */
.gallery { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-top: 20px; }
.gallery__item { margin: 0; position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-accent-soft); min-width: 0; }
.gallery__item--wide { grid-column: 1 / -1; }
.gallery__item img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.gallery__item figcaption {
  position: absolute; left: 10px; bottom: 10px; padding: 6px 12px; border-radius: 999px;
  background: rgba(0, 27, 58, .82); color: #fff; font-size: .8rem; font-weight: 600; letter-spacing: .02em;
}
@media (max-width: 559px) {
  .gallery__item:not(.gallery__item--wide) figcaption { left: 6px; right: 6px; bottom: 6px; padding: 4px 8px; font-size: .7rem; border-radius: 8px; text-align: center; }
}
@media (min-width: 720px) {
  .gallery { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
  .gallery__item--wide { grid-column: 1; grid-row: 1 / span 2; }
  .gallery__item--wide img { aspect-ratio: auto; min-height: 100%; }
}

/* Form CRM (form.js): campi di tracciamento nascosti, aspetto allineato al sito */
[data-form-slot] .etsf-field[hidden] { display: none !important; }
[data-form-slot] .etsf-card { box-shadow: none; padding: 0; background: transparent; }
[data-form-slot] .etsf-form, [data-form-slot] .etsf-input, [data-form-slot] .etsf-btn { font-family: var(--font-body) !important; }
[data-form-slot] .etsf-input { min-height: 48px; border-radius: var(--radius) !important; }
[data-form-slot] .etsf-btn { min-height: 50px; border-radius: var(--radius) !important; font-weight: 600; }

/* Blocco form */
.form-block {
  background: var(--color-surface); border-radius: var(--radius-lg);
  border: 1px solid var(--color-border); box-shadow: var(--shadow-hover);
  padding: 26px 20px; scroll-margin-top: 16px; border-top: 4px solid var(--color-brand-primary);
}
.form-block h2 { margin-bottom: 6px; }
.form-block > p { color: var(--color-text-muted); }
[data-form-slot] { min-height: 120px; width: 100%; overflow-x: hidden; }
[data-form-slot][hidden] { display: none; }
[data-form-slot] iframe { width: 100% !important; max-width: 100%; border: 0; }
.form-loading { color: var(--color-text-muted); font-size: .95rem; padding: 24px 0; text-align: center; }
.form-fallback { background: var(--color-background); padding: 18px; border-radius: var(--radius); }
.form-fallback p { margin-bottom: 10px; }
.form-legal { font-size: .8rem; color: var(--color-text-muted); margin: 16px 0 0; line-height: 1.5; }

.reassure { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.reassure li { padding-left: 30px; position: relative; color: var(--color-text-muted); }
.reassure li::before {
  content: ""; position: absolute; left: 7px; top: .3em; width: 6px; height: 11px;
  border: solid var(--color-brand-secondary); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* Thank-you */
.thanks-wrap { max-width: var(--max-hub); margin: 0 auto; padding: 0 16px; }
.thanks { text-align: center; padding: 56px 8px 64px; }
.thanks__icon {
  width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 20px;
  display: grid; place-items: center; border: 1.5px solid rgba(255,255,255,.5); color: #fff;
}
.thanks__icon svg { width: 32px; height: 32px; }
.thanks h1 { font-size: 1.9rem; font-weight: 300; }
.thanks p { color: rgba(255,255,255,.78); }
.thanks .btn-row { justify-content: center; margin-top: 24px; }

@media (min-width: 768px) {
  .hub__header { padding-top: 64px; }
  .band::after { width: 240px; height: 240px; right: -190px; top: -10px; }
  .form-block { padding: 34px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Pagine legali ---------- */
.legal { max-width: 68ch; }
.legal h2 { font-size: 1.25rem; margin: 2em 0 .5em; }
.legal h2:first-child { margin-top: 0; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: .4em 0; }
.legal code { font-size: .92em; background: var(--color-accent-soft); padding: 1px 5px; border-radius: 4px; }
.legal__updated { color: var(--color-text-muted); font-size: .9rem; margin-top: 2.5em; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1em 0; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.legal table { border-collapse: collapse; width: 100%; font-size: .94rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
.legal tr:last-child td { border-bottom: 0; }
.legal th { background: var(--color-background); color: var(--color-heading); font-weight: 600; white-space: nowrap; }

/* ---------- Banner cookie ---------- */
.cc-banner {
  position: fixed; z-index: 1000; left: 12px; right: 12px; bottom: 12px;
  max-width: 560px; margin: 0 auto; padding: 18px 18px 16px;
  background: var(--color-surface); color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 27, 58, .22);
  font-family: var(--font-body);
}
.cc-banner[hidden], .cc-modal[hidden] { display: none; }
.cc-title { font-weight: 600; color: var(--color-heading); margin: 0 32px 6px 0; font-size: 1.02rem; }
.cc-text { margin: 0 0 14px; font-size: .92rem; line-height: 1.5; }
.cc-text a, .cc-more a { color: var(--color-brand-primary); }
.cc-x {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px;
  display: grid; place-items: center; border: 0; background: transparent;
  color: var(--color-text-muted); border-radius: 50%; cursor: pointer;
}
.cc-x svg { width: 20px; height: 20px; }
.cc-x:hover { background: var(--color-background); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-btn {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 14px;
  font: 600 .95rem var(--font-body); border-radius: var(--radius); cursor: pointer;
  background: var(--color-brand-primary); color: #fff; border: 1px solid var(--color-brand-primary);
}
.cc-btn:hover { background: var(--color-brand-primary-hover); }
.cc-btn--plain { background: transparent; color: var(--color-brand-primary); }
.cc-btn--plain:hover { background: var(--color-accent-soft); }
.cc-btn:focus-visible, .cc-x:focus-visible, .cc-switch input:focus-visible + span { outline: 3px solid var(--color-focus); outline-offset: 2px; }
@media (max-width: 420px) { .cc-btn--plain { flex-basis: 100%; order: 3; } }

.cc-modal {
  position: fixed; inset: 0; z-index: 1001; display: grid; place-items: center; padding: 16px;
  background: rgba(0, 27, 58, .55);
}
.cc-dialog {
  width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--color-surface); color: var(--color-text); border-radius: var(--radius-lg);
  padding: 22px 20px 18px; font-family: var(--font-body); outline: none;
}
.cc-cat { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; }
.cc-cat p { margin: 6px 0 0; font-size: .9rem; color: var(--color-text-muted); }
.cc-cat__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; color: var(--color-heading); }
label.cc-cat__head { cursor: pointer; }
.cc-always { font-size: .82rem; font-weight: 500; color: var(--color-text-muted); }
.cc-more { font-size: .9rem; margin: 4px 0 14px; }
.cc-switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-switch span { position: absolute; inset: 0; border-radius: 13px; background: #b8c6d2; transition: background .2s; pointer-events: none; }
.cc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.cc-switch input:checked + span { background: var(--color-brand-primary); }
.cc-switch input:checked + span::after { transform: translateX(20px); }
.cc-lock, .cc-lock body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .cc-switch span, .cc-switch span::after { transition: none; } }
@media (max-width: 480px) { .cc-dialog .cc-actions { flex-direction: column; } .cc-dialog .cc-btn { flex: 0 0 auto; } }
@media (max-width: 600px) {
  .table-wrap { border: 0; background: transparent; overflow: visible; }
  .legal table, .legal tbody, .legal tr, .legal td { display: block; width: 100%; }
  .legal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal tr { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 10px; padding: 4px 0; }
  .legal td { border: 0; padding: 6px 14px; }
  .legal td::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 2px; }
}
