/* Thoughtcrime Studios / thoughtcrime.ai
   Hand-written CSS, no framework.
   Identity: dark, cinematic, sharp. Near-black ground, off-white type,
   one red accent. The aperture eye is the studio mark.
   The Itch Market Brief is set as a paper broadsheet against the dark site. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0c;
  --bg-2: #0f0f12;
  --panel: #131318;
  --line: rgba(236, 233, 226, 0.14);
  --line-strong: rgba(236, 233, 226, 0.32);
  --text: #ece9e2;
  --body: #d9d5cb;
  --dim: #a49f93;
  --accent: #e23a2e;
  --accent-hot: #f04a3a;
  --accent-bright: #ff6a5c;
  --accent-dark: #b3241a;
  --paper: #f4f0e6;
  --paper-2: #ece5d2;
  --ink: #17171b;
  --ink-body: #26262b;
  --ink-dim: #5d594f;
  --ink-line: rgba(23, 23, 27, 0.28);
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --max: 68rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.12;
  margin: 0;
}

.serif { font-family: var(--serif); }

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent-bright); }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

header.site {
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand:hover .brand-eye { color: var(--accent-bright); }

.brand-eye {
  width: 32px;
  height: auto;
  flex: none;
  color: var(--text);
  transition: color 0.25s ease;
}

nav.main { display: flex; gap: 1.6rem; flex-wrap: wrap; }
nav.main a {
  color: var(--dim);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
nav.main a:hover { color: var(--text); border-bottom-color: var(--accent); text-decoration: none; }

/* Hero: a title card */

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 6.2rem 0 5.6rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 58% 46% at 50% 26%, rgba(226, 58, 46, 0.1), transparent 70%),
    var(--bg);
}

.hero .wrap { position: relative; }

.hero .mark {
  display: block;
  width: clamp(160px, 24vw, 228px);
  height: auto;
  margin: 0 auto 2.4rem;
}

.hero .iris {
  transform-box: view-box;
  transform-origin: 120px 75px;
  animation: iris-turn 160s linear infinite;
}

@keyframes iris-turn {
  to { transform: rotate(360deg); }
}

.hero h1 {
  font-size: clamp(2.9rem, 7.4vw, 4.9rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.02;
  margin: 0 0 1.3rem;
}

.hero p.lede {
  font-size: 1.22rem;
  line-height: 1.6;
  color: var(--dim);
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: 2px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.btn:hover {
  background: var(--accent-hot);
  border-color: var(--accent-hot);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
  margin-left: 0.6rem;
}
.btn.ghost:hover {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent-bright);
}

/* Sections */

section.block { padding: 6rem 0; border-bottom: 1px solid var(--line); }
section.block.alt { background: var(--bg-2); }

section.block h2 {
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  font-weight: 750;
  letter-spacing: -0.012em;
  margin: 0 0 0.4rem;
}

.kicker {
  color: var(--accent-bright);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin: 0 0 1.1rem;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 0.75rem;
}

.rule {
  width: 3.4rem;
  height: 3px;
  background: var(--accent);
  margin: 1.2rem 0 1.8rem;
}

section.block p { max-width: 44rem; }
section.block p.dim { color: var(--dim); }

#studio .rule + p {
  font-size: 1.28rem;
  line-height: 1.55;
  font-weight: 500;
  color: var(--text);
  max-width: 46rem;
}

/* Games: key art in frames */

.games {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.2rem;
}

.game {
  position: relative;
  background: #0d0d10;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.game::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
}
.game:hover { border-color: rgba(226, 58, 46, 0.55); transform: translateY(-4px); }
.game:hover::before { transform: scaleX(1); }

.game img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
  transition: transform 0.6s ease;
}
.game:hover img { transform: scale(1.025); }

.game .body { padding: 1.6rem 1.7rem 1.9rem; }
.game h3 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}
.game p { margin: 0 0 1.2rem; color: var(--dim); font-size: 0.99rem; line-height: 1.6; max-width: none; }
.game .btn {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
  padding: 0.7rem 1.3rem;
}
.game .btn:hover {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent-bright);
  transform: none;
}

/* The Brief on index: a paper broadsheet sheet on the dark site */

#brief .wrap {
  background: var(--paper);
  color: var(--ink-body);
  padding: 3.6rem clamp(1.4rem, 5vw, 4rem) 3.8rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

#brief .kicker { color: var(--accent-dark); }
#brief h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.3rem, 5vw, 3.3rem);
  letter-spacing: 0;
  color: var(--ink);
}
#brief .rule {
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--accent) 0 3.4rem, rgba(23, 23, 27, 0.85) 3.4rem);
  margin: 1.1rem 0 2rem;
}
#brief p { color: var(--ink-body); max-width: 46rem; }
#brief a { color: var(--accent-dark); text-decoration-color: rgba(179, 36, 26, 0.45); }
#brief a:hover { color: var(--ink); }

.findings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2.4rem 0 0.6rem;
  border-top: 2px solid var(--ink);
  padding-top: 1.6rem;
}

.finding { border-top: 3px solid var(--accent); padding-top: 1rem; }
.finding .big {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 2.7rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: block;
  line-height: 1.05;
  margin-bottom: 0.4rem;
}
.finding p { margin: 0; color: var(--ink-dim); font-size: 0.95rem; max-width: none; }

/* Chart figures (data graphics) */

.chart-card {
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  padding: 1.5rem 0 1.3rem;
  margin-top: 2.4rem;
}
.chart-card h3 {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
}
#brief .chart-card h3 { color: var(--ink); }
.chart-card svg { display: block; width: 100%; height: auto; }
.chart-card .src {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  margin: 0.7rem 0 0;
}
#brief .chart-card .src { color: var(--ink-dim); }

/* Signup */

.signup-box {
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  background: var(--panel);
  padding: 2.2rem;
  max-width: 42rem;
  min-height: 13rem;
}
.signup-box p { max-width: none; }

.form-note { color: var(--dim); font-size: 0.9rem; margin-top: 0.8rem; }
.form-msg { color: var(--accent-bright); font-size: 0.95rem; margin-top: 0.8rem; min-height: 1.2em; }

/* Article (sample issue): a printed journal sheet */

article.issue {
  background: var(--paper);
  color: var(--ink-body);
  padding: 4.5rem 0 5.5rem;
}
article.issue .wrap { max-width: 50rem; }

article.issue .kicker { color: var(--accent-dark) !important; }
article.issue .kicker::before { background: var(--accent); }

article.issue h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0.6rem 0 0.5rem;
}

article.issue .dateline {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--ink-line);
  padding-bottom: 1.4rem;
  margin: 0 0 2.2rem;
}

article.issue h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--ink);
  margin: 2.8rem 0 0.7rem;
}
article.issue h2::before {
  content: "";
  display: block;
  width: 2.6rem;
  height: 3px;
  background: var(--accent);
  margin-bottom: 0.9rem;
}

article.issue p, article.issue li {
  font-size: 1.09rem;
  line-height: 1.75;
  color: var(--ink-body);
}
article.issue ol { padding-left: 1.3rem; }
article.issue li { margin-bottom: 0.5rem; }
article.issue li::marker { color: var(--accent); font-weight: 700; }
article.issue a { color: var(--accent-dark); text-decoration-color: rgba(179, 36, 26, 0.45); }
article.issue a:hover { color: var(--ink); }

article.issue .dateline + p::first-letter {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 3.55em;
  float: left;
  line-height: 0.82;
  padding: 0.05em 0.13em 0 0;
  color: var(--accent);
}

article.issue .chart-card { max-width: none; }
article.issue .chart-card h3 { color: var(--ink); }
article.issue .chart-card .src { color: var(--ink-dim); }

article.issue .signup-box {
  background: transparent;
  border: 2px solid var(--ink);
  min-height: 11rem;
}
article.issue .signup-box p { color: var(--ink-body); }

/* Footer */

footer.site { padding: 3rem 0 3.6rem; }
footer.site .links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
}
footer.site .links::before {
  content: "";
  width: 36px;
  height: 23px;
  flex: none;
  opacity: 0.9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 150'%3E%3Cpath d='M8 75C35 20 75 6 120 6c45 0 85 14 112 69-27 55-67 69-112 69-45 0-85-14-112-69Z' fill='none' stroke='%23ece9e2' stroke-width='10'/%3E%3Ccircle cx='120' cy='75' r='43' fill='none' stroke='%23ece9e2' stroke-width='9'/%3E%3Ccircle cx='120' cy='75' r='12' fill='%23e23a2e'/%3E%3C/svg%3E") center / contain no-repeat;
}
footer.site .links a {
  color: var(--dim);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
footer.site .links a:hover { color: var(--accent-bright); text-decoration: none; }
footer.site p { color: var(--dim); font-size: 0.9rem; max-width: 44rem; margin: 0.4rem 0; }

/* Responsive */

@media (max-width: 46rem) {
  .games, .findings { grid-template-columns: 1fr; }
  .hero { padding: 4.2rem 0 3.6rem; }
  section.block { padding: 4rem 0; }
  #brief .wrap { padding: 2.4rem 1.35rem 2.6rem; }
  article.issue { padding: 3rem 0 4rem; }
  .btn.ghost { margin-left: 0; margin-top: 0.7rem; }
  .signup-box { padding: 1.6rem; }
  nav.main { gap: 1.1rem; }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .iris { animation: none; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
