/* p11c — "pro" style, modeled on the Unaltered title screen: a night sky with stars, chamfered
   panels with a bright top edge and a hard drop shadow, pixel-block lettering with a light
   sweep, one accent color per panel (the warden colors), gold for what is selected.
   Active while <html> has the class "pro". */

html:not(.pro) .only-pro { display: none; }
html.pro .only-ink { display: none; }
.sky, .ring { display: none; }

/* panel accents (the warden rule colors of the game) */
.t-hero { --acc: 170 120 255; }
.t-games { --acc: 255 199 92; }
.t-tools { --acc: 92 219 158; }
.t-me { --acc: 115 168 255; }
.t-ideas { --acc: 250 235 107; }
.t-guides { --acc: 255 115 77; }
.t-dl { --acc: 82 224 242; }
.t-contact { --acc: 219 92 242; }

.enso-wrap { cursor: pointer; }
.enso-wrap:focus-visible { outline: 2px dashed var(--seal); outline-offset: 6px; }

/* ---- the wipe between the two styles: a feathered circle growing from the click ---- */
@property --r { syntax: "<length>"; inherits: false; initial-value: 0px; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) {
  z-index: 2;
  -webkit-mask-image: radial-gradient(circle at var(--tx, 50%) var(--ty, 50%), #000 calc(var(--r) - 90px), transparent var(--r));
  mask-image: radial-gradient(circle at var(--tx, 50%) var(--ty, 50%), #000 calc(var(--r) - 90px), transparent var(--r));
}

html.pro {
  --paper: #05060a;
  --paper-light: #0e0e22;
  --ink: #eceeff;
  --ink-dim: #969cc4;
  --seal: #ffd678;
  --line: #2c2e66;
  --edge: rgba(170, 120, 255, 0.45);
  --acc: 170 120 255;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --sans: "Inter", "Noto Sans", system-ui, sans-serif;
}
html.pro body {
  font-family: var(--sans);
  background: linear-gradient(#1d1535, #020208);
  background-attachment: fixed;
}
html.pro body::before { display: none; }
html.pro .sky { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
html.pro main { position: relative; z-index: 1; }
html.pro a { border-bottom-color: rgba(170, 120, 255, 0.5); }
html.pro a:hover { color: var(--seal); border-bottom-color: var(--seal); }

/* ---- pixel-block lettering: light top, violet foot, hard shadow, a light sweep ---- */
html.pro .tile:nth-child(n) .word,
html.pro .tile:nth-child(n):hover .word,
html.pro .hero-name,
html.pro header .name {
  font-family: var(--pixel);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.15;
  transform: none;
  color: transparent;
  background:
    linear-gradient(105deg, transparent 38%, rgb(255 255 255 / 0.85) 50%, transparent 62%) 160% 0 / 250% 100% no-repeat,
    linear-gradient(#eceeff 12%, rgb(var(--acc)) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0.09em 0.11em 0 rgb(6 4 20 / 0.8));
  animation: sweep 6s linear infinite;
}
@keyframes sweep { from { background-position: 160% 0, 0 0; } to { background-position: -60% 0, 0 0; } }
html.pro .tile:nth-child(n) .word { font-size: min(calc(84cqw / var(--n, 6)), 30cqh); border: 0; padding: 0; margin: 0; }
html.pro .tile:nth-child(n):hover .word {
  background:
    linear-gradient(105deg, transparent 38%, rgb(255 255 255 / 0.85) 50%, transparent 62%) 160% 0 / 250% 100% no-repeat,
    linear-gradient(#fff 12%, #ffd678 96%);
  -webkit-background-clip: text;
  background-clip: text;
}
html.pro .word a { border: 0; }
html.pro .word::after { display: none; }

/* ---- chamfered panels ---- */
html.pro .tile, html.pro .card {
  --cut: 14px;
  --hi: color-mix(in srgb, rgb(var(--acc)) 55%, white);
  animation: none;
  filter: drop-shadow(5px 7px 0 rgb(0 0 0 / 0.5));
}
html.pro .tile:nth-child(n)::before,
html.pro .card:nth-child(n)::before {
  inset: 0;
  background: rgb(var(--acc) / 0.65);
  border: 0;
  border-radius: 0;
  filter: none;
  transform: none;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
html.pro .tile::after,
html.pro .card::after {
  content: "";
  position: absolute;
  inset: 1.6px;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(var(--hi), var(--hi)) center 0.2px / calc(100% - 2 * var(--cut) - 12px) 1.4px no-repeat,
    linear-gradient(rgb(26 24 58 / 0.94), rgb(10 10 26 / 0.94));
  clip-path: polygon(calc(var(--cut) - 1px) 0, calc(100% - var(--cut) + 1px) 0, 100% calc(var(--cut) - 1px),
    100% calc(100% - var(--cut) + 1px), calc(100% - var(--cut) + 1px) 100%, calc(var(--cut) - 1px) 100%,
    0 calc(100% - var(--cut) + 1px), 0 calc(var(--cut) - 1px));
}
html.pro .tile:nth-child(n):hover::before,
html.pro a.card:hover::before,
html.pro a.card:focus-visible::before { background: rgb(255 214 120 / 0.95); transform: none; }

/* ---- chips: menu entries ---- */
html.pro .chip, html.pro .chips a {
  border-bottom: 0;
  font-family: var(--sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: clamp(0.78rem, 1.08vw, 1.2rem);
  color: var(--ink);
}
html.pro .chips.col a, html.pro .chips.col .chip, html.pro .chips.col .plain { font-size: clamp(0.9rem, 1.25vw, 1.45rem); }
html.pro .chips.two a { font-size: clamp(0.72rem, 0.98vw, 1.1rem); }
html.pro .t-games .chips a { font-size: clamp(0.85rem, 1.3vw, 1.5rem); }
html.pro .chips .plain { font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: clamp(0.9rem, 1.25vw, 1.45rem); color: var(--ink-dim); }
html.pro .chip:hover, html.pro .chips a:hover, html.pro .chip:focus-visible {
  color: var(--seal);
  text-shadow: 0 0 12px rgb(255 214 120 / 0.5);
}

/* ---- hero: the portrait in a chamfered frame inside slowly turning dashed rings ---- */
html.pro .enso, html.pro .seal { display: none; }
html.pro .enso-wrap {
  width: auto;
  height: min(54cqh, 125cqw);
  aspect-ratio: 4 / 5;
  filter: drop-shadow(0 0 16px rgb(170 120 255 / 0.4));
}
html.pro .ring {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  height: 128%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 1.5px dashed rgb(170 120 255 / 0.5);
  border-radius: 50%;
  pointer-events: none;
  animation: spin 50s linear infinite;
}
html.pro .ring.r2 { height: 98%; border-style: dotted; border-color: rgb(170 120 255 / 0.4); animation-duration: 30s; animation-direction: reverse; }
@keyframes spin { to { rotate: 360deg; } }
html.pro .portrait {
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 2px;
  background: rgb(170 120 255 / 0.8);
  border: 0;
  border-radius: 0;
  clip-path: polygon(11% 0, 89% 0, 100% 8.5%, 100% 91.5%, 89% 100%, 11% 100%, 0 91.5%, 0 8.5%);
  animation: none;
}
html.pro .hero-name { font-size: min(calc(88cqw / 8), 8cqh); text-align: center; margin-top: 0.4rem; }
html.pro .hero-name .only-pro { display: block; }
html.pro .hero-name .only-pro span { display: block; }
html.pro .hero-tag { animation: none; }

html.pro .me-row h3 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(0.9rem, 1.3vw, 1.45rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(var(--acc));
  transform: none;
}

/* ---- subpages: games page cards, guides ---- */
html.pro header { margin-bottom: 2rem; }
html.pro header::after { display: none; }
html.pro header .name { font-size: clamp(1.3rem, 4vw, 2.2rem); display: block; }
html.pro .tagline { color: var(--ink-dim); }
html.pro h2 {
  display: block;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(170 120 255);
  transform: none;
  border-bottom: 1px solid var(--edge);
  padding-bottom: 0.45rem;
  margin-bottom: 1rem;
}
html.pro h2::after { display: none; }
html.pro h3 { font-family: var(--sans); font-weight: 700; font-size: 1rem; color: var(--ink); transform: none; }
html.pro .card { --cut: 12px; --acc: 170 120 255; }
html.pro .grid .card:nth-child(6n+1) { --acc: 255 199 92; }
html.pro .grid .card:nth-child(6n+2) { --acc: 92 219 158; }
html.pro .grid .card:nth-child(6n+3) { --acc: 115 168 255; }
html.pro .grid .card:nth-child(6n+4) { --acc: 250 235 107; }
html.pro .grid .card:nth-child(6n+5) { --acc: 255 115 77; }
html.pro .grid .card:nth-child(6n) { --acc: 82 224 242; }
html.pro .card-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(var(--acc));
  transform: none;
}
html.pro .card p { color: var(--ink-dim); }
html.pro .card .thumb {
  border: 1px solid rgb(var(--acc) / 0.7);
  border-radius: 0;
  filter: none;
}
html.pro .thumb.glyph { background: rgb(var(--acc) / 0.1); color: rgb(var(--acc)); }
html.pro pre {
  background: rgba(14, 14, 34, 0.92);
  border: 1px solid var(--edge);
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}
html.pro .note {
  background: rgba(14, 14, 34, 0.92);
  border: 1px solid var(--edge);
  border-left: 4px solid rgb(var(--acc));
  border-radius: 0;
}
html.pro code { background: rgba(255, 255, 255, 0.08); }
html.pro th { color: var(--ink-dim); }
html.pro footer { border-top-color: var(--edge); }

@media (max-width: 900px), (max-height: 620px) {
  html.pro .enso-wrap { height: auto; width: min(60cqw, 12rem); }
  html.pro .hero-name { font-size: 1.1rem; }
  html.pro .chip, html.pro .chips a, html.pro .chips.col a, html.pro .chips.two a, html.pro .chips .plain { font-size: 0.85rem; }
}
@media (min-width: 901px) and (max-height: 800px) {
  html.pro .tile { --cut: 10px; }
  html.pro .tile:nth-child(n) .word { font-size: min(calc(80cqw / var(--n, 6)), 26cqh); }
  html.pro .chips a, html.pro .chip { font-size: clamp(0.66rem, 0.9vw, 0.95rem); }
  html.pro .chips.col a, html.pro .chips.col .chip, html.pro .chips.col .plain { font-size: clamp(0.78rem, 1.1vw, 1.25rem); }
  html.pro .chips.two a { font-size: clamp(0.62rem, 0.84vw, 0.95rem); }
  html.pro .me-row h3 { font-size: clamp(0.8rem, 1.05vw, 1.1rem); }
}
@media (prefers-reduced-motion: reduce) {
  html.pro .tile .word, html.pro .hero-name, html.pro header .name, html.pro .ring { animation: none; }
}
