/* SoloTechGames site. One stylesheet for the home page and the legal pages. */

@font-face { font-family: Fredoka; font-weight: 400; font-display: swap; src: url(/assets/fonts/fredoka-400.woff2) format("woff2"); }
@font-face { font-family: Fredoka; font-weight: 500; font-display: swap; src: url(/assets/fonts/fredoka-500.woff2) format("woff2"); }
@font-face { font-family: Fredoka; font-weight: 600; font-display: swap; src: url(/assets/fonts/fredoka-600.woff2) format("woff2"); }
@font-face { font-family: Fredoka; font-weight: 700; font-display: swap; src: url(/assets/fonts/fredoka-700.woff2) format("woff2"); }

:root {
  --ink: #1A1026;
  --plum: #2A1A3D;
  --plum-hi: #3B2656;
  --lime: #B8E62E;
  --lime-side: #86AD12;
  --coral: #FF5A4F;
  --coral-side: #C9362C;
  --white: #FFFFFF;
  --cream-side: #C9C2D6;
  --soft: #B9ACCB;
  --u: clamp(54px, 7.2vw, 92px);   /* one key unit */
  --gap: clamp(7px, 1vw, 12px);
  --depth: clamp(8px, 1vw, 12px);  /* height of a key's side wall */
}

* { box-sizing: border-box; }

body {
  margin: 0; min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--lime); color: var(--ink);
  font: 500 18px/1.5 Fredoka, "Trebuchet MS", system-ui, sans-serif;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: url(/assets/img/pattern.png) 0 0 / 104px 104px; opacity: .22;
}
a { color: inherit; }
:focus-visible { outline: 4px solid var(--ink); outline-offset: 4px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--white); padding: 10px 14px; border: 3px solid var(--ink); border-radius: 12px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header: the wordmark sticker, linking home. */
.site-head { padding-top: 26px; }
.site-head a { display: inline-block; border-radius: 12px; }
.site-head img { width: min(320px, 66vw); height: auto; display: block; transform: rotate(-3deg); filter: drop-shadow(4px 5px 0 var(--ink)); }

/* Sticker lettering: white fill, ink outline, hard shadow. */
.sticker-text {
  font-weight: 700; letter-spacing: -.01em; color: var(--white);
  -webkit-text-stroke: clamp(8px, 1.1vw, 14px) var(--ink); paint-order: stroke fill;
  text-shadow: 5px 7px 0 var(--ink);
}

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

.hero { padding-top: 34px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; }
.hero h1 { font-size: clamp(44px, 7.4vw, 104px); line-height: .95; margin: 0; }
.hero p {
  display: inline-block; margin: 22px 0 0; max-width: 40ch; padding: 10px 18px;
  font-weight: 600; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.3;
  background: var(--white); border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: 4px 5px 0 var(--ink); transform: rotate(-1deg);
}
.buddy { position: relative; width: clamp(200px, 26vw, 340px); aspect-ratio: 900 / 544; margin-bottom: -34px; z-index: 2; }
.buddy img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(5px 6px 0 var(--ink)); }
.buddy .flag { transform-origin: 67.38% 58.48%; animation: wave 1.1s ease-in-out .4s 3 both; }
@keyframes wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(13deg); } }

.board-wrap { padding-bottom: 80px; }
.board {
  background: var(--plum); border: 4px solid #000; border-radius: 28px;
  padding: calc(var(--gap) * 2.2);
  box-shadow: 0 14px 0 #0C0613, 8px 22px 0 rgba(26, 16, 38, .28), inset 0 3px 0 var(--plum-hi);
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: var(--u);
}

/* A keycap: the top face, with the side wall drawn as a hard shadow. Pressing shortens the wall. */
.key {
  --side: var(--cream-side);
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  padding: 9px 11px; text-decoration: none; cursor: default;
  font-weight: 600; font-size: clamp(12px, 1.25vw, 16px); line-height: 1.1; color: var(--ink);
  background: var(--white); border: 3px solid #000; border-radius: 14px;
  box-shadow: 0 var(--depth) 0 var(--side), 0 var(--depth) 0 3px #000;
  transform: translateY(calc(var(--depth) * -1));
  transition: transform .07s, box-shadow .07s;
}
a.key { cursor: pointer; }
a.key:hover { transform: translateY(calc(var(--depth) * -.55)); box-shadow: 0 calc(var(--depth) * .55) 0 var(--side), 0 calc(var(--depth) * .55) 0 3px #000; }
a.key:active { transform: translateY(-1px); box-shadow: 0 1px 0 var(--side), 0 1px 0 3px #000; }
a.key:focus-visible { outline-color: var(--white); border-radius: 14px; }
.key.lime { background: var(--lime); --side: var(--lime-side); }
.key.coral { background: var(--coral); color: var(--white); --side: var(--coral-side); }
.key.dark { background: #3A2752; color: var(--soft); --side: #1F1330; }
.key small { font-weight: 500; font-size: clamp(10px, 1vw, 13px); line-height: 1.2; opacity: .8; }
.glyph { font-size: clamp(18px, 2.2vw, 28px); line-height: 1; align-self: flex-end; }

.w1 { grid-column: span 1; } .w2 { grid-column: span 2; } .w3 { grid-column: span 3; } .w6 { grid-column: span 6; }
.h3 { grid-row: span 3; }

/* Game keys: the icon is the legend. */
.key.game { padding: 0; overflow: hidden; }
.game img { width: 100%; flex: 1; min-height: 0; object-fit: cover; display: block; }
.game .label { padding: 9px 12px 10px; background: var(--white); border-top: 3px solid #000; }
.game .label b { display: block; font-weight: 700; font-size: clamp(15px, 1.7vw, 22px); line-height: 1.1; }
.game .label small { display: block; margin-top: 3px; }
.game.live .label { background: var(--lime); }
.game .status {
  position: absolute; top: 8px; left: 8px;
  font-weight: 700; font-size: clamp(11px, 1.05vw, 14px); line-height: 1; padding: 6px 9px;
  border: 2.5px solid #000; border-radius: 999px; background: var(--white); color: var(--ink);
}
.game.live .status { background: var(--coral); color: var(--white); }

/* ---------- Legal pages: one sheet of paper stuck on the page ---------- */

.paper-wrap { max-width: 860px; padding-top: 34px; padding-bottom: 80px; }
.paper {
  background: var(--white); border: 4px solid var(--ink); border-radius: 24px;
  box-shadow: 8px 10px 0 var(--ink);
  padding: clamp(24px, 5vw, 56px);
  font-weight: 400; font-size: 17.5px; line-height: 1.65;
}
.paper h1 { font-weight: 700; font-size: clamp(30px, 4.6vw, 44px); line-height: 1.08; margin: 0 0 12px; letter-spacing: -.01em; }
.paper h2 { font-weight: 600; font-size: 24px; line-height: 1.2; margin: 40px 0 10px; padding-top: 22px; border-top: 3px solid var(--ink); }
.paper h3 { font-weight: 600; font-size: 19px; line-height: 1.3; margin: 24px 0 6px; }
.paper p { margin: 0 0 14px; max-width: 68ch; }
.paper ul { margin: 0 0 14px; padding-left: 22px; max-width: 68ch; }
.paper li { margin-bottom: 8px; }
.paper li::marker { color: var(--coral); }
.paper strong { font-weight: 600; }
.paper a { text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.paper .meta { color: #5B4F6B; }
.paper address { font-style: normal; margin: 0 0 14px; }
.back { display: inline-block; margin-bottom: 18px; font-weight: 600; }

.policy-list { list-style: none; padding: 0; margin: 20px 0 0; max-width: none; }
.policy-list li { border-top: 3px solid var(--ink); margin: 0; }
.policy-list a { display: flex; align-items: center; gap: 16px; padding: 14px 0; text-decoration: none; font-weight: 600; font-size: 21px; }
.policy-list a:hover span { text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.policy-list img { width: 64px; height: 64px; border-radius: 14px; border: 3px solid var(--ink); }

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

.site-foot { background: var(--ink); color: var(--soft); margin-top: auto; }
.site-foot .wrap { padding-top: 24px; padding-bottom: 32px; font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-foot a { color: var(--white); text-underline-offset: 4px; }
.site-foot :focus-visible { outline-color: var(--white); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .buddy { justify-self: end; margin-top: -20px; }
  .board { grid-template-columns: repeat(6, 1fr); --u: 15vw; border-radius: 22px; }
  .filler { display: none; }
  .key { padding: 8px 9px; font-size: 14px; }
  .key small { font-size: 12px; }
  .game .label b { font-size: 17px; }
  .game .status { font-size: 12px; }
  .w2 { grid-column: span 2; } .w3 { grid-column: span 3; } .w6 { grid-column: span 6; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
