/* Ninefold's page: the typographic night room of its store frame. Ink-blue
   night with the sudoku lattice behind the hero (thin lines, a bold one every
   third), the violet bar from the screenshots' captions, the phone bare with
   a hairline and a cool glow. Space Grotesk throughout. The hero stays night
   in both themes; the page below follows the device. */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/space-grotesk/space-grotesk-400-700-latin.woff2) format("woff2");
}

.app-ninefold {
  --body: "Space Grotesk", var(--sys);
  --display: "Space Grotesk", var(--sys);
  --page: #f3f4fb;
  --surface: #ffffff;
  --ink: #141a30;
  --dim: #4a5276;
  --rule: #d4d8ee;
  --line: #ccd1ea;
  --line-bold: #5a659f;
  --link: #4b3bd1;
  --focus: #6a5af0;
  --violet: #6a5af0;
  --pip-off: #d4d8ee;

  --stage-bg: radial-gradient(120% 70% at 50% 0%, #2c2a6b 0%, #141a30 55%, #0d1020 100%);
  --stage-ink: #eef0ff;
  --stage-dim: #a9b1d8;
  --stage-focus: #7fd4ff;
  --store-bg: rgba(238, 240, 255, 0.06);
  --store-ink: #eef0ff;
  --store-border: 1px solid rgba(122, 134, 200, 0.6);
  --device-fill: #0d1020;
}

@media (prefers-color-scheme: dark) {
  .app-ninefold {
    --page: #0d1020;
    --surface: #151b33;
    --ink: #e7eaf8;
    --dim: #97a0c6;
    --rule: #29315a;
    --line: #2c3459;
    --line-bold: #5a659f;
    --link: #b0a6ff;
    --focus: #8b7bff;
    --violet: #8b7bff;
    --pip-off: #2c3459;
  }
}

/* ---- the stage ---- */

.app-ninefold .stage::before,
.app-ninefold .stage::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
/* The lattice: 46 px squares, a bold line every third, fading downwards. */
.app-ninefold .stage::before {
  background-image:
    linear-gradient(to right, rgba(110, 122, 190, 0.42) 1.6px, transparent 1.6px),
    linear-gradient(to bottom, rgba(110, 122, 190, 0.42) 1.6px, transparent 1.6px),
    linear-gradient(to right, rgba(90, 101, 159, 0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(90, 101, 159, 0.2) 1px, transparent 1px);
  background-size: 138px 138px, 138px 138px, 46px 46px, 46px 46px;
  background-position: calc(50% - 23px) -1px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.15) 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.15) 100%);
}
.app-ninefold .stage::after { background: radial-gradient(60% 40% at 16% 6%, rgba(139, 123, 255, 0.3), transparent 70%); }

.app-ninefold .hero { padding-bottom: 64px; }
.app-ninefold .hero-text { display: flex; flex-direction: column; align-items: flex-start; }
.app-ninefold .app-icon { width: 72px; height: 72px; order: 0; box-shadow: 0 0 0 1px rgba(122, 134, 200, 0.5), 0 12px 40px rgba(139, 123, 255, 0.25); }
.app-ninefold .hero h1 {
  order: 1; margin-top: 28px;
  font-size: clamp(64px, 13vw, 128px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.92;
}
.app-ninefold .kind { order: 2; margin-top: 12px; font-size: 18px; letter-spacing: 0.01em; }
.app-ninefold .bar { order: 3; display: block; width: 56px; height: 6px; margin-top: 36px; border-radius: 3px; background: #8b7bff; }
.app-ninefold .promise { order: 4; margin-top: 16px; font-size: clamp(26px, 3.6vw, 36px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.app-ninefold .lede { order: 5; margin-top: 14px; font-size: 18px; }
.app-ninefold .stores { order: 6; }
.app-ninefold .store-note { order: 7; }

.app-ninefold .device {
  border-radius: 34px; overflow: hidden;
  box-shadow: 0 0 0 1.5px rgba(122, 134, 200, 0.75), 0 0 0 9px rgba(13, 16, 32, 0.6), 0 0 0 10px rgba(122, 134, 200, 0.25), 0 30px 90px rgba(127, 212, 255, 0.16);
}

/* ---- sections ---- */

.app-ninefold h2 { font-size: clamp(28px, 4.2vw, 42px); font-weight: 600; letter-spacing: -0.025em; }
.app-ninefold .section-head p { font-size: 18px; }

/* What makes it good: the four points as one box of a sudoku grid, a bold
   outer frame and hairlines between the cells. */
.app-ninefold .box {
  display: grid; gap: 1px; margin: 40px 0 0; padding: 0; list-style: none;
  background: var(--line); border: 2px solid var(--line-bold); border-radius: 6px; overflow: hidden;
}
@media (min-width: 760px) { .app-ninefold .box { grid-template-columns: 1fr 1fr; } }
.app-ninefold .box li { background: var(--page); padding: 26px 24px 28px; }
@media (min-width: 760px) { .app-ninefold .box li { padding: 32px 36px 36px; } }
.app-ninefold .box h3 { margin: 0 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.app-ninefold .box p { margin: 0; color: var(--dim); }

/* The daily week: level by weekday, as the game's level pips. */
.app-ninefold .daily-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .app-ninefold .daily-grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; } }
.app-ninefold .week { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.app-ninefold .week li { display: grid; grid-template-columns: 3.2em 76px 1fr; gap: 16px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.app-ninefold .week .day { color: var(--dim); font-size: 15px; }
.app-ninefold .week .lvl { font-weight: 600; }
.app-ninefold .pips {
  height: 5px; border-radius: 1px;
  background: linear-gradient(to right, var(--violet) 0 var(--on), var(--pip-off) var(--on) 100%);
  -webkit-mask-image: repeating-linear-gradient(to right, #000 0 16px, transparent 16px 20px);
  mask-image: repeating-linear-gradient(to right, #000 0 16px, transparent 16px 20px);
}
.app-ninefold .pips.l1 { --on: 25%; }
.app-ninefold .pips.l2 { --on: 50%; }
.app-ninefold .pips.l3 { --on: 75%; }
.app-ninefold .pips.l4 { --on: 100%; }

.app-ninefold .faq summary { letter-spacing: -0.01em; }
