/* Inverted Button Studios – Game dev blog */

:root {
  --bg: #0d0e12;
  --surface: #14161c;
  --surface-2: #1c1f28;
  --text: #e6e8ec;
  --text-muted: #8b8f99;
  --accent: #7c6bff;
  --accent-hover: #9b8cff;
  --border: #2a2d38;
  --radius: 8px;
  --font: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --container: 1100px;
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.container--narrow {
  max-width: 720px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 14, 18, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}

.logo:hover {
  color: var(--text);
}

/* Constrain logo image size to fit the header */
.logo-img {
  max-height: calc(var(--header-h) - 20px);
  max-width: 220px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: var(--radius);
}

.logo-icon {
  color: var(--accent);
  font-size: 1.4rem;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--text);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* Main */
.main {
  min-height: calc(100vh - var(--header-h) - 200px);
}

/* Hero */
.hero {
  padding: 80px 0 100px;
  text-align: center;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-subtitle {
  margin: 0 0 32px;
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text);
}

/* Sections */
.section {
  padding: 60px 0;
}

.section-title {
  margin: 0 0 32px;
  font-size: 1.75rem;
  font-weight: 600;
}

.section-desc {
  margin: -20px 0 28px;
  max-width: 560px;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.section-desc a {
  color: var(--accent);
  font-weight: 500;
}

.section-desc a:hover {
  color: var(--accent-hover);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-head .section-title {
  margin: 0;
}

.link-more {
  font-weight: 500;
  color: var(--accent);
}

.services-cta-inline {
  margin: 28px 0 0;
  text-align: center;
}

.services-cta-inline .link-more {
  font-size: 1.05rem;
}

/* Stats / Trust badges */
.stats-section {
  padding: 40px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.stat-card--highlight {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border-color: var(--accent);
  border-width: 2px;
}

.stat-icon {
  font-size: 1.8rem;
  color: var(--accent);
  flex: 0 0 auto;
  line-height: 1;
}

.stat-content {
  min-width: 0;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card--highlight .stat-number {
  color: var(--accent);
}

.stat-card--highlight .stat-icon {
  color: var(--accent-hover);
}

/* Services */
.services-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.service-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.service-card:hover {
  border-color: var(--accent);
}

.service-icon {
  display: block;
  margin-bottom: 12px;
  font-size: 1.5rem;
  color: var(--accent);
}

.service-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
}

.service-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Services page */
.services-page {
  padding-top: 24px;
}

.services-grid--page {
  margin-bottom: 48px;
}

.service-card--page .service-card-title {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.service-card-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.services-engines {
  margin-bottom: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.services-engines-title {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.services-engines-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Contact list styles */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.contact-card:hover {
  border-color: var(--accent);
}

.contact-logo {
  width: 44px;
  height: 44px;
  max-width: 44px;
  max-height: 44px;
  display: block;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  flex: 0 0 auto;
}

.contact-card-icon {
  display: inline-block;
  width: 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-weight: 600;
}

.contact-card-label {
  flex: 1 1 auto;
  color: var(--text);
  font-weight: 600;
}

.contact-card-arrow {
  color: var(--text-muted);
  font-weight: 700;
}

.services-engine-tag {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.services-cta {
  text-align: center;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.services-cta-text {
  margin: 0 0 20px;
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Blog grid (home) */
.blog-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.blog-card-link {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: border-color 0.2s;
}

.blog-card-link:hover {
  border-color: var(--accent);
  color: inherit;
}

.blog-card-image {
  height: 180px;
  background: var(--surface-2);
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card-body {
  padding: 20px;
}

.blog-meta {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.blog-card-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}

.blog-card-excerpt {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.blog-read-more {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}

/* Blog list page */
.page-head {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 700;
}

.page-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.blog-list {
  list-style: none;
  margin: 0;
  padding: 40px 0 0;
}

.blog-list-item {
  border-bottom: 1px solid var(--border);
}

.blog-list-link {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  padding: 28px 0;
  color: inherit;
  align-items: start;
}

.blog-list-link:hover {
  color: inherit;
}

.blog-list-link:hover .blog-list-title {
  color: var(--accent);
}

.blog-list-image {
  height: 120px;
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}

.blog-list-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-list-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.blog-list-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 600;
  transition: color 0.2s;
}

.blog-list-excerpt {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Article (single post) */
.article {
  padding: 40px 0 80px;
}

.article-header {
  margin-bottom: 28px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.article-title {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.article-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--surface-2);
  border-radius: 4px;
  color: var(--text-muted);
}

.article-image {
  border-radius: var(--radius);
  margin-bottom: 32px;
  background: var(--surface-2);
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.article-content {
  margin-bottom: 40px;
}

.prose p {
  margin: 0 0 1.25em;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  margin: 1.5em 0;
}

.article-footer {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* About */
.about-content p {
  margin-bottom: 1.25em;
}

.about-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Contact */
.contact-section {
  padding-top: 24px;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.contact-card:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  color: var(--text);
}

.contact-card-icon {
  font-weight: 600;
  font-size: 1rem;
  min-width: 80px;
  color: var(--accent);
}

.contact-card-label {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-card-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.contact-card:hover .contact-card-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.contact-empty {
  text-align: center;
  color: var(--text-muted);
  margin: 0;
}

.contact-empty code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 2px 6px;
  background: var(--surface-2);
  border-radius: 4px;
}

/* Projects page */
.projects-section {
  padding-top: 24px;
}

.projects-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.project-card:hover {
  border-color: var(--accent);
}

.project-card-image {
  height: 200px;
  background: var(--surface-2);
  overflow: hidden;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card-image--placeholder {
  background: var(--surface-2);
}

.project-card-body {
  padding: 24px;
}

.project-card-title {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 600;
}

.project-card-desc {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.project-card-tags {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-card-link {
  font-weight: 500;
  color: var(--accent);
}

.project-card-link:hover {
  color: var(--accent-hover);
}

.projects-empty {
  text-align: center;
  color: var(--text-muted);
  margin: 0;
}

.projects-empty code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 2px 6px;
  background: var(--surface-2);
  border-radius: 4px;
}

/* Team */
.team-section {
  padding-top: 24px;
}

.team-section--members {
  padding-top: 48px;
}

.team-heading {
  margin: 0 0 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.team-heading--founder {
  margin-bottom: 16px;
}

.founder-card {
  padding: 40px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

.person-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.person-head--founder {
  margin-bottom: 18px;
}

.person-head-body {
  min-width: 0;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.avatar--lg {
  width: 96px;
  height: 96px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.founder-role {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.founder-name {
  margin: 0 0 12px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.founder-tagline {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.5;
  white-space: pre-line;
}

.team-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.team-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.team-card:hover {
  border-color: var(--accent);
}

.team-card-name {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
}

.team-card-tagline {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.45;
  white-space: pre-line;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 100px 0;
}

.error-code {
  margin: 0 0 8px;
  font-size: 4rem;
  font-weight: 700;
  color: var(--text-muted);
}

.error-message {
  margin: 0 0 24px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 48px 0 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
}

.footer-brand .logo-icon {
  color: var(--accent);
}

.footer-tagline {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-nav a {
  color: var(--text-muted);
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Mobile */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .nav.is-open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }

  .menu-toggle {
    display: flex;
  }

  .blog-list-link {
    grid-template-columns: 1fr;
  }

  .blog-list-image {
    height: 160px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .stat-card {
    padding: 16px 18px;
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .stat-icon {
    font-size: 1.5rem;
  }

  .stat-number {
    font-size: 1.3rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }
}
