/* ============================================================
   PALMWARE GAMES — style.css
   Dark CRT-flavoured single page. Colours pulled from the logo:
   blue / red / orange / yellow / green rainbow palm.
   ============================================================ */

:root {
  /* StudioSplash background: rgb(0.04, 0.05, 0.07) */
  --bg: #0a0d12;
  --bg-panel: #11161f;
  --text: #e8e8e8;
  --text-dim: #9aa3ad;
  --blue:   #4a7ce8;
  --red:    #d7263d;
  --orange: #e8712a;
  --yellow: #e8d84a;
  --green:  #3aa655;
  /* Theme Terminal — overridden per theme by the script in index.html.
     --heading exists because light themes (cream, LCD) need dark headings. */
  --heading: #ffffff;
  --bg-hdr: rgba(10, 13, 18, 0.92);
  --border: #1d2530;
  --accent: #e8d84a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  line-height: 1.6;
}

/* CRT splash screen removed 2026-07-08 — archived, runnable copy with all
   its CSS in archive/crt-splash/splash-demo.html. */

/* ============================================================
   FAINT FULL-SITE CRT TEXTURE
   ============================================================ */

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* ============================================================
   HEADER / NAV
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--bg-hdr);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-logo { width: 34px; height: 34px; }

.brand-name {
  font-weight: bold;
  letter-spacing: 0.25em;
  font-size: 0.95rem;
}

.site-nav { display: flex; gap: 22px; }

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--heading);
  border-bottom-color: var(--yellow);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  text-align: center;
  padding: 90px 20px 70px;
}

.hero-logo {
  width: min(46vw, 220px);
  height: auto;
  filter: drop-shadow(0 0 30px rgba(74, 124, 232, 0.25));
}

.hero-title {
  margin-top: 28px;
  font-size: clamp(1.5rem, 5vw, 2.6rem);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-shadow: -2px 0 rgba(255, 0, 0, 0.35), 2px 0 rgba(0, 255, 255, 0.35);
}

.hero-tagline {
  margin-top: 18px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

/* Rainbow accent bar in the logo's stripe colours. */
.rainbow-bar {
  height: 5px;
  width: min(70%, 420px);
  margin: 22px auto 0;
  background: linear-gradient(to right,
    var(--blue) 0 20%,
    var(--red) 20% 40%,
    var(--orange) 40% 60%,
    var(--yellow) 60% 80%,
    var(--green) 80% 100%);
  border-radius: 2px;
}

/* ============================================================
   SECTIONS
   ============================================================ */

.section {
  max-width: 880px;
  margin: 0 auto;
  padding: 60px 24px;
}

.section-title {
  font-size: 1.3rem;
  letter-spacing: 0.35em;
  margin-bottom: 34px;
  color: var(--heading);
}

.section-title::after {
  content: "";
  display: block;
  height: 3px;
  width: 64px;
  margin-top: 10px;
  background: linear-gradient(to right,
    var(--blue) 0 20%, var(--red) 20% 40%, var(--orange) 40% 60%,
    var(--yellow) 60% 80%, var(--green) 80% 100%);
}

.section p { color: var(--text-dim); max-width: 640px; }

/* ============================================================
   GAME CARDS
   ============================================================ */

.game-card {
  display: flex;
  gap: 26px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 28px;
  align-items: stretch;
}

/* Placeholder key art — swap for a real image later:
   replace the div with <img class="game-art" src="..."> */
.game-art {
  flex: 0 0 240px;
  min-height: 170px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.art-title {
  font-weight: bold;
  font-size: 1.4rem;
  letter-spacing: 0.2em;
  color: #fff;
  text-shadow: -2px 0 rgba(255, 0, 0, 0.5), 2px 0 rgba(0, 255, 255, 0.5),
               0 2px 8px rgba(0, 0, 0, 0.8);
}

.art-spellslinger {
  background:
    radial-gradient(circle at 30% 30%, rgba(232, 216, 74, 0.35), transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(74, 124, 232, 0.45), transparent 60%),
    linear-gradient(135deg, #241a3d, #0e1a38);
}

.art-crochunter {
  background:
    radial-gradient(circle at 70% 25%, rgba(232, 113, 42, 0.4), transparent 55%),
    radial-gradient(circle at 25% 75%, rgba(58, 166, 85, 0.45), transparent 60%),
    linear-gradient(135deg, #0e2b1a, #123033);
}

.game-info h3 {
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.badge {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: #0a0d12;
  background: var(--yellow);
  border-radius: 3px;
  padding: 3px 8px;
  vertical-align: middle;
  margin-left: 8px;
}

.game-info p { margin-bottom: 10px; }

.game-meta { font-size: 0.8rem; color: var(--text-dim); }

/* "Play on itch.io" button on a game card. */
.play-link {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 16px;
  font-weight: bold;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: #0a0d12;
  background: var(--green);
  text-decoration: none;
  border-radius: 4px;
}

.play-link:hover {
  background: var(--yellow);
}

@media (max-width: 640px) {
  .game-card { flex-direction: column; }
  .game-art { flex-basis: auto; }
  .site-nav { gap: 14px; }
}

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */

.contact-link { color: var(--yellow); }
.contact-link:hover { color: #fff; }

.site-footer {
  text-align: center;
  padding: 40px 20px 50px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.site-footer .rainbow-bar { margin-bottom: 26px; }

/* ============================================================
   THEME TERMINAL
   Retro palettes (see script in index.html). A random theme loads
   on each visit; the panel bottom-left lets visitors skip themes,
   switch auto-rotation on, or turn on a glitch burst between
   theme changes (both off by default).
   ============================================================ */

/* Scanline-coloured veil that flashes during a theme change. */
#glitch-veil {
  position: fixed;
  inset: 0;
  z-index: 950;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}

.theme-glitch #glitch-veil { animation: veil 0.5s steps(4) both; }

@keyframes veil {
  0%   { opacity: 0.55; transform: translateY(-8px); }
  40%  { opacity: 0.3;  transform: translateY(6px) scaleY(1.02); }
  70%  { opacity: 0.35; transform: translateY(-3px); }
  100% { opacity: 0;    transform: none; }
}

.theme-glitch main, .theme-glitch .site-header, .theme-glitch .site-footer {
  animation: page-glitch 0.5s steps(2) both;
}

@keyframes page-glitch {
  0%   { transform: none; }
  15%  { transform: translate(-8px, 1px) skewX(1.5deg); filter: hue-rotate(22deg) saturate(1.6) contrast(1.1); }
  35%  { transform: translate(7px, -2px); }
  55%  { transform: translate(-4px, 1px) skewX(-1deg); filter: hue-rotate(-16deg); }
  75%  { transform: translate(2px, 0); }
  100% { transform: none; filter: none; }
}

.theme-glitch .hero-title, .theme-glitch .section-title, .theme-glitch .brand-name {
  text-shadow: -4px 0 rgba(255, 0, 60, 0.6), 4px 0 rgba(0, 255, 255, 0.6) !important;
}

/* The control panel. */
#theme-terminal {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 960;
  font: 11px/1.6 "Courier New", Courier, monospace;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  background: var(--bg-hdr);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 4px;
  user-select: none;
}

#theme-terminal b { color: var(--text); }

.tt-btn {
  display: inline-block;
  margin: 7px 6px 0 0;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  cursor: pointer;
}

.tt-btn:hover { border-color: var(--accent); color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .theme-glitch #glitch-veil, .theme-glitch main,
  .theme-glitch .site-header, .theme-glitch .site-footer { animation: none; }
}
