/*
 * CobblemonsOCE, on the web.
 *
 * One stylesheet for every page, no build step and no framework: Cloudflare Pages serves this directory
 * exactly as it is, so anything added here has to work by being opened in a browser. That constraint is
 * deliberate - a guide nobody can edit without installing a toolchain is a guide that stops being written.
 *
 * The look is the network's own, carried over from the in-game menus rather than invented here: dark slate
 * panels with a lighter top edge, gold hairlines, thin gold corner ornaments, and a Poke Ball on the title.
 * Dark is the identity, so there is no light theme - a half-lit version of this would be a different server.
 */

:root {
  color-scheme: dark;

  /* Page */
  --ground: #0e1117;
  --ground-2: #151a24;
  --sunk: #1b2029;

  /* Menu panels, straight from the in-game frames */
  --panel: #4a5262;
  --panel-top: #565f71;
  --edge-light: #8691a6;
  --edge-dark: #2c313d;
  --surface: #232936;

  /* Ink */
  --ink: #f2f5fa;
  --muted: #c0c9d8;
  --dim: #97a1b3;
  --line: #343c4b;

  /* Accents */
  --gold: #fbbf24;
  --gold-deep: #b48012;
  --grass: #4ade80;
  --water: #8ec5ff;
  --ball-red: #e14133;
  --ball-white: #e9ecf2;
  --ball-ink: #15181f;

  /* Type. Fredoka has the rounded, confident shape a Pokemon title wants and still sets tight at small
     sizes; Source Sans 3 is a quiet humanist body face with proper tabular figures for the tables. */
  --display: "Fredoka", "Trebuchet MS", Verdana, sans-serif;
  --body: "Source Sans 3", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* A faint lattice and two slow washes of colour, so the dark has some depth in it. Very low opacity on
   purpose: you should notice it only if you go looking. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 560px at 50% -12%, rgba(251, 191, 36, 0.07), transparent 70%),
    radial-gradient(900px 520px at 8% 108%, rgba(96, 165, 250, 0.05), transparent 70%),
    repeating-linear-gradient(60deg, rgba(134, 145, 166, 0.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(-60deg, rgba(134, 145, 166, 0.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(134, 145, 166, 0.035) 0 1px, transparent 1px 28px),
    var(--ground);
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 76px;
}

.wrap.wide { max-width: 1120px; }

/* ---------------------------------------------------------------- header */

header.site {
  border-bottom: 1px solid var(--edge-dark);
  background: linear-gradient(180deg, var(--panel-top), #3d4453);
  box-shadow: inset 0 1px 0 var(--edge-light), 0 1px 0 rgba(0, 0, 0, 0.5), 0 6px 18px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 5;
}

/* The gold hairline that runs under every title bar in game. */
header.site::after {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-deep) 18%, var(--gold) 50%, var(--gold-deep) 82%, transparent);
  opacity: 0.8;
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}

header.site a.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

header.site a.brand .oce { color: var(--gold); }

header.site nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}

header.site nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
}

header.site nav a:hover,
header.site nav a:focus-visible {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.22);
  border-color: var(--edge-dark);
}

header.site nav a.here {
  color: var(--gold);
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(0, 0, 0, 0.22);
}

/* ---------------------------------------------------------------- type */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.08;
  margin: 40px 0 12px;
}

h2 {
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.2;
  margin: 46px 0 14px;
  padding-bottom: 9px;
  border-width: 0 0 1px;
  border-style: solid;
  border-image: linear-gradient(90deg, var(--gold) 0, var(--gold-deep) 26%, rgba(180, 128, 18, 0) 76%) 1;
}

h2.plain { border: 0; padding-bottom: 0; }

h3 { font-size: 19px; margin: 28px 0 8px; }

p, li { max-width: 68ch; }

a { color: var(--water); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

.lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 62ch;
}

.small { font-size: 15px; color: var(--dim); }

strong { color: var(--ink); }

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

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--edge-dark);
  padding: 1px 6px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

pre {
  background: var(--sunk);
  border: 1px solid var(--line);
  padding: 14px 16px;
  overflow-x: auto;
}

pre code { background: none; border: 0; padding: 0; }

/* The Poke Ball mark, inline SVG everywhere it appears. */
.ball { flex: none; display: block; }
.ball.sm { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- panels */

.panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel) 0, #424a59 62%, #3b4251 100%);
  border: 1px solid var(--edge-dark);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 var(--panel-top),
    inset 0 2px 0 rgba(134, 145, 166, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3),
    0 3px 0 rgba(0, 0, 0, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.3);
  padding: 22px 24px;
}

/* Four thin gold corner ornaments, drawn as eight one-pixel gradients on a single pseudo-element so the
   markup stays clean. Thin on purpose - in game they are a hairline, not a frame. */
.orn::before {
  content: "";
  position: absolute;
  inset: 7px;
  pointer-events: none;
  border-radius: 6px;
  opacity: 0.55;
  background:
    linear-gradient(var(--gold), var(--gold)) left top / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left top / 1px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right top / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right top / 1px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left bottom / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left bottom / 1px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 1px 16px no-repeat;
}

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

/* ---------------------------------------------------------------- hero */

.hero {
  margin: 30px 0 8px;
  padding: 34px 30px 30px;
  text-align: left;
}

.hero h1 { margin: 14px 0 12px; }
.hero .lede { color: #dbe2ee; }

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 999px;
  padding: 5px 14px 5px 9px;
}

.address {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, #171c25, #10141b);
  border: 1px solid var(--gold-deep);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(251, 191, 36, 0.28), 0 2px 0 rgba(0, 0, 0, 0.4);
  padding: 13px 20px;
  font-family: var(--mono);
  font-size: clamp(17px, 3.6vw, 21px);
  color: var(--ink);
  margin: 20px 0 6px;
  overflow-wrap: anywhere;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  padding: 12px 20px;
  border-radius: 9px;
  text-decoration: none;
  border: 1px solid var(--gold-deep);
  background: linear-gradient(180deg, #fcd34d, #eea90f);
  color: #21170a;
  box-shadow: 0 3px 0 #7c5a0d, inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn:hover { filter: brightness(1.06); transform: translateY(-1px); color: #21170a; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #7c5a0d, inset 0 1px 0 rgba(255, 255, 255, 0.55); }

.btn.ghost {
  background: linear-gradient(180deg, var(--panel-top), #3e4554);
  color: var(--ink);
  border-color: var(--edge-dark);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45), inset 0 1px 0 var(--edge-light);
}

.btn.ghost:hover { color: var(--gold); }
.btn.wide { width: 100%; justify-content: center; }

/* ---------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.cards li {
  position: relative;
  background: linear-gradient(180deg, var(--panel) 0, #424a59 65%, #3b4251 100%);
  border: 1px solid var(--edge-dark);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 var(--panel-top), inset 0 -2px 0 rgba(0, 0, 0, 0.28), 0 3px 0 rgba(0, 0, 0, 0.3);
  padding: 18px 20px 20px;
  max-width: none;
}

.cards li::before {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  border-radius: 7px;
  opacity: 0.4;
  background:
    linear-gradient(var(--gold), var(--gold)) left top / 13px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left top / 1px 13px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 13px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 1px 13px no-repeat;
}

.cards h3 {
  margin: 0 0 6px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cards p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------------------------------------------------------------- notes */

.note {
  border: 1px solid var(--edge-dark);
  border-left: 3px solid var(--water);
  background: linear-gradient(180deg, #1b2534, #151d29);
  border-radius: 10px;
  padding: 15px 18px;
  margin: 24px 0;
  color: var(--muted);
}

.note.warn {
  border-left-color: var(--gold);
  background: linear-gradient(180deg, #261f10, #1c170c);
}

.note p { margin: 0; }
.note p + p { margin-top: 8px; }

/* ---------------------------------------------------------------- tables */

.scroller { overflow-x: auto; margin: 20px 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15.5px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.scroller > table { margin: 0; }

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

thead th, tr:first-child th {
  color: var(--gold);
  font-family: var(--display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom-color: var(--gold-deep);
  white-space: nowrap;
}

tbody tr:hover td { background: rgba(134, 145, 166, 0.07); }

td.num, th.num { text-align: right; }

/* ---------------------------------------------------------------- steps */

.steps { counter-reset: step; list-style: none; padding: 0; }

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  margin-bottom: 20px;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--panel-top), #363d4a);
  border: 1px solid var(--gold-deep);
  color: var(--gold);
  font-family: var(--display);
  font-size: 15px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ---------------------------------------------------------------- the store */

/* Six tiers land as three across on a desktop and one per row on a phone - a six-wide row of cards is a
   comparison nobody reads. */
.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin: 24px 0 8px;
  padding: 0;
  list-style: none;
}

.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--panel) 0, #424a59 60%, #3a4150 100%);
  border: 1px solid var(--edge-dark);
  border-top: 2px solid var(--accent, var(--gold));
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(134, 145, 166, 0.5), inset 0 -2px 0 rgba(0, 0, 0, 0.3), 0 3px 0 rgba(0, 0, 0, 0.32);
  padding: 18px 20px 20px;
  max-width: none;
}

.tier::before {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  border-radius: 7px;
  opacity: 0.4;
  background:
    linear-gradient(var(--gold), var(--gold)) left top / 13px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left top / 1px 13px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 13px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 1px 13px no-repeat;
}

.tier h3 {
  margin: 0;
  font-size: 21px;
  color: var(--accent, var(--gold));
  display: flex;
  align-items: center;
  gap: 8px;
}

.tier .price {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1.1;
  margin: 6px 0 2px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.tier .price small { font-size: 14px; color: var(--dim); font-family: var(--body); }

.tier .purse {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
}

.tier ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  font-size: 15px;
  color: var(--muted);
}

.tier ul li {
  max-width: none;
  padding: 4px 0 4px 20px;
  position: relative;
  border-top: 1px solid rgba(0, 0, 0, 0.18);
}

.tier ul li:first-child { border-top: 0; }

.tier ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, var(--gold));
  opacity: 0.85;
}

.tier .btn { margin-top: auto; justify-content: center; }

/* The pass sits apart from the ladder: it is rented, not owned. */
.pass {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin: 26px 0 8px;
}

@media (max-width: 720px) { .pass { grid-template-columns: 1fr; gap: 16px; } }

.compare th:first-child { width: 210px; }
.compare td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.compare tbody th {
  color: var(--muted);
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
  border-bottom-color: var(--line);
  white-space: normal;
}

.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 22px 0; padding: 0; list-style: none; }

/* ---------------------------------------------------------------- footer */

footer.site {
  border-top: 1px solid var(--edge-dark);
  background: linear-gradient(180deg, rgba(74, 82, 98, 0.16), transparent);
  color: var(--dim);
  font-size: 14.5px;
  padding: 26px 0 52px;
}

footer.site .wrap { padding-bottom: 0; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--gold); }

.footlinks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; padding: 0; list-style: none; }
.footlinks li { max-width: none; }

/* ---------------------------------------------------------------- phones */

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding-bottom: 56px; }
  .hero { padding: 24px 18px 22px; }
  .panel { padding: 18px 18px; }
  header.site .wrap { gap: 10px; }
  header.site nav { margin-left: 0; width: 100%; }
  th, td { padding: 9px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .btn:hover, .btn:active { transform: none; }
}
