/* Pet Rock Translator — Exhibit 01. Same circus, smaller tent. */

:root {
  --yellow: #ffff00;
  --lime: #00ff41;
  --magenta: #ff00a8;
  --blue: #0000ee;
  --red: #ff0000;
  --ink: #111111;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

h1, h2, h3 { font-family: Impact, "Arial Black", sans-serif; font-weight: 400; line-height: 1.05; }
h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); text-transform: uppercase; margin: 0.5rem 0 1rem; }
h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); text-transform: uppercase; margin: 0 0 0.75rem; }

a { color: var(--blue); }
a:hover { color: var(--red); }
:focus-visible { outline: 4px dotted var(--red); outline-offset: 3px; }
button, input { font: inherit; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--yellow); padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 2rem; padding: 1rem 1.5rem;
  background: var(--yellow); border-bottom: 6px double var(--ink);
}
.brand { margin: 0; font-family: Impact, sans-serif; font-size: 1.7rem; color: var(--magenta); text-shadow: 2px 2px 0 var(--ink); }
.brand-sub { margin: 0; font-size: 0.8rem; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-header nav a { font-weight: bold; }

.game { padding: 2.5rem 1.5rem; background: repeating-linear-gradient(45deg, #fff 0 40px, #eaffea 40px 80px); border-bottom: 4px solid var(--ink); }
.kicker { display: inline-block; margin: 0 0 1rem; padding: 0.25rem 0.75rem; background: var(--ink); color: var(--yellow); font-family: "Courier New", monospace; font-weight: bold; }
.lede { max-width: 44rem; font-size: 1.15rem; }

.stage { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; align-items: start; }
.rock-wrap { text-align: center; }
.rock { width: min(100%, 20rem); height: auto; }
.rock-name { font-family: Impact, sans-serif; font-size: 1.4rem; margin: 0.5rem 0 0; }
.mood { font-family: "Courier New", monospace; font-size: 0.85rem; color: #555; }
.rock-speech { font-family: "Comic Sans MS", cursive; font-size: 1.2rem; min-height: 1.6em; margin: 0.5rem 0 0; }

.stats { border: 4px solid var(--ink); background: #fff; padding: 1.25rem; box-shadow: 8px 8px 0 var(--ink); }
.stat { margin-bottom: 1rem; }
.stat-labels { display: flex; justify-content: space-between; font-family: "Courier New", monospace; font-weight: bold; }
.bar { height: 1.3rem; border: 3px solid var(--ink); background: #fff; }
.bar-fill { height: 100%; width: 50%; background: var(--lime); transition: width 0.4s ease; }
.bar-bond .bar-fill { background: var(--magenta); }
.bond-note { font-size: 0.85rem; color: #444; }

.btn { display: inline-block; padding: 0.7rem 1.3rem; font-weight: bold; border: 3px outset #999; background: #eee; color: var(--ink); text-decoration: none; cursor: pointer; }
.btn:active { border-style: inset; }
.btn-red { background: var(--red); color: #fff; border-color: #7a0000; }
.btn-blue { background: var(--blue); color: #fff; border-color: #00005a; }
.btn-green { background: var(--lime); color: var(--ink); border-color: #00661a; }
.btn-plain { background: #fff; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.log { font-family: "Courier New", monospace; border-left: 8px solid var(--lime); background: #fff; padding: 0.75rem 1rem; max-width: 44rem; min-height: 3.2em; }
/* Older log lines stay readable but recede, newest first. */
.log-line { display: block; }
.log-line:nth-child(2) { opacity: 0.7; }
.log-line:nth-child(3) { opacity: 0.5; }
.log-line:nth-child(4) { opacity: 0.35; }
.log-line + .log-line { margin-top: 0.35rem; }

.translator { padding: 2.5rem 1.5rem; background: #fff8e1; border-bottom: 4px solid var(--ink); }
.featured { display: inline-block; margin: 0 0 1rem; padding: 0.25rem 0.75rem; background: var(--magenta); color: #fff; font-family: "Courier New", monospace; font-weight: bold; text-transform: uppercase; }
.translator-intro { max-width: 42rem; }
#translateForm { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin: 1.5rem 0; }
#translateForm label { display: block; font-weight: bold; margin-bottom: 0.25rem; width: 100%; }
#translateForm input { flex: 1 1 18rem; padding: 0.6rem; border: 4px solid var(--ink); background: #fff; }
.translation-output { border: 4px dashed var(--magenta); background: #fff; padding: 1.25rem; max-width: 42rem; }
.output-label { margin: 0; font-family: "Courier New", monospace; font-weight: bold; text-transform: uppercase; font-size: 0.85rem; }
.output-text { font-family: "Comic Sans MS", cursive; font-size: 1.6rem; margin: 0.5rem 0 0; min-height: 1.4em; }
.translator-note { color: #444; }

.site-footer { padding: 2rem 1.5rem; background: var(--ink); color: #fff; font-family: "Courier New", monospace; font-size: 0.9rem; }
.site-footer a { color: var(--lime); }
.site-footer strong { color: var(--yellow); }

@media (max-width: 44rem) {
  .stage { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar-fill { transition: none; }
}
