/* ============================================
   Opion Games — Shared Stylesheet
   Fonts: Outfit (display) + DM Sans (body)
   Signature: Letter-tile logo mark in nav
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=DM+Sans:wght@400;500&display=swap');

/* ---- Tokens ---- */
:root {
  --bg:           #0D1117;
  --surface:      #141C2E;
  --surface-hi:   #1B2640;
  --border:       rgba(255,255,255,0.07);
  --gold:         #F5A623;
  --gold-dim:     rgba(245,166,35,0.10);
  --gold-border:  rgba(245,166,35,0.30);
  --text:         #E8EDF3;
  --muted:        #7B8799;
  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    20px;
  --max-w:        1080px;
  --display:      'Outfit', sans-serif;
  --body:         'DM Sans', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---- Layout ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.page-section { padding: 80px 0; }

/* ---- Navigation ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo: each letter sits in a tile — the studio's signature mark */
.nav-logo {
  display: flex;
  gap: 4px;
  text-decoration: none;
  align-items: center;
}
.nav-logo .tile {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.2s, color 0.2s;
}
.nav-logo .tile.locked {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}
.nav-logo:hover .tile { border-color: rgba(255,255,255,0.16); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

/* ---- Hero ---- */
.hero {
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
/* Subtle tile grid texture in hero background */
.hero-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, 48px);
  grid-template-rows: repeat(auto-fill, 48px);
  gap: 6px;
  opacity: 0.028;
  pointer-events: none;
  padding: 6px;
}
.hero-bg-tile {
  border: 1px solid var(--gold);
  border-radius: 6px;
}
.hero-content { position: relative; z-index: 1; }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 22px;
}
.hero h1 .word-gold { color: var(--gold); }
.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 460px;
  margin-bottom: 36px;
  line-height: 1.7;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold {
  background: var(--gold);
  color: #0D1117;
}
.btn-gold:hover { background: #ffb93a; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.18); background: var(--surface); }
.btn-full { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }

/* ---- Section labels ---- */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.section-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.section-heading {
  font-family: var(--display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 44px;
}

/* ---- Game cards ---- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.22s, border-color 0.22s;
}
.game-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-border);
}
.game-thumb {
  width: 100%;
  height: 220px;
  background: var(--surface-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.game-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.game-thumb-placeholder .placeholder-tiles {
  display: grid;
  grid-template-columns: repeat(4, 36px);
  gap: 5px;
}
.game-thumb-placeholder .p-tile {
  width: 36px;
  height: 36px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--gold);
}
.game-thumb-placeholder span { font-size: 12px; }
.game-body { padding: 24px; }
.game-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.game-body h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.game-body p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.store-row { display: flex; gap: 10px; flex-wrap: wrap; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.store-btn:hover { border-color: rgba(255,255,255,0.2); background: #243050; }

/* ---- Portfolio/About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.about-text p { color: var(--muted); margin-bottom: 16px; font-size: 15px; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip {
  padding: 6px 14px;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text);
}

/* ---- Service cards ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 64px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.service-icon { font-size: 26px; margin-bottom: 14px; }
.service-card h3 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}
.service-card p { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ---- Contact form ---- */
.form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 580px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 7px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  padding: 11px 14px;
  transition: border-color 0.2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 120px; }
.field select { cursor: pointer; }
.form-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 20px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  color: var(--muted);
  font-size: 12px;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ---- Legal pages ---- */
.legal-page { max-width: 720px; margin: 0 auto; padding: 60px 24px 100px; }
.legal-page h1 {
  font-family: var(--display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.legal-updated { color: var(--muted); font-size: 14px; margin-bottom: 52px; }
.legal-page h2 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  margin: 44px 0 12px;
  color: var(--text);
}
.legal-page p { color: var(--muted); margin-bottom: 14px; font-size: 15px; }
.legal-page ul,
.legal-page ol { color: var(--muted); padding-left: 20px; margin-bottom: 14px; }
.legal-page li { margin-bottom: 7px; font-size: 15px; }
.legal-page a { color: var(--gold); text-decoration: underline; }
.legal-page strong { color: var(--text); font-weight: 600; }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
  .form-wrap { padding: 28px 20px; }
  .page-section { padding: 60px 0; }
  .hero { padding: 70px 0 60px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 500px) {
  .nav-links { display: none; }
  .hero { padding: 52px 0 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
