/**
 * Floating controls (scroll-to-top) — contrast on light marketing canvas.
 * Loaded on all central marketing pages; pairs with marketing.js --on-hero toggle.
 */

body.mkt-theme-preset .mkt-scroll-top:not(.mkt-scroll-top--on-hero) {
    background: var(--mkt-primary-dark, var(--mkt-dark));
    color: #fff;
    border-color: rgb(255 255 255 / 14%);
    box-shadow:
        0 0 0 1px rgb(15 23 42 / 0.14),
        0 12px 32px -10px rgb(15 23 42 / 0.42);
}

body.mkt-theme-preset .mkt-scroll-top--on-hero {
    background: #fff;
    color: var(--mkt-primary-dark, var(--mkt-dark));
    border-color: rgb(255 255 255 / 72%);
    box-shadow:
        0 0 0 1px rgb(15 23 42 / 0.08),
        0 12px 32px -10px rgb(15 23 42 / 0.38);
}

body.mkt-theme-preset .mkt-scroll-top:hover {
    background: var(--mkt-primary);
    color: #fff;
    border-color: var(--mkt-primary);
    box-shadow: 0 14px 32px -10px rgb(var(--mkt-primary-rgb) / 45%);
}

body.mkt-theme-preset .mkt-scroll-top--on-hero:hover {
    background: var(--mkt-primary-dark, var(--mkt-dark));
    color: #fff;
    border-color: transparent;
}

.mkt-footer__brand,
.mkt-footer__brand:hover,
.mkt-footer__brand .mkt-brand__name--footer,
.mkt-footer__brand .mkt-brand__name-primary,
.mkt-footer__brand .mkt-brand__name-accent {
    text-decoration: none;
}

.mkt-footer--surface .mkt-footer__brand .mkt-brand__mark--footer,
.mkt-footer--surface .mkt-brand__mark--themed {
    filter: brightness(0) invert(1);
}

body.mkt-theme-preset:has(.mkt-sol-hero--landing) .mkt-header:not(.is-scrolled) .mkt-brand__mark--themed,
body.mkt-theme-preset:has(.mkt-sol-hero--landing) .mkt-header:not(.is-scrolled) .mkt-brand__mark--nav-icon {
    filter: brightness(0) invert(1);
}

body.mkt-theme-preset:has(.mkt-sol-hero--landing) .mkt-header.is-scrolled .mkt-brand__mark--themed,
body.mkt-theme-preset:has(.mkt-sol-hero--landing) .mkt-header.is-scrolled .mkt-brand__mark--nav-icon {
    filter: none;
}

.mkt-header:not(.mkt-header--hero) .mkt-nav__link {
    position: relative;
    padding-block: 0.35rem;
}

.mkt-header:not(.mkt-header--hero) .mkt-nav__link.is-active {
    color: var(--mkt-primary);
    font-weight: 700;
    box-shadow: none;
}

.mkt-header:not(.mkt-header--hero) .mkt-nav__link::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    background: var(--mkt-primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.mkt-header:not(.mkt-header--hero) .mkt-nav__link.is-active::after,
.mkt-header:not(.mkt-header--hero) .mkt-nav__link:hover::after {
    transform: scaleX(1);
}

body.mkt-theme-preset:has(.mkt-sol-hero--landing) .mkt-header:not(.is-scrolled):not(.mkt-header--hero) .mkt-nav__link.is-active {
    color: #fff;
}

body.mkt-theme-preset:has(.mkt-sol-hero--landing) .mkt-header:not(.is-scrolled):not(.mkt-header--hero) .mkt-nav__link::after {
    background: color-mix(in srgb, var(--mkt-accent) 88%, #fff);
}

.mkt-footer--surface .mkt-brand__name--footer .mkt-brand__name-primary,
body.mkt-theme-preset .mkt-footer--surface .mkt-brand__name--footer .mkt-brand__name-primary {
    background: none;
    -webkit-text-fill-color: #fff;
    color: #fff;
}

.mkt-footer--surface .mkt-brand__name--footer .mkt-brand__name-accent,
body.mkt-theme-preset .mkt-footer--surface .mkt-brand__name--footer .mkt-brand__name-accent {
    background: linear-gradient(118deg, var(--mkt-primary-50) 0%, color-mix(in srgb, var(--mkt-accent) 70%, #fff) 52%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.mkt-footer__grid--saas {
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
    gap: 2.5rem 2rem;
    padding-bottom: 2.5rem;
}

.mkt-footer__grid--saas .mkt-footer__address,
.mkt-footer__grid--saas .mkt-footer__email {
    display: block;
    max-width: 22rem;
    margin: 0.7rem 0 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgb(255 255 255 / 68%);
    text-decoration: none;
}

.mkt-footer__grid--saas .mkt-footer__email + .mkt-footer__email {
    margin-top: 0.35rem;
}

.mkt-footer__grid--saas .mkt-footer__email:hover {
    color: #fff;
}

.mkt-footer__grid--saas .mkt-footer__social {
    margin-top: 1.25rem;
}

.mkt-footer__bottom--saas {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
}

.mkt-footer__bottom--saas .mkt-footer__legal-bar {
    width: auto;
}

@media (max-width: 991px) {
    .mkt-footer__grid--saas {
        grid-template-columns: 1fr 1fr;
    }

    .mkt-footer__grid--saas .mkt-footer__brand-col {
        grid-column: 1 / -1;
    }
}

@media (max-width: 639px) {
    .mkt-footer__grid--saas {
        grid-template-columns: 1fr;
    }

    .mkt-footer__bottom--saas {
        flex-direction: column;
        align-items: flex-start;
    }
}

.ct-form {
    max-width: 44rem;
    margin-inline: auto;
    padding: 1.75rem 1.6rem 2rem;
    border: 1px solid var(--mkt-border, #e2e5de);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 40px -28px rgb(23 61 50 / 28%);
}

.ct-form__status,
.ct-form__error {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 4px;
    font-size: 0.92rem;
}

.ct-form__status {
    color: #173d32;
    background: #e8f3ec;
}

.ct-form__error {
    color: #7a1f1f;
    background: #f8e8e8;
}

.ct-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.15rem;
}

.ct-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.ct-field--wide {
    grid-column: 1 / -1;
}

.ct-field input:not([type="range"]),
.ct-field select {
    min-height: 2.85rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--mkt-border, #d5d8d2);
    border-radius: 6px;
    font: inherit;
    font-weight: 500;
    color: var(--mkt-text-primary, #202b26);
    background: #fff;
}

.ct-field input::placeholder {
    color: rgb(32 43 38 / 42%);
}

.ct-field input:focus,
.ct-field select:focus,
.ct-slider input:focus-visible {
    outline: 2px solid rgb(23 61 50 / 28%);
    outline-offset: 1px;
    border-color: var(--mkt-primary, #173d32);
}

.ct-slider__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.ct-slider__value {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--mkt-primary, #173d32);
}

.ct-slider input[type="range"] {
    width: 100%;
    margin-top: 0.65rem;
    accent-color: var(--mkt-primary, #173d32);
}

.ct-field em,
.ct-field__error {
    font-style: normal;
    font-weight: 600;
    color: #b42318;
}

.ct-channels {
    margin: 1.5rem 0 0;
    padding: 0;
    border: 0;
}

.ct-channels legend {
    font-size: 0.82rem;
    font-weight: 800;
}

.ct-channels__hint {
    margin: 0.4rem 0 0.85rem;
    font-size: 0.88rem;
    color: var(--mkt-text-secondary, #65716a);
}

.ct-channels__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.4rem, 1fr));
    gap: 0.65rem;
}

.ct-channel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 6.4rem;
    padding: 0.85rem 0.55rem 0.7rem;
    border: 1px solid var(--mkt-border, #d5d8d2);
    border-radius: 8px;
    background: #f7f6f1;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
}

.ct-channel img {
    width: 2.15rem;
    height: 2.15rem;
    object-fit: contain;
}

.ct-channel:has(input:focus-visible) {
    outline: 2px solid rgb(23 61 50 / 35%);
    outline-offset: 2px;
}

.ct-channel:has(input:checked) {
    border-color: var(--mkt-primary, #173d32);
    background: #fff;
    box-shadow: 0 10px 22px -16px rgb(23 61 50 / 55%);
}

.ct-channel__check {
    position: absolute;
    top: 0.4rem;
    inset-inline-end: 0.4rem;
    display: none;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    color: #fff;
    background: var(--mkt-primary, #173d32);
}

.ct-channel:has(input:checked) .ct-channel__check {
    display: flex;
}

.ct-form__submit {
    margin-top: 1.75rem;
}

@media (max-width: 639px) {
    .ct-form__grid {
        grid-template-columns: 1fr;
    }
}
