/* ==========================================================================
 * Home page, top section (Modern design). Desktop is the same for every look;
 * the phone looks (Admin → Settings → Appearance → Home page on phones) are the
 * rules inside the (max-width: 767px) block, keyed by .nl-hero--<look>.
 * ========================================================================== */

/* --- Everywhere: airport buttons and the three promises ------------------ */
.nlh-airports { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.nlh-airports button {
    min-height: 44px; border-radius: var(--nl-radius-control, 12px);
    border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04);
    color: #f3f4f6; font: 600 14px/1 var(--nl-font-brand, Montserrat, sans-serif); letter-spacing: .04em;
    transition: border-color .15s, background-color .15s, color .15s;
}
.nlh-airports button:hover { border-color: rgb(var(--nl-gold) / .6); color: rgb(var(--nl-gold)); }
.nlh-airports button.is-picked { background: rgb(var(--nl-gold)); border-color: rgb(var(--nl-gold)); color: #000; }
.nlh-airports button:focus-visible { outline: 2px solid rgb(var(--nl-gold)); outline-offset: 2px; }

.nlh-promises { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 0 40px; margin: 28px 0 0; }
.nlh-promises > div { padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .16); }
.nlh-promises dt { font-size: 13px; color: #d1d5db; }
.nlh-promises dd { margin: 4px 0 0; font: 700 28px/1.1 var(--nl-font-brand, Montserrat, sans-serif); color: rgb(var(--nl-gold)); letter-spacing: -.01em; }

.nlh-m { display: none; }

/* --- Phones ---------------------------------------------------------------- */
@media (max-width: 767px) {
    .nlh-promises { display: none; }
    .nlh-airports button { min-height: 44px; font-size: 13px; }

    /* Every look except "photo": one short line instead of three, no long lead. */
    .nl-hero:not(.nl-hero--photo) .nlh-eyebrow,
    .nl-hero:not(.nl-hero--photo) .nlh-sub { display: none; }
    .nl-hero:not(.nl-hero--photo) .nlh-kicker { display: block; margin: 0 0 10px; font-size: 14px; color: #d1d5db; }
    .nl-hero:not(.nl-hero--photo):not(.nl-hero--type) .nlh-lead { display: none; }
    .nl-hero:not(.nl-hero--photo) h1 { margin-bottom: 0; }

    /* Looks without the big photo behind: a plain black top, content from the top. */
    .nl-hero--car, .nl-hero--top, .nl-hero--line, .nl-hero--book, .nl-hero--type { min-height: 0; justify-content: flex-start; }
    .nl-hero--car .nlh-bg, .nl-hero--top .nlh-bg, .nl-hero--line .nlh-bg, .nl-hero--book .nlh-bg, .nl-hero--type .nlh-bg { display: none; }

    /* Full-screen photo: the tall crop shows the car; dark only where the text is. */
    .nl-hero--full .nlh-bg { bottom: auto; height: min(66vh, 560px); }
    .nl-hero--full .nl-hero-img { object-position: center 88%; }
    .nl-hero--full .nlh-shade {
        background: linear-gradient(to top, rgb(var(--nl-black)) 0%, rgb(var(--nl-black) / .75) 22%, rgb(var(--nl-black) / 0) 55%, rgb(var(--nl-black) / .45) 100%);
    }

    /* The car in a frame (also "booking first", under the fare card). */
    .nlh-car { display: block; position: relative; margin: 0; border-radius: min(calc(var(--nl-r1, 1px) * 20), 24px); overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); aspect-ratio: 780 / 351; }
    .nlh-car img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .nlh-car figcaption {
        position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px;
        background: rgb(var(--nl-black) / .78); border: 1px solid rgba(255, 255, 255, .14); font-size: 12px; color: #e5e7eb;
    }
    .nl-hero--book .nlh-car { order: 3; }

    /* Photo across the top, fading into black. */
    .nlh-top { display: block; position: relative; height: 250px; overflow: hidden; }
    .nlh-top img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 60%; display: block; }
    .nlh-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 110px; background: linear-gradient(rgb(var(--nl-black) / 0), rgb(var(--nl-black))); }

    /* Booking first: smaller title, the kinds of ride on top of the card. */
    .nl-hero--book h1 { font-size: 2rem; }
    .nlh-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; margin: 0 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
    .nlh-tabs a { min-height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 999px; font: 600 13px var(--nl-font-brand, Montserrat, sans-serif); color: #d1d5db; text-decoration: none; }
    .nlh-tabs a[aria-current="page"] { background: rgb(var(--nl-gold)); color: #000; }

    /* Type and numbers. */
    .nl-hero--type h1 { font-size: 2.9rem; line-height: 1; }
    .nl-hero--type .nlh-lead { margin-top: 12px; }
    .nl-hero--type .nlh-promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); border-bottom: 1px solid rgba(255, 255, 255, .14); }
    .nl-hero--type .nlh-promises > div { padding: 14px 0 14px 12px; border-top: 0; border-left: 1px solid rgba(255, 255, 255, .14); }
    .nl-hero--type .nlh-promises > div:first-child { padding-left: 0; border-left: 0; }
    .nl-hero--type .nlh-promises dt { font-size: 12px; color: #9ca3af; }
    .nl-hero--type .nlh-promises dd { font-size: 24px; }

    /* Gold line drawing: from your door to the four airports. Each route lights up in turn (10 s loop)
       with a car driving it; the airport pings when the car arrives; city lights twinkle. */
    .nlh-line { display: block; position: relative; margin: 0 -16px; height: 210px; }
    .nlh-line svg { width: 100%; height: 100%; overflow: visible; }
    .nlh-grid-lines path { stroke: rgba(255, 255, 255, .06); stroke-width: 1; fill: none; }
    .nlh-skyline { stroke: rgb(var(--nl-gold) / .22); stroke-width: 1; fill: rgb(var(--nl-gold) / .04); stroke-linejoin: round; }
    .nlh-lights circle { fill: rgb(var(--nl-gold) / .55); animation: nlhTwinkle 3.2s ease-in-out infinite; }
    .nlh-lights circle:nth-child(2n) { animation-delay: 1.1s; }
    .nlh-lights circle:nth-child(3n) { animation-delay: 2.2s; }
    .nlh-route-bg { stroke: rgb(var(--nl-gold) / .16); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-dasharray: 2 5; }
    .nlh-route { stroke: rgb(var(--nl-gold)); stroke-width: 2; fill: none; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1;
        animation: nlhRoute 10s cubic-bezier(.45, 0, .25, 1) infinite; animation-delay: calc(var(--i) * 2.5s); }
    .nlh-home { fill: rgb(var(--nl-black)); stroke: rgb(var(--nl-gold)); stroke-width: 2; }
    .nlh-airport circle { fill: rgb(var(--nl-gold)); }
    .nlh-airport text { fill: #e5e7eb; font: 600 11px var(--nl-font-brand, Montserrat, sans-serif); letter-spacing: .06em; }
    .nlh-airport .nlh-ping { fill: none; stroke: rgb(var(--nl-gold)); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center;
        animation: nlhPing 10s ease-out infinite; animation-delay: calc(var(--i) * 2.5s + 2.2s); }
    .nlh-carshape { fill: rgb(var(--nl-black)); stroke: rgb(var(--nl-gold)); stroke-width: 1.4; stroke-linejoin: round; }
    .nlh-door { fill: #d1d5db; font: 500 12px var(--nl-font-sans, Inter, sans-serif); }

    /* Route: draws in 22% of the loop, stays lit a moment, then fades so the next one stands out. */
    @keyframes nlhRoute { 0% { stroke-dashoffset: 1; opacity: 1; } 22% { stroke-dashoffset: 0; opacity: 1; } 34% { opacity: 1; } 46%, 100% { stroke-dashoffset: 0; opacity: .25; } }
    @keyframes nlhPing { 0% { transform: scale(1); opacity: .9; } 18% { transform: scale(3.4); opacity: 0; } 100% { opacity: 0; } }
    @keyframes nlhTwinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

    @media (prefers-reduced-motion: reduce) {
        .nlh-route { animation: none; stroke-dashoffset: 0; opacity: .8; }
        .nlh-lights circle, .nlh-airport .nlh-ping { animation: none; }
        .nlh-carshape { display: none; }
    }
}

/* ==========================================================================
 * Phones: the top of the page is exactly one screen, whatever the phone.
 * The fare card and "See prices" always sit just above the bottom tab bar;
 * the title and the picture above it use what is left: pictures shrink, then
 * the less important lines step aside on shorter screens (container queries on
 * the section's height, which is the screen with the browser bars shown).
 * If a browser has no container queries, the column is anchored at the bottom,
 * so whatever does not fit is cut at the top, never the button.
 * Very short screens (a phone turned sideways) keep the normal scrolling page.
 * ========================================================================== */
@media (max-width: 767px) and (min-height: 520px) {
    .nl-hero { height: 100vh; height: 100svh; min-height: 0; justify-content: flex-start; container: nlhero / size; }
    .nl-hero .nlh-grid {
        flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 14px;
        padding-top: 92px; padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }
    .nlh-text, .nlh-card { flex: none; }
    .nlh-foot { display: none; }           /* the same note sits in the row under the top */
    .nl-hero h1 { margin-bottom: 0; }
    .nlh-sub { margin-bottom: 8px; }

    /* Pictures take the space that is left and step aside when it is too small to read. */
    .nlh-car, .nlh-line { flex: 1 1 0; min-height: 0; aspect-ratio: auto; border: 0; border-radius: 0; overflow: visible; container-type: size; }
    .nlh-car { display: flex; align-items: center; }
    .nlh-car img { height: auto; max-height: 100%; aspect-ratio: 780 / 351; border-radius: min(calc(var(--nl-r1, 1px) * 20), 24px); border: 1px solid rgba(255, 255, 255, .08); }
    .nlh-car figcaption { left: 12px; bottom: auto; top: calc(50% + min(50cqh, 22.5cqw) - 40px); }
    .nlh-line { margin: 0 -8px; height: auto; }
    @container (max-height: 84px) { .nlh-car img, .nlh-car figcaption, .nlh-line svg { display: none; } }

    /* Photo across the top: the photo is the flexible part, the title sits under it. */
    .nl-hero--top .nlh-top { flex: 1 1 0; min-height: 0; height: auto; container-type: size; }
    .nl-hero--top .nlh-grid { flex: none; padding-top: 0; margin-top: -28px; }
    @container (max-height: 120px) { .nlh-top img { opacity: 0; } }

    /* Booking first: title, then the card, then the car fills the space down to the tab bar. */
    .nl-hero--book .nlh-grid { justify-content: flex-start; }
    .nl-hero--book .nlh-car { order: 3; }

    /* Full-screen photo: the photo covers the free space above the title. */
    .nl-hero--full .nlh-bg { height: auto; bottom: 0; }
    .nl-hero--full .nl-hero-img { object-position: center 70%; }
    .nl-hero--full .nlh-shade { background: linear-gradient(to top, rgb(var(--nl-black)) 0%, rgb(var(--nl-black) / .85) 48%, rgb(var(--nl-black) / 0) 72%, rgb(var(--nl-black) / .45) 100%); }

    /* ---- shorter screens: what steps aside first ---- */
    @container nlhero (max-height: 820px) {
        .nl-hero--photo .nlh-eyebrow { display: none; }
        .nl-hero--type .nlh-lead { display: none; }
    }
    @container nlhero (max-height: 770px) {
        .nl-hero--photo .nlh-lead { display: none; }
        .nl-hero.nl-hero--car .nlh-kicker, .nl-hero.nl-hero--line .nlh-kicker,
        .nl-hero.nl-hero--top .nlh-kicker, .nl-hero.nl-hero--type .nlh-kicker { display: none; }
    }
    @container nlhero (max-height: 700px) {
        .nl-hero--photo .nlh-sub { display: none; }
        .nl-hero--photo .nlh-kicker { display: block; margin: 0 0 8px; font-size: 14px; color: #d1d5db; }
        .nl-hero--type h1 { font-size: 2.4rem; }
        .nl-hero--type .nlh-promises { margin-top: 14px; }
        .nl-hero--type .nlh-promises > div { padding-top: 10px; padding-bottom: 10px; }
    }
    @container nlhero (max-height: 660px) {
        .nl-hero h1, .nl-hero--book h1 { font-size: 2.1rem; }
        .nl-hero .nlh-grid { gap: 10px; padding-top: 86px; }
        .nl-hero .nlh-card { padding: 12px; }
        .nl-hero .nlh-card form { gap: 8px; }
        .nl-hero .nlh-card h2 { font-size: 1rem; }
        .nl-hero #home-quick-booking-form input { min-height: 50px; padding-top: 12px; padding-bottom: 12px; }
        .nl-hero .nlh-airports button { min-height: 40px; }
        .nl-hero .nlh-card .nl-btn-lg { min-height: 50px; }
        .nl-hero--type .nlh-promises { display: none; }
        .nlh-tabs { margin-bottom: 10px; }
        .nlh-tabs a { min-height: 36px; }
    }
    @container nlhero (max-height: 590px) {
        .nl-hero .nlh-kicker { display: none !important; }
        .nl-hero h1, .nl-hero--book h1 { font-size: 1.75rem; line-height: 1.1; }
        .nl-hero--book .nlh-tabs { display: none; }
    }
}
