/* Arctic Hare — one stylesheet for every page. No build step, no third-party requests.
   The look follows CardJig's menu map: teal sea, cream cards, sand, gold buttons, coral accents. */

@font-face {
  font-family: "Tombul One";
  src: url("fonts/TombulOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Sea: the menu's vertical gradient and its shadow colour. */
  --sea-top: #33a4b8;
  --sea-mid: #5cbfcd;
  --sea-bottom: #43aec0;
  --sea-shadow: #126074;
  --teal: #186c78;
  --teal-ink: #0c4854;

  /* Cards and islands. */
  --cream: #fdf6e9;
  --paper: #fffdf7;
  --sand: #f6e8c3;
  --sand-edge: #e8d5a2;

  /* Buttons and accents, sampled from the game's button art. */
  --gold: #fcc03c;
  --gold-lip: #c0840c;
  --green: #48c054;
  --green-lip: #24903c;
  --coral: #fc603c;
  --coral-lip: #cc4818;
  --purple: #8474d8;
  --grey: #d5dcdc;
  --grey-lip: #9ca8a8;

  --ink: #17303b;
  --ink-soft: #4a626e;

  --page: 1080px;
  --prose: 46rem;
  --gutter: 20px;
  --radius: 24px;

  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --display: "Tombul One", "Arial Rounded MT Bold", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  background: var(--sea-bottom);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    url("sea-waves.webp") 0 0 / 760px 640px repeat,
    linear-gradient(180deg, var(--sea-top), var(--sea-mid) 55%, var(--sea-bottom));
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #0d6877;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(13, 104, 119, 0.4);
}

a:hover {
  color: var(--coral-lip);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 20;
}

.skip:focus {
  left: 8px;
  color: #fff;
}

/* ---------- Headings ---------- */

h1,
h2,
h3 {
  font-family: var(--display);
  /* The font is already heavy; a faked bold makes its letters merge. */
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

/* White title with a darker rim that is thicker at the bottom, like the game's titles. */
.pop {
  color: #fff;
  -webkit-text-stroke: 0.14em var(--sea-shadow);
  paint-order: stroke fill;
  text-shadow: 0 0.09em 0 var(--sea-shadow);
}

/* Small text that sits straight on the sea gets a soft halo, so a wave mark behind it never cuts
   through the letters. */
.eyebrow,
.section-title,
.hero p,
.game-hero .lead,
.page-head .meta {
  text-shadow:
    0 0 3px #4fb5c5,
    0 0 6px #4fb5c5,
    0 0 10px #4fb5c5,
    0 0 14px #4fb5c5;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
  box-shadow: 0 4px 0 rgba(18, 96, 116, 0.28);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
}

.brand:hover {
  color: var(--teal);
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--teal);
  box-shadow: 0 3px 0 var(--teal-ink);
}

.brand-badge img {
  height: 32px;
  width: auto;
}

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

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 999px;
}

.site-nav a:hover {
  background: var(--sand);
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  background: var(--teal);
  color: #fff;
}

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 60px 0 56px;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero-mark {
  width: min(150px, 34vw);
  margin: 0 auto 16px;
  filter: drop-shadow(0 8px 0 rgba(18, 96, 116, 0.45));
}

.hero h1 {
  font-size: clamp(46px, 11vw, 92px);
}

.hero p {
  max-width: 30rem;
  margin: 18px auto 0;
  color: var(--teal-ink);
  font-size: 20px;
  font-weight: 600;
}

/* Bits of the menu map floating around the hero. Decoration only. */
.deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.deco.island-a {
  width: 300px;
  top: 26px;
  left: max(-110px, calc(50% - 700px));
}

.deco.island-b {
  width: 340px;
  bottom: -34px;
  right: max(-130px, calc(50% - 720px));
}

.deco.boat {
  width: 62px;
  left: max(6%, calc(50% - 400px));
  bottom: 44px;
  animation: bob 4.5s ease-in-out infinite;
}

.deco.buoy {
  width: 26px;
  right: max(9%, calc(50% - 330px));
  top: 132px;
  animation: bob 3.6s ease-in-out infinite reverse;
}

.deco.gull {
  width: 34px;
}

.deco.gull.one {
  top: 64px;
  right: max(24%, calc(50% - 250px));
}

.deco.gull.two {
  top: 92px;
  right: max(18%, calc(50% - 310px));
  width: 28px;
}

.deco.gull.three {
  top: 108px;
  right: max(27%, calc(50% - 215px));
  width: 26px;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-6px) rotate(2deg);
  }
}

/* ---------- Sections and cards ---------- */

.section {
  padding: 30px 0;
}

.section-title {
  font-size: 26px;
  color: var(--teal-ink);
  margin-bottom: 16px;
}

.card,
.panel,
.game-card,
.features li {
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 rgba(18, 96, 116, 0.34);
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.game-card {
  position: relative;
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 rgba(18, 96, 116, 0.34);
}

.game-card img {
  width: 104px;
  height: 104px;
  border-radius: 24px;
}

.game-card h3 {
  font-size: 26px;
}

.game-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

/* The whole card is the link target, while the heading stays the only link a screen reader hears. */
.game-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.game-card p {
  margin: 4px 0 10px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.45;
}

.pill {
  display: inline-block;
  padding: 4px 12px 5px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.2;
}

.panel {
  padding: 24px;
}

.panel > :first-child {
  margin-top: 0;
}

.panel > :last-child {
  margin-bottom: 0;
}

.two-up {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.two-up h3 {
  font-size: 23px;
  margin-bottom: 6px;
}

.two-up p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 16px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Chunky buttons with a darker lip underneath, like the game's Level button. */
.button {
  display: inline-block;
  padding: 10px 22px 11px;
  border-radius: 16px;
  background: var(--gold);
  box-shadow: 0 5px 0 var(--gold-lip);
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.25;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.button:hover {
  color: var(--ink);
  filter: brightness(1.05);
}

.button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--gold-lip);
}

.button.green {
  background: var(--green);
  box-shadow: 0 5px 0 var(--green-lip);
  color: #fff;
}

.button.green:hover {
  color: #fff;
}

.button.green:active {
  box-shadow: 0 2px 0 var(--green-lip);
}

.button.quiet {
  background: #fff;
  box-shadow: 0 5px 0 var(--sand-edge);
  color: var(--teal);
}

.button.quiet:hover {
  color: var(--teal-ink);
}

.button.quiet:active {
  box-shadow: 0 2px 0 var(--sand-edge);
}

.button[aria-disabled="true"] {
  background: var(--grey);
  box-shadow: 0 5px 0 var(--grey-lip);
  color: #55666b;
  cursor: default;
  filter: none;
  transform: none;
}

/* ---------- Game page ---------- */

.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 220px) 1fr;
  gap: 34px;
  align-items: center;
  padding: 48px 0 30px;
}

.game-hero .icon {
  width: 100%;
  border-radius: 22.5%;
  box-shadow: 0 10px 0 rgba(18, 96, 116, 0.4);
}

.game-hero h1 {
  font-size: clamp(46px, 9vw, 76px);
}

.game-hero .lead {
  margin: 16px 0 22px;
  color: var(--teal-ink);
  font-size: 19px;
  font-weight: 600;
  max-width: 34rem;
}

.shot {
  margin: 0;
  padding: 12px;
  background: var(--cream);
  border-radius: 30px;
  box-shadow: 0 8px 0 rgba(18, 96, 116, 0.34);
}

.shot img {
  width: 100%;
  border-radius: 20px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.features li {
  position: relative;
  padding: 18px 18px 18px 52px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.5;
}

.features li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 20px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--coral);
  box-shadow: 0 3px 0 var(--coral-lip);
}

.features li:nth-child(5n + 2)::before {
  background: var(--gold);
  box-shadow: 0 3px 0 var(--gold-lip);
}

.features li:nth-child(5n + 3)::before {
  background: var(--green);
  box-shadow: 0 3px 0 var(--green-lip);
}

.features li:nth-child(5n + 4)::before {
  background: var(--purple);
  box-shadow: 0 3px 0 #5a4bb0;
}

.features li:nth-child(5n + 5)::before {
  background: var(--teal);
  box-shadow: 0 3px 0 var(--teal-ink);
}

.features strong {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 4px;
}

/* ---------- Text pages (support, privacy, terms) ---------- */

.page-head {
  padding: 44px 0 26px;
  /* A boat from the menu map sails past the title. */
  background: url("map-boat.webp") right 6% bottom 18px / 58px auto no-repeat;
}

.page-head h1 {
  font-size: clamp(40px, 8vw, 66px);
}

.page-head .meta {
  margin: 14px 0 0;
  color: var(--teal-ink);
  font-size: 15px;
  font-weight: 600;
}

.sheet {
  max-width: calc(var(--prose) + 72px);
  padding: 10px 36px 30px;
  margin-bottom: 44px;
  background: var(--cream);
  border-radius: 30px;
  box-shadow: 0 8px 0 rgba(18, 96, 116, 0.34);
}

.prose h2 {
  font-size: 27px;
  color: var(--teal);
  margin: 40px 0 10px;
}

.prose h3 {
  font-size: 21px;
  margin: 26px 0 6px;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 14px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li {
  margin-bottom: 6px;
}

.prose li::marker {
  color: var(--coral);
}

.prose strong {
  color: #0d2630;
}

.summary {
  margin: 26px 0 8px;
  border-radius: 20px;
  background: #dff3f5;
  border: 2px solid #b5e0e6;
  padding: 18px 22px;
}

.summary h2 {
  font-size: 21px;
  color: var(--teal);
  margin: 0 0 8px;
}

.summary ul {
  margin: 0;
}

.summary li::marker {
  color: var(--teal);
}

.toc {
  margin: 22px 0 0;
  padding: 16px 22px;
  border: 2px dashed var(--sand-edge);
  border-radius: 20px;
}

.toc h2 {
  font-size: 19px;
  color: var(--ink);
  margin: 0 0 8px;
}

.toc ol {
  margin: 0;
  columns: 2 220px;
  column-gap: 28px;
}

.toc li {
  break-inside: avoid;
  margin-bottom: 4px;
}

.toc li::marker {
  color: var(--ink-soft);
}

.toc a {
  text-decoration: none;
  font-weight: 600;
}

.toc a:hover {
  text-decoration: underline;
}

/* Wide tables scroll inside their own box so the page never scrolls sideways. */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 18px;
  border: 2px solid var(--sand-edge);
  border-radius: 18px;
  background: var(--paper);
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px;
  border-bottom: 1px solid var(--sand-edge);
}

th {
  color: var(--ink);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--sand);
}

tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  color: var(--ink);
  font-weight: 700;
}

details {
  border: 2px solid var(--sand-edge);
  border-radius: 18px;
  background: var(--paper);
  margin-bottom: 10px;
}

summary {
  cursor: pointer;
  padding: 13px 18px 13px 4px;
  margin-left: 20px;
  font-weight: 700;
  color: var(--ink);
}

summary::marker {
  color: var(--coral);
}

details[open] {
  border-color: var(--gold);
}

details[open] summary {
  border-bottom: 1px solid var(--sand-edge);
  margin-right: 18px;
}

details > :not(summary) {
  margin: 12px 18px;
  color: var(--ink-soft);
}

details > :last-child {
  margin-bottom: 16px;
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 18px;
  padding: 20px 22px 24px;
  border-radius: 20px;
  background: var(--sand);
  border: 2px solid var(--sand-edge);
}

.contact-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15.5px;
}

.contact-card .address {
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* A blank still to be filled in before the site goes live. Listed in README.md. */
.todo {
  background: #ffe0d5;
  color: #a2300e;
  outline: 2px dashed var(--coral);
  border-radius: 5px;
  padding: 0 4px;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 28px;
  background: var(--teal-ink);
  color: #d5eef1;
  font-size: 14.5px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 24px;
  padding-top: 20px;
  padding-bottom: 22px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.site-footer a {
  color: #fff;
  font-weight: 600;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.site-footer a:hover {
  color: var(--gold);
}

.site-footer :focus-visible {
  outline-color: #fff;
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  .deco.island-a {
    width: 190px;
    left: -86px;
    top: 14px;
  }

  .deco.island-b {
    width: 210px;
    right: -92px;
    bottom: -30px;
  }

  .deco.boat {
    width: 46px;
    left: 7%;
    bottom: 18px;
  }

  .deco.buoy,
  .deco.gull.three {
    display: none;
  }

  .deco.gull.one {
    right: 12%;
    top: 40px;
  }

  .deco.gull.two {
    right: 5%;
    top: 62px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 16.5px;
  }

  .site-header .wrap {
    justify-content: center;
  }

  .site-nav a {
    padding: 6px 11px;
  }

  .hero {
    padding: 44px 0 64px;
  }

  .game-hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 22px;
    padding-top: 34px;
  }

  .game-hero .icon {
    width: 168px;
    margin: 0 auto;
  }

  .game-hero .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .game-hero .button-row {
    justify-content: center;
  }

  .game-card {
    grid-template-columns: 80px 1fr;
  }

  .game-card img {
    width: 80px;
    height: 80px;
    border-radius: 19px;
  }

  .page-head {
    background-size: 44px auto;
    background-position: right 5% bottom 12px;
  }

  .sheet {
    padding: 4px 18px 22px;
    border-radius: 24px;
  }

  .shot {
    padding: 8px;
    border-radius: 22px;
  }

  .shot img {
    border-radius: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .deco,
  .game-card,
  .button {
    animation: none;
    transition: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .toc,
  .deco {
    display: none;
  }

  html,
  body,
  .sheet {
    background: #fff;
    box-shadow: none;
  }

  .pop {
    color: #000;
    -webkit-text-stroke: 0;
    text-shadow: none;
  }
}
