/* Cryatura LLC site styles. Self-hosted fonts only, no external requests. */

@font-face {
  font-family: "Bangers";
  src: url("/assets/fonts/bangers.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fffaf0;
  --surface: #ffffff;
  --sky: #dff2ff;
  --leaf: #e2f5e4;
  --sun: #ffd23f;
  --sun-soft: #fff1c2;
  --ink: #1d2340;
  --muted: #464e6b;
  --brand: #1d7548;
  --brand-dark: #135836;
  --berry: #a3245a;
  --fire: #b8401c;
  --grass: #2c7a34;
  --water: #1f65a8;
  --focus: #1b4fd8;
  --radius: 22px;
  --pop: 6px 6px 0 var(--ink);
  --max: 1120px;
  --display: "Bangers", "Impact", "Arial Black", system-ui, sans-serif;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-dark); font-weight: 700; text-underline-offset: 0.18em; }
a:hover { color: var(--berry); }

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

h1, h2, h3 { line-height: 1.1; margin: 0 0 0.5em; }
h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.02em;
}
h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); }
h2 { font-size: clamp(2rem, 5vw, 2.9rem); margin-top: 1.4em; }
h3 { font-size: 1.25rem; font-weight: 900; margin-top: 1.1em; }
p, ul, ol { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 14px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  z-index: 10;
}
.skip-link:focus { top: 12px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 3px solid var(--ink);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.9rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 40px;
  height: 40px;
  border: 3px solid var(--ink);
  border-radius: 12px;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}
.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  border: 2px solid transparent;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.98rem;
}
.site-nav a:hover { border-color: var(--ink); color: var(--ink); }
.site-nav a[aria-current="page"] {
  background: var(--sun);
  border-color: var(--ink);
}

/* Main */
main { padding: 32px 0 64px; }
main.bleed { padding-top: 0; }
main:focus { outline: none; }

.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.prose { max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: 0.95rem; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--sun);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 14px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 1.05rem;
  text-decoration: none;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--brand); color: #ffffff; }
.btn-primary:hover { background: var(--brand-dark); color: #ffffff; }
.btn-secondary { background: var(--surface); color: var(--ink); }
.btn-secondary:hover { background: var(--sun-soft); color: var(--ink); }

.cards {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 24px 0;
}
.card {
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--pop);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.band {
  background: var(--leaf);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px;
  margin: 36px 0;
  box-shadow: var(--pop);
}
.band h2 { margin-top: 0; }

/* Full-width colored sections on the home page */
.section { padding: 56px 0; }
.section-sky { background: var(--sky); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.section-sun { background: var(--sun-soft); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.section > .wrap > h2:first-child { margin-top: 0; }

/* Hero */
.hero-band {
  background:
    radial-gradient(circle at 4% 6%, rgba(255, 210, 63, 0.5) 0 70px, transparent 71px),
    radial-gradient(circle at 92% 85%, rgba(44, 122, 52, 0.18) 0 160px, transparent 161px),
    var(--sky);
  border-bottom: 3px solid var(--ink);
  padding: 40px 0 56px;
}
.hero {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1.15fr; }
}
.hero h1 { margin-bottom: 0.3em; }

/* The battle scene: the game's own backdrops behind the owner's critter art */
.battle { margin: 0; }
.battle-stage {
  position: relative;
  aspect-ratio: 440 / 270;
  border: 4px solid var(--ink);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  background: #aee3f5 url("/assets/scenes/meadow.webp") center / cover no-repeat;
}
.battle-stage .scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.battle-stage .fighter { position: absolute; }
.battle-stage .fighter.player { left: 11%; bottom: 6%; height: 50%; width: auto; }
.battle-stage .fighter.foe { right: 14%; bottom: 46%; width: 21%; }
.hud {
  position: absolute;
  background: rgba(255, 255, 255, 0.94);
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 4px 10px 6px;
  font-size: clamp(0.75rem, 1.6vw, 0.95rem);
  font-weight: 900;
  line-height: 1.25;
  min-width: 34%;
}
.hud-foe { top: 5%; left: 4%; }
.hud-player { bottom: 5%; right: 4%; }
.hud .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hud .lv { margin-left: auto; }
.chip {
  display: inline-block;
  padding: 0 7px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.75rem;
  line-height: 1.5;
}
.chip.fire { background: var(--fire); }
.chip.grass { background: var(--grass); }
.chip.water { background: var(--water); }
.hp {
  display: block;
  height: 8px;
  margin-top: 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #e6e8ef;
  overflow: hidden;
}
.hp span { display: block; height: 100%; background: #2fb35a; }
.battle-log {
  margin: 0;
  background: var(--ink);
  color: #ffffff;
  border: 4px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 10px 16px;
  font-weight: 800;
}
.battle-frame { filter: drop-shadow(6px 6px 0 var(--ink)); }
.soon { margin-top: 14px; }
.battle figcaption { margin-top: 14px; font-size: 0.92rem; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .battle-stage .scene { animation: scene-cycle 15s infinite; }
  .battle-stage .scene:nth-of-type(2) { animation-delay: 5s; }
  .battle-stage .scene:nth-of-type(3) { animation-delay: 10s; }
  .battle-stage .fighter.player { animation: bob 2.6s ease-in-out infinite; }
  .battle-stage .fighter.foe { animation: bob 2.2s ease-in-out infinite reverse; }
  .btn, .site-nav a { transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease; }
}
@keyframes scene-cycle {
  0% { opacity: 0; }
  6% { opacity: 1; }
  33% { opacity: 1; }
  39% { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4%); }
}

/* Choose your creature */
.starters {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 28px;
}
.starter {
  margin: 0;
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--pop);
  padding: 18px;
  text-align: center;
}
.starter .portrait {
  aspect-ratio: 1 / 1;
  border: 3px solid var(--ink);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 240px;
  margin: 0 auto 14px;
  padding: 12px;
}
.starter.fire .portrait { background: #ffe1d4; }
.starter.grass .portrait { background: #d9f3d6; }
.starter.water .portrait { background: #d5ebff; }
.starter .portrait img { max-height: 100%; width: auto; }
.starter .mystery {
  font-family: var(--display);
  font-size: 6rem;
  line-height: 1;
  color: var(--ink);
}
.starter figcaption strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.8rem;
  letter-spacing: 0.03em;
}

/* Gym leaders and badges */
.gyms {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  margin-top: 26px;
}
.gym { margin: 0; }
.gym-stage {
  aspect-ratio: 440 / 270;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--pop);
  background: center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gym-stage.forest { background-image: url("/assets/scenes/forest.webp"); }
.gym-stage.desert { background-image: url("/assets/scenes/desert.webp"); }
.gym-stage .leader {
  width: 46%;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.88);
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: 4px 4px 0 var(--ink);
}
.gym figcaption { margin-top: 12px; font-size: 1.05rem; }
.gym figcaption strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  margin-right: 8px;
}
.mystery-row h3 { margin-top: 1.6em; }
.locked-leaders,
.badges {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 14px;
}
.locked-leaders { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); max-width: 980px; }
/* Both rows fade out at the end, so they promise more without giving a count */
.locked-leaders,
.badges {
  -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 55%, transparent 100%);
  grid-template-rows: auto;
  grid-auto-rows: 0;
  row-gap: 0;
  column-gap: 14px;
  overflow: hidden;
}
.locked-leaders li {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #cfd3dd;
  overflow: hidden;
}
.locked-leaders svg { width: 100%; height: 100%; display: block; }
.locked-leaders .hair { fill: #8f95a6; }
.locked-leaders .skin { fill: #b3b8c5; }
.locked-leaders .body { fill: #a0a6b5; }
.q,
.badges span {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1;
}
.locked-leaders .q {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  color: #ffffff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--ink);
}
.badges { grid-template-columns: repeat(auto-fill, 60px); max-width: 980px; }
.badges li {
  width: 60px;
  height: 60px;
  border: 3px dashed var(--ink);
  border-radius: 50%;
  background: #e2e5ec;
  display: flex;
  align-items: center;
  justify-content: center;
}
.badges span { font-size: 1.9rem; }

/* Orbs */
.orbs {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 24px;
}
.orb {
  margin: 0;
  text-align: center;
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--pop);
  padding: 16px;
}
.orb img { width: 120px; margin: 0 auto 8px; }
.orb figcaption strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.6rem; letter-spacing: 0.03em; }

/* Game page critter figures */
.critter-stage {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.critter {
  margin: 0;
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--pop);
  text-align: center;
}
.critter.fire { background: linear-gradient(180deg, #ffe1d4, var(--surface) 70%); }
.critter.grass { background: linear-gradient(180deg, #d9f3d6, var(--surface) 70%); }
.critter img {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 10px;
  object-fit: contain;
}
.critter figcaption strong { display: block; font-size: 1.15rem; }

.facts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.facts li {
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.facts strong { display: block; font-size: 1.05rem; }

.badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--sun);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 900;
  font-size: 0.92rem;
}

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
  margin-bottom: 18px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sun);
  border: 3px solid var(--ink);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* FAQ */
.faq details {
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: 14px;
  margin-bottom: 12px;
  padding: 0 18px;
}
.faq summary {
  cursor: pointer;
  font-weight: 900;
  padding: 14px 0;
  list-style-position: inside;
}
.faq details[open] { box-shadow: 4px 4px 0 var(--ink); }
.faq details[open] summary { border-bottom: 2px solid var(--ink); margin-bottom: 12px; }
.faq details > *:last-child { margin-bottom: 16px; }

.contact-box {
  background: var(--sun-soft);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--pop);
  padding: 22px;
  max-width: 560px;
}
.contact-box .email {
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  font-weight: 900;
  word-break: break-word;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #eef0f7;
  padding: 36px 0;
  font-size: 0.95rem;
}
.site-footer a { color: #ffffff; }
.site-footer a:hover { color: var(--sun); }
.footer-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .legal-line { margin: 24px 0 0; color: #cfd3e3; }

/* Outside the home hero, the battle scene keeps a comfortable size */
.wrap > .battle { max-width: 760px; margin-top: 34px; }

/* Company details: each card grows to fit its line rather than breaking it */
.facts.company { display: flex; flex-wrap: wrap; }
.facts.company li { flex: 1 1 auto; white-space: nowrap; overflow-wrap: normal; }

/* Play now! - a button with a rainbow ring that circles it and glows */
@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.play-ring {
  position: relative;
  display: inline-block;
  padding: 5px;
  border-radius: 999px;
  background: conic-gradient(from var(--spin), #ffd23f, #ff7a3d, #ff3d7f, #8a5cff, #3dc8ff, #3ddc84, #ffd23f);
  isolation: isolate;
}
.play-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(from var(--spin), #ffd23f, #ff7a3d, #ff3d7f, #8a5cff, #3dc8ff, #3ddc84, #ffd23f);
  filter: blur(14px);
  opacity: 0.75;
  z-index: -1;
}
.btn-play {
  display: inline-block;
  padding: 14px 44px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--brand);
  color: #ffffff;
  font-family: var(--display);
  font-weight: 400;
  font-size: 2.3rem;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-decoration: none;
}
.btn-play:hover,
.btn-play:focus-visible { background: var(--brand-dark); color: #ffffff; }

/* Emberpup perched on the hero's Play now! button, front paws over its edge */
.cta-row { align-items: flex-end; }
.play-cta { position: relative; padding-top: 114px; }
.pup {
  position: absolute;
  top: 0;
  left: 14px;
  width: 140px;
  z-index: 2;
  pointer-events: none;
  transform-origin: 50% 100%;
}
.pup img { width: 100%; height: auto; display: block; }
.woof {
  position: absolute;
  left: 136px;
  top: 10px;
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 2px 10px;
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
}
.woof::after {
  content: "";
  position: absolute;
  left: -11px;
  bottom: 6px;
  border: 7px solid transparent;
  border-right: 9px solid var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  .play-ring,
  .play-ring::before { animation: ring-spin 3s linear infinite; }
  .play-ring::before { animation: ring-spin 3s linear infinite, ring-pulse 1.6s ease-in-out infinite; }
  .pup { animation: pup-hop 4s ease-in-out infinite; }
  .woof { animation: woof 4s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .woof { opacity: 1; }
}
@keyframes ring-spin { to { --spin: 360deg; } }
@keyframes ring-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.06); }
}
@keyframes pup-hop {
  0%, 58%, 72%, 100% { transform: translateY(0); }
  63% { transform: translateY(-8px); }
  68% { transform: translateY(0); }
}
@keyframes woof {
  0%, 58% { opacity: 0; transform: scale(0.4); }
  64% { opacity: 1; transform: scale(1.12); }
  70%, 86% { opacity: 1; transform: scale(1); }
  92%, 100% { opacity: 0; transform: scale(0.6); }
}

/* A critter's type under its name: a small icon and the word, on the type's colour */
.type-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 14px 4px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: #ffffff;
  font-family: var(--font);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.type-tag svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.type-tag.fire { background: var(--fire); }
.type-tag.grass { background: var(--grass); }
.type-tag.water { background: var(--water); }
