/* The download page (/download, docs/download-page.md), on top of landing.css (tokens, nav,
   buttons, cards, reveals, footer). A device mock-up for the recommended platform: the app icon
   pops onto its screen, a download bar fills, rings orbit it and it floats. Motion only under
   html.lp-motion (download.js adds it when the OS and the site's Animations setting allow), so
   with motion off or no JavaScript the page is complete and still. */

.dl [hidden] { display: none !important; }
.lp-links a[aria-current="page"] { color: var(--ink); }

/* Hero */
.dl-hero { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; min-height: calc(100svh - 64px); padding: 48px 0 96px; }
@media (max-width: 900px) { .dl-hero { grid-template-columns: 1fr; min-height: 0; padding-top: 32px; gap: 8px; } }
.dl-title { margin-bottom: 28px; }
.dl-line { display: inline-block; overflow: hidden; padding-bottom: .08em; vertical-align: bottom; }
.dl-line > span { display: inline-block; }
.dl-accent { color: var(--brand); }
.dl-detected { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 19px; margin: 0 0 22px; }
.dl-detected [data-device-name] { color: var(--ink); font-weight: 600; }
.dl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 50%, transparent); flex: none; }
.dl-cta { height: 60px; padding: 0 30px; font-size: 17px; box-shadow: 0 10px 30px -10px var(--glow); }
.dl-cta svg, .dl-card-btn svg, .dl-soon svg, .dl-soon-chip svg, .dl-more svg, .dl-badge svg { width: 18px; height: 18px; flex: none; }
.dl-fine { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.dl-soon { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 14px 20px; border-radius: 999px; background: var(--card); font-weight: 600; }

/* Glow behind the hero */
.dl-glow { position: absolute; inset: -10% -20% auto; height: 120%; pointer-events: none; z-index: -1; filter: blur(70px); opacity: .55; }
.dl-glow i { position: absolute; width: 380px; height: 380px; border-radius: 50%; }
.dl-glow i:nth-child(1) { right: 6%; top: 10%; background: var(--glow); }
.dl-glow i:nth-child(2) { right: 26%; top: 38%; width: 260px; height: 260px; background: color-mix(in srgb, var(--green) 30%, transparent); }
.dl-glow i:nth-child(3) { left: 4%; top: 52%; width: 220px; height: 220px; background: color-mix(in srgb, var(--brand) 16%, transparent); }

/* The device mock-up */
.dl-stage { position: relative; display: grid; place-items: center; min-height: 460px; }
@media (max-width: 900px) { .dl-stage { min-height: 340px; margin-top: 24px; } }
.dl-device { position: relative; z-index: 1; display: grid; justify-items: center; }
.dl-screen { position: relative; display: grid; place-items: center; align-content: center; gap: 12px; background: linear-gradient(160deg, var(--bg-2), var(--card)); border: 10px solid var(--ink); box-shadow: 0 30px 80px -30px rgba(11, 13, 18, .45); overflow: hidden; }
.dl-device-ios .dl-screen, .dl-device-android .dl-screen { width: 230px; height: 460px; border-radius: 44px; }
.dl-device-ios .dl-screen::before { content: ""; position: absolute; top: 12px; left: 50%; width: 80px; height: 22px; margin-left: -40px; border-radius: 999px; background: var(--ink); }
.dl-device-android .dl-screen::before { content: ""; position: absolute; top: 14px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--ink); }
.dl-device-mac .dl-screen { width: 440px; height: 280px; border-radius: 18px 18px 6px 6px; border-width: 12px; }
.dl-device-mac .dl-base { width: 520px; height: 16px; border-radius: 2px 2px 16px 16px; background: var(--ink); opacity: .85; }
.dl-device-windows .dl-screen { width: 440px; height: 270px; border-radius: 10px; }
.dl-device-windows .dl-stand { width: 120px; height: 46px; background: linear-gradient(var(--ink), var(--ink)) center top / 26px 34px no-repeat, linear-gradient(var(--ink), var(--ink)) center bottom / 120px 10px no-repeat; opacity: .85; }
@media (max-width: 900px) {
  .dl-device-ios .dl-screen, .dl-device-android .dl-screen { width: 150px; height: 280px; border-radius: 30px; border-width: 8px; }
  .dl-device-ios .dl-screen::before { width: 54px; height: 16px; margin-left: -27px; top: 9px; }
  .dl-device-mac .dl-screen, .dl-device-windows .dl-screen { width: min(340px, 80vw); height: 200px; }
  .dl-device-mac .dl-base { width: min(400px, 92vw); }
}
.dl-appicon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 12px 28px -10px var(--glow); }
@media (max-width: 900px) { .dl-appicon { width: 64px; height: 64px; border-radius: 15px; } }
.dl-appname { font-weight: 650; letter-spacing: -.01em; }
.dl-progress { width: 110px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dl-progress i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--brand); }

/* Rings orbiting the device */
.dl-orbit { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.dl-orbit i { position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 1px dashed var(--line); }
.dl-orbit i:nth-child(2) { width: 400px; height: 400px; border-style: solid; }
.dl-orbit i:nth-child(3), .dl-orbit i:nth-child(4) { width: 14px; height: 14px; border: 0; border-radius: 4px; background: var(--brand); }
.dl-orbit i:nth-child(4) { background: var(--green); width: 10px; height: 10px; }
@media (max-width: 900px) { .dl-orbit i:nth-child(1) { width: 340px; height: 340px; } .dl-orbit i:nth-child(2) { width: 260px; height: 260px; } }

/* "Other downloads" scroll hint */
.dl-more { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.dl-more:hover { color: var(--ink); }
@media (max-width: 900px) { .dl-more { position: static; transform: none; justify-self: center; } }

/* All downloads */
.dl-grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .dl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .dl-grid { grid-template-columns: 1fr; } }
.dl-card { display: flex; flex-direction: column; gap: 4px; border: 2px solid transparent; transition: transform var(--d4) var(--ease-back), border-color var(--d3) var(--ease-ui), box-shadow var(--d4) var(--ease-ui); }
.dl-card .lp-body { font-size: 16px; }
.dl-card .dl-fine { margin: 8px 0 18px; }
.dl-card.is-recommended { border-color: var(--brand); box-shadow: 0 20px 50px -24px var(--glow); }
@media (hover: hover) { .dl-card:hover { transform: translateY(-4px); } }
.dl-card-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--bg); margin-bottom: 14px; }
.dl-card-icon svg { width: 24px; height: 24px; }
.dl-card.is-recommended .dl-card-icon { background: var(--brand); color: var(--brand-ink); }
.dl-card-btn, .dl-soon-chip { margin-top: auto; align-self: flex-start; }
.dl-card-btn { white-space: nowrap; padding: 0 14px; font-size: 14px; max-width: 100%; }
.dl-soon-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--bg); color: var(--muted); font-weight: 600; font-size: 15px; }
.dl-badge { position: absolute; top: 18px; right: 18px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); font-size: 12px; font-weight: 650; }
.dl-web { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; margin-top: 16px; }
.dl-web .dl-card-icon { margin: 0; }
.dl-web .lp-body { font-size: 16px; max-width: 70ch; }
@media (max-width: 720px) { .dl-web { grid-template-columns: 1fr; } }

/* Motion (only when allowed) */
html.lp-motion .dl-line > span { transform: translateY(105%); }
html.lp-motion.dl-in .dl-line > span { transform: none; transition: transform 900ms var(--ease-out); }
html.lp-motion.dl-in .dl-line:nth-child(2) > span { transition-delay: 120ms; }
html.lp-motion .dl-hero-text .dl-pick, html.lp-motion .dl-hero-text .lp-eyebrow, html.lp-motion .dl-more { opacity: 0; translate: 0 12px; }
html.lp-motion.dl-in .dl-hero-text .dl-pick, html.lp-motion.dl-in .dl-hero-text .lp-eyebrow, html.lp-motion.dl-in .dl-more { opacity: 1; translate: 0 0; transition: opacity 700ms var(--ease-out) 300ms, translate 700ms var(--ease-out) 300ms; }
html.lp-motion .dl-device { opacity: 0; transform: translateY(40px) scale(.92); }
html.lp-motion.dl-in .dl-device { opacity: 1; transform: none; transition: opacity 800ms var(--ease-out) 150ms, transform 1000ms var(--ease-back) 150ms; }
html.lp-motion .dl-appicon { transform: scale(0) rotate(-12deg); }
html.lp-motion.dl-in .dl-appicon { transform: none; transition: transform 700ms var(--ease-back) 700ms; }
html.lp-motion .dl-progress i { transform: scaleX(0); transform-origin: left; }
html.lp-motion.dl-in .dl-progress i { transform: scaleX(1); transition: transform 1600ms var(--ease-io) 1000ms; }
html.lp-motion.dl-in .dl-stage .dl-device:not([hidden]) .dl-screen { animation: dl-float 6s ease-in-out 1.8s infinite; }
html.lp-motion .dl-orbit i:nth-child(1) { animation: dl-spin 60s linear infinite; }
html.lp-motion .dl-orbit i:nth-child(3) { animation: dl-orbit 9s linear infinite; }
html.lp-motion .dl-orbit i:nth-child(4) { animation: dl-orbit 13s linear infinite reverse; }
html.lp-motion .dl-dot { animation: dl-ping 2s var(--ease-out) infinite; }
html.lp-motion .dl-more svg { animation: dl-bob 1.6s var(--ease-io) infinite; }
html.lp-motion .dl-glow i { animation: dl-drift 14s ease-in-out infinite alternate; }
html.lp-motion .dl-glow i:nth-child(2) { animation-duration: 18s; }
html.lp-motion .dl-glow i:nth-child(3) { animation-duration: 22s; }
/* Switching device (download.js): the new one swings in. */
html.lp-motion .dl-device.is-swap { animation: dl-swap 700ms var(--ease-back); }

@keyframes dl-float { 50% { transform: translateY(-14px); } }
@keyframes dl-spin { to { transform: rotate(360deg); } }
@keyframes dl-orbit { from { transform: rotate(0deg) translateX(230px) rotate(0deg); } to { transform: rotate(360deg) translateX(230px) rotate(-360deg); } }
@keyframes dl-ping { 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes dl-bob { 50% { transform: translateY(5px); } }
@keyframes dl-drift { to { transform: translate(40px, -30px) scale(1.15); } }
@keyframes dl-swap { from { opacity: 0; transform: translateY(30px) scale(.9) rotate(-4deg); } }
@media (max-width: 900px) { @keyframes dl-orbit { from { transform: rotate(0deg) translateX(150px) rotate(0deg); } to { transform: rotate(360deg) translateX(150px) rotate(-360deg); } } }

@media (prefers-reduced-motion: reduce) {
  .dl *, .dl *::before, .dl *::after { animation: none !important; transition: none !important; }
}

/* Icons (the sprite's size classes are Tailwind's, which this page doesn't load). */
.dl .lucide { width: 18px; height: 18px; flex: none; }
.dl .dl-card-icon .lucide { width: 24px; height: 24px; }
