/* beagle.games home page. Same palette as the game (css/theme.css), but responsive. */

:root {
  --bg: #0a0e13;
  --panel: #141b24;
  --panel-hi: #1a2330;
  --inset: #0c1117;
  --line: #243040;
  --line-hi: #34465a;
  --text: #e8eef4;
  --muted: #93a3b4;
  --dim: #5e6d7d;
  --accent: #2ee6a6;
  --money: #ffc44d;
  --power: #4fd5ff;
  --research: #b894ff;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --tile: 40px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font: 15px/1.6 var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(46, 230, 166, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(79, 213, 255, 0.07), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

/* Header */
.siteHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  border-bottom: 1px solid var(--line);
}

.siteBrand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.siteBrand .dot {
  color: var(--accent);
}

.siteMark {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 8px rgba(46, 230, 166, 0.45));
}

.siteNav a {
  margin-left: 22px;
  color: var(--muted);
  font-weight: 600;
}

.siteNav a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 64px 0 40px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero h1 .glow {
  color: var(--accent);
  text-shadow: 0 0 24px rgba(46, 230, 166, 0.45);
}

.hero p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.sectionTitle {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

/* Featured game */
.gameCard {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 36px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel) 120px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.scene {
  display: grid;
  grid-template-columns: repeat(11, var(--tile));
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 14px 34px rgba(0, 0, 0, 0.6);
}

.scene span {
  width: var(--tile);
  height: var(--tile);
  background-size: cover;
}

.scene .core {
  animation: corePulse 2.4s ease-in-out infinite;
}

@keyframes corePulse {
  50% {
    filter: brightness(1.35) drop-shadow(0 0 6px rgba(255, 106, 77, 0.8));
  }
}

.gameCard + .gameCard {
  margin-top: 24px;
}

/* Idle Loops: a loop's action list running, with the mana bar draining. */
.loopScene {
  display: grid;
  gap: 12px;
  width: calc(11 * var(--tile));
  padding: 16px;
  border-radius: 10px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(140, 150, 255, 0.16), transparent 70%),
    var(--inset);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 14px 34px rgba(0, 0, 0, 0.6);
}

.loopMana {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #0a0d1a;
  border: 1px solid var(--line);
  overflow: hidden;
}

.loopMana span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5d68e8, #8c96ff 70%, #c3c8ff);
  box-shadow: 0 0 12px rgba(140, 150, 255, 0.6);
  animation: manaDrain 9s linear infinite;
}

@keyframes manaDrain {
  from {
    width: 100%;
  }
  to {
    width: 4%;
  }
}

.loopIcons {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.loopIcons img {
  width: 100%;
  aspect-ratio: 1;
  opacity: 0.55;
  animation: loopStep 9s steps(1) infinite;
}

.loopIcons img:nth-child(1) {
  animation-delay: 0s;
}
.loopIcons img:nth-child(2) {
  animation-delay: 0.75s;
}
.loopIcons img:nth-child(3) {
  animation-delay: 1.5s;
}
.loopIcons img:nth-child(4) {
  animation-delay: 2.25s;
}
.loopIcons img:nth-child(5) {
  animation-delay: 3s;
}
.loopIcons img:nth-child(6) {
  animation-delay: 3.75s;
}
.loopIcons img:nth-child(7) {
  animation-delay: 4.5s;
}
.loopIcons img:nth-child(8) {
  animation-delay: 5.25s;
}
.loopIcons img:nth-child(9) {
  animation-delay: 6s;
}
.loopIcons img:nth-child(10) {
  animation-delay: 6.75s;
}
.loopIcons img:nth-child(11) {
  animation-delay: 7.5s;
}
.loopIcons img:nth-child(12) {
  animation-delay: 8.25s;
}

@keyframes loopStep {
  0% {
    opacity: 1;
    transform: translateY(-3px);
    filter: drop-shadow(0 0 8px rgba(140, 150, 255, 0.8));
  }
  8.33% {
    opacity: 0.55;
    transform: none;
    filter: none;
  }
}

.loopLabel {
  color: var(--muted);
  font: 12px/1 var(--font);
  letter-spacing: 0.04em;
  text-align: center;
}

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--money);
}

.gameCard h2 {
  margin: 4px 0 10px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
}

.gameCard h2 small {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}

.gameCard p {
  margin: 0 0 16px;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 4px 11px;
  border: 1px solid var(--line-hi);
  border-radius: 999px;
  background: var(--inset);
  font-size: 13px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.playButton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border: 1px solid #1d8f69;
  border-radius: 10px;
  background: linear-gradient(180deg, #2fe3a8, #17a273);
  color: #04140e;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(46, 230, 166, 0.35);
  transition:
    filter 0.12s,
    transform 0.08s;
}

.playButton:hover {
  filter: brightness(1.1);
  color: #04140e;
}

.playButton:active {
  transform: translateY(1px);
}

.note {
  color: var(--dim);
  font-size: 13px;
}

/* About page */
.siteNav a[aria-current="page"] {
  color: var(--text);
}

.prose {
  max-width: 760px;
  margin-bottom: 36px;
}

.points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.points li {
  margin-bottom: 10px;
  padding-left: 16px;
  border-left: 2px solid var(--line-hi);
  color: var(--muted);
}

.points strong {
  color: var(--text);
}

.small {
  color: var(--muted);
  font-size: 14px;
}

.dim {
  color: var(--dim);
  font-size: 13px;
}

.creditCard {
  margin-bottom: 24px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel) 120px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.creditCard h2 {
  margin: 4px 0 10px;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
}

.creditCard h2 small {
  margin-left: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

.creditCard > p {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--muted);
}

.linkGroups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.linkGroups > div {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--inset);
}

.linkGroups h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--money);
}

.linkGroups p {
  margin: 0 0 8px;
}

.links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.links li {
  margin: 4px 0;
}

.links a {
  font-weight: 600;
}

.links a:hover {
  text-decoration: underline;
}

/* Footer */
.siteFooter {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
}

.siteFooter p {
  margin: 4px 0;
}

.siteFooter a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-hi);
}

@media (max-width: 860px) {
  :root {
    --tile: 28px;
  }

  .gameCard {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 20px;
  }

  .hero {
    padding: 40px 0 28px;
  }
}

@media (max-width: 380px) {
  :root {
    --tile: 24px;
  }
}

@media (max-width: 560px) {
  .siteNav a {
    margin-left: 0;
    white-space: nowrap;
  }

  .siteNav a:first-child {
    display: none;
  }
}
