/* Preview home only. The supplied 2560px-wide desktop capture is the reference;
   readable bounds take priority over proportional shrinking on small screens. */
html body #page-home.home-scroll-page {
    --home-gutter: clamp(20px, 5vw, 100px);
    --home-display-size: clamp(46px, min(4.1vw, 9svh), 120px);
    --home-copy-size: clamp(16px, .8vw, 22px);
    --home-control-size: clamp(15px, .67vw, 18px);
}
html body #page-home.home-scroll-page .home-hero-surface {
    padding: max(96px, calc(var(--site-header-h, 90px) + 24px)) var(--home-gutter)
        max(96px, var(--home-section-bottom, 100px));
    min-height: 100svh;
}
html body #page-home.home-scroll-page .hero-content-left {
    width: 100%;
    max-width: 1480px;
    min-width: 0;
    flex: 0 1 auto;
    text-align: center;
}
html body #page-home.home-scroll-page .main-title .text-fill {
    font-size: var(--home-display-size) !important;
    line-height: 1.08 !important;
}
html body #page-home.home-scroll-page .line-1-wrapper {
    margin-bottom: clamp(4px, .85svh, 10px);
}
html body #page-home.home-scroll-page .home-panel--title .home-intro-copy {
    font-size: var(--home-copy-size) !important;
    line-height: 1.6 !important;
    margin-top: clamp(20px, 2.55svh, 32px) !important;
    max-width: 100%;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
html body #page-home.home-scroll-page .home-intro-copy br { display: initial; }
html body #page-home .home-hero-actions {
    margin-top: clamp(24px, 3.5svh, 44px);
    gap: clamp(10px, .65vw, 18px);
}
html body #page-home .home-hero-actions .home-view-more {
    font-size: var(--home-control-size);
    padding: clamp(12px, 1.35svh, 17px) clamp(26px, 1.75vw, 48px);
    min-height: 44px;
    box-sizing: border-box;
    white-space: nowrap;
}

/* Keep later sections within safe header/cue insets, but allow document flow
   when content needs more height instead of scaling text to illegible sizes. */
html body #page-home.home-scroll-page .home-editorial:not(.home-contact-strip) {
    padding-inline: var(--home-gutter) !important;
    min-height: 100svh !important;
}
html body #page-home .home-section-inner { min-width: 0; }
html body #page-home :is(.home-approach, .home-services, .home-faq) .home-section-title {
    font-size: clamp(44px, min(4.1vw, 7.8svh), 78px);
}
html body #page-home .home-approach .home-section-inner {
    max-width: clamp(900px, calc((100svh - 380px) * 3.57), 1240px);
}
html body #page-home.home-scroll-page .home-editorial.home-approach .home-approach-description {
    font-size: clamp(17px, 1.2vw, 20px);
    line-height: 1.6;
    margin-block: clamp(24px, 3svh, 36px);
    text-wrap: pretty;
}
html body #page-home .home-process { margin-bottom: clamp(28px, 4svh, 48px); }
html body #page-home.home-scroll-page .home-process strong {
    font-size: clamp(23px, 2vw, 34px);
}
html body #page-home.home-scroll-page .home-process-copy {
    font-size: clamp(15px, 1.1vw, 17px);
}
html body #page-home .home-service-row { padding-block: clamp(18px, 2.4svh, 28px); }
html body #page-home :is(.home-approach-action, .home-service-action, .home-faq-action) .home-action {
    font-size: clamp(15px, 1.1vw, 17px);
    min-height: 44px;
    box-sizing: border-box;
    padding: clamp(12px, 1.4svh, 15px) clamp(16px, 1.5vw, 22px);
}
html body #page-home .home-contact-strip #home-projects-title {
    font-size: clamp(22px, 1.65vw, 34px);
    overflow-wrap: anywhere;
    text-wrap: pretty;
}
html body #page-home .home-contact-marquee {
    width: calc(100% + 2 * var(--home-gutter));
}
html body #page-home.home-scroll-page .home-editorial.home-contact-strip {
    padding-inline: var(--home-gutter) !important;
}
html body.is-home-active .page-footer.footer-three-column {
    --footer-text-size: clamp(15px, 1.25vw, 18px);
}

@media (min-width: 769px) and (max-width: 1100px) {
    html body #page-home .home-services .home-section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
    html body #page-home .home-services .home-service-row {
        grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.25fr) 44px;
        gap: 16px;
    }
    html body #page-home .home-circle-arrow { width: 44px; height: 44px; }
    html body #page-home .home-editorial .home-service-copy p { font-size: 16px; }
}
@media (max-width: 900px) {
    /* Height-based circle widths used to squash the contents in landscape. */
    html body #page-home .home-process {
        width: 100%;
        max-width: 560px;
        margin-inline: auto;
        row-gap: 0;
    }
    html body #page-home .home-process li:nth-child(n + 3) { margin-top: -6%; }
}
@media (max-width: 768px) {
    html body #page-home.home-scroll-page {
        --home-display-size: clamp(24px, 8.1vw, 46px);
        --home-copy-size: clamp(14px, 3.55vw, 17px);
        --home-control-size: clamp(14px, 2.4vw, 15px);
    }
    html body #page-home .home-hero-actions .home-view-more {
        padding: 12px clamp(18px, 4.5vw, 32px);
    }
    html body #page-home :is(.home-approach, .home-services, .home-faq) .home-section-title {
        font-size: clamp(34px, 8vw, 56px);
    }
    html body #page-home .home-service-action { flex-wrap: wrap; }
    html body #page-home .home-service-action .home-action {
        font-size: clamp(13px, 3.5vw, 15px);
        padding: 12px clamp(10px, 2.5vw, 16px);
        gap: 5px;
    }
}
@media (max-width: 600px) {
    html body #page-home .home-process li { padding: 10px; }
    html body #page-home.home-scroll-page .home-process strong { font-size: clamp(18px, 4.7vw, 25px); }
    html body #page-home.home-scroll-page .home-process-copy { font-size: clamp(13px, 3.5vw, 15px); }
    html body #page-home.home-scroll-page .home-process-number {
        width: 36px; height: 36px; font-size: 13px; margin-bottom: 8px;
    }
    html body #page-home.home-scroll-page .home-editorial.home-approach .home-approach-description {
        font-size: 16px;
    }
}
@media (max-height: 600px) {
    html body #page-home.home-scroll-page .home-hero-surface {
        padding-top: calc(var(--site-header-h, 76px) + 20px);
        padding-bottom: 72px;
    }
    html body #page-home.home-scroll-page .home-panel--title .home-intro-copy { margin-top: 18px !important; }
    html body #page-home .home-hero-actions { margin-top: 20px; }
    html body.is-home-active #scroll-hint-overlay { bottom: max(20px, env(safe-area-inset-bottom, 0px)) !important; }
}
@media (max-width: 480px), (max-height: 500px) {
    html body.is-home-active #dt-launcher { width: 52px; height: 52px; }
    html body.is-home-active #dt-launcher .dt-chat-launcher-icon { width: 26px; height: 26px; }
}

/* The existing popup fitter preserves each image's aspect ratio and measures
   the control panel on resize. Keep controls readable instead of scaling it all. */
html body #dt-home-popup[data-preview="true"] {
    max-width: calc(100vw - 32px);
    max-height: calc(100svh - 32px);
}
html body #dt-home-popup[data-preview="true"] .dt-popup-dismiss label {
    font-size: clamp(12px, .65vw, 14px);
}
html body #dt-home-popup[data-preview="true"] .dt-popup-dismiss input {
    width: 14px; height: 14px; flex: 0 0 14px;
}
@media (max-height: 600px) {
    html body #dt-home-popup[data-preview="true"] .dt-popup-panel { padding: 6px 10px 10px; }
    html body #dt-home-popup[data-preview="true"] .dt-popup-navigation { margin-bottom: 4px; }
}
