/* ==================================================================
   Metropolitan Mayfair – TABLET & MOBILE compositions (< 1200px)
   Mobile values come from the Figma "Home / Mobile 390" & "375" frames
   (20px gutter, 72px section rhythm, Mobile/H1 44, Mobile/H2 34).
   Tablet (768–1199) follows the "Home / Tablet 1024" frame (56px gutter).
   ================================================================== */

@media (max-width: 1199.98px) {

    /* Generic stacked section rhythm: label → 28 → title → 28 → … */
    .section > .container { display: flex; flex-direction: column; gap: var(--stack-gap); }

    /* --- Hero (mobile frame 19:149) --- */
    .hero {
        position: relative; overflow: hidden; background: var(--c-warm-black); color: var(--c-ivory);
        display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; row-gap: 24px;
        grid-template-areas: "counter eyebrow" "banner banner" "title title" "text text" "ctas ctas" "controls controls";
        padding: calc(var(--header-h) + 32px) var(--gutter) 40px;
    }
    .hero__monogram { left: 76px; top: 155px; width: 332px; height: 436px; opacity: .07; }
    .hero__intro { display: contents; }
    .hero__counter { grid-area: counter; position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 10px; }
    .hero__counter-current { font-family: var(--ff-serif); font-weight: 700; font-style: italic; font-size: 44px; line-height: 1.08; letter-spacing: -0.005em; color: var(--c-champagne); }
    .hero__counter-total { font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0.22em; }
    .hero__eyebrow { grid-area: eyebrow; position: relative; z-index: 1; justify-self: end; align-self: end; font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0.22em; text-transform: uppercase; }
    .hero__rule { display: none; }
    .hero__title { grid-area: title; position: relative; z-index: 1; font-family: var(--ff-serif); font-weight: 700; font-size: 28px; line-height: 1.3; }
    .hero__texts { grid-area: text; position: relative; z-index: 1; display: grid; }
    .hero__text { grid-area: 1 / 1; font-size: 16px; line-height: 1.6; opacity: 0; transition: opacity .6s var(--ease); }
    .hero__text.is-active { opacity: 1; }
    .hero__banner { grid-area: banner; position: relative; z-index: 1; aspect-ratio: 2 / 1; overflow: hidden; background: #1b1a17; }
    .hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s var(--ease); }
    .hero__slide.is-active { opacity: 1; }
    .hero__slide picture, .hero__img { width: 100%; height: 100%; object-fit: cover; }
    .hero__ctas { grid-area: ctas; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
    .hero__cta-desktop { display: none; }
    .hero__controls { grid-area: controls; position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; margin-top: -4px; }
    .hero__pagination { display: flex; align-items: center; gap: 16px; }
    .hero__page { position: relative; width: 28px; height: 2px; background: var(--c-ivory); transition: width .5s var(--ease), background-color .5s; }
    .hero__page::before { content: ""; position: absolute; inset: -14px -4px; }
    .hero__page.is-active { width: 56px; background: var(--c-champagne); }
    .hero__swipe { font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0.22em; text-transform: uppercase; }
    .hero__arrow { display: none; }
    .hero__scroll { display: none; }

    /* --- Scroll image expansion (mobile frame 19:308: 620 tall, statement at bottom) --- */
    .expansion { position: relative; min-height: 620px; display: flex; align-items: flex-end; overflow: hidden; color: var(--c-ivory); background: var(--c-warm-black); }
    .expansion__media { position: absolute; inset: 0; }
    .expansion__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(17, 17, 16, 0) 22%, rgba(17, 17, 16, .55) 50%, rgba(17, 17, 16, .88) 100%); }
    .expansion__media picture, .expansion__img { width: 100%; height: 100%; object-fit: cover; object-position: 80% 30%; }
    .expansion__statement { position: relative; z-index: 1; width: 100%; padding: 340px var(--gutter) 48px; display: flex; flex-direction: column; gap: 20px; }
    .expansion__title { font-size: var(--fs-h2); line-height: 1.08; }
    .expansion__text { font-size: 16px; }

    /* --- Introduction (mobile 19:313) --- */
    .intro__monogram { display: none; }
    .intro__grid { display: flex; flex-direction: column; gap: var(--stack-gap); }
    .intro__main { aspect-ratio: 350 / 280; }
    .intro__side { display: flex; flex-direction: column; gap: var(--stack-gap); }
    .intro__text { font-size: 16px; color: var(--c-charcoal); }
    .intro__detail { display: none; }
    .intro__cta { align-self: flex-start; }

    /* --- Location (mobile 19:325) --- */
    .location__grid { display: flex; flex-direction: column; gap: var(--stack-gap); }
    .location__content { display: contents; }
    .location__content > .section-label { order: 1; }
    .location__title { order: 2; color: var(--c-ivory); }
    .location__text { order: 3; color: var(--c-ivory); }
    .distances { order: 4; border-top: 1px solid var(--c-ivory); }
    .location-map { order: 5; }
    .location__cta { order: 6; align-self: flex-start; }
    .distances__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 14px 0; border-bottom: 1px solid var(--c-ivory); }
    .distances__row:last-child { border-bottom: 0; }
    .distances__place { font-size: 14px; font-weight: 500; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-ivory); }
    .distances__time { font-family: var(--ff-serif); font-weight: 700; font-style: italic; font-size: 30px; line-height: 1.2; color: var(--c-champagne); white-space: nowrap; }
    .location-map { position: relative; width: 100%; aspect-ratio: 986.667 / 920; background: var(--c-warm-black); overflow: hidden; }
    .location-map__art { position: absolute; inset: 0; width: 100%; height: 100%; }
    .location-map__home { position: absolute; width: 3.484%; height: 2.826%; }
    .location-map__home .logo-mark { --mono-color: var(--c-charcoal); }
    .location-map__name, .location-map__ring { display: none; }
    .map-marker { position: absolute; display: flex; align-items: center; gap: 6px; }
    .map-marker__dot { flex: none; width: 12px; height: 12px; border: 1px solid var(--c-champagne); border-radius: 50%; display: grid; place-items: center; }
    .map-marker__dot::after { content: ""; width: 40%; height: 40%; border-radius: 50%; background: var(--c-champagne); }
    .map-marker__place { display: none; }
    .map-marker__time { font-size: 11px; line-height: 1.4; letter-spacing: 0.04em; color: var(--c-ivory); white-space: nowrap; }

    /* --- Lifestyle (mobile 19:381 – swipe carousel) --- */
    .lifestyle { overflow: hidden; }
    .lifestyle__panels {
        display: flex; gap: 16px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter);
        overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .lifestyle__panels::-webkit-scrollbar { display: none; }
    .panel { flex: 0 0 290px; height: 394.4px; scroll-snap-align: start; }
    .panel__overlay { background: linear-gradient(to bottom, rgba(17, 17, 16, .1), rgba(17, 17, 16, .88)); }
    .panel__index { left: 24px; top: 24px; font-size: 13px; }
    .panel__content { left: 24px; right: 24px; top: 232.4px; gap: 12px; }
    .panel__title { font-size: 40px; line-height: 1.2; }
    .panel__rule { display: none; }
    .panel__list { font-size: 16px; line-height: 1.6; }
    .panel__list li { display: inline; }
    .panel__list li + li::before { content: " · "; }
    .lifestyle__hint { font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0.22em; text-transform: uppercase; white-space: pre; }

    /* --- Architecture (mobile 19:406) --- */
    .architecture__head { display: flex; flex-direction: column; gap: var(--stack-gap); }
    .architecture__text { font-size: 16px; color: var(--c-charcoal); }
    .architecture__grid { display: flex; flex-direction: column; gap: var(--stack-gap); }
    .architecture__main-media { aspect-ratio: 4 / 3; }
    .architecture__monogram { display: none; }
    .architecture__tall { aspect-ratio: 350 / 315; }
    .architecture__tall img { object-position: center 30%; }
    .architecture__cta { align-self: flex-start; }

    /* --- Specifications (mobile 19:420) --- */
    .specs__grid { display: grid; gap: var(--stack-gap); }
    .spec { display: flex; flex-direction: column; gap: 14px; }
    .spec__media { aspect-ratio: 350 / 210; }
    .spec__head { display: flex; flex-direction: column; gap: 14px; }
    .spec__index { font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0.22em; color: var(--c-champagne); }
    .spec__text { display: flex; flex-direction: column; gap: 14px; }
    .spec__title { font-family: var(--ff-serif); font-weight: 700; font-size: 30px; line-height: 1.2; }
    .spec__desc { font-size: 16px; line-height: 1.6; }

    /* --- Developer legacy + Vision & Mission --- */
    .legacy { padding: var(--section-pad) 0 24px; }
    .legacy__inner { display: flex; flex-direction: column; align-items: center; gap: var(--stack-gap); text-align: center; }
    .legacy__title { font-size: var(--fs-h2); line-height: 1.14; }
    .stats { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .stat { display: flex; flex-direction: column; align-items: center; padding: 20px 8px; border-color: rgba(32, 32, 30, .2); }
    .stat:nth-child(odd) { border-right: 1px solid rgba(32, 32, 30, .2); }
    .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(32, 32, 30, .2); }
    .stat__over, .stat__label { font-size: 16px; white-space: normal; }
    .stat__num { font-size: 44px; }

    .vision { position: relative; overflow: hidden; padding: 48px 0 var(--section-pad); }
    .vision__monogram { left: 50%; top: 0; width: 340px; height: 446px; transform: translateX(-50%); opacity: .5; --mono-color: var(--c-ivory); }
    .vision__grid { position: relative; z-index: 1; display: flex; flex-direction: column; gap: var(--stack-gap); }
    .vision__col { display: flex; flex-direction: column; gap: var(--stack-gap); }
    .vision__divider { display: none; }
    .vision__text { font-size: var(--fs-h3); line-height: 1.2; }
    .vision__logo { width: 224px; height: auto; }
    .vision__col:last-child { order: 2; }

    /* --- Gallery (mobile 19:480) --- */
    .gallery__head { display: flex; flex-direction: column; gap: var(--stack-gap); }
    .gallery__title br { display: none; }
    .gallery__filters {
        display: flex; gap: 24px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter);
        overflow-x: auto; scrollbar-width: none;
    }
    .gallery__filters::-webkit-scrollbar { display: none; }
    .gallery__filter { position: relative; flex: none; padding-bottom: 10px; font-size: 14px; font-weight: 500; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-charcoal); }
    .gallery__filter.is-active { color: var(--c-charcoal); }
    .gallery__filter.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--c-champagne); }
    .gallery__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .gallery__tile { aspect-ratio: 167 / 192.05; }
    .gallery__nav { display: none; }

    /* --- Enquiry (mobile 19:515) --- */
    .enquiry__grid { display: flex; flex-direction: column; gap: var(--stack-gap); }
    .enquiry__content { display: contents; }
    .enquiry__content > .section-label { order: 1; }
    .enquiry__title { order: 2; }
    .enquiry__text { order: 3; color: var(--c-charcoal); }
    .enquiry__form { order: 4; }
    .contact { order: 5; display: flex; flex-direction: column; gap: 20px; padding-top: 12px; border-top: 1px solid rgba(32, 32, 30, .2); }
    .contact__item { display: flex; flex-direction: column; gap: 8px; }
    .contact__phone { font-size: 30px; }
    .contact__value { font-size: 16px; }
    .lead-form__row { grid-template-columns: 1fr; }
    .lead-form__submit { width: 100%; }

    /* --- Footer --- */
    .site-footer__inner { padding: var(--section-pad) var(--gutter) calc(32px + 64px); display: flex; flex-direction: column; gap: 40px; }
    .site-footer__monogram { right: -120px; top: -40px; width: 340px; height: 446px; opacity: .05; }
    .site-footer__top { display: flex; flex-direction: column; gap: 40px; }
    .site-footer__brand { display: flex; flex-direction: column; gap: 28px; }
    .site-footer__logo { width: 73px; height: 96px; }
    .site-footer__partners { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
    .site-footer__logos { gap: 20px; }
    .site-footer__logos img:first-child { width: 168px; }
    .site-footer__logos img:last-child { width: 196px; }
    .site-footer__divider { height: 40px; }
    .site-footer__rera { gap: 12px; }
    .site-footer__rera-text { align-items: flex-start; font-size: 22px; }
    .site-footer__qr { width: 46px; height: 48px; }
    .site-footer__bottom { gap: 20px; }
    .site-footer__legal { flex-direction: column; align-items: flex-start; gap: 12px; }
    .site-footer__links { gap: 12px 24px; }

    /* --- Sticky enquiry bar (mobile 19:640) --- */
    .sticky-bar {
        position: fixed; inset: auto 0 0; z-index: 90; display: grid; grid-template-columns: 1fr 1fr;
        height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
        background: var(--c-charcoal); transform: translateY(0); transition: transform .3s var(--ease);
    }
    .sticky-bar a { display: grid; place-items: center; font-size: 14px; font-weight: 600; line-height: 1.4; letter-spacing: 0.18em; text-transform: uppercase; }
    .sticky-bar__call { background: var(--c-charcoal); color: var(--c-ivory); }
    .sticky-bar__enquire { background: var(--c-champagne); color: var(--c-warm-black); }
    .sticky-bar.is-hidden { transform: translateY(100%); }
}

/* ---------- Mobile-only details (< 768) ---------- */
@media (max-width: 767.98px) {
    .lifestyle__panels { padding-bottom: 2px; }
    .gallery__more { margin-top: 0; min-height: 62px; }
    .lightbox { grid-template-columns: 1fr; padding: 64px 12px; }
    .lightbox__prev, .lightbox__next { position: absolute; bottom: 20px; }
    .lightbox__prev { left: calc(50% - 64px); }
    .lightbox__next { right: calc(50% - 64px); }
}

/* ---------- Tablet (768 – 1199) ---------- */
@media (min-width: 768px) and (max-width: 1199.98px) {
    :root { --header-h: 72px; }
    .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "counter eyebrow" "banner banner" "title text" "ctas controls"; column-gap: 48px; row-gap: 32px; padding-bottom: 56px; }
    .hero__monogram { left: -20px; top: 120px; width: 500px; height: 656px; }
    .hero__title { font-size: 32px; }
    .hero__texts { align-self: end; }
    .hero__ctas { flex-direction: row; align-items: center; gap: 32px; }
    .hero__cta-mobile.btn--block { width: auto; }
    .hero__controls { justify-content: flex-end; gap: 20px; margin: 0; }
    .hero__arrow { display: inline-grid; }
    .hero__swipe { display: none; }

    .expansion { min-height: 640px; }
    .expansion__statement { padding-top: 320px; padding-bottom: 64px; max-width: 760px; }
    .expansion__text { font-size: 18px; }

    .intro__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
    .intro__main { aspect-ratio: 4 / 3.2; }
    .intro__detail { display: block; aspect-ratio: 693 / 406; }
    .intro__text { font-size: 18px; }

    .location__grid { display: grid; grid-template-columns: 1fr; }
    .distances__time { font-size: 34px; }

    .panel { flex-basis: calc((100% - 32px) / 2.4); height: auto; aspect-ratio: 290 / 394.4; }

    .architecture__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
    .architecture__main-media { aspect-ratio: 986.667 / 700; }
    .architecture__tall { aspect-ratio: 695 / 1042.5; }
    .architecture__text { font-size: 18px; max-width: 640px; }

    .specs__grid { grid-template-columns: 1fr 1fr; column-gap: 32px; row-gap: 48px; }

    .stats { grid-template-columns: repeat(4, 1fr); }
    .stat { border-bottom: 0 !important; border-right: 0 !important; }
    .stat + .stat { border-left: 1px solid rgba(32, 32, 30, .2); }

    .vision__grid { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 40px; }
    .vision__divider { display: block; background: rgba(32, 32, 30, .2); }
    .vision__col:last-child { order: 0; }

    .gallery__grid { grid-template-columns: repeat(3, 1fr); }
    .gallery__nav { display: flex; justify-content: center; gap: 32px; }
    .gallery__more { display: none; }

    .enquiry__grid { display: grid; grid-template-columns: 1fr; }
    .lead-form__row { grid-template-columns: 1fr 1fr; gap: 32px; }
    .lead-form__submit-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
    .lead-form__submit { width: auto; }

    .site-footer__top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
    .site-footer__brand { max-width: 50%; }
    .site-footer__partners { align-items: flex-end; }
    .site-footer__rera-text { align-items: flex-end; }
    .site-footer__inner { padding-bottom: 40px; }
    .site-footer__legal { flex-direction: row; justify-content: space-between; }
    .sticky-bar { display: none; }
}
