/* ==========================================================================
   1. Design Tokens
   La Baia del Silenzio di mattina presto: fondo di foschia fredda, testo
   blu profondo, ocra delle facciate di Sestri in piccole dosi. Il verde
   WhatsApp è funzionale: solo sui bottoni wa.me.
   ========================================================================== */

:root {
    --bg: #F4F7F8;
    --card: #FFFFFF;
    --ink: #0C2233;
    --ink-soft: #23405A;
    --slate: #5C7285;
    --muted: #4E6377;
    --line: #DBE2E8;
    --accent: #D9A036;
    --accent-ink: #96690D;
    --wa: #25D366;
    --wa-deep: #1DA851;
    --dark: #0C2233;
    --radius: 1rem;
    --font-display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
    --font-body: 'Instrument Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    padding: 0;
}

img, svg {
    display: block;
    max-width: 100%;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

[hidden] { display: none !important; }

section[id] { scroll-margin-top: 5rem; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

::selection {
    background-color: var(--accent);
    color: var(--ink);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate); }

/* ==========================================================================
   3. Layout
   ========================================================================== */

.container {
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 1024px) {
    .container { padding-left: 2rem; padding-right: 2rem; }
}

.section {
    position: relative;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .section { padding-top: 7rem; padding-bottom: 7rem; }
}

/* ==========================================================================
   4. Typography
   ========================================================================== */

h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.08;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.section-title {
    margin-bottom: 3rem;
    font-size: clamp(1.85rem, 4vw, 2.9rem);
    color: var(--ink);
    text-wrap: balance;
}

/* Section label: mono eyebrow with an ocra tick */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-soft);
}

.section-label::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    background-color: var(--accent);
    flex-shrink: 0;
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border-radius: 9999px;
    padding: 0.85rem 1.6rem;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn svg { width: 1.2rem; height: 1.2rem; flex-shrink: 0; }

/* WhatsApp green: reserved for wa.me actions */
.btn--wa {
    background-color: var(--wa);
    color: var(--ink);
}

.btn--wa:hover {
    background-color: #2FE175;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -10px rgba(12, 34, 51, 0.35);
}

.btn--ghost {
    border: 1.5px solid var(--ink);
    color: var(--ink);
    background-color: transparent;
}

.btn--ghost:hover {
    background-color: var(--ink);
    color: var(--card);
}

/* ==========================================================================
   6. Scroll progress
   ========================================================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--accent);
    z-index: 100;
    transition: width 0.1s linear;
}

/* ==========================================================================
   7. Header
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.header--scrolled {
    background-color: rgba(244, 247, 248, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.header__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 72rem;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .header__nav { padding-left: 2rem; padding-right: 2rem; }
}

.header__logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.header__desktop-nav {
    display: none;
    align-items: center;
    gap: 1.75rem;
}

@media (min-width: 768px) {
    .header__desktop-nav { display: flex; }
}

.header__nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.25s ease;
}

.header__nav-link:hover {
    color: var(--ink);
}

.header__cta-link {
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.5rem 1.15rem;
    background-color: var(--ink);
    color: var(--card);
    transition: background-color 0.25s ease;
}

.header__cta-link:hover {
    background-color: var(--ink-soft);
}

.header__lang-toggle {
    border-radius: 9999px;
    border: 1px solid var(--line);
    padding: 0.28rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    transition: border-color 0.25s ease, color 0.25s ease;
}

.header__lang-toggle:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.header__mobile-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .header__mobile-controls { display: none; }
}

.header__hamburger {
    color: var(--ink);
}

.header__hamburger svg {
    width: 1.4rem;
    height: 1.4rem;
}

/* Mobile overlay */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(244, 247, 248, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

@media (min-width: 768px) {
    .mobile-menu { display: none !important; }
}

.mobile-menu.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu__link {
    padding: 0.9rem;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--ink);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu.is-open .mobile-menu__link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.is-open .mobile-menu__link:nth-child(1) { transition-delay: 0ms; }
.mobile-menu.is-open .mobile-menu__link:nth-child(2) { transition-delay: 50ms; }
.mobile-menu.is-open .mobile-menu__link:nth-child(3) { transition-delay: 100ms; }
.mobile-menu.is-open .mobile-menu__link:nth-child(4) { transition-delay: 150ms; }
.mobile-menu.is-open .mobile-menu__link:nth-child(5) { transition-delay: 200ms; }

/* ==========================================================================
   8. Hero
   ========================================================================== */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 92vh;
    padding-top: 7rem;
    padding-bottom: 4rem;
}

.hero__grid {
    display: grid;
    align-items: center;
    gap: 3rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .hero__grid { grid-template-columns: minmax(0, 1fr) 30rem; gap: 4rem; }
}

.hero__headline {
    font-size: clamp(2.3rem, 5.2vw, 3.9rem);
    font-weight: 750;
    color: var(--ink);
    text-wrap: balance;
}

.hero__headline span { display: block; }

.hero__headline-accent em {
    font-style: normal;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 0.09em;
    text-underline-offset: 0.13em;
    text-decoration-skip-ink: none;
}

.hero__subtitle {
    max-width: 34rem;
    margin-top: 1.5rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--muted);
    text-wrap: pretty;
}

.hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2.25rem;
}

.hero__ctanote {
    margin-top: 0.9rem;
    font-size: 0.85rem;
    color: var(--muted);
    max-width: 30rem;
}

/* Entrance (CSS only) */
.hero__entrance {
    opacity: 0;
    animation: hero-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero__entrance--1 { animation-delay: 0.05s; }
.hero__entrance--2 { animation-delay: 0.15s; }
.hero__entrance--3 { animation-delay: 0.25s; }
.hero__entrance--4 { animation-delay: 0.35s; }

@keyframes hero-rise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   9. "Come ti vede l'AI" widget — the only dark block on the page
   ========================================================================== */

.hero__audit {
    width: 100%;
    max-width: 30rem;
    justify-self: center;
}

@media (min-width: 1024px) {
    .hero__audit { justify-self: end; }
}

.audit {
    background-color: var(--dark);
    color: #E8EEF2;
    border-radius: 1.15rem;
    padding: 1.5rem;
    box-shadow: 0 30px 70px -30px rgba(12, 34, 51, 0.55);
}

.audit__head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.audit__dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background-color: var(--accent);
    animation: audit-pulse 2.4s ease-in-out infinite;
}

@media (max-width: 767px) {
    .audit__form input { font-size: 1rem; }
}

@keyframes audit-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.audit__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FFFFFF;
}

.audit__intro {
    font-size: 0.85rem;
    line-height: 1.55;
    color: #A9BAC7;
    margin-bottom: 1rem;
}

.audit__form {
    display: flex;
    gap: 0.5rem;
}

.audit__form input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    border-radius: 0.6rem;
    border: 1px solid #2C4B64;
    background-color: #142E44;
    padding: 0.7rem 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #FFFFFF;
    outline: none;
    transition: border-color 0.25s ease;
}

.audit__form input::placeholder {
    color: #6C8296;
}

.audit__form input:focus {
    border-color: var(--accent);
}

.audit__form button {
    min-height: 44px;
    border-radius: 0.6rem;
    background-color: var(--accent);
    color: var(--ink);
    padding: 0.7rem 1.1rem;
    font-weight: 700;
    font-size: 0.875rem;
    transition: background-color 0.25s ease;
}

.audit__form button:hover { background-color: #E5B152; }
.audit__form button:disabled { opacity: 0.55; cursor: wait; }

.audit__demo {
    margin-top: 1.1rem;
    border: 1px solid #21415A;
    border-radius: 0.75rem;
    padding: 0.85rem 0.95rem;
    background-color: #0F2A3F;
}

.audit__error {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: #F5B7A6;
}

.audit__error a {
    color: var(--wa);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.audit__status {
    margin-top: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #A9BAC7;
}

.audit__bridge {
    margin-top: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #C8D4DD;
}

.audit__panels {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 1.1rem;
}

.audit__panel {
    border: 1px solid #21415A;
    border-radius: 0.75rem;
    padding: 0.85rem 0.95rem;
    background-color: #0F2A3F;
}

.audit__label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 0.45rem;
}

.audit__out {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.65;
    color: #DEE8EE;
    min-height: 1.3em;
    white-space: pre-wrap;
}

.audit__out.is-streaming::after {
    content: "▋";
    color: var(--accent);
    animation: audit-blink 0.9s steps(1) infinite;
}

@keyframes audit-blink {
    50% { opacity: 0; }
}

.audit__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    border-radius: 9999px;
    background-color: var(--wa);
    color: var(--ink);
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: background-color 0.25s ease;
}

.audit__cta:hover { background-color: #2FE175; }

.audit__disclaimer {
    margin-top: 0.8rem;
    font-size: 0.74rem;
    color: #8FA3B3;
}

/* ==========================================================================
   10. Stats
   ========================================================================== */

.stats {
    padding: 3.5rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background-color: var(--card);
}

.stats__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
}

@media (min-width: 768px) {
    .stats__grid { grid-template-columns: repeat(4, 1fr); }
}

.stat__value {
    font-family: var(--font-mono);
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.stat__label {
    margin-top: 0.35rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--muted);
    max-width: 14rem;
}

.stats__note {
    margin-top: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
}

/* ==========================================================================
   11. Offers (bento)
   ========================================================================== */

.offers__grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 700px) {
    .offers__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .offers__grid { grid-template-columns: repeat(6, 1fr); }
    .offer-card { grid-column: span 3; }
    .offer-card--wide { grid-column: span 6; }
}

@media (min-width: 700px) and (max-width: 1023px) {
    .offer-card--wide { grid-column: span 2; }
}

.offer-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background-color: var(--card);
    padding: 1.75rem;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.offer-card:hover {
    border-color: var(--slate);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -24px rgba(12, 34, 51, 0.25);
}

.offer-card__cols {
    display: grid;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 900px) {
    .offer-card__cols { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; }
}

.offer-card__main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.offer-card::before {
    content: attr(data-n) " /05";
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--accent-ink);
    margin-bottom: 1rem;
}

.offer-card__icon {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 1.1rem;
    border-radius: 0.65rem;
    border: 1px solid var(--line);
    background-color: var(--bg);
    padding: 0.6rem;
}

.offer-card__icon svg {
    width: 1.35rem;
    height: 1.35rem;
    color: var(--ink);
}

.offer-card__title {
    margin-bottom: 0.6rem;
    font-size: 1.3rem;
}

.offer-card__problem {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.55;
    color: var(--ink-soft);
}

.offer-card__what {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--muted);
    flex: 1;
}

.offer-card__price {
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--line);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-ink);
    align-self: stretch;
}

/* ==========================================================================
   12. Chat mockup (WhatsApp light, inside the chatbot card)
   ========================================================================== */

.offer-card__chat {
    width: 100%;
    max-width: 22rem;
    justify-self: center;
}

.chat-mock {
    border-radius: 1rem;
    border: 1px solid var(--line);
    background-color: #EFEAE2;
    overflow: hidden;
    box-shadow: 0 18px 40px -26px rgba(12, 34, 51, 0.35);
}

.chat-mock__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    background-color: #F0F2F5;
    border-bottom: 1px solid var(--line);
}

.chat-mock__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background-color: var(--ink);
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 700;
}

.chat-mock__meta {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.chat-mock__name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
}

.chat-mock__status {
    font-size: 0.72rem;
    color: var(--muted);
}

.chat-mock__body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem 0.9rem 1.15rem;
    min-height: 17rem;
}

.chat-bubble {
    max-width: 86%;
    border-radius: 0.75rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.83rem;
    line-height: 1.5;
    color: var(--ink);
    box-shadow: 0 1px 1px rgba(12, 34, 51, 0.08);
}

.chat-bubble--in {
    align-self: flex-start;
    background-color: #FFFFFF;
    border-bottom-left-radius: 0.25rem;
}

.chat-bubble--out {
    align-self: flex-end;
    background-color: #D9FDD3;
    border-bottom-right-radius: 0.25rem;
}

/* Steps hidden until revealed */
.chat-step {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.chat-step.is-shown {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Typing indicator */
.chat-bubble__typing { display: none; gap: 0.25rem; align-items: center; height: 1.3em; }
.chat-bubble__typing i {
    width: 0.33rem;
    height: 0.33rem;
    border-radius: 50%;
    background-color: var(--slate);
    animation: typing-dot 1s ease-in-out infinite;
}
.chat-bubble__typing i:nth-child(2) { animation-delay: 0.15s; }
.chat-bubble__typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-dot {
    0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

.chat-bubble.is-typing .chat-bubble__typing { display: inline-flex; }
.chat-bubble.is-typing .chat-bubble__text { display: none; }

/* Voice message */
.chat-bubble--voice {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 58%;
}

.chat-voice__play {
    width: 0;
    height: 0;
    border-top: 0.38rem solid transparent;
    border-bottom: 0.38rem solid transparent;
    border-left: 0.58rem solid var(--slate);
    flex-shrink: 0;
}

.chat-voice__wave {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    height: 1.15rem;
}

.chat-voice__wave i {
    flex: 1;
    border-radius: 2px;
    background-color: var(--slate);
}

.chat-voice__wave i:nth-child(odd)  { height: 40%; }
.chat-voice__wave i:nth-child(even) { height: 85%; }
.chat-voice__wave i:nth-child(3n)   { height: 60%; }

.chat-voice__time {
    font-size: 0.68rem;
    color: var(--muted);
}

/* Confirmation tag */
.chat-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-end;
    border-radius: 9999px;
    border: 1px solid rgba(12, 34, 51, 0.18);
    background-color: #FFFFFF;
    padding: 0.3rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink);
}

.chat-tag svg { width: 0.85rem; height: 0.85rem; color: var(--accent-ink); }

/* ==========================================================================
   13. Sectors
   ========================================================================== */

.sectors { position: relative; }

.sectors__bg {
    position: absolute;
    inset: 0;
    background-color: var(--card);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    pointer-events: none;
}

.sectors__inner { position: relative; }

.sectors__grid {
    display: grid;
    gap: 2.5rem 2rem;
}

@media (min-width: 640px) {
    .sectors__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .sectors__grid { grid-template-columns: repeat(3, 1fr); }
}

.sector {
    border-top: 2px solid var(--ink);
    padding-top: 1.4rem;
}

.sector__case {
    margin-top: 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--accent-ink);
}

.sector__title {
    margin-bottom: 0.6rem;
    font-size: 1.15rem;
}

.sector__desc {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--muted);
}

/* ==========================================================================
   14. Proof
   ========================================================================== */

.proof__grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .proof__grid { grid-template-columns: 1.2fr 0.8fr; gap: 3rem; }
}

.proof__case {
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--ink-soft);
    text-wrap: pretty;
}

.proof__cite {
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--slate);
}

.proof__side {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    align-self: center;
}

.proof__products {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--muted);
}

.proof__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.proof__badge {
    border-radius: 9999px;
    border: 1px solid var(--line);
    background-color: var(--card);
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink);
}

.proof__badge--meta {
    border-color: var(--accent);
    color: var(--accent-ink);
}

.proof__meta {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--muted);
}

/* Mid-page CTA band */
.cta-band {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background-color: var(--card);
    padding: 3rem 0;
}

.cta-band__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.cta-band__text {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Products shelf */
.proof__kicker {
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--slate);
}

.proof-shelf {
    list-style: none;
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.proof-shelf > li {
    flex: 0 0 78vw;
    max-width: 20rem;
    scroll-snap-align: start;
    display: flex;
}

@media (min-width: 768px) {
    .proof-shelf {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow: visible;
        margin: 0;
        padding: 0;
    }
    .proof-shelf > li { max-width: none; }
}

@media (min-width: 1024px) {
    .proof-shelf { grid-template-columns: repeat(4, 1fr); }
}

.proof-shelf__card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    min-height: 9rem;
    background-color: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

a.proof-shelf__card:hover {
    border-color: var(--slate);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -24px rgba(12, 34, 51, 0.25);
}

a.proof-shelf__card:hover .proof-shelf__foot { color: var(--ink); }

.proof-shelf__head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.proof-shelf__dot {
    width: 0.55rem;
    height: 0.55rem;
    flex-shrink: 0;
}

.proof-shelf__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.proof-shelf__status {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-ink);
    border: 1px solid var(--accent);
    border-radius: 9999px;
    padding: 0.2rem 0.6rem;
    white-space: nowrap;
}

.proof-shelf__desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--muted);
}

.proof-shelf__foot {
    margin-top: auto;
    padding-top: 0.8rem;
    border-top: 1px dashed var(--line);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--slate);
    transition: color 0.25s ease;
}

/* Selected projects: porta discreta, niente griglia né CTA */
.selected {
    padding-top: 0;
}

.selected .section-title {
    margin-bottom: 1.4rem;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.selected__text {
    max-width: 46rem;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--slate);
}

/* ==========================================================================
   15. About
   ========================================================================== */

.about {
    background-color: var(--card);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.about__inner { max-width: 52rem; }

.about__lines {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.about__lines li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink-soft);
}

.about__lines li:last-child { border-bottom: none; }

.about__coords {
    margin-top: 2rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--slate);
}

/* ==========================================================================
   16. FAQ
   ========================================================================== */

.faq__inner { max-width: 52rem; }

.faq__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--card);
    transition: border-color 0.25s ease;
}

.faq-item:hover { border-color: var(--slate); }

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent-ink);
    transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 1.35rem 1.2rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--muted);
}

/* ==========================================================================
   17. Contact
   ========================================================================== */

.contact {
    background-color: var(--card);
    border-top: 1px solid var(--line);
}

.contact__bg { display: none; }

.contact__inner { position: relative; }

.contact__subtitle {
    margin-bottom: 2rem;
    max-width: 38rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--muted);
    text-wrap: pretty;
}

.contact__wa {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.contact__or {
    font-size: 0.875rem;
    color: var(--muted);
}

.contact__grid {
    display: grid;
    gap: 3rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .contact__grid { grid-template-columns: 1fr 0.62fr; gap: 5rem; }
}

.contact__aside {
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
}

.contact__aside-title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.contact__aside-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
}

.contact__aside-list li::before {
    content: "\2192\0020";
    font-family: var(--font-mono);
    color: var(--accent-ink);
}

.contact__aside-address {
    margin-top: 2rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--slate);
}

.contact-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--muted);
    cursor: pointer;
    max-width: 34rem;
}

.contact-form__consent input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
    accent-color: var(--ink);
    flex-shrink: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-form__row {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .contact-form__row { grid-template-columns: 1fr 1fr; }
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border-radius: 0.65rem;
    border: 1px solid var(--line);
    background-color: var(--bg);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: var(--font-body);
    color: var(--ink);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--slate);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(12, 34, 51, 0.08);
    background-color: var(--card);
}

.contact-form textarea { resize: none; }

.contact-form__submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    background-color: var(--ink);
    padding: 0.8rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--card);
    transition: background-color 0.25s ease;
    align-self: flex-start;
}

.contact-form__submit:hover {
    background-color: var(--ink-soft);
}

.contact-form__submit svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.25s ease;
}

.contact-form__submit:hover svg { transform: translateX(4px); }

.contact-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.contact-form__feedback {
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.contact-form__feedback--success {
    background-color: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(29, 168, 81, 0.4);
    color: #14683A;
}

.contact-form__feedback--error {
    background-color: rgba(200, 60, 40, 0.08);
    border: 1px solid rgba(200, 60, 40, 0.35);
    color: #9E2F1D;
}

.contact__note {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--muted);
    max-width: 32rem;
}

.g-recaptcha {
    transform: scale(0.9);
    transform-origin: 0 0;
}

/* ==========================================================================
   18. Footer
   ========================================================================== */

.footer {
    border-top: 1px solid var(--line);
    background-color: var(--card);
    padding: 2rem 0 5rem;
}

@media (min-width: 768px) {
    .footer { padding-bottom: 2rem; }
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
}

.footer__legal { opacity: 0.8; }

.footer__legal a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.footer__marks {
    margin-top: 1rem;
    font-size: 0.7rem;
    color: var(--slate);
    text-align: center;
}

@media (min-width: 640px) {
    .footer__marks { text-align: left; }
}

@media (min-width: 640px) {
    .footer__inner { flex-direction: row; text-align: left; }
}

/* Legal / privacy page */
.legal__header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--line);
}

.legal__body {
    max-width: 46rem;
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.legal__body h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    margin-bottom: 0.75rem;
}

.legal__updated {
    font-size: 0.85rem;
    color: var(--slate);
    margin-bottom: 2rem;
}

.legal__body h2 {
    font-size: 1.2rem;
    margin: 2rem 0 0.6rem;
}

.legal__body h3 {
    font-size: 1rem;
    margin: 1.25rem 0 0.4rem;
}

.legal__body p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--muted);
}

.legal__back { margin-top: 3rem; }

.legal__back a {
    font-weight: 600;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* ==========================================================================
   19. Mobile sticky WhatsApp CTA
   ========================================================================== */

.mobile-cta {
    position: fixed;
    left: 50%;
    bottom: max(1rem, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 35;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    background-color: var(--wa);
    color: var(--ink);
    padding: 0.8rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 14px 34px -12px rgba(12, 34, 51, 0.45);
    white-space: nowrap;
}

.mobile-cta svg { width: 1.1rem; height: 1.1rem; }

.mobile-cta.is-hidden {
    transform: translateX(-50%) translateY(150%);
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 768px) {
    .mobile-cta { display: none; }
}

/* ==========================================================================
   20. Scroll reveal
   ========================================================================== */

.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--delay, 0ms);
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal--sm {
    transform: translateY(14px);
}

/* ==========================================================================
   21. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .scroll-reveal,
    .chat-step,
    .hero__entrance {
        transition-duration: 0.01ms;
        animation-duration: 0.01ms;
        animation-delay: 0s;
        opacity: 1;
        transform: none;
    }

    .chat-bubble__typing i,
    .audit__dot,
    .audit__out.is-streaming::after {
        animation: none;
    }
}
