.home-origin {
    width: 100%;
    padding: clamp(112px, 12vw, 168px) clamp(24px, 5vw, 100px);
    background: var(--paper);
    color: var(--ink);
}

.home-origin-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(36px, 4vw, 64px);
    width: min(100%, 1480px);
    margin-inline: auto;
}

.home-origin-copy {
    max-width: 820px;
}

.home-origin-eyebrow {
    margin: 0 0 22px;
    color: var(--subtle);
    font-size: clamp(14px, 1.1vw, 17px);
}

.home-origin-title {
    display: grid;
    gap: 0;
    margin: 0;
    font-size: clamp(46px, 4.9vw, 72px);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.065em;
    text-transform: uppercase;
}

.home-origin-title-line {
    display: block;
    width: fit-content;
    max-width: 100%;
    white-space: nowrap;
}

.home-origin-title-line:first-child {
    white-space: normal;
    color: var(--muted);
    -webkit-text-fill-color: currentColor;
}

.home-origin-highlight {
    position: relative;
    z-index: 0;
    display: inline-block;
    isolation: isolate;
    margin-left: -0.07em;
    padding: 0.01em 0.07em 0.08em;
    color: var(--paper);
    background: var(--green);
}

.home-origin-copy > p:last-child {
    max-width: 66ch;
    margin: clamp(26px, 2.5vw, 38px) 0 0;
    color: var(--ink);
    font-size: clamp(16px, 1.35vw, 19px);
    line-height: 1.65;
}

.home-origin-scroll-text .home-origin-description-word {
    color: #aeb5b0;
    transition: color 220ms linear;
}

.home-origin-scroll-text .home-origin-description-word.is-filled {
    color: #111512;
}

.home-origin-scroll-spacer {
    display: none;
}

.home-origin-visual {
    width: calc(100% + 24px);
    min-width: 0;
    margin: 0;
}

.home-origin-visual picture {
    display: block;
}

.home-origin-visual img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1642 / 958;
    object-fit: contain;
}

@media (max-width: 980px) {
    .home-origin-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .home-origin-copy {
        max-width: 860px;
    }

    .home-origin-title {
        font-size: clamp(44px, 7vw, 64px);
    }

    .home-origin-visual {
        width: min(100%, 720px);
        justify-self: center;
    }
}

@media (max-width: 600px) {
    .home-origin {
        padding: 88px 22px 96px;
    }

    .home-origin-eyebrow {
        margin-bottom: 18px;
    }

    .home-origin-title {
        font-size: clamp(34px, 9vw, 52px);
        letter-spacing: -0.06em;
    }

    .home-origin-copy > p:last-child {
        margin-top: 22px;
        font-size: 16px;
        line-height: 1.6;
    }

    .home-origin-inner {
        gap: 30px;
    }

    .home-origin-visual {
        width: min(100%, 420px);
    }

    .home-origin-visual img {
        aspect-ratio: 1190 / 1322;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-origin-scroll-text .home-origin-description-word {
        transition: none;
    }
}

@media (min-width: 981px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
    .home-content.home-origin-scroll-active #perche-krymtech {
        position: sticky;
        top: 0;
        z-index: 0;
        display: flex;
        box-sizing: border-box;
        height: 100svh;
        min-height: 640px;
        align-items: center;
        padding-block: clamp(40px, 8vh, 84px);
    }

    .home-content.home-origin-scroll-active > .home-origin-scroll-spacer {
        display: block;
        height: 155svh;
    }

    .home-content > section:not(.home-origin) {
        position: relative;
        z-index: 1;
    }
}

.home-content > .home-faq,
.home-content > .home-reading {
    background: var(--paper);
}

.site-footer .footer-wordmark img {
    width: auto;
    height: 0.75em;
    flex: none;
}

/* Section headings use softer ink; highlighted keywords keep their own color. */
#contenuto-principale .home-content h2 {
    color: var(--muted);
}

/* Keep the service introductions centered and the process steps compact. */
#contenuto-principale .home-origin-title {
    font-size: clamp(44px, 4vw, 58px);
}

.home-content .home-macro .home-macro-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: clamp(24px, 3vw, 40px);
    text-align: center;
}

.home-content .home-macro .home-macro-heading h2 {
    max-width: 100%;
    margin: 0;
    text-align: center;
}

.home-content .home-macro .home-macro-intro {
    width: min(100%, 760px);
}

.home-content .home-macro .home-macro-intro > p {
    max-width: none;
    margin: 0;
    text-align: center;
}

.home-content .home-macro .home-method-viewport {
    margin-top: 20px;
    padding: 2px 0 8px;
}

.home-content .home-macro .home-method-steps {
    gap: 0;
}

.home-content .home-macro .home-method-steps li {
    padding: 14px 16px;
    border: 0;
    background: transparent;
    box-shadow: none;
    scroll-snap-align: start;
}

.home-content .home-macro .home-method-steps li + li {
    border-left: 1px solid var(--macro-line);
}

.home-content .home-macro .home-method-steps li:first-child,
.home-content .home-macro .home-method-steps li:last-child {
    padding-inline: 16px;
}

.home-content .home-macro .home-method-steps h3 {
    margin-top: 12px;
}

.home-content .home-macro .home-method-steps p {
    margin-bottom: 0;
}

.home-content .home-macro .home-carousel .home-work-card {
    flex-basis: calc((100% - 24px) / 2);
}

.home-content .home-macro-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0 28px;
    margin-top: 12px;
}

.home-content .home-macro-actions .text-link {
    margin-top: 0;
}

@media (max-width: 1100px) {
    .home-content .home-macro .home-method-steps {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: clamp(220px, 32vw, 280px);
    }
}

@media (max-width: 760px) {
    #contenuto-principale .home-origin-title {
        font-size: clamp(32px, 8vw, 44px);
    }

    .home-content .home-macro .home-macro-heading {
        gap: 12px;
    }

    .home-content .home-macro .home-method-steps {
        grid-auto-columns: clamp(220px, 76vw, 280px);
    }

    .home-content .home-macro .home-method-steps li {
        padding: 14px;
    }

    .home-content .home-macro .home-carousel .home-work-card {
        flex-basis: 63%;
    }

    .home-content .home-macro .home-method-steps li:first-child,
    .home-content .home-macro .home-method-steps li:last-child {
        padding-inline: 14px;
    }

    .home-content .home-macro-actions {
        gap: 8px 20px;
    }
}

/* Product illustrations keep their descriptive titles visible without an overlay. */
.home-content .home-macro--ai .home-carousel {
    width: 100%;
    margin-inline: auto;
}
.home-content .home-macro--ai .home-ai-preview-card {
    display: block;
    flex: 0 0 calc((100% - 24px) / 2);
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}
.home-ai-preview-card picture {
    display: block;
}
.home-ai-preview-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 7 / 5;
    border: 0;
    border-radius: 0;
    background: #edf0ea;
    object-fit: contain;
}
.home-ai-preview-card:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 4px;
}
.home-ai-preview-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin-top: 16px;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.4;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.home-ai-preview-card:is(:hover, :focus-visible) .home-ai-preview-cta {
    color: var(--green-hover);
}
.home-content .home-macro--ai .home-carousel-controls > button:disabled {
    opacity: 0;
    visibility: hidden;
}
@media (min-width: 1101px) {
    .home-content .home-macro--ai .home-carousel-controls {
        display: none;
    }
}
@media (max-width: 1100px) {
    .home-content .home-macro--ai .home-ai-preview-card {
        flex-basis: 78%;
    }
    .home-content .home-macro--ai .home-carousel-controls {
        top: auto;
        bottom: 46px;
    }
    .home-content .home-macro--ai .home-carousel-controls > button:first-child {
        right: 64px;
        left: auto;
    }
}
@media (max-width: 760px) {
    .home-content .home-macro--ai .home-carousel .home-work-grid {
        gap: 16px;
    }
    .home-content .home-macro--ai .home-ai-preview-card {
        flex-basis: 92%;
    }
}
