/* 99cents studio. One stylesheet for the studio pages; each game page brings
   its own look on top of the shared reset and footer. */

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("fonts/silkscreen.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #F4EFE6;
  --paper-deep: #EAE3D6;
  --card: #FBF8F2;
  --ink: #1B1713;
  --ink-soft: #4A433B;
  --ink-faint: #7A7166;
  --rule: #D9D0C1;
  --tag: #E4502E;
  --tag-ink: #FFF4E6;
  --tag-text: #C8401F;
  --shadow: 0 1px 0 rgba(27, 23, 19, .04), 0 18px 40px -18px rgba(27, 23, 19, .28);
  --gutter: clamp(16px, 4vw, 40px);
  --pixel: "Silkscreen", ui-monospace, monospace;
  --sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #13110F;
    --paper-deep: #1B1815;
    --card: #1E1B17;
    --ink: #F2ECE2;
    --ink-soft: #C9C0B3;
    --ink-faint: #8E8579;
    --rule: #2F2A24;
    --tag: #EE5A36;
    --tag-text: #FF7A57;
    --shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 18px 40px -18px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--tag); color: var(--tag-ink); }
:focus-visible { outline: 3px solid var(--tag); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Pixel labels: the studio's one piece of type with an accent. */
.label {
  font: 400 11px/1 var(--pixel);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.label.hot { color: var(--tag-text); }

/* ---------- Header ---------- */
.site-head { padding: 22px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: 34px; image-rendering: pixelated; }
.brand span { font: 400 14px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; }
.site-nav { display: flex; gap: clamp(14px, 3vw, 28px); }
.site-nav a {
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink-soft);
}
.site-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 560px) { .site-nav .optional { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(56px, 9vw, 112px); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 6vw, 72px);
}
.hero h1 {
  font-size: clamp(46px, 8.4vw, 104px);
  line-height: .94; letter-spacing: -.045em; font-weight: 700;
  margin: 18px 0 26px;
}
.hero h1 em { font-style: normal; color: var(--tag-text); }
.hero p.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-soft); max-width: 34ch; margin: 0; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 10px;
  font: 600 16px/1 var(--sans); text-decoration: none;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.line { box-shadow: inset 0 0 0 2px var(--rule); color: var(--ink); }
.btn.line:hover { box-shadow: inset 0 0 0 2px var(--ink-faint); }

/* The price tag. Pixel sticker, hung on a string, swinging a little. */
.tag-art { justify-self: center; width: min(100%, 360px); margin-top: -40px; }
.tag-art svg {
  width: 100%; height: auto; overflow: visible;
  transform-origin: 50% 0; animation: swing 6s ease-in-out infinite;
}
.tag-art .sticker { fill: var(--tag); filter: drop-shadow(0 .9px .9px rgba(27, 23, 19, .22)); }
.tag-art .glyph { fill: var(--tag-ink); }
.tag-art .hole { fill: var(--paper); }
.tag-art .string { stroke: var(--ink-faint); stroke-width: .18; }
@keyframes swing { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .tag-art svg { animation: none; transform: rotate(-3deg); } }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .tag-art { order: -1; width: 128px; justify-self: start; margin: -24px 0 -12px; }
}

/* ---------- Sections ---------- */
section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  border-top: 2px solid var(--ink); padding-top: 18px; margin-bottom: clamp(28px, 4vw, 44px);
}
.section-head h2 {
  margin: 0; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.05; letter-spacing: -.03em; font-weight: 700;
}

/* ---------- Games ---------- */
.games { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.game {
  position: relative; border-radius: 18px; overflow: hidden; text-decoration: none;
  background: var(--card); box-shadow: var(--shadow);
}
.game.feature {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  background: #1C130E; color: #F3E4C8;
}
.game.feature .shot { position: relative; min-height: 100%; background: #2A1C13; }
.game.feature .shot img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.game.feature .shot::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(28, 19, 14, 0) 70%, #1C130E);
}
.game.feature .body { padding: clamp(24px, 3.4vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.game.feature .icon { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.game.feature .no { font: 400 11px/1 var(--pixel); letter-spacing: .08em; color: #C89B4A; }
.game.feature h3 { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.05; letter-spacing: -.025em; }
.game.feature h3 small { display: block; font-size: .5em; letter-spacing: 0; font-weight: 500; color: #C4A279; margin-top: 6px; }
.game.feature p { margin: 0; color: #E8C79A; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; padding: 0; list-style: none; }
.chips li {
  font: 500 13px/1 var(--sans); padding: 7px 10px; border-radius: 99px;
  background: rgba(200, 155, 74, .14); color: #F3E4C8;
}
.game.feature .go {
  margin-top: auto; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: #F3E4C8;
}
.game.feature .go::after { content: "→"; transition: transform .2s ease; }
.game.feature:hover .go::after { transform: translateX(4px); }
.status {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font: 400 11px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: #C89B4A;
}
.status::before {
  content: ""; width: 8px; height: 8px; background: #C89B4A;
  animation: blink 1.6s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .status::before { animation: none; } }

.game.slot {
  min-height: 210px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between;
  background: transparent; box-shadow: none; border: 2px dashed var(--rule);
}
.game.slot .no { font: 400 11px/1 var(--pixel); letter-spacing: .08em; color: var(--ink-faint); }
.game.slot p { margin: 0; color: var(--ink-faint); font-size: 15px; }
.game.slot .silhouette {
  width: 56px; height: 56px; border-radius: 13px; background:
    repeating-linear-gradient(45deg, var(--rule) 0 6px, transparent 6px 12px);
}

@media (max-width: 900px) {
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game.feature { grid-template-columns: 1fr; }
  .game.feature .shot { aspect-ratio: 16 / 8; }
  .game.feature .shot::after { background: linear-gradient(180deg, rgba(28, 19, 14, 0) 60%, #1C130E); }
}

/* ---------- Promise ---------- */
.promise { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.promise > div { padding: 4px clamp(16px, 2.4vw, 28px) 0; border-left: 1px solid var(--rule); }
.promise > div:first-child { border-left: 0; padding-left: 0; }
.promise .big {
  font: 700 clamp(40px, 5vw, 60px)/1 var(--sans); letter-spacing: -.05em; margin-bottom: 18px;
}
.promise .big.hot { color: var(--tag-text); }
.promise h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.01em; }
.promise p { margin: 0; color: var(--ink-soft); font-size: 16px; }
@media (max-width: 900px) {
  .promise { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .promise > div:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 520px) {
  .promise { grid-template-columns: 1fr; row-gap: 32px; }
  .promise > div { border-left: 0; padding-left: 0; padding-right: 0; }
}

/* ---------- Contact ---------- */
.contact {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px;
  background: var(--ink); color: var(--paper); border-radius: 22px;
  padding: clamp(28px, 5vw, 56px);
}
.contact h2 { margin: 0 0 12px; font-size: clamp(30px, 4.4vw, 52px); line-height: 1; letter-spacing: -.04em; }
.contact p { margin: 0; color: color-mix(in srgb, var(--paper) 72%, transparent); max-width: 46ch; }
.contact a.mail {
  font: 600 clamp(18px, 2.2vw, 24px)/1 var(--sans); color: var(--paper);
  text-decoration: none; border-bottom: 3px solid var(--tag); padding-bottom: 6px; white-space: nowrap;
}
.contact a.mail:hover { border-color: var(--paper); }
@media (max-width: 720px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Prose pages ---------- */
.prose { max-width: 680px; padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.prose h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1; letter-spacing: -.045em; margin: 14px 0 12px; }
.prose h2 { font-size: 22px; letter-spacing: -.015em; margin: 44px 0 10px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose .lede { font-size: 21px; color: var(--ink); }
.prose a { text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-foot { padding: 40px 0 48px; color: var(--ink-faint); font-size: 14px; }
.site-foot .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--rule); padding-top: 24px;
}
.site-foot .brand img { width: 22px; height: 22px; }
.site-foot .brand span { font-size: 11px; color: var(--ink-faint); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Phones: the empty slots are a row of three stubs, not three tall cards. */
@media (max-width: 560px) {
  .section-head .label { display: none; }
  .games { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .game.slot { min-height: 0; padding: 14px; gap: 12px; border-radius: 14px; }
  .game.slot p { display: none; }
  .game.slot .silhouette { width: 40px; height: 40px; border-radius: 10px; }
}
