/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  --ink: #2b2350;
  --muted: #6a6288;
  --paper: #fffdf8;
  --sky: #fff4e0;
  --pink: #ff5d8f;
  --purple: #6c4dff;
  --sun: #ffc93c;
  --line: #2b2350;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--sky);
  background-image: radial-gradient(rgba(108, 77, 255, 0.14) 2px, transparent 2px);
  background-size: 24px 24px;
  font-family: ui-rounded, "SF Pro Rounded", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

a {
  color: var(--purple);
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: var(--paper);
  border-bottom: 3px solid var(--line);
}

.brand {
  color: var(--pink);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-nav a {
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.site-nav a:hover {
  background: var(--sky);
}

.site-nav a.active {
  background: var(--sun);
}

/* Page */

.page {
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) 1rem;
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.25rem;
}

.card {
  padding: 1.5rem;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 6px 6px 0 var(--line);
}

/* Home */

.hero {
  padding-block: clamp(1rem, 6vw, 3rem);
  text-align: center;
}

.hero h1 {
  color: var(--pink);
  font-size: clamp(2.75rem, 10vw, 4.5rem);
  text-shadow: 3px 3px 0 var(--sun);
}

.hero p {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.35rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.button {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--pink);
  border: 3px solid var(--line);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--line);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.button-alt {
  background: var(--paper);
  color: var(--ink);
}

/* About */

.card .lead {
  color: var(--ink);
  font-weight: 700;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  margin: 0;
}

.facts div {
  padding: 0.75rem 1rem;
  background: var(--sky);
  border-radius: 0.75rem;
}

.facts dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Games */

.table-wrap {
  padding: 0;
  overflow-x: auto;
}

.games-table {
  width: 100%;
  border-collapse: collapse;
}

.games-table th {
  padding: 0.75rem 1.25rem;
  background: var(--purple);
  color: #fff;
  text-align: left;
}

.games-table td {
  height: 3.25rem;
  padding: 0.75rem 1.25rem;
  border-top: 2px solid var(--sky);
}

.games-table tbody tr:hover {
  background: var(--sky);
}

/* Shark Game */

.game {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 6px 6px 0 var(--line);
}

.game-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  touch-action: none;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(11, 79, 158, 0.65);
  color: #fff;
  text-align: center;
}

.game-overlay[hidden] {
  display: none;
}

.game-overlay h2,
.game-overlay p {
  margin: 0;
}

.game-overlay h2 {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  line-height: 1.1;
}

.game-overlay .button {
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.game-help {
  margin: 1.75rem 0 1rem;
  padding-left: 1.25rem;
}
