/* ==========================================================================
   Y1 Game — Download page
     00 · Hero device mockup
     01 · Install rail (vertical timeline)
     02 · Platform cards
     03 · Requirements table
     04 · QR panel
     05 · Safety block
     06 · Compare paths
   ========================================================================== */


/* ==========================================================================
   00 · HERO DEVICE MOCKUP
   A lighter twin of the homepage's device mockup, scoped to this page only
   so download.css stays self-contained.
   ========================================================================== */

.dl-hero-grid {
  display: grid;
  gap: clamp(2.5rem, 1rem + 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 960px) {
  .dl-hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
}

.dl-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(340px, 40vw, 480px);
}
.dl-art::before {
  content: '';
  position: absolute;
  width: min(360px, 88%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.36) 0%, rgba(212, 175, 55, 0.1) 46%, transparent 70%);
  filter: blur(6px);
}
.dl-ring {
  position: absolute;
  width: min(420px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line-gold-faint);
}
.dl-ring::after {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px dashed rgba(212, 175, 55, 0.26);
  animation: dlRingSpin 50s linear infinite;
}
@keyframes dlRingSpin { to { transform: rotate(360deg); } }

.dl-device {
  position: relative;
  z-index: 2;
  width: clamp(210px, 22vw, 264px);
  aspect-ratio: 9 / 19.2;
  padding: 8px;
  border-radius: 34px;
  background: linear-gradient(150deg, #2A2724, var(--surface-base) 46%, #23201D);
  box-shadow:
    0 44px 80px -36px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(212, 175, 55, 0.55);
  animation: dlDeviceFloat 8.5s var(--ease-inout) infinite;
}
@keyframes dlDeviceFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
.dl-device::before {
  content: '';
  position: absolute;
  top: 17px;
  left: 50%;
  transform: translateX(-50%);
  width: 66px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
  z-index: 3;
}
.dl-device__screen {
  position: relative;
  height: 100%;
  border-radius: 27px;
  overflow: hidden;
  background: var(--surface-deep);
}
.dl-device__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.dl-device__screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0.15) 0%, transparent 34%, transparent 66%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}

.dl-badge {
  position: absolute;
  z-index: 3;
  padding: 0.5rem 0.9rem;
  border-radius: var(--r-pill);
  background: var(--surface-lift);
  color: var(--gold-bright);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px var(--line-gold), var(--shadow-md);
}
.dl-badge--a { left: 2%; top: 10%; }
.dl-badge--b { right: 0; bottom: 14%; background: var(--ruby-plate); color: #fff; box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(212, 175, 55, 0.5); }

@media (prefers-reduced-motion: reduce) {
  .dl-ring::after, .dl-device { animation: none; }
}
@media (max-width: 640px) {
  .dl-badge { font-size: 0.6rem; padding: 0.4rem 0.7rem; }
}


/* ==========================================================================
   01 · INSTALL RAIL
   ========================================================================== */

.rail {
  position: relative;
  display: grid;
  gap: clamp(1.25rem, 0.8rem + 1.6vw, 2.25rem);
  padding-left: 2.9rem;
}

/* The vertical gold line the steps hang from */
.rail::before {
  content: '';
  position: absolute;
  left: 1.05rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 1px;
  background: linear-gradient(180deg, var(--gold), var(--ruby));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1600ms var(--ease-out) 150ms;
}
.rail.is-in::before { transform: scaleY(1); }

@media (min-width: 720px) { .rail { padding-left: 3.6rem; } }

.rstep {
  position: relative;
  padding: clamp(1.25rem, 1rem + 1vw, 1.85rem);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 46%),
    var(--surface-lift);
  box-shadow: inset 0 0 0 1px var(--line-ink), var(--shadow-sm);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.rstep:hover {
  transform: translateX(4px);
  box-shadow: inset 0 0 0 1px var(--line-gold-strong), var(--shadow-md);
}

/* The numbered node sitting on the rail */
.rstep__node {
  position: absolute;
  left: -2.9rem;
  top: clamp(1.25rem, 1rem + 1vw, 1.85rem);
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--surface-base);
  color: var(--gold);
  font-family: var(--font-label);
  font-size: 0.68rem;
  box-shadow: 0 0 0 5px var(--surface-base), inset 0 0 0 1px var(--line-gold);
  transition: background var(--t-base) linear, color var(--t-base) linear;
}
.rstep:hover .rstep__node { background: var(--ruby-plate); color: #fff; }
@media (min-width: 720px) { .rstep__node { left: -3.6rem; width: 2.5rem; height: 2.5rem; font-size: 0.76rem; } }

.rstep h3 {
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
}
.rstep p { font-size: var(--fs-sm); line-height: 1.72; }
.rstep .chip { margin-top: 0.9rem; }

.section--tint .rstep { background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0) 46%), var(--surface-lift); }
.section--tint .rstep__node { box-shadow: 0 0 0 5px var(--surface-tint), inset 0 0 0 1px var(--line-gold); }
.section--tint .rail::before { z-index: 0; }


/* ==========================================================================
   02 · PLATFORM CARDS
   ========================================================================== */

.plats {
  display: grid;
  gap: clamp(1rem, 0.6rem + 1.2vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.plat {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  padding: clamp(1.4rem, 1rem + 1.4vw, 2rem);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 46%),
    var(--surface-lift);
  box-shadow: inset 0 0 0 1px var(--line-gold-faint), var(--shadow-sm);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.plat:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px var(--line-gold-strong), var(--shadow-md); }
.plat__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--surface-base);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--line-gold);
}
.plat__icon svg { width: 25px; height: 25px; }
.plat h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 800; letter-spacing: 0; }
.plat p { font-size: var(--fs-sm); line-height: 1.7; }
.plat dl {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.35rem;
  font-size: var(--fs-xs);
}
.plat dl div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--line-gold-faint);
}
.plat dt { color: var(--ink-soft); }
.plat dd { color: var(--ink); font-weight: 700; }


/* ==========================================================================
   03 · REQUIREMENTS TABLE
   ========================================================================== */

.reqs {
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line-gold-faint);
  background: var(--surface-lift);
  font-size: var(--fs-sm);
}
.reqs th,
.reqs td {
  padding: 0.95rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--line-ink-soft);
}
.reqs thead th {
  background: var(--surface-deep);
  color: var(--gold);
  font-family: var(--font-label);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: 0;
}
.reqs tbody tr:last-child th,
.reqs tbody tr:last-child td { border-bottom: 0; }
.reqs tbody th { font-weight: 700; color: var(--ink); width: 40%; }
.reqs tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.028); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }


/* ==========================================================================
   04 · QR PANEL
   ========================================================================== */

.qr {
  display: grid;
  gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  align-items: center;
  padding: clamp(1.6rem, 1rem + 2.4vw, 3rem);
  border-radius: var(--r-xl);
  background:
    radial-gradient(520px 300px at 88% 12%, rgba(212, 175, 55, 0.22), transparent 66%),
    radial-gradient(560px 320px at 8% 92%, rgba(155, 17, 30, 0.4), transparent 64%),
    var(--surface-deep);
  color: var(--ink-muted);
  box-shadow: inset 0 0 0 1px var(--line-gold), var(--shadow-lg);
}
@media (min-width: 780px) { .qr { grid-template-columns: auto 1fr; } }

.qr h2 { color: var(--ink); font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem); }
.qr p { font-size: var(--fs-sm); line-height: 1.7; max-width: 52ch; }

.qr__code {
  position: relative;
  display: grid;
  place-items: center;
  gap: 0.6rem;
  width: clamp(160px, 22vw, 210px);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: var(--r-lg);
  background: var(--ivory);
  box-shadow: inset 0 0 0 1px var(--line-gold), var(--shadow-md);
  text-align: center;
  padding: 1rem;
  overflow: hidden;
}
/* Placeholder pattern until a real QR image is dropped in */
.qr__code::before {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: var(--r-sm);
  background-image:
    linear-gradient(45deg, rgba(13, 13, 13, 0.07) 25%, transparent 25%, transparent 75%, rgba(13, 13, 13, 0.07) 75%),
    linear-gradient(45deg, rgba(13, 13, 13, 0.07) 25%, transparent 25%, transparent 75%, rgba(13, 13, 13, 0.07) 75%);
  background-size: 22px 22px;
  background-position: 0 0, 11px 11px;
}
.qr__code span {
  position: relative;
  z-index: 1;
  font-family: var(--font-label);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.92);
  padding: 0.4rem 0.6rem;
  border-radius: var(--r-xs);
}
.qr__code svg { position: relative; z-index: 1; width: 42px; height: 42px; color: var(--ruby); }


/* ==========================================================================
   05 · SAFETY BLOCK
   ========================================================================== */

.safety {
  display: grid;
  gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  align-items: center;
}
@media (min-width: 900px) { .safety { grid-template-columns: 1fr 1fr; } }

.safety__list { display: grid; gap: 0.9rem; }
.warn {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: var(--r-md);
  background: var(--surface-lift);
  box-shadow: inset 0 0 0 1px var(--line-ink);
  font-size: var(--fs-sm);
  line-height: 1.65;
}
.warn svg { width: 20px; height: 20px; color: var(--ruby-bright); margin-top: 0.15rem; }
.warn b { display: block; color: var(--ink); margin-bottom: 0.15rem; }
