/* ============================================================================
   Glassly — Download page.
   Its own visual identity while sharing the Opaline design tokens: a fanned
   three-device showcase, numbered install steps, and a distinct hero rhythm.
   Loaded after style.css.
   ============================================================================ */

/* ------------------------------------------------------------------ HERO -- */
.dl-hero {
  display: grid; grid-template-columns: 1fr 1.02fr; gap: clamp(30px,4vw,64px);
  align-items: center; padding: clamp(44px,6vw,86px) 0 clamp(48px,6vw,90px);
  position: relative; isolation: isolate;
}
.dl-hero::before {
  content: ""; position: absolute; z-index: -1; width: 52vw; max-width: 660px; aspect-ratio: 1;
  top: -18%; right: -16%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--iris-1), transparent 68%);
  filter: blur(64px); opacity: .5;
}
.dl-hero h1 { font-size: clamp(2.7rem, 5.8vw, 4.4rem); line-height: 1.02; letter-spacing: -0.036em; margin-bottom: 22px; }
.dl-hero .lead { font-size: 1.1rem; color: var(--ink-2); max-width: 46ch; margin-bottom: 32px; }

.dl-cta { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; margin-bottom: 30px; }
.dl-btn { min-width: 262px; }
.dl-btn[disabled] { opacity: 1; background: var(--surface); color: var(--ink-3); border: 1px dashed var(--line-2); box-shadow: none; cursor: not-allowed; }
.dl-btn[disabled]::before { display: none; }
.dl-btn[disabled] .ico { opacity: .5; }
.dl-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-chip {
  font-size: 0.76rem; font-weight: 550; color: var(--ink-2); font-variant-numeric: tabular-nums;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; background: var(--surface);
}

/* ---- integrity / verification block ---- */
.dl-verify { max-width: 470px; margin: -8px 0 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.dl-verify summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 9px;
  padding: 13px 16px; font-size: 0.87rem; font-weight: 550; color: var(--ink-2);
  transition: color .18s ease;
}
.dl-verify summary::-webkit-details-marker { display: none; }
.dl-verify summary:hover { color: var(--accent); }
.dl-verify summary .ico { width: 17px; height: 17px; color: var(--ok); flex: none; }
.dl-verify[open] summary { border-bottom: 1px solid var(--line); color: var(--ink); }
.dl-verify-body { padding: 16px; }
.dl-verify-body p { font-size: 0.85rem; color: var(--ink-2); margin-bottom: 10px; }
.dl-hashcmd {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; overflow-x: auto; margin-bottom: 14px;
}
.dl-hashcmd code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.76rem; color: var(--ink); white-space: nowrap; }
.dl-hash-l { font-size: 0.68rem !important; text-transform: uppercase; letter-spacing: 0.13em; color: var(--ink-3) !important; margin-bottom: 4px !important; font-weight: 600; }
.dl-hash {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.72rem; line-height: 1.6;
  color: var(--accent) !important; word-break: break-all; margin-bottom: 14px !important;
  user-select: all;
}
.dl-verify-note { font-size: 0.78rem !important; color: var(--ink-3) !important; margin: 0 !important; }

.dl-notify { padding: 22px 24px; max-width: 430px; }
.dl-notify::before { display: none; }
.dl-notify-h { font-family: "Fraunces", Georgia, serif; font-size: 1.02rem; margin-bottom: 6px; }
.dl-notify-p { font-size: 0.89rem; color: var(--ink-2); margin-bottom: 16px; }

/* ------------------------------------------------------ DEVICE SHOWCASE -- */
/* Three phones fanned in a shared 3D scene. Transform-only, and the whole
   group tilts as one on hover — no per-frame layout work. */
.dl-stage {
  position: relative; height: clamp(430px, 52vw, 590px);
  display: flex; align-items: center; justify-content: center;
  perspective: 1400px; transform-style: preserve-3d;
}
.dl-glow {
  position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--iris-2) 55%, transparent), transparent 66%);
  filter: blur(56px); opacity: .55;
}
.dl-phone {
  position: absolute; width: clamp(178px, 21vw, 232px); aspect-ratio: 1 / 2.03;
  border-radius: 30px; padding: 11px 11px 13px;
  background: linear-gradient(168deg, #241D33, #14101F);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .65s var(--ease), box-shadow .5s ease;
  will-change: transform;
}
.dl-front { z-index: 3; transform: translateY(0) rotateY(-6deg) rotateX(2deg) scale(1); }
.dl-back  { z-index: 2; transform: translate3d(30%, -9%, -90px) rotateY(-17deg) scale(.9); opacity: .95; }
.dl-side  { z-index: 1; transform: translate3d(-32%, 7%, -140px) rotateY(13deg) scale(.85); opacity: .9; }
.dl-stage:hover .dl-front { transform: translateY(-10px) rotateY(-4deg) rotateX(1deg) scale(1.03); }
.dl-stage:hover .dl-back  { transform: translate3d(38%, -12%, -70px) rotateY(-14deg) scale(.93); }
.dl-stage:hover .dl-side  { transform: translate3d(-40%, 9%, -120px) rotateY(11deg) scale(.88); }

.dlp-notch { width: 46px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.2); margin: 1px auto 10px; flex: none; }
.dlp-head { display: flex; align-items: center; gap: 6px; font-size: 0.66rem; font-weight: 600; color: #F2EEFA; margin-bottom: 10px; flex: none; }
.dlp-head img { border-radius: 5px; }

/* screen: scan */
.dlp-cam {
  position: relative; flex: 1; border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 6%, #332A4A, #171223 74%);
  border: 1px solid rgba(255,255,255,0.08);
}
.dlp-grid {
  position: absolute; inset: 0; opacity: .13;
  background-image: linear-gradient(rgba(205,178,255,.6) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(205,178,255,.6) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask: radial-gradient(70% 70% at 50% 45%, #000 55%, transparent 100%);
          mask: radial-gradient(70% 70% at 50% 45%, #000 55%, transparent 100%);
}
.dlp-face { position: absolute; left: 50%; top: 47%; width: 64%; transform: translate(-50%,-50%); }
.dlp-pt {
  position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 7px var(--iris-1); transform: translate(-50%,-50%);
  animation: dlpPop 3.4s ease-in-out infinite;
}
@keyframes dlpPop { 0%,100% { opacity: 0; transform: translate(-50%,-50%) scale(.4); } 45%,72% { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
.dlp-scan {
  position: absolute; left: 7%; right: 7%; height: 2px; top: 0; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--iris-1), var(--iris-2), transparent);
  box-shadow: 0 0 12px rgba(205,178,255,.75);
  animation: dlpSweep 3.4s ease-in-out infinite;
}
@keyframes dlpSweep {
  0% { transform: translateY(18px); opacity: 0; } 12% { opacity: 1; }
  50% { transform: translateY(215px); opacity: 1; } 88% { opacity: 1; }
  100% { transform: translateY(18px); opacity: 0; }
}
.dlp-live {
  position: absolute; right: 7px; top: 7px; font-size: 0.5rem; letter-spacing: .12em;
  text-transform: uppercase; color: #A8F0D2; padding: 4px 8px; border-radius: 999px;
  background: rgba(95,224,176,.15); border: 1px solid rgba(95,224,176,.35);
}
.dlp-tabs { display: flex; justify-content: space-around; align-items: center; padding: 9px 0 2px; flex: none; }
.dlp-tabs i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.26); }
.dlp-tabs i.on { width: 16px; border-radius: 999px; background: var(--iris); }

/* screen: results */
.dlp-score { display: flex; justify-content: center; padding: 6px 0 12px; flex: none; }
.dlp-ring { position: relative; width: 86px; height: 86px; }
.dlp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dlp-ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.dlp-track { stroke: rgba(255,255,255,.12); }
.dlp-val { stroke: var(--iris-1); stroke-dasharray: 100; stroke-dashoffset: 14; }
.dlp-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dlp-ring-c b { font-family: "Fraunces", Georgia, serif; font-size: 1.5rem; color: #F5F1FF; line-height: 1; }
.dlp-ring-c span { font-size: .48rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-top: 2px; }
.dlp-rows { display: flex; flex-direction: column; gap: 9px; }
.dlp-row span { display: block; font-size: .56rem; color: rgba(255,255,255,.6); margin-bottom: 4px; }
.dlp-row i { display: block; height: 4px; border-radius: 999px; background: rgba(255,255,255,.12); position: relative; }
.dlp-row i::after {
  content: ""; position: absolute; inset: 0; width: var(--w); border-radius: 999px; background: var(--iris);
}

/* screen: routine */
.dlp-list { display: flex; flex-direction: column; gap: 7px; }
.dlp-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 10px; background: rgba(255,255,255,.05); }
.dlp-item b { display: block; font-family: "Inter", sans-serif; font-size: .58rem; font-weight: 600; color: #F2EEFA; }
.dlp-item em { display: block; font-style: normal; font-size: .5rem; color: rgba(255,255,255,.48); margin-top: 1px; }
.dlp-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.dlp-dot.am { background: var(--iris-3); }
.dlp-dot.pm { background: var(--iris-1); }

/* ----------------------------------------------------------- FEATURES -- */
.dl-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.dl-feat h3 { font-size: 1.1rem; margin-bottom: 9px; }

/* -------------------------------------------------------------- STEPS -- */
.dl-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: dl; }
.dl-step { position: relative; padding-top: 34px; }
.dl-step-n {
  position: absolute; top: 26px; right: 26px;
  font-family: "Fraunces", Georgia, serif; font-size: 2.4rem; line-height: 1;
  background: var(--iris-deep); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; opacity: .34;
}
.dl-step h3 { font-size: 1.06rem; margin-bottom: 9px; }
.dl-step p { font-size: .91rem; color: var(--ink-2); }

.dl-safety { display: flex; gap: 20px; align-items: flex-start; margin-top: 22px; padding: 28px 30px; }
.dl-safety-ico {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--iris); border: 1px solid var(--line);
}
.dl-safety-ico .ico { width: 23px; height: 23px; color: #2A1C33; }
.dl-safety h3 { font-size: 1.06rem; margin-bottom: 8px; }
.dl-safety p { font-size: .91rem; color: var(--ink-2); }

/* --------------------------------------------------------- RESPONSIVE -- */
@media (max-width: 980px) {
  .dl-hero { grid-template-columns: 1fr; gap: 40px; }
  .dl-hero .lead { max-width: 56ch; }
  .dl-steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dl-stage { height: clamp(360px, 76vw, 470px); }
  .dl-back { transform: translate3d(34%, -8%, -90px) rotateY(-15deg) scale(.86); }
  .dl-side { display: none; }          /* two devices read better on a phone */
  .dl-safety { flex-direction: column; gap: 14px; }
}
@media (max-width: 560px) {
  .dl-cta { align-items: stretch; }
  .dl-btn { width: 100%; min-width: 0; }
  .dl-notify { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dlp-scan, .dlp-pt { animation: none; }
  .dlp-scan { opacity: .5; top: 45%; }
  .dlp-pt { opacity: 1; }
  .dl-phone { transition: none; }
}
