/* ============================================================
   SkinSignal / the dashboard's sign in gate (signed out only)
   dashboard.html #dashGate, revealed by showSignedOut in js/app.js.
   Loaded after css/shell.css. Nothing here applies to a signed in
   reader: the gate is hidden for them and every rule is scoped to it
   (or to body.dash--gated, which only the gate sets).

   THREE LAYERS, back to front:
     the teaser   the dashboard's own structure behind glass: blurred,
                  dimmed and fading away behind the gate. A shape, never
                  a sample: the value is starred out, the rank and the
                  collection are locked, the rows are bars.
     the gate     the one sharp thing: dark glass, a 1px blue edge, a
                  faint blue glow, a little gold, hairline corner marks
     what you get four modules under it

   The rail beside it stays razor sharp; nothing outside the gate's own
   section is blurred.
   ============================================================ */

/* ---------- Signed out: the chrome around the gate ---------- */
/* No figures to convert, so no currency switcher. */
.dash--gated .currency { display: none; }
/* The rail's active page, in the premium system: a blue wash and a 2px
   blue edge (the rail is css/shell.css; this only while the gate shows). */
@media (min-width: 1024px) {
  .dash--gated .topbar .nav__link--active {
    background: rgba(61, 127, 255, 0.1);
    box-shadow: inset 2px 0 0 #3d7fff;
  }
}

/* ---------- The section ---------- */
.dash-gate {
  --dg-gold: #e4ae39;
  --dg-blue: 76, 141, 255;
  --dg-ink: #f4f6fa;
  --dg-ink-2: #b9bfca;
  --dg-ink-3: #8a919e;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(24px, 2.6vw, 44px) clamp(16px, 2.6vw, 44px) clamp(44px, 4.4vw, 72px);
  background:
    radial-gradient(46% 38% at 50% 30%, rgba(61, 127, 255, 0.1), rgba(61, 127, 255, 0) 72%),
    radial-gradient(30% 34% at 88% 12%, rgba(228, 174, 57, 0.06), rgba(228, 174, 57, 0) 72%),
    #05080d;
}
/* A grid you have to look for, fading out towards the edges. */
.dash-gate::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(255, 255, 255, 0.018) 47px 48px),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(255, 255, 255, 0.014) 47px 48px);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 38%, #000 0%, transparent 100%);
          mask-image: radial-gradient(70% 60% at 50% 38%, #000 0%, transparent 100%);
}

/* The gate sits outside <main>, so it clears the rail itself, the way the
   strip and the footer do (css/shell.css), and centres in what is left. */
@media (min-width: 1024px) {
  .dash-gate { margin-left: var(--rail); }
}

.dg {
  position: relative;
  max-width: 1480px;
  margin: 0 auto;
}

/* ============================================================
   THE TEASER, behind glass
   ============================================================ */
.dg__teaser {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 0;
  height: clamp(560px, 44vw, 660px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(14px, 1.4vw, 24px);
  pointer-events: none;
  user-select: none;
  opacity: 0.62;
}
/* Falls away behind the gate: darkest in the middle, and gone at the
   bottom before the four modules. */
.dg__teaser::after {
  content: '';
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(40% 52% at 50% 50%, rgba(5, 8, 13, 0.7) 0%, rgba(5, 8, 13, 0.3) 70%, rgba(5, 8, 13, 0.06) 100%),
    linear-gradient(180deg, rgba(5, 8, 13, 0) 70%, #05080d 100%);
}

.dg__col {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.4vw, 24px);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.dgt {
  position: relative;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(17, 23, 36, 0.92), rgba(9, 13, 21, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
/* A little gold under some panels, as on the real dashboard's cards. */
.dgt--holdings::after,
.dgt--value::after,
.dgt--cards::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(228, 174, 57, 0.7), transparent);
  box-shadow: 0 0 12px rgba(228, 174, 57, 0.5);
}

/* The labels are real labels, faint; everything that would carry a
   figure is a bar or a picture, and blurred. */
.dgt__k {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: rgba(200, 210, 228, 0.7);
  filter: blur(0.6px);
}
.dgt__soft { filter: blur(4px); }

.dgt__bar {
  display: block;
  height: 7px;
  width: 70%;
  margin-top: 8px;
  border-radius: 4px;
  background: rgba(170, 190, 225, 0.28);
}
.dgt__bar--s { width: 42%; background: rgba(170, 190, 225, 0.16); }
.dgt__bar--gold { width: 36%; background: linear-gradient(90deg, rgba(228, 174, 57, 0.9), rgba(228, 174, 57, 0.4)); }

.dgt--holdings { flex: 1 1 0; min-height: 0; }
.dgt-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dgt-item img { grid-row: 1 / 3; width: 96px; height: auto; }
.dgt-item .dgt__bar { margin-top: 0; }

.dgt--trends { flex: 0 0 auto; }
.dgt__line { display: block; width: 100%; height: 120px; }
.dgt__line-stroke { fill: none; stroke: rgba(var(--dg-blue), 0.9); stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.dgt__line-fill { fill: rgba(var(--dg-blue), 0.14); }

.dgt--strip { height: 76px; }
.dgt--strip .dgt__soft { display: flex; gap: 18px; }
.dgt--strip .dgt__bar { flex: 1; }

/* The value: starred out, and an eye that is shut. Never a number. */
.dgt__hidden {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  color: rgba(225, 232, 244, 0.85);
}
.dgt__stars { font-size: 20px; letter-spacing: 0.12em; }
.dgt__eye { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }

.dgt--rank { flex: none; }
.dgt__rank {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
  gap: 12px;
}
.dgt__ask {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 700;
  font-size: 17px;
  color: rgba(225, 232, 244, 0.8);
}
.dgt__frame { position: relative; display: block; width: 96px; aspect-ratio: 1 / 1; }
.dgt__frame img { display: block; width: 100%; height: 100%; opacity: 0.55; }
.dgt__lock {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dgt__frame .dgt__lock { position: absolute; inset: 0; margin: auto; color: rgba(225, 232, 244, 0.7); }

.dgt--cards { flex: 1 1 0; min-height: 0; }
.dgt__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.dgt__cards img { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: contain; border-radius: 4px; }
.dgt__ask--over {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  color: rgba(235, 240, 250, 0.92);
  background: radial-gradient(60% 50% at 50% 55%, rgba(5, 8, 13, 0.65), rgba(5, 8, 13, 0) 100%);
}
.dgt__ask--over .dgt__lock { width: 26px; height: 26px; }

/* ============================================================
   THE GATE
   ============================================================ */
.dg__stage {
  position: relative;
  z-index: 1;
  padding-top: clamp(96px, 8.6vw, 150px);
}

.dg__gate {
  position: relative;
  width: min(100%, 780px);
  margin: 0 auto;
  padding: clamp(36px, 3.4vw, 56px) clamp(22px, 3vw, 48px) clamp(32px, 3vw, 48px);
  text-align: center;
  border: 1px solid rgba(var(--dg-blue), 0.35);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(var(--dg-blue), 0.07) 0%, rgba(var(--dg-blue), 0) 38%),
    linear-gradient(180deg, rgba(13, 21, 38, 0.95) 0%, rgba(7, 11, 20, 0.97) 100%);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 70px -24px rgba(61, 127, 255, 0.5),
    0 50px 100px -40px rgba(0, 0, 0, 0.95);
}
/* A little gold light along the foot of the glass. */
.dg__gate::after {
  content: '';
  position: absolute;
  left: 30%;
  right: 30%;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(228, 174, 57, 0.75), transparent);
  box-shadow: 0 0 14px rgba(228, 174, 57, 0.45);
}
/* Hairline corner marks: construction lines you notice on a second look. */
.dg__mark {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.dg__mark--tl { top: 12px; left: 12px; border-top: 1px solid rgba(var(--dg-blue), 0.5); border-left: 1px solid rgba(var(--dg-blue), 0.5); border-top-left-radius: 6px; }
.dg__mark--br { right: 12px; bottom: 12px; border-right: 1px solid rgba(228, 174, 57, 0.45); border-bottom: 1px solid rgba(228, 174, 57, 0.45); border-bottom-right-radius: 6px; }

.dg__eyebrow {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--dg-gold);
}
.dg__title {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 800;
  font-size: clamp(32px, 3.2vw, 56px);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--dg-ink);
}
.dg__line { display: block; white-space: nowrap; }
.dg__gold { color: var(--dg-gold); }
.dg__body {
  max-width: 640px;
  margin: 20px auto 0;
  font-family: var(--font-body);
  font-size: clamp(15px, 1vw, 17.5px);
  line-height: 1.6;
  color: var(--dg-ink-2);
}
.dg__cta { margin-top: clamp(24px, 2.4vw, 34px); min-width: 356px; justify-content: center; }

.dg__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin: clamp(22px, 2vw, 30px) 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--dg-ink-2);
}
.dg__trust li { position: relative; display: inline-flex; align-items: center; gap: 9px; }
.dg__trust li + li::before {
  content: '';
  position: absolute;
  left: -16px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}
.dg__trust svg { width: 19px; height: 19px; fill: none; stroke: rgb(var(--dg-blue)); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   WHAT YOU GET: four modules
   ============================================================ */
.dg__gets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.2vw, 20px);
  max-width: 1400px;
  margin: clamp(28px, 3vw, 44px) auto 0;
  padding: 0;
  list-style: none;
}
.dg-get {
  --get: var(--dg-blue);
  position: relative;
  padding: clamp(22px, 1.8vw, 30px) clamp(20px, 1.6vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 21, 34, 0.94), rgba(8, 12, 20, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 30px 60px -36px rgba(0, 0, 0, 0.95);
  overflow: hidden;
}
.dg-get--gold { --get: 228, 174, 57; }
/* The edge accent: a short light along the foot, in the module's colour. */
.dg-get::after {
  content: '';
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--get), 0.8), transparent);
  box-shadow: 0 0 12px rgba(var(--get), 0.45);
}
.dg-get__icon {
  display: block;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: rgb(var(--get));
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dg-get__k {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 20px 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(var(--get), 0.95);
}
.dg-get__k span { letter-spacing: 0.08em; color: var(--dg-ink-3); }
.dg-get__title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 800;
  font-size: clamp(18px, 1.3vw, 22px);
  line-height: 1.12;
  text-transform: uppercase;
  color: var(--dg-ink);
}
.dg-get__text {
  margin: 10px 0 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--dg-ink-2);
}

/* ============================================================
   NARROWER
   ============================================================ */
@media (max-width: 1279px) {
  .dg__teaser { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr); }
  .dg__gets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tablet: the gate narrower, the modules two by two, the teaser quieter. */
@media (max-width: 1023px) {
  .dg__teaser { opacity: 0.36; }
  .dg__gate { width: min(100%, 700px); }
}

/* Phones: one column, the teaser only a hint so the words stay clear. */
@media (max-width: 700px) {
  .dg__teaser { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); opacity: 0.22; }
  .dg__col--mid { display: none; }
  .dg__stage { padding-top: 48px; }
  .dg__gate { padding: 32px 18px 28px; }
  .dg__title { font-size: clamp(28px, 8.4vw, 38px); }
  .dg__line { white-space: normal; }
  .dg__cta { width: 100%; min-width: 0; }
  .dg__trust { flex-direction: column; align-items: center; gap: 10px; }
  .dg__trust li + li::before { display: none; }
  .dg__gets { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================
   ARRIVAL: the gate rises once, the modules follow; the teaser fades in.
   Nothing under reduced motion: it is simply there.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .dash-gate:not([hidden]) .dg__teaser { animation: dgFade 900ms ease both; }
  .dash-gate:not([hidden]) .dg__gate { animation: dgRise var(--reveal-dur, 650ms) var(--ease) 120ms both; }
  .dash-gate:not([hidden]) .dg-get { animation: dgRise var(--reveal-dur, 650ms) var(--ease) both; animation-delay: calc(320ms + var(--i, 0) * 70ms); }
  .dg-get:nth-child(2) { --i: 1; }
  .dg-get:nth-child(3) { --i: 2; }
  .dg-get:nth-child(4) { --i: 3; }
}
@keyframes dgFade {
  from { opacity: 0; }
}
@keyframes dgRise {
  from { opacity: 0; translate: 0 var(--reveal-rise, 12px); }
  to   { opacity: 1; translate: 0 0; }
}
