html,
body {
    margin: 0;
    min-height: 100%;
    overscroll-behavior-y: none;
}

html {
    scroll-padding-top: var(--fonte-public-scroll-offset);
}

[id] {
    scroll-margin-top: var(--fonte-public-scroll-offset);
}

body {
    background: var(--fonte-web-white);
    color: var(--fonte-web-ink);
    font-family: var(--fonte-font-public);
}

@media (min-width: 47.501rem) {
    .fonte-call-to-action .fonte-call-to-action__button {
        padding-right: 10px;
    }

    .fonte-call-to-action .fonte-call-to-action__button i {
        width: calc(3.5rem - 20px);
        height: calc(3.5rem - 20px);
    }

    .public-home .fonte-hero__cta--primary {
        padding: 10px 10px 10px 0;
    }

    .public-home .fonte-hero__cta--primary [data-dot] {
        width: calc(4rem - 20px - 2 * var(--fonte-border-width));
        height: calc(4rem - 20px - 2 * var(--fonte-border-width));
    }

    .public-home .fonte-hero__cta--primary [data-dot] svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 47.5rem), (any-pointer: coarse) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
}

@media (max-width: 47.5rem) {
    main > section:not(.fonte-hero):not(.fonte-page-hero):not(.fonte-apartment-detail__hero):not(.fonte-key-numbers):not(.fonte-gallery-categories):not(.fonte-gallery-collections):not(.fonte-intro):not(.fonte-apartment-offer) {
        padding-block: 3.125rem;
    }

    main > section:not(.fonte-hero):not(.fonte-page-hero) > h2,
    main > section:not(.fonte-hero):not(.fonte-page-hero) > header h2,
    main > section:not(.fonte-hero):not(.fonte-page-hero) [class$="__header"] h2,
    main > section:not(.fonte-hero):not(.fonte-page-hero) [class$="__heading"] h2,
    main > section:not(.fonte-hero):not(.fonte-page-hero) [class$="__content"] > h2 {
        font-size: 1.875rem;
    }

    main > section:not(.fonte-hero):not(.fonte-page-hero) > header p,
    main > section:not(.fonte-hero):not(.fonte-page-hero) [class$="__header"] > p,
    main > section:not(.fonte-hero):not(.fonte-page-hero) [class$="__heading"] > p,
    main > section:not(.fonte-hero):not(.fonte-page-hero) [class$="__content"] > h2 + p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .fonte-button,
    .fonte-project-standard__download {
        box-sizing: border-box;
        max-width: 100%;
        padding-inline: 1rem !important;
        font-size: 0.875rem !important;
        transition: transform 140ms ease, filter 140ms ease;
    }

    /* Shared size for mobile action buttons; applies over page-specific sizing. */
    :is(
        .fonte-button,
        :where(.fonte-blog-card.is-featured) .fonte-blog-card__link,
        .fonte-project-standard__download,
        .fonte-hero__cta,
        .fonte-hero__mobile-plan-cta,
        .fonte-intro__cta,
        .fonte-key-numbers__cta,
        .fonte-locality__cta,
        .fonte-gallery__cta,
        .fonte-developer__cta,
        .fonte-developer__references a,
        .fonte-call-to-action__button,
        .fonte-apartment-types__all,
        .fonte-apartment-card__choose,
        .fonte-apartment-offer__advice,
        .fonte-apartment-offer__compare,
        .fonte-apartment-comparison__clear,
        .fonte-contact__submit,
        .fonte-footer__subscribe-button,
        .fonte-gallery-category,
        .fonte-blog-categories button,
        .fonte-apartment-types__tabs button,
        .fonte-apartment-detail__tabs button,
        .fonte-apartment-offer__tabs button,
        .fonte-apartment-offer__pagination button,
        .fonte-apartment-selection-bar button,
        .fonte-apartment-offer__filter--types button
    ) {
        box-sizing: border-box;
        height: var(--fonte-mobile-button-height) !important;
        min-height: var(--fonte-mobile-button-height) !important;
        padding-block: 0 !important;
        max-width: 100%;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .fonte-apartment-selection-bar button,
    .fonte-apartment-offer__pagination button {
        width: var(--fonte-mobile-button-height) !important;
        flex-shrink: 0;
    }

    .fonte-apartment-offer__pagination button {
        width: 35px !important;
        height: 35px !important;
        min-height: 35px !important;
    }

    .fonte-hero__actions .fonte-hero__cta,
    .fonte-project-intro__actions .fonte-button,
    .fonte-page-hero__actions .fonte-button {
        font-size: 0.875rem !important;
    }

    .fonte-apartment-selection-bar__controls {
        grid-template-columns: repeat(auto-fit, minmax(var(--fonte-mobile-button-height), 1fr)) !important;
    }

    .fonte-apartment-offer__pagination {
        flex-wrap: wrap;
    }

    .public-home .fonte-apartment-types__all,
    .public-home .fonte-gallery__cta,
    .fonte-call-to-action .fonte-call-to-action__button {
        padding-right: 6px;
    }

    .public-home .fonte-apartment-types__all {
        gap: 8px;
    }

    .public-home .fonte-apartment-types__all i,
    .public-home .fonte-gallery__cta i,
    .fonte-call-to-action .fonte-call-to-action__button i {
        flex: none;
        width: calc(var(--fonte-mobile-button-height) - 12px);
        height: calc(var(--fonte-mobile-button-height) - 12px);
    }

    .public-home .fonte-apartment-types__all i svg,
    .public-home .fonte-gallery__cta i svg,
    .fonte-call-to-action .fonte-call-to-action__button i svg {
        width: 14px;
        height: 14px;
    }

    .public-home .fonte-hero__actions .fonte-hero__cta--primary {
        padding: 5px !important;
        gap: 4px !important;
    }

    .public-home .fonte-hero__actions .fonte-hero__cta--primary > span {
        height: auto;
        padding-inline: 6px 4px !important;
    }

    .public-home .fonte-hero__actions .fonte-hero__cta--primary [data-dot] {
        width: calc(var(--fonte-mobile-button-height) - 12px);
        height: calc(var(--fonte-mobile-button-height) - 12px);
    }

    .public-home .fonte-hero__actions .fonte-hero__cta--primary [data-dot] svg {
        width: 14px;
        height: 14px;
    }

    :is(button, [role="button"], .fonte-button, [class*="__cta"], [class*="__button"], [class*="__choose"], .fonte-apartment-types__all) {
        transition-property: scale;
        transition-duration: 120ms;
        transition-timing-function: ease;
    }

    :is(button, [role="button"], .fonte-button, [class*="__cta"], [class*="__button"], [class*="__choose"], .fonte-apartment-types__all):active {
        scale: 0.97;
    }
}

button,
input,
select,
textarea {
    font: inherit;
}

/* Shared public action primitive: filled actions have no border; outlined actions do. */
@media (max-width: 27.5rem) {
    .fonte-hero__actions .fonte-hero__cta,
    .fonte-project-intro__actions .fonte-button,
    .fonte-page-hero__actions .fonte-button,
    .fonte-call-to-action__actions .fonte-button {
        padding-inline: 0.5rem !important;
        font-size: 0.875rem !important;
        gap: 0.25rem !important;
    }

    .fonte-page-hero__actions:has(> a:nth-child(2)):not(.public-locality .fonte-page-hero__actions, .public-gallery-page .fonte-page-hero__actions, .public-blog .fonte-page-hero__actions) {
        grid-template-columns: max-content minmax(0, 1fr) !important;
    }
}

@media (max-width: 22.5rem) {
    .public-home .fonte-hero__actions .fonte-hero__cta--secondary {
        padding-inline: 4px !important;
    }

    .fonte-page-hero__actions .fonte-button {
        padding-inline: 0.375rem !important;
    }

    .fonte-page-hero__actions .fonte-button svg {
        width: 1rem;
        height: 1rem;
        flex-basis: 1rem;
    }

    .fonte-hero__text h1 .fonte-hero__title-final {
        display: inline !important;
        white-space: normal !important;
    }
}

.fonte-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--fonte-button-icon-gap);
    height: var(--fonte-button-height);
    padding: 0 var(--fonte-button-inline-padding);
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--fonte-token-radius-pill);
    color: var(--fonte-button-color);
    font-family: var(--fonte-button-font-family, var(--fonte-font-public));
    font-size: var(--fonte-button-font-size, var(--fonte-type-public-button));
    font-weight: var(--fonte-button-font-weight, var(--fonte-font-weight-bold));
    letter-spacing: var(--fonte-button-letter-spacing, normal);
    line-height: 1;
    text-decoration: none;
    transition: color 0.95s cubic-bezier(0.19, 1, 0.22, 1);
}

.fonte-button::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: var(--fonte-button-hover-background);
    content: "";
    transform: translateY(101%);
    transition: transform 1.6s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}

.fonte-button > * {
    position: relative;
    z-index: 2;
}

.fonte-button--filled {
    border: 0;
    background: var(--fonte-button-background);
}

.fonte-button--outline {
    border: var(--fonte-border-width) solid var(--fonte-button-border-color);
    background: transparent;
}

/* Shared interaction for standalone arrow, chevron and close controls. */
.fonte-icon-control {
    transition: border-color 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

.fonte-icon-control::before {
    display: none !important;
}

.fonte-icon-control--close svg {
    transition: transform 280ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

@media (min-width: 75.001rem) and (hover: hover) and (pointer: fine) {
    .fonte-icon-control:hover,
    .fonte-icon-control:focus-visible {
        border-color: var(--fonte-web-ink-32) !important;
        background-color: var(--fonte-web-cream) !important;
        color: var(--fonte-web-ink) !important;
        box-shadow: inset 0 0 0 var(--fonte-border-width) var(--fonte-web-ink-32), 0 0.375rem 1rem var(--fonte-web-ink-16);
    }

    .fonte-icon-control--close:hover svg,
    .fonte-icon-control--close:focus-visible svg {
        transform: rotate(90deg);
    }
}

@media (min-width: 75.001rem) and (hover: hover) and (pointer: fine) {
    .fonte-button:hover::before,
    .fonte-button:focus-visible::before {
        transform: translateY(0);
    }

    .fonte-button:hover,
    .fonte-button:focus-visible {
        color: var(--fonte-button-hover-color);
    }
}

/* Touch devices keep each button's resting colours and use motion only as tap feedback. */
@media (max-width: 75rem), (hover: none), (pointer: coarse) {
    .fonte-button:is(:hover, :focus-visible, :active) {
        color: var(--fonte-button-color);
    }

    .fonte-button::before,
    .fonte-roll::before {
        display: none !important;
    }
}

h1,
h2,
h3,
h4 {
    font-family: var(--fonte-font-public-display);
    font-weight: var(--fonte-font-weight-regular);
}

.fonte-type-body {
    font-family: var(--fonte-font-public);
}

.fonte-type-display {
    font-family: var(--fonte-font-public-display);
    font-weight: var(--fonte-font-weight-regular);
}

@media (prefers-reduced-motion: reduce) {
    .fonte-button::before {
        transition: none;
    }
}
