/* flawedgames.com: the studio site. A friendly crash screen up top, the
   games below. Colours and type are the only borrowed things: the blue of
   a crash screen and a plain bold sans; every word and shape is our own. */

@font-face { font-family: "Inter"; src: url("fonts/Inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --blue: #0078d7;
  --blue-deep: #0063b1;
  --ink: #12202f;
  --ink-soft: #4a5868;
  --paper: #f3f6fa;
  --card: #ffffff;
  --rule: rgba(18, 32, 47, 0.1);
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--blue); scroll-behavior: smooth; }
body { margin: 0; font: 400 1.0625rem/1.6 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(1120px, 100% - 48px); margin: 0 auto; }

/* ---- top bar ---- */
.bar { position: absolute; inset: 0 0 auto; z-index: 2; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.wordmark { font-weight: 800; letter-spacing: -0.02em; font-size: 1.35rem; }
.wordmark b { font-weight: 800; letter-spacing: 0.01em; }
.bar nav { display: flex; gap: 26px; }
.bar nav a { color: rgba(255, 255, 255, 0.86); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.bar nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* ---- the crash screen ---- */
.crash {
  background: var(--blue);
  color: #fff;
  min-height: min(100svh, 920px);
  display: flex;
  align-items: center;
  padding: 110px 0 70px;
  position: relative;
  overflow: hidden;
}
.crash .frown { font-weight: 300; font-size: clamp(6rem, 17vw, 11.5rem); line-height: 0.9; margin: 0 0 18px; letter-spacing: -0.04em; }
.crash h1 { font-weight: 800; font-size: clamp(2.6rem, 8.2vw, 5.6rem); line-height: 1; letter-spacing: -0.035em; margin: 0 0 30px; }
.crash h1 b { letter-spacing: 0.005em; }
.crash .lede { font-size: clamp(1.25rem, 2.6vw, 1.75rem); line-height: 1.45; font-weight: 400; max-width: 30em; margin: 0 0 26px; }
.crash .progress { font-size: clamp(1.15rem, 2.2vw, 1.5rem); margin: 0 0 44px; }
.crash .progress span { font-variant-numeric: tabular-nums; }
.stopcode { display: flex; gap: 22px; align-items: flex-start; }
.stopcode img { width: 92px; height: 92px; border-radius: 10px; flex: none; background: #fff; padding: 8px; }
.stopcode p { margin: 0 0 8px; font-size: 0.98rem; color: rgba(255, 255, 255, 0.88); }
.stopcode .small { font-size: 0.85rem; color: rgba(255, 255, 255, 0.75); margin-top: 12px; }
.stopcode code { font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.02em; }
.stopcode a { color: #fff; }

/* ---- sections ---- */
section.games { padding: 96px 0 40px; }
.eyebrow { font: 700 0.78rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); margin: 0 0 14px; }
.section-title { font-weight: 800; font-size: clamp(2rem, 4.4vw, 2.9rem); letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 14px; }
.section-lede { color: var(--ink-soft); font-size: 1.15rem; max-width: 40em; margin: 0 0 52px; }

.game {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 44px;
  align-items: center;
  background: var(--card);
  border-radius: 22px;
  padding: 26px;
  margin: 0 0 34px;
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -26px rgba(18, 32, 47, 0.35);
}
.game:nth-child(even) { grid-template-columns: 1fr 1.15fr; }
.game:nth-child(even) .art { order: 2; }
.game .art { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1232 / 706; background: #dfe6ee; }
.game .art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.game:hover .art img { transform: scale(1.025); }
.game .art .shot { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; }
.game:hover .art .shot { opacity: 1; }
.game .text { padding: 8px 10px 8px 0; }
.game:nth-child(even) .text { padding: 8px 0 8px 10px; }
.game .genre { font: 700 0.75rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 12px; }
.game h3 { font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 10px; }
.game .tagline { font-size: 1.15rem; font-weight: 600; color: var(--blue-deep); margin: 0 0 14px; line-height: 1.4; }
.game .about { color: var(--ink-soft); margin: 0 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.chips li { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--rule); padding: 5px 11px; border-radius: 999px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 0.98rem; text-decoration: none; padding: 12px 20px; border-radius: 11px; background: var(--blue); color: #fff; transition: background 0.15s ease, transform 0.15s ease; }
.btn:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--blue-deep); box-shadow: inset 0 0 0 1.5px rgba(0, 99, 177, 0.35); }
.btn.ghost:hover { background: rgba(0, 120, 215, 0.07); }
.btn svg { width: 18px; height: 18px; }
.soon { font: 600 0.92rem/1.3 var(--sans); color: var(--ink-soft); }

/* ---- studio ---- */
section.studio { padding: 60px 0 100px; }
.studio-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.studio p { color: var(--ink-soft); font-size: 1.1rem; margin: 0 0 16px; }
.contact-card { background: var(--card); border-radius: 18px; padding: 28px 30px; box-shadow: 0 1px 0 var(--rule), 0 18px 40px -28px rgba(18, 32, 47, 0.3); }
.contact-card h3 { margin: 0 0 6px; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; }
.contact-card p { font-size: 1rem; margin: 0 0 18px; }
.contact-card .mail { font-weight: 700; font-size: 1.15rem; color: var(--blue-deep); text-decoration: none; }
.contact-card .mail:hover { text-decoration: underline; }
.contact-card dl { margin: 22px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 0.95rem; }
.contact-card dt { color: var(--ink-soft); }
.contact-card dd { margin: 0; font-weight: 600; }

/* ---- footer ---- */
footer { background: var(--blue); color: rgba(255, 255, 255, 0.86); padding: 34px 0; font-size: 0.92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer .brand img { width: 28px; height: 28px; }
footer .wordmark { font-size: 1.1rem; }
footer code { font-family: var(--mono); font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); }
footer nav { display: flex; gap: 20px; }
footer nav a { color: #fff; text-decoration: none; }
footer nav a:hover { text-decoration: underline; }

/* ---- prose pages ---- */
.page-head { background: var(--blue); color: #fff; padding: 120px 0 56px; }
.page-head h1 { font-weight: 800; font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: -0.03em; margin: 0; }
.prose { padding: 56px 0 90px; max-width: 46em; }
.prose h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; margin: 36px 0 8px; }
.prose p, .prose li { color: var(--ink-soft); }

@media (max-width: 880px) {
  .game, .game:nth-child(even) { grid-template-columns: 1fr; gap: 22px; padding: 18px; }
  .game:nth-child(even) .art { order: 0; }
  .game .text, .game:nth-child(even) .text { padding: 0 6px 6px; }
  .studio-grid { grid-template-columns: 1fr; gap: 30px; }
  .bar nav { gap: 18px; }
  .bar nav a.wide { display: none; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 32px); }
  .stopcode img { width: 70px; height: 70px; }
  .bar nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .game .art img, .game .art .shot, .btn { transition: none; }
}
