
:root {
  --navy-950: #07101f;
  --navy-900: #0b1630;
  --navy-800: #13203c;
  --cream: #f6f1e7;
  --cream-muted: #cfc9bc;
  --teal: #63b5bb;
  --teal-dark: #2e6f78;
  --lavender: #a38ac8;
  --lavender-dark: #635280;
  --border: rgba(246, 241, 231, 0.12);
  --panel: rgba(11, 22, 48, 0.74);
  --panel-strong: rgba(7, 16, 31, 0.9);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background:
    linear-gradient(rgba(7, 16, 31, 0.78), rgba(7, 16, 31, 0.92)),
    url("assets/cosmic-background.png") center / cover fixed;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a { color: inherit; }

img {
  display: block;
  max-width: 100%;
}

.site-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 16, 31, 0.78);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(99, 181, 187, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--cream-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--cream);
  background: rgba(99, 181, 187, 0.12);
}

.hero {
  padding: 92px 0 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 54px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--teal);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--lavender));
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 7vw, 6.6rem);
  line-height: 0.91;
  letter-spacing: -0.075em;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 650px;
  margin-bottom: 30px;
  color: var(--cream-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--navy-950);
  background: var(--cream);
  text-decoration: none;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(99, 181, 187, 0.18);
}

.button.secondary {
  color: var(--cream);
  border-color: var(--border);
  background: rgba(246, 241, 231, 0.06);
}

.feature-card,
.card,
.devlog-entry,
.callout {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(19, 32, 60, 0.88), rgba(7, 16, 31, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.feature-card {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  padding: 30px;
  border-radius: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-image: url('assets/misfortune-hero-image.png');
  background-size: cover;
  background-position: center;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 18%, rgba(163, 138, 200, 0.35), transparent 36%),
    radial-gradient(circle at 20% 75%, rgba(99, 181, 187, 0.30), transparent 38%);
}

.feature-card::after {
  content: "MISFORTUNE";
  position: absolute;
  top: 28px;
  right: -14px;
  color: rgba(246, 241, 231, 0.05);
  font-size: clamp(3.6rem, 8vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  transform: rotate(90deg) translateX(100%);
  transform-origin: top right;
}

.feature-content {
  position: relative;
  z-index: 1;
}

.game-tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--teal);
  background: rgba(99, 181, 187, 0.12);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section {
  padding: 70px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.section-heading p {
  max-width: 540px;
  margin-bottom: 2px;
  color: var(--cream-muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}

.card--linked {
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card--linked:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.card-link {
  color: inherit;
  text-decoration: none;
}

.card-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.game-splash {
  padding: 0 0 60px;
}

.game-splash img {
  width: 100%;
  border-radius: var(--radius);
}

.card-art {
  aspect-ratio: 16 / 10;
  position: relative;
  background:
    linear-gradient(135deg, rgba(99, 181, 187, 0.34), rgba(163, 138, 200, 0.27)),
    radial-gradient(circle at 30% 35%, rgba(246, 241, 231, 0.12), transparent 30%),
    var(--navy-800);
  overflow: hidden;
}

.card-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card:nth-child(2) .card-art {
  background:
    linear-gradient(135deg, rgba(163, 138, 200, 0.35), rgba(46, 111, 120, 0.25)),
    radial-gradient(circle at 72% 30%, rgba(246, 241, 231, 0.13), transparent 25%),
    var(--navy-800);
}

.card:nth-child(3) .card-art {
  background:
    linear-gradient(135deg, rgba(46, 111, 120, 0.32), rgba(99, 181, 187, 0.2)),
    radial-gradient(circle at 45% 70%, rgba(163, 138, 200, 0.16), transparent 28%),
    var(--navy-800);
}

.card-body { padding: 22px; }

.card p,
.devlog-entry p,
.meta {
  color: var(--cream-muted);
}

.meta {
  margin-bottom: 10px;
  font-size: 0.86rem;
}

.text-link {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.devlog-list {
  display: grid;
  gap: 18px;
}

.devlog-entry {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border-radius: 20px;
}

.devlog-entry time {
  color: var(--lavender);
  font-weight: 800;
}

.devlog-entry p { margin-bottom: 0; }

.post-date {
  display: block;
  color: var(--lavender);
  font-weight: 800;
  margin-bottom: 12px;
}

.eyebrow-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
}

.eyebrow-link:hover { opacity: 1; }

.post-content {
  max-width: 680px;
}

.post-content h2,
.post-content h3 { margin-top: 2em; }

.post-content ul,
.post-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.post-content li { margin-bottom: 0.4em; }

.post-content blockquote {
  border-left: 3px solid var(--lavender);
  padding-left: 1.25em;
  margin-left: 0;
  color: var(--cream-muted);
}

.post-content pre {
  background: var(--navy-800);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25em;
  overflow-x: auto;
  font-size: 0.88rem;
}

.post-content code {
  font-family: monospace;
  background: rgba(99, 181, 187, 0.1);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

.post-content img {
  max-width: 100%;
  border-radius: var(--radius);
}

.callout {
  padding: 36px;
  border-radius: 28px;
  background:
    linear-gradient(120deg, rgba(99, 181, 187, 0.16), rgba(163, 138, 200, 0.14)),
    var(--panel-strong);
}

.site-footer {
  margin-top: 70px;
  padding: 32px 0 44px;
  border-top: 1px solid var(--border);
  color: var(--cream-muted);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

@media (max-width: 820px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
  }

  .hero-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  .hero { padding-top: 64px; }

  .feature-card { min-height: 380px; }

  .section-heading,
  .footer-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .devlog-entry {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .site-shell { width: min(calc(100% - 20px), var(--max-width)); }

  h1 { font-size: clamp(2.8rem, 16vw, 4.3rem); }

  .feature-card,
  .callout {
    padding: 24px;
    border-radius: 22px;
  }
}
