/* Drew It Yourself Games — studio site. No framework, no build step. */

/* ---------- Fonts (self-hosted, SIL OFL 1.1 — see fonts/LICENSES.txt) ---------- */
@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo-latin-variable.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Lilita One"; src: url("/assets/fonts/lilita-one-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --paper: #f1efe9;
  --card: #fbfaf6;
  --ink: #17161c;
  --ink-soft: #3b3944;
  --muted: #4f4c58;
  --rule: #c4c0b6;
  --orange: #ff5c1a;
  --orange-text: #ff7a40;
  --on-ink: #f1efe9;
  --on-ink-2: #d4d1cb;

  /* the game's own colours, used only inside its card */
  --g-ink: #17161c;
  --g-panel: #1d1c24;
  --g-text: #f6f4fa;
  --g-text-2: #d6d2e0;
  --g-pink: #ff5fae;
  --g-pink-deep: #a3195f;
  --g-gold: #f0c040;
  --g-blue: #39c3ea;
  --g-red: #ff6b73;
  --g-line: #5a5668;
  --g-black: #0d0c10;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --f-game: "Lilita One", "Arial Black", sans-serif;

  --wrap: 1200px;
  --gutter: 24px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: linear-gradient(rgba(23, 22, 28, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 22, 28, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 17px;
  line-height: 1.5;
}
a { color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 12px 16px; background: var(--ink); color: var(--on-ink); font-weight: 700; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

.eyebrow { margin: 0; font: 600 13px/1.4 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.h2 { margin: 0; font-stretch: 125%; font-weight: 800; font-size: clamp(36px, 4.6vw, 60px); line-height: 1; letter-spacing: -0.01em; text-wrap: balance; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 26px; border-radius: 10px; font-family: var(--f-display); font-stretch: 112%; font-weight: 800; font-size: 18px; line-height: 1; text-decoration: none; transition: transform 0.08s ease, box-shadow 0.08s ease; }
.btn--ink { background: var(--ink); color: var(--on-ink); box-shadow: 4px 4px 0 var(--orange); }
.btn--ink:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--orange); }
.btn--ink:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--orange); }
.btn--line { padding: 0 24px; border: 3px solid var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--on-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.site-header .wrap { padding-block: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.brand { display: flex; align-items: center; gap: 14px; min-height: 44px; color: var(--ink); text-decoration: none; }
.mono-mark { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 8px; background: var(--ink); color: var(--paper); font-stretch: 125%; font-weight: 900; font-size: 16px; letter-spacing: 0.02em; transform: rotate(-4deg); box-shadow: 3px 3px 0 var(--orange); }
.brand-name { display: flex; flex-direction: column; font-stretch: 112%; font-weight: 800; font-size: 18px; line-height: 1.05; }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px 6px; }
.site-nav a { padding: 12px 10px; color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 600; }
.site-nav a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--orange); text-underline-offset: 6px; }

/* ---------- Hero ---------- */
.hero .wrap { padding-block: 48px 96px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px 64px; }
.hero__copy { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { margin: 0; font-stretch: 125%; font-weight: 800; font-size: clamp(46px, 7.6vw, 112px); line-height: 0.95; letter-spacing: -0.01em; }
.hero h1 > span { display: block; }
.tape { display: inline-block; padding: 0 0.12em; background: var(--orange); transform: rotate(-2deg); box-shadow: 5px 5px 0 var(--ink); }
.hero__lead { margin: 0; max-width: 32em; font-size: 20px; line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; }
.hero__tag { flex: 1 1 340px; min-width: 0; display: flex; justify-content: center; }

.spec { position: relative; width: 100%; max-width: 400px; padding: 44px 28px 24px; background: var(--card); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 10px 10px 0 var(--ink); transform: rotate(2deg); }
.spec::before { content: ""; position: absolute; top: 14px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper); }
.spec h2 { margin: 0 0 14px; text-align: center; font: 600 12px/1.4 var(--f-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.spec dl { margin: 0; display: flex; flex-direction: column; font-family: var(--f-mono); border-bottom: 2px dashed var(--rule); }
.spec dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-top: 2px dashed var(--rule); }
.spec dt { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: 0; font-size: 15px; font-weight: 600; text-align: right; }

/* ---------- Games ---------- */
.games .wrap { padding-block: 24px 96px; display: flex; flex-direction: column; gap: 32px; }
.games__head { display: flex; flex-direction: column; gap: 12px; }

.game { display: flex; flex-wrap: wrap; overflow: hidden; border-radius: 24px; background: var(--g-ink); color: var(--g-text); box-shadow: 10px 10px 0 var(--orange); }
.game__copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 18px; padding: clamp(24px, 3.4vw, 40px); }
.game__pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font: 600 12px/1.4 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.game__pills li { padding: 3px 8px; border-radius: 99px; border: 2px solid var(--g-line); }
.game__pills li:first-child { padding: 5px 10px; border: 0; background: var(--g-gold); color: var(--g-ink); }
.game h3 { margin: 0; font-family: var(--f-game); font-weight: 400; font-size: clamp(40px, 5.4vw, 72px); line-height: 0.88; text-transform: uppercase; }
.game h3 span { display: block; }
.game h3 .pink { color: var(--g-pink); }
.game__tagline { margin: 0; font-family: var(--f-game); font-size: 26px; line-height: 1.1; color: var(--g-gold); }
.game__desc { margin: 0; max-width: 30em; font-size: 18px; line-height: 1.55; color: var(--g-text-2); }
.game .btn-row { padding-top: 6px; gap: 12px; }
.gbtn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px; border-radius: 14px; font-family: var(--f-game); font-size: 19px; line-height: 1; text-decoration: none; }
.gbtn--pink { background: var(--g-pink); color: var(--g-ink); box-shadow: 0 5px 0 var(--g-pink-deep); }
.gbtn--line { padding: 0 20px; border: 3px solid var(--g-text); color: var(--g-text); }
.gbtn--line:hover { background: var(--g-text); color: var(--g-ink); }
.game__art { flex: 1 1 360px; min-width: 0; min-height: 300px; display: flex; align-items: center; justify-content: center; padding: 32px; background-color: var(--g-panel); background-image: radial-gradient(rgba(255, 95, 174, 0.2) 1.5px, transparent 1.8px); background-size: 18px 18px; }
.trio { position: relative; display: flex; align-items: flex-end; gap: 10px; padding: 0 20px 22px; }
.trio::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 44px; border-radius: 50%; border: 3px dashed var(--g-pink); background: rgba(255, 95, 174, 0.12); }
.trio span { position: relative; display: flex; flex-direction: column; align-items: center; }
.trio i, .trio b { display: block; border: 3px solid var(--g-black); }
.trio i { position: relative; z-index: 1; border-radius: 50%; margin-bottom: -4px; }
.trio .s i, .trio .s b { background: var(--g-blue); }
.trio .m i, .trio .m b { background: var(--g-gold); }
.trio .t i, .trio .t b { background: var(--g-red); }
.trio .s i { width: 40px; height: 40px; } .trio .s b { width: 54px; height: 112px; border-radius: 46% 46% 16% 16% / 26% 26% 8% 8%; }
.trio .m i { width: 42px; height: 42px; } .trio .m b { width: 72px; height: 100px; border-radius: 44% 44% 16% 16% / 30% 30% 10% 10%; }
.trio .t i { width: 44px; height: 44px; } .trio .t b { width: 98px; height: 94px; border-radius: 40% 40% 18% 18% / 34% 34% 12% 12%; }

.next-game { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: clamp(24px, 3vw, 32px) clamp(24px, 3.4vw, 40px); border: 3px dashed var(--ink); border-radius: 24px; }
.next-game div { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.next-game h3 { margin: 0; font-stretch: 125%; font-weight: 800; font-size: 34px; line-height: 1.05; }
.next-game p:last-child { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-soft); }

/* ---------- About ---------- */
.about { background: var(--ink); color: var(--on-ink); }
.about .wrap { padding-block: 96px; display: flex; flex-wrap: wrap; gap: 48px 72px; }
.about__copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.about .eyebrow { color: var(--orange-text); }
.about__copy p:not(.eyebrow) { margin: 0; font-size: 19px; line-height: 1.6; color: var(--on-ink-2); text-wrap: pretty; }
.principles { flex: 1 1 400px; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.principles li { display: flex; gap: 20px; align-items: flex-start; }
.principles .n { flex: 0 0 56px; font-stretch: 125%; font-weight: 900; font-size: 44px; line-height: 1; color: var(--orange); }
.principles div { display: flex; flex-direction: column; gap: 6px; }
.principles h3 { margin: 0; font-stretch: 112%; font-weight: 800; font-size: 24px; line-height: 1.2; }
.principles p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--on-ink-2); }

/* ---------- Contact ---------- */
.contact { background: var(--orange); color: var(--ink); }
.contact .wrap { padding-block: 88px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 56px; }
.contact h2 { margin: 0; font-stretch: 125%; font-weight: 900; font-size: clamp(64px, 11vw, 160px); line-height: 0.85; letter-spacing: -0.02em; }
.contact dl { margin: 0; flex: 0 1 520px; min-width: 0; display: flex; flex-direction: column; font-family: var(--f-mono); border-bottom: 2px solid var(--ink); }
.contact dl div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 12px 0; border-top: 2px solid var(--ink); }
.contact dt { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.contact dd { margin: 0; }
.contact dd a { display: inline-block; padding: 6px 0; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer .wrap { padding-block: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; font-size: 14px; color: var(--muted); }

/* ---------- 404 ---------- */
.lost .wrap { min-height: 60vh; padding-block: 64px 120px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 22px; }
.lost h1 { margin: 0; font-stretch: 125%; font-weight: 800; font-size: clamp(46px, 7vw, 96px); line-height: 0.95; letter-spacing: -0.01em; }
.lost p { margin: 0; max-width: 30em; font-size: 20px; line-height: 1.55; color: var(--ink-soft); }
.lost .code { font: 600 14px/1.4 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* Banana Game card */
.game--banana { background: #1a1130; }
.game--banana h3 .yellow { color: #ffd23f; }
.game--banana .game__tagline { color: #ff9fd0; }
.game--banana .game__pills li:first-child { background: #ffd23f; }
.game--banana .game__pills li { border-color: #5b4a7e; }
.game--banana .game__desc { color: #e2dcf0; }
.gbtn--yellow { background: #ffd23f; color: var(--g-ink); box-shadow: 0 5px 0 #a87900; }
.gbtn--yellow:hover { background: #ffe066; }
.game__art--sunset { position: relative; padding: 0; background: #1d0f3d; }
.sunset { position: absolute; inset: 0; width: 100%; height: 100%; }
.banana { transform-box: fill-box; transform-origin: 50% 50%; animation: bg-spin 2.6s linear infinite; }
.axe { animation: bg-bob 3.2s ease-in-out infinite; }
.axe--b { animation-delay: -1.6s; }
@keyframes bg-spin { to { transform: rotate(360deg); } }
@keyframes bg-bob { 50% { transform: translate(6px, 8px); } }
@media (prefers-reduced-motion: reduce) { .banana, .axe { animation: none; } }
