/* ================================================================
   /download — app landing page, modeled on chatgpt.com/download:
   headline + text + two QR boxes with iOS / Android buttons, and
   one image card beside them. The whole page fits one screen
   (desktop and phone); phones show only their own store button.
   ================================================================ */

/* The shared footer's CR seal is ~375px wide; never let it cause sideways scroll on this ad page. */
html:has(.dl), body:has(.dl) { overflow-x: clip; }

.dl {
    --dl-bg: #0D0D0D;
    --dl-ink: #fff;
    --dl-text: rgba(255,255,255,.72);
    --dl-btn-bg: #fff; --dl-btn-ink: #000; --dl-btn-hover: #e6e6e6;
    --dl-qr-ring: transparent;
    --dl-glow: rgba(46,204,113,.16);
    --dl-grid: rgba(46,204,113,.05);
    position: relative; isolation: isolate;
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column;
    background: radial-gradient(70% 55% at 50% 0%, var(--dl-glow), transparent 70%), var(--dl-bg);
    color: var(--dl-ink);
}
/* Faint grid, same language as the home page hero */
.dl::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(var(--dl-grid) 1px, transparent 1px), linear-gradient(90deg, var(--dl-grid) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(#000, transparent 85%);
    -webkit-mask-image: linear-gradient(#000, transparent 85%);
}

.dl-row {
    flex: 1;
    width: min(944px, calc(100% - 48px));
    margin: 0 auto;
    padding: 120px 0 40px;
    display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px;
}

.dl-title {
    margin: 0 0 22px;
    font-size: clamp(2.6rem, min(5vw, 8vh), 4.1rem);
    font-weight: 700; line-height: 1.02; letter-spacing: -.035em;
}
[data-lang=ar] .dl-title { letter-spacing: 0; line-height: 1.3; font-weight: 800; }
.dl-text { margin: 0 0 32px; max-width: 440px; font-size: 1rem; line-height: 1.6; color: var(--dl-text); }

/* ---- Two boxes: QR + button ----------------------------------- */
.dl-get { display: flex; gap: 26px; }
.dl-get-item { display: flex; flex-direction: column; gap: 14px; }
.dl-get-item[hidden] { display: none; }
.dl-qr {
    display: block; width: 138px; height: 138px; padding: 14px; box-sizing: border-box;
    border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--dl-qr-ring);
    transition: transform .2s;
}
.dl-qr:hover { transform: translateY(-2px); }
.dl-qr img { display: block; width: 100%; height: 100%; }
.dl-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 22px;
    border-radius: 999px; background: var(--dl-btn-bg); color: var(--dl-btn-ink);
    font-family: var(--font-en); font-size: .9rem; font-weight: 600;
    transition: background .2s, transform .2s;
}
.dl-btn:hover { background: var(--dl-btn-hover); }
.dl-btn:active { transform: scale(.97); }
.dl-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.dl-btn svg { width: 18px; height: 18px; flex: none; }

/* ---- Image card ----------------------------------------------- */
.dl-media { position: relative; aspect-ratio: 1; max-height: 62vh; justify-self: center; width: 100%; border-radius: 16px; overflow: hidden; background: #0e1a12; }
.dl-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% center; }

/* Bottom line, like "Download ChatGPT Classic for Mac and Windows" */
.dl-foot { margin: 0; padding: 0 16px 28px; text-align: center; font-size: .85rem; color: var(--dl-text); }
.dl-foot a { color: var(--dl-ink); text-decoration: underline; text-underline-offset: 3px; }
.dl-foot a:hover { color: var(--green); }

/* ---- Phones: one screen — text, button, image fills the rest --- */
@media (max-width: 760px) {
    .dl-row {
        width: calc(100% - 32px);
        padding: 96px 0 14px;
        display: flex; flex-direction: column; align-items: stretch; gap: 0;
    }
    .dl-title { font-size: clamp(2rem, 9vw, 2.6rem); margin-bottom: 12px; }
    .dl-text { margin-bottom: 18px; font-size: .95rem; line-height: 1.55; }
    .dl-qr { display: none; }
    .dl-get { gap: 10px; margin-bottom: 20px; }
    .dl-get-item { flex: 1; }
    .dl-btn { height: 48px; padding: 0 20px; font-size: .95rem; }
    .dl-media { flex: 1; min-height: 170px; max-height: none; aspect-ratio: auto; }
    .dl-foot { padding-bottom: 18px; font-size: .8rem; }
}

/* ---- Light theme ---------------------------------------------- */
[data-theme=light] .dl {
    --dl-bg: #eef7f1;
    --dl-ink: #0c1a10;
    --dl-text: rgba(15,26,18,.66);
    --dl-btn-bg: #0c1a10; --dl-btn-ink: #fff; --dl-btn-hover: #24352a;
    --dl-qr-ring: rgba(15,26,18,.1);
    --dl-glow: rgba(46,204,113,.2);
    --dl-grid: rgba(39,174,96,.07);
}
