/* Alcázar del Genil · Rey Abu Said 6 — campaign page.
   Loads before the identity sheet and mobile.css, so every rule is scoped to
   .ag-page / .ag-* and figures stay at weight 300–400 (the Sofia Pro bold
   subset has no digits or accents). */

.ag-page {
    --ag-gutter: max(24px, calc((100vw - 1240px) / 2));
    --ag-line: rgba(167, 162, 153, .45);
    --ag-text: #4f4c47;
    --ag-label: #716d65;
}
.ag-page main strong { font-weight: 400; }

/* ==================== SHARED ==================== */
.ag-eyebrow {
    margin: 0 0 18px;
    color: var(--ag-label);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.ag-eyebrow--light { color: var(--brand-beige); }

.ag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 28px;
    border: 1px solid var(--brand-anthracite);
    background: var(--brand-anthracite);
    color: var(--brand-paper);
    font-family: var(--body);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .16em;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background .22s, color .22s, border-color .22s;
}
.ag-btn:hover { background: transparent; color: var(--brand-anthracite); }
.ag-btn--light { border-color: var(--brand-paper); background: var(--brand-paper); color: var(--brand-anthracite); }
.ag-btn--light:hover { background: transparent; color: var(--brand-paper); }
.ag-btn--outline { background: transparent; color: var(--brand-anthracite); }
.ag-btn--outline:hover { background: var(--brand-anthracite); color: var(--brand-paper); }
.ag-btn--block { width: 100%; }

.ag-link {
    display: inline-flex;
    gap: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid currentColor;
    color: var(--brand-anthracite);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    text-decoration: none;
}
.ag-link--light { color: var(--brand-paper); }

.ag-section {
    padding: 112px var(--ag-gutter);
    scroll-margin-top: 64px;
}
.ag-section--soft { background: var(--bg-card); }
.ag-section h2 {
    margin: 0 0 22px;
    color: var(--brand-anthracite);
    font-family: var(--display);
    font-size: clamp(32px, 4.2vw, 58px);
    line-height: 1.06;
    letter-spacing: -.005em;
    text-wrap: balance;
}
.ag-heading {
    max-width: 1240px;
    margin: 0 auto 52px;
}
.ag-heading > p:not(.ag-eyebrow),
.ag-heading > div > p:not(.ag-eyebrow) {
    max-width: 640px;
    margin: 0;
    color: var(--grey);
    font-size: 16px;
    line-height: 1.7;
}
.ag-footnote {
    margin: 18px 0 0;
    color: var(--ag-label);
    font-size: 12px;
    line-height: 1.6;
}

/* ==================== HERO ==================== */
.ag-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: 100vh;
    min-height: 100svh;
    padding: 132px var(--ag-gutter) 40px;
    overflow: hidden;
    background: var(--brand-anthracite);
    color: var(--brand-paper);
}
.ag-hero__media,
.ag-hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.ag-hero__media { z-index: -2; }
.ag-hero__media img { object-fit: cover; object-position: center 60%; }
.ag-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(35, 35, 35, .6) 0, rgba(35, 35, 35, .12) 24%, rgba(35, 35, 35, .2) 46%, rgba(35, 35, 35, .88) 100%);
}
.ag-hero__inner { width: 100%; max-width: 1240px; margin: 0 auto; }
.ag-hero h1 {
    max-width: 900px;
    margin: 0 0 22px;
    color: var(--brand-paper);
    font-family: var(--display);
    font-size: clamp(42px, 6.4vw, 92px);
    line-height: 1;
    letter-spacing: -.01em;
    text-wrap: balance;
}
.ag-hero__lead {
    max-width: 600px;
    margin: 0 0 32px;
    color: rgba(244, 241, 235, .86);
    font-size: clamp(16px, 1.45vw, 19px);
    line-height: 1.65;
}
.ag-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 32px;
}
.ag-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 56px 0 0;
    padding: 22px 0 0;
    border-top: 1px solid rgba(217, 211, 199, .35);
    list-style: none;
}
.ag-facts li { display: flex; align-items: baseline; gap: 12px; padding-right: 16px; }
.ag-facts strong { font-size: clamp(30px, 3.2vw, 44px); font-weight: 300; line-height: 1; }
.ag-facts span {
    color: rgba(244, 241, 235, .78);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.ag-hero__credit {
    position: absolute;
    top: 98px;
    right: var(--ag-gutter);
    margin: 0;
    color: rgba(244, 241, 235, .72);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* ==================== EL PROYECTO ==================== */
.ag-project__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(40px, 7vw, 104px);
    align-items: center;
    max-width: 1240px;
    margin: 0 auto;
}
.ag-project__copy > p:not(.ag-eyebrow) {
    margin: 0 0 18px;
    color: var(--ag-text);
    font-size: 16px;
    line-height: 1.75;
}
.ag-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
    margin: 34px 0 0;
    border-top: 1px solid var(--brand-beige);
}
.ag-specs div { padding: 16px 0; border-bottom: 1px solid var(--brand-beige); }
.ag-specs dt {
    margin: 0 0 6px;
    color: var(--ag-label);
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.ag-specs dd { margin: 0; color: var(--brand-anthracite); font-size: 15px; line-height: 1.45; }
.ag-project__photo { margin: 0; }
.ag-project__photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 4.6;
    object-fit: cover;
    object-position: 62% center;
}
.ag-page figcaption { margin-top: 12px; color: var(--ag-label); font-size: 12px; line-height: 1.5; }

/* ==================== TIPOLOGÍAS ==================== */
.ag-types__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    max-width: 1240px;
    margin: 0 auto;
}
.ag-type {
    display: grid;
    grid-template-columns: minmax(0, .78fr) minmax(0, 1fr);
    border: 1px solid var(--ag-line);
    background: var(--brand-paper);
}
.ag-type__plan {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px 52px;
    border-right: 1px solid var(--ag-line);
    background: #fff;
    text-decoration: none;
}
/* Fixed height reserves the space before the lazy image loads; width follows the attributes' ratio. */
.ag-type__plan img { display: block; width: auto; max-width: 100%; height: 500px; object-fit: contain; }
.ag-type__zoom {
    position: absolute;
    left: 16px;
    bottom: 16px;
    color: var(--brand-anthracite);
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.ag-type__plan:hover .ag-type__zoom { text-decoration: underline; text-underline-offset: 4px; }
.ag-type__body { display: flex; flex-direction: column; padding: 34px 30px 30px; }
.ag-type__count {
    margin: 0 0 14px;
    color: var(--ag-label);
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.ag-type h3 {
    margin: 0 0 18px;
    color: var(--brand-anthracite);
    font-family: var(--display);
    font-size: clamp(24px, 2.3vw, 31px);
    line-height: 1.15;
}
.ag-type__area { margin: 0 0 20px; color: var(--ag-label); font-size: 14px; line-height: 1.5; }
.ag-type__area strong {
    color: var(--brand-anthracite);
    font-size: clamp(30px, 2.8vw, 38px);
    font-weight: 300;
    line-height: 1.1;
}
.ag-type__area span { display: block; margin-top: 4px; }
.ag-type__summary { margin: 0 0 22px; color: var(--ag-text); font-size: 15px; line-height: 1.7; }
.ag-type__features { margin: 0 0 18px; padding: 0; list-style: none; border-top: 1px solid var(--brand-beige); }
.ag-type__features li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--brand-beige);
    color: var(--brand-anthracite);
    font-size: 14px;
    line-height: 1.45;
}
.ag-type__features span { flex: none; color: var(--ag-label); }
.ag-type__note { margin: auto 0 0; color: var(--ag-label); font-size: 12px; line-height: 1.5; }
.ag-inline-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px 28px;
    flex-wrap: wrap;
    max-width: 1240px;
    margin: 44px auto 0;
}
.ag-inline-cta p { margin: 0; color: var(--brand-anthracite); font-size: 18px; }

/* ==================== REFERENCIAS ==================== */
.ag-refs__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.ag-refs__nav { display: flex; flex: none; gap: 8px; }
.ag-refs__arrow {
    width: 50px;
    height: 50px;
    border: 1px solid var(--brand-anthracite);
    background: transparent;
    color: var(--brand-anthracite);
    font-size: 17px;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.ag-refs__arrow:hover { background: var(--brand-anthracite); color: var(--brand-paper); }
.ag-refs__track {
    display: flex;
    gap: 16px;
    margin: 0 calc(var(--ag-gutter) * -1);
    padding: 0 var(--ag-gutter) 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--ag-gutter);
    scrollbar-width: none;
    outline-offset: -2px;
}
.ag-refs__track::-webkit-scrollbar { display: none; }
.ag-ref { position: relative; flex: 0 0 auto; width: min(560px, 42vw); color: inherit; text-decoration: none; scroll-snap-align: start; }
.ag-ref figure { margin: 0; }
.ag-ref img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--bg-card); transition: opacity .25s ease; }
.ag-page .ag-ref figcaption { display: flex; justify-content: space-between; gap: 12px; color: var(--ag-text); font-size: 13px; }
.ag-ref__more {
    flex: none;
    padding-bottom: 2px;
    border-bottom: 1px solid currentColor;
    color: var(--brand-anthracite);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
}
a.ag-ref:hover img { opacity: .88; }
.ag-ref__tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    background: rgba(244, 241, 235, .94);
    color: var(--brand-anthracite);
    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
}

/* ==================== CALIDADES ==================== */
.ag-quality__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1240px;
    margin: 0 auto;
    padding: 0;
    border-top: 1px solid var(--ag-line);
    border-left: 1px solid var(--ag-line);
    list-style: none;
    counter-reset: ag-quality;
}
.ag-quality__list li {
    padding: 28px 28px 32px;
    border-right: 1px solid var(--ag-line);
    border-bottom: 1px solid var(--ag-line);
    background: var(--brand-paper);
    counter-increment: ag-quality;
}
.ag-quality__list li::before {
    content: counter(ag-quality, decimal-leading-zero);
    display: block;
    margin-bottom: 22px;
    color: var(--brand-warm-grey);
    font-size: 12px;
    letter-spacing: .14em;
}
.ag-quality__list h3 { margin: 0 0 8px; color: var(--brand-anthracite); font-family: var(--display); font-size: 21px; line-height: 1.25; }
.ag-quality__list p { margin: 0; color: var(--grey); font-size: 14px; line-height: 1.65; }
.ag-quality .ag-footnote { max-width: 1240px; margin-left: auto; margin-right: auto; }

/* ==================== UBICACIÓN ==================== */
.ag-location__grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(40px, 6vw, 88px);
    align-items: start;
    max-width: 1240px;
    margin: 0 auto;
}
.ag-location__copy > p:not(.ag-eyebrow):not(.ag-footnote) { margin: 0; color: var(--ag-text); font-size: 16px; line-height: 1.75; }
.ag-places { margin: 32px 0 0; padding: 0; border-top: 1px solid var(--brand-beige); list-style: none; }
.ag-places li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--brand-beige);
}
.ag-places__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--brand-anthracite);
    border-radius: 50%;
    color: var(--brand-anthracite);
    font-size: 12px;
}
.ag-places__name { color: var(--brand-anthracite); font-size: 15px; }
.ag-places__time { color: var(--ag-label); font-size: 15px; white-space: nowrap; }
.ag-map {
    position: relative;
    z-index: 0;
    height: 520px;
    border: 1px solid var(--brand-beige);
    background: #ebe8e2;
}
.ag-map.leaflet-container { font-family: var(--body); }
.ag-map-tiles { filter: grayscale(1) contrast(.9) brightness(1.04); }
.ag-map__fallback { margin: 0; padding: 24px; }
.ag-metro { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: center; margin: 16px 0 0; }
.ag-metro img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.ag-metro figcaption { margin: 0; }
.ag-pin-home {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 2px solid var(--brand-paper);
    border-radius: 50% 50% 50% 0;
    background: var(--brand-anthracite);
    box-shadow: 0 10px 22px rgba(35, 35, 35, .35);
    transform: rotate(-45deg);
}
.ag-pin-home span { color: var(--brand-beige); font-size: 14px; font-weight: 300; transform: rotate(45deg); }
.ag-pin-poi {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--brand-anthracite);
    border-radius: 50%;
    background: var(--brand-paper);
    box-shadow: 0 4px 12px rgba(35, 35, 35, .2);
    color: var(--brand-anthracite);
    font-size: 12px;
}
.leaflet-tooltip.ag-tip {
    padding: 6px 10px;
    border: 0;
    border-radius: 0;
    background: var(--brand-anthracite);
    box-shadow: none;
    color: var(--brand-paper);
    font-family: var(--body);
    font-size: 12px;
    letter-spacing: .03em;
}
.leaflet-tooltip-top.ag-tip::before { border-top-color: var(--brand-anthracite); }

/* ==================== FORMULARIO ==================== */
.ag-lead { background: var(--brand-anthracite); color: var(--brand-paper); }
.ag-lead__grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
    gap: clamp(40px, 7vw, 104px);
    align-items: start;
    max-width: 1240px;
    margin: 0 auto;
}
.ag-lead__copy { position: sticky; top: 120px; }
.ag-section.ag-lead h2 { color: var(--brand-paper); }
.ag-lead__copy > p:not(.ag-eyebrow) { margin: 0; color: rgba(244, 241, 235, .78); font-size: 16px; line-height: 1.7; }
.ag-lead__perks { margin: 32px 0 0; padding: 0; border-top: 1px solid rgba(217, 211, 199, .22); list-style: none; }
.ag-lead__perks li {
    position: relative;
    padding: 14px 0 14px 28px;
    border-bottom: 1px solid rgba(217, 211, 199, .22);
    font-size: 15px;
}
.ag-lead__perks li::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 2px;
    width: 12px;
    height: 1px;
    background: var(--brand-beige);
}
.ag-form-card { padding: clamp(24px, 3.4vw, 44px); background: var(--brand-paper); color: var(--brand-anthracite); }
.ag-errors {
    margin: 0 0 22px;
    padding: 14px 16px;
    border-left: 3px solid #9c352c;
    background: #fff5f3;
    color: #7d2a23;
    font-size: 13px;
    line-height: 1.55;
}
.ag-errors p { margin: 0; }
.ag-trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.ag-group { min-width: 0; margin: 0 0 22px; padding: 0; border: 0; }
.ag-group legend {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 16px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--brand-beige);
    color: var(--brand-anthracite);
    font-size: 15px;
}
.ag-group legend span { color: var(--brand-warm-grey); font-size: 11px; letter-spacing: .14em; }
.ag-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.ag-field { min-width: 0; }
.ag-field label {
    display: block;
    margin: 0 0 8px;
    color: var(--grey);
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.ag-field input,
.ag-field select {
    width: 100%;
    min-height: 52px;
    padding: 14px;
    border: 1px solid #cfc8bb;
    border-radius: 0;
    background: #fbfaf7;
    color: var(--brand-anthracite);
    font-family: var(--body);
    font-size: 16px;
    font-weight: 300;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .18s, background .18s;
}
.ag-field select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23232323' stroke-width='1.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}
.ag-field input:focus,
.ag-field select:focus { border-color: var(--brand-anthracite); background-color: #fff; }
.ag-field input::placeholder { color: #a7a299; }
.ag-privacy {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin: 10px 0 24px;
    color: var(--grey);
    font-size: 12px;
    line-height: 1.55;
}
.ag-privacy input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand-anthracite); }
.ag-privacy a { color: var(--brand-anthracite); }
.ag-form-note { margin: 12px 0 0; color: var(--ag-label); font-size: 11px; text-align: center; }
.ag-direct { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--brand-beige); }
.ag-direct p { margin: 0 0 12px; color: var(--grey); font-size: 13px; }
.ag-direct__links { display: grid; }
.ag-direct__links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--ag-line);
    color: var(--brand-anthracite);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .18s, background .18s;
}
.ag-direct__links a:hover { border-color: var(--brand-anthracite); background: #fff; }

/* ==================== GRACIAS ==================== */
.ag-thanks { display: grid; place-items: center; min-height: 78vh; padding: 150px 24px 90px; background: var(--brand-paper); }
.ag-thanks__card { width: min(100%, 680px); text-align: center; }
.ag-thanks__mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 28px;
    border: 1px solid var(--brand-warm-grey);
    color: var(--brand-warm-grey);
    font-size: 22px;
}
.ag-thanks h1 { margin: 0 0 18px; color: var(--brand-anthracite); font-family: var(--display); font-size: clamp(36px, 5.4vw, 62px); line-height: 1.05; }
.ag-thanks__card > p:not(.ag-eyebrow) { max-width: 540px; margin: 0 auto; color: var(--grey); font-size: 16px; line-height: 1.7; }
.ag-thanks__card > p a { color: var(--brand-anthracite); }
.ag-thanks__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 34px 0 28px; }

/* ==================== BARRA FIJA (MÓVIL) ====================
   Reuses .viv-mobile-bar from mobile.css (fixed bar, chat inside it,
   floating buttons hidden). It hides while the hero button or the form
   is on screen; then the chat goes back to its usual corner. */
.ag-mobile-bar { transition: transform .28s ease, visibility .28s; }
.ag-mobile-bar.is-hidden { visibility: hidden; transform: translateY(110%); }
.ag-mobile-bar .viv-mobile-bar-info strong { overflow: hidden; font-size: 17px; font-weight: 300; white-space: nowrap; text-overflow: ellipsis; }
/* "Quiero información" needs 176px instead of the 156px of "Solicitar visita". */
.ag-mobile-bar .viv-mobile-bar-btn { width: 176px; padding: 0; }
@media (max-width: 768px) {
    /* Chat sits inside the bar, just left of the wider button: 16px gutter + 176px + 10px. */
    body.ag-page:has(.viv-mobile-bar) .blv-public-chat { right: 202px; }
    /* With the bar out of view, the chat goes back to the corner the public pages use. */
    body.ag-page.ag-bar-hidden .blv-public-chat { right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); }
    /* The room kept for the bar belongs to the dark footer, so no paper strip shows when the bar hides. */
    body.ag-page:has(.viv-mobile-bar) { padding-bottom: 0; }
    body.ag-page:has(.viv-mobile-bar) .public-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}
@media (max-width: 370px) {
    .ag-mobile-bar .viv-mobile-bar-info strong { font-size: 15px; }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1100px) {
    .ag-types__grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .ag-project__grid,
    .ag-location__grid,
    .ag-lead__grid { grid-template-columns: 1fr; }
    .ag-lead__copy { position: static; }
    .ag-quality__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ag-hero__credit { top: 84px; }
}

@media (max-width: 700px) {
    .ag-page { --ag-gutter: 20px; }
    .ag-section { padding-top: 68px; padding-bottom: 68px; }
    .ag-section h2 { font-size: clamp(30px, 8.6vw, 38px); }
    .ag-heading { margin-bottom: 32px; }
    .ag-heading > p:not(.ag-eyebrow),
    .ag-heading > div > p:not(.ag-eyebrow) { font-size: 15px; }

    /* Bottom room keeps the floating chat clear of the figures. */
    .ag-hero { padding: 104px 20px calc(84px + env(safe-area-inset-bottom)); }
    .ag-hero::before { background: linear-gradient(180deg, rgba(35, 35, 35, .55) 0, rgba(35, 35, 35, .08) 22%, rgba(35, 35, 35, .3) 44%, rgba(35, 35, 35, .9) 78%); }
    .ag-hero h1 { margin-bottom: 16px; font-size: clamp(36px, 10.6vw, 46px); line-height: 1.04; }
    .ag-hero__lead { margin-bottom: 24px; font-size: 15px; line-height: 1.6; }
    .ag-hero__actions { gap: 16px; }
    .ag-hero__actions .ag-btn { width: 100%; }
    .ag-facts { grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 28px; padding-top: 18px; }
    .ag-facts li { gap: 10px; padding: 0; }
    .ag-facts strong { font-size: 28px; }
    .ag-facts span { font-size: 10px; letter-spacing: .12em; }
    .ag-hero__credit { top: 76px; right: 20px; font-size: 9px; }

    .ag-specs { grid-template-columns: 1fr; }
    .ag-project__photo img { aspect-ratio: 4 / 3.2; }

    .ag-type { grid-template-columns: 1fr; }
    .ag-type__plan { padding: 20px 16px 46px; border-right: 0; border-bottom: 1px solid var(--ag-line); }
    .ag-type__plan img { height: 400px; }
    .ag-type__body { padding: 24px 20px 22px; }
    .ag-inline-cta { flex-direction: column; margin-top: 32px; }
    .ag-inline-cta .ag-btn { width: 100%; }

    .ag-refs__nav { display: none; }
    .ag-refs__head { margin-bottom: 28px; }
    .ag-refs__track { gap: 10px; }
    .ag-ref { width: 84vw; }

    .ag-quality__list { grid-template-columns: 1fr; }
    .ag-quality__list li {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        column-gap: 8px;
        padding: 20px 18px;
    }
    .ag-quality__list li::before { grid-row: 1 / span 2; margin: 3px 0 0; }
    .ag-quality__list h3 { font-size: 19px; }

    .ag-places__name,
    .ag-places__time { font-size: 14px; }
    .ag-map { height: 340px; }
    .ag-metro { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }

    /* The form comes straight after the heading on phones. */
    .ag-lead__perks { display: none; }
    .ag-lead__grid { gap: 28px; }
    .ag-form-card { margin: 0 -4px; padding: 24px 18px; }
    .ag-fields { grid-template-columns: 1fr; }

    .ag-thanks { padding: 120px 20px 80px; }
    .ag-thanks__actions .ag-btn { width: 100%; }
}
