/* ── /download-app (www/download-app.html) ───────────────────────────────────
   Page-only rules. The shared skin (tokens, footer) is landing.css and the header is
   site-header.css; neither is restyled here. The `dl-ios` / `dl-android` / `dl-desktop` class on
   <html> is set by the page's <head> script before first paint. Bump `?v=` in the page on
   every change to this file. */

.download-page {
    --dl-ink: var(--dark);
    --dl-muted: rgba(0, 18, 27, 0.68);
    --dl-tint: #effaff;
}

/* ── Hero ── */
.dl-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 600px at 78% 45%, rgba(17, 182, 226, 0.28), transparent 70%),
        radial-gradient(500px 400px at 0% 100%, rgba(206, 254, 5, 0.08), transparent 70%),
        var(--dark);
    color: #fff;
    padding: 72px 64px 88px;
}

.dl-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 48px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.dl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid rgba(206, 254, 5, 0.35);
    border-radius: 999px;
    background: rgba(206, 254, 5, 0.1);
    color: var(--accent);
    font-family: var(--font-inter);
    font-weight: 600;
    font-size: 14px;
}

.dl-eyebrow__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.dl-hero__title {
    margin-top: 20px;
    font-family: var(--font-poppins);
    font-weight: 700;
    font-size: clamp(34px, 4.6vw, 56px);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.dl-hl {
    display: block;
    color: var(--accent);
}

.dl-hero__lead {
    max-width: 34em;
    margin: 20px 0 28px;
    font-family: var(--font-inter);
    font-size: 18px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
}

/* Store badges. Both artworks are 3.375:1 once Google Play's transparent side padding is
   cropped (object-fit), so equal heights give equal widths. */
.dl-stores {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.dl-store {
    --badge-h: 52px;
    display: block;
    border-radius: 10px;
    transition: transform 0.15s ease;
}

.dl-store:hover {
    transform: translateY(-2px);
}

.dl-store:active {
    transform: scale(0.97);
}

.dl-store:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.dl-store img {
    display: block;
    height: var(--badge-h);
    width: calc(var(--badge-h) * 3.375);
    max-width: none;
    object-fit: cover;
}

/* A detected phone: its store first and larger, the other one under it. */
html.dl-android .dl-stores,
html.dl-ios .dl-stores {
    flex-direction: column;
    align-items: flex-start;
}

html.dl-android .dl-store--play,
html.dl-ios .dl-store--apple {
    order: -1;
    --badge-h: 60px;
}

html.dl-android .dl-store--apple,
html.dl-ios .dl-store--play {
    --badge-h: 42px;
}

.dl-hint {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-family: var(--font-inter);
    font-weight: 600;
    font-size: 15px;
    color: var(--accent);
}

html.dl-android .dl-hint--android,
html.dl-ios .dl-hint--ios {
    display: flex;
}

.dl-hint svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* QR code: wide screens with no detected phone (desktop, or no JavaScript). */
.dl-qr {
    display: none;
    align-items: center;
    gap: 16px;
    max-width: 380px;
    margin-top: 28px;
    padding: 12px 18px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
}

@media (min-width: 1024px) {
    html:not(.dl-android):not(.dl-ios) .dl-qr {
        display: flex;
    }
}

/* The SVG has no margin of its own: the 12px white padding is the scanner's quiet zone
   (4 modules at this size). */
.dl-qr__code {
    flex: none;
    width: 120px;
    height: 120px;
    padding: 12px;
    border-radius: 10px;
    background: #fff;
}

.dl-qr__title {
    font-family: var(--font-poppins);
    font-weight: 600;
    font-size: 16px;
}

.dl-qr__text {
    margin-top: 4px;
    font-family: var(--font-inter);
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
}

.dl-login {
    margin-top: 24px;
    font-family: var(--font-inter);
    font-size: 15px;
    color: rgba(255, 255, 255, 0.72);
}

.dl-login a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Phone: the mockup is a 960x960 transparent canvas with the phone (368x747) centred, so the
   box takes the phone's ratio and the image is scaled up 960/368 around its centre. */
.dl-hero__visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0;
}

.dl-hero__visual::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 560px;
    height: 560px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: repeating-radial-gradient(circle, transparent 0 63px, rgba(17, 182, 226, 0.28) 63px 64px);
    -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 70%);
    mask-image: radial-gradient(circle, #000 35%, transparent 70%);
    pointer-events: none;
}

.dl-phone {
    position: relative;
    z-index: 1;
    width: 250px;
    aspect-ratio: 368 / 747;
    overflow: hidden;
    filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5));
}

.dl-phone img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 260.87%;
    max-width: none;
    height: auto;
    transform: translate(-50%, -50%);
}

.dl-chips {
    list-style: none;
}

.dl-chip {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 10px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    color: var(--dl-ink);
    font-family: var(--font-inter);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.dl-chip__ico {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
}

.dl-chip__ico svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: var(--dl-ink);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dl-chip--clock {
    top: 16%;
    right: calc(50% + 70px);
}

.dl-chip--leave {
    top: 47%;
    left: calc(50% + 80px);
}

.dl-chip--pay {
    bottom: 14%;
    right: calc(50% + 60px);
}

@media (prefers-reduced-motion: no-preference) {
    .dl-chip {
        animation: dl-float 6s ease-in-out infinite;
    }

    .dl-chip--leave {
        animation-delay: -2s;
    }

    .dl-chip--pay {
        animation-delay: -4s;
    }
}

@keyframes dl-float {
    50% {
        transform: translateY(-6px);
    }
}

/* ── Sections ── */
.dl-section__head {
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
}

.dl-h2 {
    font-family: var(--font-poppins);
    font-weight: 700;
    font-size: clamp(28px, 3.2vw, 40px);
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--dl-ink);
}

.dl-section__lead {
    margin-top: 12px;
    font-family: var(--font-inter);
    font-size: 18px;
    line-height: 1.5;
    color: var(--dl-muted);
}

.dl-features {
    padding: 96px 64px;
}

.dl-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.dl-card {
    display: flex;
    flex-direction: column;
    height: 500px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--dl-tint);
}

.dl-card__body {
    padding: 32px 32px 24px;
}

.dl-card h3 {
    font-family: var(--font-poppins);
    font-weight: 600;
    font-size: 22px;
    color: var(--dl-ink);
}

.dl-card p {
    margin-top: 8px;
    font-family: var(--font-inter);
    font-size: 16px;
    line-height: 1.55;
    color: var(--dl-muted);
}

/* The screenshot rises from the card's bottom edge in a drawn phone frame, the same height in
   every card whatever the length of its copy. */
.dl-card__shot {
    flex: none;
    height: 250px;
    width: 236px;
    margin: auto auto 0;
    overflow: hidden;
    border: 8px solid var(--dl-ink);
    border-bottom: 0;
    border-radius: 36px 36px 0 0;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 18, 27, 0.12);
}

.dl-card__shot img {
    display: block;
    width: 100%;
    height: auto;
}

.dl-steps {
    padding: 88px 64px 96px;
    background: #f6f8f9;
}

.dl-steps__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
    list-style: none;
}

.dl-step {
    padding: 28px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 18, 27, 0.05);
}

.dl-step__num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--dl-ink);
    font-family: var(--font-poppins);
    font-weight: 700;
    font-size: 18px;
}

.dl-step h3 {
    font-family: var(--font-poppins);
    font-weight: 600;
    font-size: 19px;
    color: var(--dl-ink);
}

.dl-step p {
    margin-top: 6px;
    font-family: var(--font-inter);
    font-size: 16px;
    line-height: 1.5;
    color: var(--dl-muted);
}

.dl-steps__more {
    margin-top: 36px;
    text-align: center;
    font-family: var(--font-inter);
    font-size: 16px;
    color: var(--dl-muted);
}

.dl-steps__more a {
    color: #0a7ea0;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Tablet ── */
@media (max-width: 960px) {
    .dl-hero {
        padding: 48px 32px 56px;
    }

    .dl-hero__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        text-align: center;
    }

    .dl-hero__lead {
        margin-left: auto;
        margin-right: auto;
    }

    .dl-stores,
    html.dl-android .dl-stores,
    html.dl-ios .dl-stores {
        justify-content: center;
        align-items: center;
    }

    .dl-hint {
        justify-content: center;
    }

    .dl-features {
        padding: 72px 32px;
    }

    .dl-cards,
    .dl-steps__list {
        grid-template-columns: minmax(0, 1fr);
        max-width: 440px;
    }

    .dl-steps {
        padding: 64px 32px 72px;
    }
}

/* ── Phone ── */
@media (max-width: 600px) {
    .dl-hero {
        padding: 32px 16px 40px;
    }

    /* "Get the trellis PH app." stays on one line down to a 360px Android screen. */
    .dl-hero__title {
        font-size: min(34px, 8.6vw);
    }

    .dl-hero__lead {
        font-size: 16px;
        margin: 16px auto 24px;
    }

    .dl-hero__visual {
        padding: 8px 0;
    }

    .dl-hero__visual::before {
        width: 380px;
        height: 380px;
    }

    .dl-phone {
        width: 180px;
    }

    .dl-chip {
        padding: 7px 12px 7px 7px;
        font-size: 12px;
        gap: 8px;
    }

    .dl-chip__ico {
        width: 24px;
        height: 24px;
    }

    .dl-chip__ico svg {
        width: 14px;
        height: 14px;
    }

    /* Pinned to the screen edges: offsets from the centre ran off a 390px screen. */
    .dl-chip--clock {
        right: auto;
        left: 0;
    }

    .dl-chip--leave {
        left: auto;
        right: 0;
    }

    .dl-chip--pay {
        right: auto;
        left: 8px;
    }

    .dl-features {
        padding: 56px 16px;
    }

    .dl-section__head {
        margin-bottom: 28px;
    }

    .dl-section__lead {
        font-size: 16px;
    }

    .dl-card {
        height: 460px;
    }

    .dl-card__body {
        padding: 24px 24px 20px;
    }

    .dl-steps {
        padding: 56px 16px 64px;
    }
}
