/* ==========================================================================
   IN7 GAME — Download page
   Triple-phone mockup • install card • platform tabs • spec sheet
   Deliberately a different device treatment from the home hero.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Download hero
   -------------------------------------------------------------------------- */

.dl-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(38px, 4.4vw, 74px) clamp(52px, 6vw, 100px);
  background:
    radial-gradient(820px 460px at 22% 0%, rgba(193, 26, 50, 0.14), transparent 62%),
    radial-gradient(880px 500px at 86% 90%, rgba(203, 159, 42, 0.22), transparent 62%),
    var(--grad-canvas);
}

.dl-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -140px;
  width: 140%;
  height: 280px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(203, 159, 42, 0.16), transparent 68%);
  pointer-events: none;
}

.dl-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(30px, 4vw, 64px);
  align-items: center;
}

.dl-hero h1 { font-size: var(--fs-hero); line-height: 1.04; }

.dl-hero__lead {
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  line-height: 1.82;
  max-width: 54ch;
}

/* --- Install card: a fake "downloading" panel with a live bar --- */
.dl-card {
  margin-block: var(--sp-5);
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-gold-light);
  box-shadow: var(--shadow-card);
  max-width: 480px;
}

.dl-card__top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.dl-card__icon {
  width: 56px; height: 56px;
  flex: none;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: var(--grad-black);
  border: 1px solid rgba(203, 159, 42, 0.4);
  overflow: hidden;
  padding: 8px;
}

.dl-card__icon img { width: 100%; height: auto; }

.dl-card__meta { min-width: 0; flex: 1; }
.dl-card__meta b { display: block; font-family: var(--font-display); font-size: 1.02rem; color: var(--color-black); line-height: 1.3; }
.dl-card__meta span { font-size: var(--fs-xs); color: var(--color-text-muted); }

.dl-card__verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-success);
  margin-top: 3px;
}

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

.dl-bar {
  height: 8px;
  border-radius: 8px;
  background: var(--color-surface-alt);
  overflow: hidden;
  position: relative;
}

.dl-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 8px;
  background: var(--grad-gold);
  transition: width 0.25s linear;
}

.dl-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: shimmerSweep 2.4s linear infinite;
}

.dl-card__stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.dl-card__stats b { color: var(--color-black); font-family: var(--font-display); }

.dl-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-5);
}

.dl-specs li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.dl-specs svg { width: 15px; height: 15px; color: var(--color-crimson); flex: none; }
.dl-specs b { color: var(--color-black); }

/* --------------------------------------------------------------------------
   2. Triple-phone stage (unique to this page)
   -------------------------------------------------------------------------- */

.dl-stage {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  perspective: 1500px;
}

.dl-stage__floor {
  position: absolute;
  bottom: 6%;
  width: 78%;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(11, 10, 11, 0.24), transparent 70%);
  filter: blur(6px);
}

.dl-stage__ring {
  position: absolute;
  width: 470px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(203, 159, 42, 0.3);
  background: radial-gradient(circle, rgba(203, 159, 42, 0.13), transparent 62%);
}

.dl-phones {
  position: relative;
  width: min(560px, 94%);
  height: 100%;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

.dl-phone {
  position: absolute;
  width: min(226px, 46%);
  aspect-ratio: 848 / 1855;
  border-radius: 36px;
  padding: 9px;
  background: linear-gradient(158deg, #3A3740 0%, #101014 32%, #26242B 64%, #0B0A0B 100%);
  box-shadow:
    0 34px 66px -20px rgba(11, 10, 11, 0.48),
    inset 0 0 0 1.3px rgba(255, 255, 255, 0.12);
  transition: transform 1s var(--ease-out), opacity 0.8s var(--ease-out);
}

.dl-phone__screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: #0B0A0B;
}

.dl-phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.dl-phone__notch {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  width: 30%; height: 15px;
  border-radius: var(--r-pill);
  background: #050506;
  z-index: 3;
}

/* three-layer arrangement */
.dl-phone--back {
  transform: translate3d(-74%, -7%, -130px) rotateY(24deg) rotateZ(-8deg) scale(0.94);
  opacity: 0.82;
  z-index: 1;
}

.dl-phone--mid {
  transform: translate3d(74%, 5%, -130px) rotateY(-24deg) rotateZ(8deg) scale(0.94);
  opacity: 0.82;
  z-index: 2;
}

.dl-phone--front {
  transform: translate3d(0, -2%, 0) rotateY(-6deg) rotateZ(-1deg);
  z-index: 3;
  box-shadow:
    0 46px 84px -22px rgba(11, 10, 11, 0.56),
    0 0 0 1px rgba(203, 159, 42, 0.24),
    inset 0 0 0 1.3px rgba(255, 255, 255, 0.14);
}

.dl-phone--front .dl-phone__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(103deg, transparent 42%, rgba(255, 255, 255, 0.16) 50%, transparent 58%);
  animation: sheenSlide 5.4s var(--ease-in-out) 1.6s infinite;
}

@keyframes sheenSlide {
  0%, 100% { transform: translateX(-70%); opacity: 0; }
  40% { opacity: 1; }
  70% { transform: translateX(70%); opacity: 0; }
}

.dl-stage.is-in .dl-phone--back { animation: floaty 8.5s var(--ease-in-out) 0.4s infinite; }
.dl-stage.is-in .dl-phone--mid { animation: floaty 7.4s var(--ease-in-out) 0.9s infinite; }
.dl-stage.is-in .dl-phone--front { animation: floaty 6.6s var(--ease-in-out) infinite; }

.dl-phones:hover .dl-phone--back { transform: translate3d(-84%, -10%, -130px) rotateY(27deg) rotateZ(-10deg) scale(0.94); }
.dl-phones:hover .dl-phone--mid { transform: translate3d(84%, 8%, -130px) rotateY(-27deg) rotateZ(10deg) scale(0.94); }
.dl-phones:hover .dl-phone--front { transform: translate3d(0, -5%, 0) rotateY(0deg) scale(1.03); }

/* Floating badges around the stack */
.dl-badge {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  font-size: var(--fs-xs);
  white-space: nowrap;
}

.dl-badge b { display: block; font-family: var(--font-display); font-size: 0.9rem; color: var(--color-black); line-height: 1.2; }
.dl-badge small { color: var(--color-text-muted); font-size: 0.7rem; }

.dl-badge__ic {
  width: 32px; height: 32px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--grad-gold);
  color: #3A2C05;
}

.dl-badge__ic svg { width: 17px; height: 17px; }

.dl-badge--top { top: -1%; left: -4%; animation: floaty 6.8s var(--ease-in-out) 0.6s infinite; }
.dl-badge--bottom { bottom: 4%; right: -4%; animation: floaty 7.8s var(--ease-in-out) 1.3s infinite; }

@media (max-width: 1020px) {
  .dl-hero__inner { grid-template-columns: 1fr; }
  .dl-stage { min-height: 470px; margin-top: var(--sp-5); }
}

@media (max-width: 700px) {
  .dl-stage { min-height: 420px; }
  .dl-stage__ring { width: 320px; }
  .dl-phones { width: 100%; }
  .dl-phone { width: min(178px, 50%); }
  .dl-phone--back { transform: translate3d(-56%, -6%, -120px) rotateY(22deg) rotateZ(-8deg) scale(0.9); }
  .dl-phone--mid { transform: translate3d(56%, 5%, -120px) rotateY(-22deg) rotateZ(8deg) scale(0.9); }
  .dl-badge--top { left: 0; top: 2%; padding: 8px 12px; }
  .dl-badge--bottom { display: none; }
}

/* --------------------------------------------------------------------------
   3. Platform tabs
   -------------------------------------------------------------------------- */

.plat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: var(--sp-6);
}

.plat-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--r-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-out);
}

.plat-tab svg { width: 19px; height: 19px; }

.plat-tab:hover { border-color: var(--color-gold); color: var(--color-black); }

.plat-tab[aria-selected="true"] {
  background: var(--grad-black);
  border-color: transparent;
  color: var(--color-gold-light);
  box-shadow: 0 10px 26px rgba(11, 10, 11, 0.22);
}

.plat-panel[hidden] { display: none; }

.plat-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 52px);
  align-items: start;
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-card);
  animation: panelIn 0.5s var(--ease-out);
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 820px) {
  .plat-panel { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   4. Install step cards (horizontal, numbered)
   -------------------------------------------------------------------------- */

.install-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-4);
  counter-reset: istep;
}

.istep {
  position: relative;
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}

.istep:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }

.istep::before {
  counter-increment: istep;
  content: counter(istep);
  position: absolute;
  right: 12px; top: -6px;
  font-family: var(--font-display);
  font-size: 4.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-gold-tint);
  z-index: 0;
}

.istep > * { position: relative; z-index: 1; }

.istep__ic {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--color-crimson-soft);
  color: var(--color-crimson);
  margin-bottom: 15px;
}

.istep__ic svg { width: 23px; height: 23px; }
.istep h3 { font-size: 1.02rem; margin-bottom: 7px; }
.istep p { font-size: var(--fs-sm); color: var(--color-text-muted); margin-bottom: 0; }

.istep__hint {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border);
  font-size: var(--fs-xs);
  color: var(--color-gold);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   5. Version / changelog
   -------------------------------------------------------------------------- */

.version-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--grad-black);
  color: var(--color-text-inverse);
}

.version-head h3 { color: #fff; margin: 0; font-size: 1.1rem; }
.version-head .badge { margin-left: auto; }

.version-body {
  padding: var(--sp-6);
  border: 1px solid var(--color-border);
  border-top: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: var(--color-surface);
}
