/* ============================================
   ReadOnly Studios - Global Styles
   ============================================ */

:root {
  --color-bg: #FFFFFF;
  --color-bg-light: #F5F7FA;
  --color-bg-card: #FFFFFF;
  --color-bg-elevated: #FFFFFF;
  --color-bg-raised: #EEF6F8;
  --color-bg-hero: #0F2B3C;
  --color-teal: #2A9AAE;
  --color-teal-hover: #1E7F91;
  --color-teal-dim: rgba(42, 154, 174, 0.10);
  --color-white: #1A1A2E;
  --color-text: #3A3F4B;
  --color-text-muted: #6B7280;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-warm: #B8922E;

  --font-mono: 'Source Code Pro', 'IBM Plex Mono', 'Courier New', monospace;
  --font-body: 'Inter', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1100px;
  --spacing: 2rem;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4 {
  font-family: var(--font-mono);
  color: var(--color-teal);
  font-weight: 400;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }

p + p { margin-top: 1rem; }

/* ============================================
   Layout
   ============================================ */

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

main {
  flex: 1;
}

section {
  padding: 6rem 0;
}

section:first-child {
  padding-top: 3rem;
}

/* Raised section background for alternating depth */
.section--raised {
  background: var(--color-bg-raised);
  border-top: 1px solid rgba(42, 154, 174, 0.12);
  border-bottom: 1px solid rgba(42, 154, 174, 0.12);
}

/* ============================================
   Header / Nav
   ============================================ */

.site-header {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--color-bg-hero);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo {
  display: flex;
  align-items: center;
}

.site-header__logo img {
  height: 70px;
  width: auto;
}

.site-header__logo:hover {
  color: var(--color-teal-hover);
}

.site-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: #FFFFFF;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
  background: var(--color-bg-light);
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer__copy {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.site-footer__copy .cursor-blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.social-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.social-links a {
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.social-links a:hover {
  color: var(--color-teal);
}

.social-links svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ============================================
   Mini Hero (Home page)
   ============================================ */

.mini-hero {
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--color-bg-hero);
}

.mini-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(42, 154, 174, 0.2) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.mini-hero .container {
  position: relative;
  z-index: 1;
}

.mini-hero__headline {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
}

.mini-hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 2px solid var(--color-teal);
  color: var(--color-teal);
  background: transparent;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--color-teal);
  color: #FFFFFF;
  box-shadow: 0 4px 16px var(--color-teal-dim);
}

.btn--primary {
  background-color: var(--color-teal);
  color: #FFFFFF;
}

.btn--primary:hover {
  background-color: var(--color-teal-hover);
  color: #FFFFFF;
  box-shadow: 0 4px 16px var(--color-teal-dim);
}

.btn--large {
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

/* ============================================
   Game Cards (used on games.html and home)
   ============================================ */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.game-grid--single {
  display: flex;
  justify-content: center;
}

.game-grid--single .game-card {
  max-width: 500px;
  width: 100%;
}

.game-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-teal);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

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

.game-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-bg-light);
}

.game-card__body {
  padding: 1.5rem;
}

.game-card__title {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--color-teal);
  margin-bottom: 0.5rem;
}

.game-card__blurb {
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.game-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Status badges */
.badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--coming-soon {
  background: rgba(184, 146, 46, 0.12);
  color: var(--color-warm);
  border: 1px solid rgba(184, 146, 46, 0.25);
}

.badge--released {
  background: rgba(34, 139, 34, 0.12);
  color: #1B8C1B;
  border: 1px solid rgba(34, 139, 34, 0.25);
}

.badge--in-dev {
  background: rgba(180, 140, 30, 0.12);
  color: #9A7B1F;
  border: 1px solid rgba(180, 140, 30, 0.25);
}

/* ============================================
   Featured Game (Home page)
   ============================================ */

.featured-game {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.featured-game__image {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-bg-light);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.featured-game__info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.featured-game__title {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--color-teal);
  line-height: 1.3;
}

a.featured-game__title:hover {
  color: var(--color-teal-hover);
}

/* ============================================
   Devlog Section
   ============================================ */

.devlog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.devlog-list li {
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.devlog-list .devlog-date {
  color: var(--color-text-muted);
  margin-right: 0.75rem;
  font-size: 0.85rem;
}

/* ============================================
   Game Detail Page
   ============================================ */

.game-hero {
  position: relative;
  padding: 6rem 0;
  background: var(--color-bg-hero);
}

.game-hero__image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2.5rem;
  background: var(--color-bg-light);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.game-hero__content {
  text-align: center;
}

.game-hero__title {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  color: #FFFFFF;
}

.game-hero__pitch {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
}

.game-hero__cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Features list */
.features-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.features-list li {
  padding: 1.25rem 1.5rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-teal);
  border-radius: 10px;
  font-size: 0.95rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.features-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.features-list li strong {
  display: block;
  color: var(--color-teal);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

/* Screenshot gallery */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.screenshot-grid img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-bg-light);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.screenshot-grid img:hover {
  border-color: var(--color-teal);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 700px;
}

.faq-item h3 {
  color: var(--color-teal);
  margin-bottom: 0.4rem;
}

.faq-item p {
  color: var(--color-text);
  font-size: 0.95rem;
}

/* ============================================
   Page Header (for inner pages)
   ============================================ */

.page-header {
  padding: 3rem 0 2rem;
  background: var(--color-bg-hero);
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  color: #FFFFFF;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  :root {
    --spacing: 1.25rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }

  section {
    padding: 4rem 0;
  }

  .mini-hero {
    padding: 3rem 0;
  }

  .mini-hero__headline {
    font-size: 2rem;
  }

  .featured-game {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .game-hero__title {
    font-size: 1.75rem;
  }

  .screenshot-grid {
    grid-template-columns: 1fr;
  }

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

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }
}
