/* Ohio Games v1.0 - palette taken from the original game art */
@font-face { font-family: "Cabin"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/cabin-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cabin"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/cabin-latin-700-normal.woff2") format("woff2"); }

:root {
  --sky: #6f8dd9;        /* original page background */
  --sky-deep: #5673c4;
  --navy: #1c2752;       /* game screen gradient, dark end */
  --navy-mid: #34488f;
  --frame: #f7941d;      /* game frame orange */
  --frame-light: #ffb347;
  --rust: #8a3410;       /* button lettering */
  --white: #ffffff;
  --mist: #e4eafb;
  --shadow: rgba(16, 24, 56, 0.45);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--sky);
  color: var(--white);
  font-family: "Cabin", "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}

a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Hero ---------- */
.hero { padding-top: 56px; padding-bottom: 24px; }

.hero h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 0 var(--sky-deep), 0 10px 24px var(--shadow);
}

.hero p {
  margin: 18px 0 0;
  max-width: 34em;
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  line-height: 1.4;
  color: var(--mist);
}

/* ---------- Game screens (the art already carries its own riveted frame) ---------- */
.games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 32px;
  padding-top: 32px;
  padding-bottom: 72px;
}

.screen {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 36px var(--shadow);
  transition: transform 160ms ease;
}
.screen img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; }
a.screen:hover { transform: translateY(-3px); }

.game h2 {
  margin: 22px 0 6px;
  font-size: 1.75rem;
  line-height: 1.15;
}

.game p {
  margin: 0 0 18px;
  color: var(--mist);
  max-width: 30em;
}

/* Buttons echo the beveled level buttons in the game */
.btn {
  display: inline-block;
  padding: 10px 26px 11px;
  font-weight: 700;
  font-size: 1.1875rem;
  color: var(--rust);
  text-decoration: none;
  background: linear-gradient(180deg, var(--frame-light), var(--frame));
  border: 2px solid #c96a00;
  border-radius: 6px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 4px 0 #b55a00, 0 8px 16px var(--shadow);
}
.btn:hover { background: linear-gradient(180deg, #ffc266, var(--frame-light)); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 1px 0 #b55a00; }

/* ---------- Story ---------- */
.story {
  background: linear-gradient(170deg, var(--navy-mid), var(--navy) 70%);
  padding: 64px 0 72px;
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 48px;
}

.story h2 {
  margin: 0 0 14px;
  font-size: 1.875rem;
  line-height: 1.15;
}

.story p { margin: 0 0 14px; max-width: 36em; color: var(--mist); }

.story .about {
  border-left: 4px solid var(--frame);
  padding-left: 24px;
}

.story .about a { color: var(--frame-light); font-weight: 700; }

footer {
  padding: 28px 0 40px;
  font-size: 0.875rem;
  color: var(--mist);
  background: var(--navy);
}
footer p { margin: 0 0 6px; max-width: 60em; }

/* ---------- Game page ---------- */
.game-page { min-height: 100vh; display: flex; flex-direction: column; }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  font-size: 0.9375rem;
}
.bar a { font-weight: 700; text-decoration: none; }
.bar a:hover { text-decoration: underline; }
.bar span { color: var(--mist); text-align: right; }

.stage {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 16px 24px;
}

.stage .screen {
  width: min(100%, 800px, calc((100vh - 90px) * 4 / 3));
}

.player {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--sky);
  border-radius: 4px;
  overflow: hidden;
}
.player ruffle-player, .player ruffle-embed { display: block; width: 100%; height: 100%; }

.noscript { padding: 24px; color: var(--navy); background: var(--mist); }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .hero { padding-top: 36px; }
  .games { grid-template-columns: 1fr; gap: 48px; padding-bottom: 56px; }
  .story-grid { grid-template-columns: 1fr; gap: 36px; }
  .bar { flex-direction: column; align-items: flex-start; gap: 4px; }
  .bar span { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  a.screen:hover, .btn:active { transform: none; }
}
