/* ==========================================================================
   PokeSlayerz — shared shell
   Dark dossier: near-black ink, violet signal, ember accent.
   Display: Bricolage Grotesque · Body: Newsreader · Labels: Azeret Mono
   ========================================================================== */

:root {
  /* ink */
  --ink: #08060e;
  --ink-2: #0b0813;
  --surface: #14111b;
  --surface-2: #191524;

  /* line work */
  --line: rgba(193, 154, 255, 0.13);
  --line-strong: rgba(193, 154, 255, 0.32);

  /* signal */
  --violet: #c19aff;
  --violet-dim: #9174c2;
  --ember: #d8974f;

  /* type */
  --heading: #f7f3ff;
  --text: #c2bacd;
  --text-dim: #8a8298;

  --measure: 64ch;
  --radius: 22px;
  --radius-sm: 12px;

  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "Azeret Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(20px, 5vw, 56px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(16.5px, 0.4vw + 15.6px, 18.5px);
  line-height: 1.72;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Atmosphere: two fixed light wells plus a grain plate.
   Both are fixed and inert so nothing repaints while scrolling.
   -------------------------------------------------------------------------- */

.atmosphere,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.atmosphere {
  background:
    radial-gradient(
      62rem 42rem at 12% -8%,
      rgba(139, 96, 214, 0.22),
      transparent 68%
    ),
    radial-gradient(
      44rem 34rem at 104% 12%,
      rgba(216, 151, 79, 0.11),
      transparent 66%
    ),
    radial-gradient(
      70rem 50rem at 50% 118%,
      rgba(97, 68, 156, 0.16),
      transparent 70%
    );
}

.grain {
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
.wordmark,
.pill {
  font-family: var(--font-display);
  color: var(--heading);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  margin: 0 0 0.5rem;
}

h2 {
  font-size: clamp(1.42rem, 2.2vw, 1.85rem);
  margin: 3.4rem 0 0.7rem;
}

h3 {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  margin: 2rem 0 0.35rem;
  color: #e8e0f5;
}

p,
li {
  margin: 0 0 1.05rem;
  max-width: var(--measure);
}

strong {
  color: var(--heading);
  font-weight: 600;
}

a {
  color: var(--violet);
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.18s var(--ease), text-decoration-color 0.18s var(--ease);
}

a:hover {
  color: #ddc6ff;
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 4px;
}

/* visually hidden, still read aloud — used for "opens in a new tab" notes */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* label — the mono voice used for eyebrows and metadata */
.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.685rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--violet-dim);
  margin: 0 0 0.9rem;
}

.label--ember {
  color: var(--ember);
}

/* lists get a drawn marker rather than a bullet glyph */
ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
}

ul li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.55rem;
}

ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 0.7rem;
  height: 1px;
  background: var(--violet-dim);
}

/* --------------------------------------------------------------------------
   Frame
   -------------------------------------------------------------------------- */

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  background: var(--surface);
  color: var(--heading);
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.skip:focus {
  left: 0;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  font-size: 1.06rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--heading);
}

.wordmark svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--violet);
  transition: transform 0.5s var(--ease);
}

.wordmark:hover {
  color: var(--heading);
}

.wordmark:hover svg {
  transform: rotate(90deg);
}

.wordmark b {
  font-weight: 700;
}

.wordmark span {
  color: var(--violet);
  font-weight: 400;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.735rem;
  letter-spacing: 0.06em;
}

.nav a {
  position: relative;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.25rem 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--violet);
  transition: right 0.28s var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--heading);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  right: 0;
}

.nav a[aria-current="page"]::after {
  background: var(--ember);
}

main {
  flex: 1;
  padding: clamp(2.6rem, 7vw, 5.4rem) var(--gutter) clamp(4rem, 9vw, 7rem);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem var(--gutter) 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
}

.footer a {
  color: var(--text-dim);
  text-decoration: none;
}

.footer a:hover {
  color: var(--violet);
}

/* --------------------------------------------------------------------------
   Document pages
   -------------------------------------------------------------------------- */

.doc {
  max-width: 1180px;
  margin: 0 auto;
}

.doc-head {
  margin-bottom: clamp(2.4rem, 5vw, 3.6rem);
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--line);
}

.doc-head p {
  color: var(--text-dim);
  font-size: 0.98rem;
  margin: 0.9rem 0 0;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

/* asymmetric split: sticky index rail on the left, prose offset right */
.doc-body {
  display: grid;
  gap: clamp(2rem, 4vw, 4.5rem);
}

@media (min-width: 62rem) {
  .doc-body {
    grid-template-columns: 15.5rem minmax(0, 1fr);
  }
}

.index {
  align-self: start;
}

@media (min-width: 62rem) {
  .index {
    position: sticky;
    top: 6.5rem;
  }
}

.index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: idx;
  border-left: 1px solid var(--line);
}

.index li {
  counter-increment: idx;
  margin: 0;
}

.index a {
  display: flex;
  gap: 0.7rem;
  padding: 0.42rem 0 0.42rem 1rem;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.715rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.index a::before {
  content: counter(idx, decimal-leading-zero);
  color: var(--violet-dim);
  opacity: 0.7;
}

.index a:hover {
  color: var(--heading);
  border-left-color: var(--violet);
}

/* prose */
.prose {
  min-width: 0;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.prose h2:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

/* numbered sections for the long-form policy */
.prose--numbered {
  counter-reset: sect;
}

.prose--numbered h2 {
  counter-increment: sect;
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}

.prose--numbered h2::before {
  content: counter(sect, decimal-leading-zero);
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ember);
  transform: translateY(-0.15em);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.panel {
  background: linear-gradient(
    168deg,
    var(--surface-2),
    var(--surface) 55%
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.2rem);
}

.panel h2 {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.panel > *:last-child {
  margin-bottom: 0;
}

/* stack of choice / support blocks — deliberately staggered, not a tidy row */
.stack {
  display: grid;
  gap: 1rem;
  max-width: 54rem;
}

@media (min-width: 48rem) {
  .stack > *:nth-child(even) {
    margin-left: clamp(1rem, 4vw, 3.4rem);
  }
}

.block {
  position: relative;
  padding: 1.6rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  overflow: hidden;
}

.block::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(var(--violet), transparent);
  opacity: 0.55;
}

.block h2,
.block h3 {
  margin: 0 0 0.5rem;
  border: 0;
  padding: 0;
  font-size: 1.16rem;
}

.block > *:last-child {
  margin-bottom: 0;
}

/* value that still needs filling in by a human */
.pending {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8em;
  letter-spacing: 0.05em;
  color: var(--ember);
  background: rgba(216, 151, 79, 0.09);
  border: 1px dashed rgba(216, 151, 79, 0.42);
  border-radius: 6px;
  padding: 0.12em 0.5em;
}

/* --------------------------------------------------------------------------
   Landing
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  max-width: 1180px;
  margin: 0 auto clamp(3.5rem, 8vw, 6rem);
}

.hero-grid {
  display: grid;
  gap: clamp(2.4rem, 5vw, 4rem);
  align-items: end;
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}

.hero h1 {
  font-size: clamp(3rem, 10.5vw, 6.4rem);
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin-bottom: 1.4rem;
}

.hero h1 em {
  display: block;
  font-style: normal;
  color: var(--violet);
}

.hero .lede {
  font-size: clamp(1.02rem, 1.2vw, 1.16rem);
  color: var(--text);
  max-width: 34ch;
}

/* calls to action — mono caps, same line work as the rest of the shell */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.82rem 1.3rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  font-family: var(--font-mono);
  font-size: 0.735rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--heading);
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease),
    background-color 0.24s var(--ease), color 0.24s var(--ease),
    box-shadow 0.24s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--violet);
  background: var(--surface);
  color: var(--heading);
}

.btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.btn .arrow {
  font-size: 0.95em;
  transition: transform 0.24s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* membership — the one ember-filled element on the page */
.btn--ember {
  border-color: transparent;
  background: linear-gradient(148deg, #eaad61, var(--ember));
  color: #1a1005;
}

.btn--ember:hover {
  border-color: transparent;
  background: linear-gradient(148deg, #f2b96e, #e0a25c);
  color: #150c03;
  box-shadow: 0 12px 26px rgba(216, 151, 79, 0.18);
}

/* radar rings bleeding off the right edge — the one grid-breaking element */
.rings {
  position: absolute;
  top: -8rem;
  right: -14rem;
  width: 40rem;
  height: 40rem;
  color: var(--violet);
  opacity: 0.16;
  pointer-events: none;
}

@media (max-width: 62rem) {
  .rings {
    top: -12rem;
    right: -18rem;
    width: 30rem;
    height: 30rem;
    opacity: 0.1;
  }
}

.rings circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.7;
}

.rings .sweep {
  stroke: var(--ember);
  stroke-width: 1.1;
  transform-origin: 100px 100px;
  animation: sweep 9s linear infinite;
}

@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}

/* document links */
.docs-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-list li {
  padding: 0;
  margin: 0;
}

.docs-list li::before {
  display: none;
}

.doc-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.6rem 1.2rem;
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  text-decoration: none;
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease),
    background-color 0.24s var(--ease);
}

.doc-link:hover {
  transform: translateX(6px);
  border-color: var(--line-strong);
  background: var(--surface);
}

.doc-link strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: -0.015em;
  color: var(--heading);
}

.doc-link small {
  display: block;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 0.15rem;
}

.doc-link .arrow {
  font-family: var(--font-mono);
  color: var(--violet-dim);
  transition: transform 0.24s var(--ease), color 0.24s var(--ease);
}

.doc-link:hover .arrow {
  color: var(--violet);
  transform: translateX(4px);
}

/* what the app does — factual, from the policy */
.capabilities {
  max-width: 1180px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 4vw, 3rem);
}

.cap-grid {
  display: grid;
  gap: 1.6rem clamp(1.6rem, 4vw, 3.4rem);
  margin-top: 1.8rem;
}

@media (min-width: 44rem) {
  .cap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 72rem) {
  .cap-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* break the even rhythm so it never reads as a card row */
  .cap-grid > *:nth-child(2) {
    transform: translateY(1.5rem);
  }

  .cap-grid > *:nth-child(4) {
    transform: translateY(1.5rem);
  }
}

.cap {
  border-top: 1px solid var(--line-strong);
  padding-top: 0.9rem;
}

.cap h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
}

.cap p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-dim);
  max-width: 30ch;
}

/* --------------------------------------------------------------------------
   Not found
   -------------------------------------------------------------------------- */

.notfound {
  max-width: 44rem;
  margin: clamp(2rem, 8vh, 6rem) auto;
  text-align: left;
}

.notfound .code {
  font-family: var(--font-mono);
  font-size: clamp(3.4rem, 14vw, 7rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--violet-dim);
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

/* --------------------------------------------------------------------------
   Entrance — one staggered reveal per page, then done
   -------------------------------------------------------------------------- */

.reveal > * {
  animation: rise 0.75s var(--ease) both;
}

.reveal > *:nth-child(1) {
  animation-delay: 0.04s;
}
.reveal > *:nth-child(2) {
  animation-delay: 0.13s;
}
.reveal > *:nth-child(3) {
  animation-delay: 0.22s;
}
.reveal > *:nth-child(4) {
  animation-delay: 0.31s;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

@media print {
  .atmosphere,
  .grain,
  .masthead,
  .index,
  .rings {
    display: none !important;
  }

  body {
    background: #fff;
    color: #14111b;
  }

  h1,
  h2,
  h3 {
    color: #08060e;
  }

  p,
  li {
    color: #2b2635;
  }
}
