:root {
  --navy: #0C121D;
  --navy-deep: #070C15;
  --navy-soft: #131B2A;
  --cream: #F4F0E6;
  --cream-soft: #EAE4D5;
  --ink: #232A36;
  --accent: #C8102E;
  --accent-hover: #A30D25;
  --green: #3E8E62;
  --line-dark: rgba(244, 240, 230, 0.14);
  --line-light: rgba(17, 24, 39, 0.12);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; line-height: 1.12; }

h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: 1.12rem; font-weight: 600; }

a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

/* Bands */
.band { padding: 88px 0; }
.band-navy { background: var(--navy-deep); color: var(--cream); }
.band-navy h2 { color: #fff; }
.band-cream { background: var(--cream); }
.band-cream .lead { color: #4A5261; }

.lead { font-size: 1.16rem; max-width: 46rem; }

.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow-dark { color: #9E1720; }

.sec-head { max-width: 46rem; margin-bottom: 44px; }
.sec-head p { margin-top: 12px; opacity: 0.85; }
.sub-head { margin: 40px 0 18px; font-size: 1.35rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 17, 32, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: #fff;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.95rem;
}
.logo-text { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.1rem; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; color: rgba(244, 240, 230, 0.82); font-size: 0.95rem; font-weight: 500; }
.nav a:hover { color: #fff; }
.nav .btn-small { padding: 8px 16px; font-size: 0.9rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.header-right { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; align-items: center; gap: 2px; background: rgba(244,240,230,0.08); border: 1px solid var(--line-dark); border-radius: 999px; padding: 3px; }
.lang-switch a, .lang-switch span { font-size: 0.78rem; font-weight: 600; text-decoration: none; color: rgba(244,240,230,0.65); padding: 4px 10px; border-radius: 999px; }
.lang-switch .active { background: var(--accent); color: #fff; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--cream); margin: 5px 0; border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent); color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 0.98rem;
  padding: 13px 26px; border-radius: 999px;
  text-decoration: none; border: 0; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--line-dark); color: var(--cream); }
.btn-ghost:hover { background: rgba(244, 240, 230, 0.08); }
.btn-dark { background: var(--navy); color: var(--cream); }
.btn-dark:hover { background: #000; }
.btn-big { font-size: 1.15rem; padding: 16px 34px; }

/* Hero */
.hero { padding: 110px 0 90px; }
.hero h1 { margin-bottom: 22px; max-width: 44rem; }
.hero .lead { opacity: 0.88; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 54px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  border-top: 1px solid var(--line-dark); padding-top: 34px;
}
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { font-family: 'Space Grotesk', sans-serif; font-size: 1.9rem; color: var(--accent); }
.hero-stats span { font-size: 0.9rem; opacity: 0.72; }

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }

.check-list { list-style: none; margin: 22px 0 28px; display: flex; flex-direction: column; gap: 14px; }
.check-list li { padding-left: 30px; position: relative; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.42em;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.5-1.5z'/%3E%3C/svg%3E") center/contain no-repeat, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background: var(--accent);
}
.band-navy .check-list li::before { background: var(--accent); }

.quote-card {
  background: #fff; border: 1px solid var(--line-light);
  border-radius: var(--radius); padding: 34px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.10);
}
.quote-text { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; line-height: 1.45; font-weight: 500; }
.quote-src { margin-top: 14px; font-size: 0.9rem; color: #6A7280; }
.quote-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.quote-tags span {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  background: var(--cream); border: 1px solid var(--line-light);
  padding: 5px 12px; border-radius: 999px;
}

/* Game grid */
.game-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.game-card {
  background: var(--navy-soft);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--cream);
  display: flex; flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.game-card:hover { transform: translateY(-4px); border-color: rgba(200, 16, 46, 0.55); }
.game-card.no-link { cursor: default; }
.game-card img { width: 100%; aspect-ratio: 16/9.5; object-fit: cover; display: block; }
.game-art-icon {
  aspect-ratio: 16/9.5; display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #1C2638, #10182A);
}
.game-meta { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.game-meta p { font-size: 0.86rem; opacity: 0.75; }
.game-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.game-badges span {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.03em;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(244, 240, 230, 0.09); color: rgba(244, 240, 230, 0.8);
}
.badge.b-ok { background: rgba(62, 142, 98, 0.22); color: #7ED0A4; }
.badge.b-new { background: rgba(200, 16, 46, 0.2); color: #F08C8C; }
.badge.b-dev { background: rgba(244, 240, 230, 0.14); color: rgba(244, 240, 230, 0.65); }

/* Portal */
.portal-shot { margin: 0 0 14px; }
.portal-shot img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--line-light);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.16);
}
.portal-shot figcaption { font-size: 0.85rem; color: #6A7280; margin-top: 10px; text-align: center; }

.top-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.top-card {
  text-decoration: none; background: #fff;
  border: 1px solid var(--line-light); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.top-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(17, 24, 39, 0.14); }
.top-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.top-card span {
  display: block; padding: 10px 12px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.92rem;
}

/* Agents */
.agents-panel {
  background: var(--navy-soft);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 34px;
}
.agents-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.1rem; margin-bottom: 20px; color: #fff; }
.steps { list-style: none; display: flex; flex-direction: column; gap: 16px; counter-reset: step; }
.steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 0.97rem; }
.steps span {
  flex: 0 0 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.85rem;
}
.agents-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-dark); font-size: 0.9rem; opacity: 0.78; }

/* PlaytestQuest row */
.pq-row { margin-top: 54px; padding-top: 40px; border-top: 1px solid var(--line-dark); display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.pq-row h3 { font-size: 1.25rem; color: #fff; margin-bottom: 6px; }
.pq-row p { font-size: 0.96rem; opacity: 0.8; max-width: 40rem; }
.pq-row .btn { flex-shrink: 0; }

/* Blog */
.blog-wrap { max-width: 860px; margin: 0 auto; }
.post-card { display: block; background: var(--navy-soft); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 24px 26px; text-decoration: none; color: var(--cream); margin-bottom: 16px; transition: border-color 0.18s ease, transform 0.18s ease; }
.post-card:hover { border-color: rgba(200, 16, 46, 0.55); transform: translateY(-2px); }
.post-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.post-card p { font-size: 0.94rem; opacity: 0.78; margin: 0 0 10px; }
.post-card .meta { font-family: 'Space Grotesk', sans-serif; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.post-body p { margin: 16px 0; opacity: 0.92; }
.post-body h2 { font-size: 1.5rem; margin: 34px 0 12px; }
.post-body h3 { font-size: 1.2rem; margin: 26px 0 10px; }
.post-body ul, .post-body ol { margin: 16px 0 16px 24px; }
.post-body li { margin: 8px 0; }
.post-body blockquote { border-left: 3px solid var(--accent); padding: 8px 20px; margin: 20px 0; background: var(--navy-soft); border-radius: 0 10px 10px 0; }
.post-body a { color: #F08C8C; }
.post-body img { max-width: 100%; border-radius: 10px; }
.attrib { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line-dark); font-size: 0.9rem; opacity: 0.75; }
.crumb { font-size: 0.88rem; margin-bottom: 26px; }
.crumb a { color: rgba(244,240,230,0.7); text-decoration: none; }
.band-band-navy .band-navy-post { background: var(--navy-deep); }
.post-page { background: var(--navy-deep); color: var(--cream); min-height: 70vh; }

/* Admin */
.admin-page { background: var(--navy-deep); color: var(--cream); min-height: 100vh; padding: 40px 0 80px; }
.login-card { max-width: 420px; margin: 40px auto; background: var(--navy-soft); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 34px; }
.login-card label { display: block; font-size: 0.85rem; margin: 14px 0 6px; opacity: 0.8; }
.login-card input { width: 100%; padding: 11px 14px; border-radius: 9px; border: 1px solid var(--line-dark); background: var(--navy-deep); color: var(--cream); font-size: 0.95rem; }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 26px 0; }
.stat-box { background: var(--navy-soft); border: 1px solid var(--line-dark); border-radius: 12px; padding: 18px; }
.stat-box strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; color: var(--accent); }
.stat-box span { font-size: 0.8rem; opacity: 0.7; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 12px; }
.admin-table th { text-align: left; font-family: 'Space Grotesk', sans-serif; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.65; padding: 10px 12px; border-bottom: 1px solid var(--line-dark); }
.admin-table td { padding: 9px 12px; border-bottom: 1px solid rgba(244,240,230,0.06); }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 0.85rem; }
.bar-track { flex: 1; background: var(--navy-soft); border-radius: 6px; height: 22px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #F08C8C); border-radius: 6px; }
.admin-err { color: #F08C8C; font-size: 0.9rem; margin-top: 12px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* News grid on homepages */
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.news-grid .post-card h3 { font-size: 0.98rem; line-height: 1.35; }
@media (max-width: 1020px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .news-grid { grid-template-columns: 1fr; } }

/* Contact */
#contact .lead { margin: 14px auto 30px; }

/* Footer */
.site-footer { background: var(--navy-deep); color: rgba(244, 240, 230, 0.8); padding: 60px 0 30px; border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.9fr 1fr 1fr 0.9fr; gap: 30px; font-size: 0.92rem; }
.footer-logo { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.2rem; color: #fff; margin-bottom: 8px; }
.foot-head { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: #fff; margin-bottom: 12px; font-size: 0.95rem; }
.site-footer a { display: block; text-decoration: none; color: rgba(244, 240, 230, 0.68); margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.footer-legal { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-dark); font-size: 0.85rem; opacity: 0.6; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Responsive */
@media (max-width: 1020px) {
  .game-grid, .top-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .band { padding: 64px 0; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--navy-deep); flex-direction: column; align-items: flex-start;
    padding: 20px 24px; gap: 16px; border-bottom: 1px solid var(--line-dark);
  }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .game-grid, .top-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 80px 0 64px; }
  .pq-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .game-grid, .top-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
