:root {
  --surface: #ffffff;
  --surface-alt: #eef4ff;
  --text: #15213d;
  --muted: #52607d;
  --primary: #4f6dff;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-soft: 0 10px 24px rgba(20, 35, 80, 0.08);
  --shadow-hover: 0 14px 32px rgba(20, 35, 80, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

html,
body {
  margin: 0;
  font-family: "Segoe UI", "Inter", "Avenir Next", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 0%, #eaf0ff 0%, #f6f9ff 32%, #f9fbff 100%);
}

main[data-main] {
  min-width: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(8px);
  background: rgba(246, 249, 255, 0.85);
  border-bottom: 1px solid rgba(79, 109, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}

.brand:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.brand img {
  height: 46px;
  width: auto;
}

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

.nav-link {
  font-weight: 600;
  color: var(--muted);
  padding: 0.35rem 0.15rem;
  border-radius: 6px;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--primary);
}

.nav-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.hero {
  margin-top: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--surface);
}

.hero-media {
  position: relative;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 20, 49, 0) 40%, rgba(9, 20, 49, 0.5) 100%);
}

.hero-media img {
  width: 100%;
  height: clamp(220px, 50vw, 460px);
  object-fit: cover;
}

.hero-text {
  padding: 32px 32px 36px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

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

.hero-title {
  color: #354e76;
  font-weight: 600;
  font-size: clamp(1.9rem, 2.9vw, 2.7rem);
  letter-spacing: 0.01em;
  line-height: 1.16;
  max-width: 22ch;
}

p {
  line-height: 1.7;
}

.lede {
  color: var(--muted);
  max-width: 74ch;
}

.section {
  padding: 56px 0;
}

#games {
  margin-top: 48px;
  padding: 44px 28px 60px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 248, 255, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.section-header {
  margin-bottom: 22px;
}

.section-title {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

#games .section-title {
  display: inline-block;
  color: #2f4f7b;
}

#games .section-title::after {
  content: "";
  display: block;
  margin-top: 8px;
  width: 74px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(79, 109, 255, 0.35), rgba(39, 197, 161, 0.35));
}

.section-subtitle {
  margin-top: 10px;
  color: var(--muted);
}

#games .section-subtitle {
  max-width: 80ch;
  color: #61718f;
}

.project-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
}

.project-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transform: translateY(0);
  border: 1px solid rgba(120, 140, 190, 0.08);
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-5px) scale(1.012);
  box-shadow: 0 18px 34px rgba(40, 66, 119, 0.14);
  border-color: rgba(97, 125, 194, 0.24);
}

.project-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-card-content {
  padding: 14px 14px 16px;
}

.project-card-content h3 {
  font-size: clamp(0.95rem, 2.8vw, 1.05rem);
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.project-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: var(--surface-alt);
  color: #3a4f7f;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #4f6dff, #6f61ff);
}

.btn-secondary {
  color: #0f1f46;
  background: #fff;
}

.btn:focus-visible {
  outline: 2px solid #4f6dff;
  outline-offset: 3px;
}

.project-hero {
  margin-top: 28px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.project-top-layout {
  display: grid;
  gap: 22px;
  align-items: start;
}

.project-main-content .section-title {
  margin-top: 18px;
}

.project-trailer-card {
  background: linear-gradient(180deg, #ffffff, #f7faff);
  border-radius: var(--radius-md);
  border: 1px solid rgba(110, 132, 188, 0.12);
  box-shadow: 0 10px 26px rgba(33, 56, 110, 0.1);
  padding: 10px;
}

.project-trailer-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
  display: block;
}

.project-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.gallery-grid {
  margin-top: 22px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
}

.gallery-item {
  border: 1px solid rgba(99, 122, 180, 0.12);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  background: #fff;
  box-shadow: 0 8px 20px rgba(30, 50, 100, 0.08);
  transform: translateY(0) scale(1);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.gallery-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 14px 26px rgba(30, 50, 100, 0.12);
  border-color: rgba(99, 122, 180, 0.22);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 14, 30, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(1100px, 95vw);
  max-height: 88vh;
  border-radius: var(--radius-sm);
  transition: opacity 150ms ease, transform 150ms ease;
}

.lightbox img.is-transitioning {
  opacity: 0.35;
  transform: scale(0.992);
}

.lightbox-control {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(13, 20, 40, 0.45);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
  backdrop-filter: blur(2px);
  -webkit-tap-highlight-color: transparent;
}

.lightbox-control:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: 2px;
}

.lightbox-control:hover,
.lightbox-control:focus-visible {
  background: rgba(13, 20, 40, 0.62);
  transform: scale(1.04);
}

.lightbox-prev {
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover,
.lightbox-prev:focus-visible,
.lightbox-next:hover,
.lightbox-next:focus-visible {
  transform: translateY(-50%) scale(1.04);
}

.lightbox-close {
  top: 24px;
  right: 24px;
  font-size: 1.3rem;
}

.lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.94);
  background: rgba(13, 20, 40, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.86rem;
  font-weight: 600;
}

.site-footer {
  margin-top: auto;
  background: #101b3a;
  color: #dbe6ff;
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links {
  display: inline-flex;
  gap: 14px;
  align-items: center;
}

.footer-links a {
  color: #dbe6ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:focus-visible {
  outline: 2px solid #dbe6ff;
  outline-offset: 3px;
  border-radius: 4px;
}

.legal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  margin-top: 28px;
}

.legal h2 {
  margin-top: 18px;
  font-size: 1.2rem;
}

.legal p {
  margin: 0.5rem 0 0;
}

.policy-content {
  max-width: min(980px, 92vw);
}

.policy-content h2 {
  margin-top: 2rem;
}

.policy-content h3 {
  margin: 1.25rem 0 0.35rem;
  font-size: 1rem;
  color: #2a3f68;
}

.policy-content p,
.policy-content li {
  font-size: 0.96rem;
  line-height: 1.72;
  color: #314364;
}

.policy-content ul,
.policy-content ol {
  margin: 0.5rem 0 0.8rem 1.3rem;
  padding: 0;
}

@media (max-width: 640px) {
  .brand img {
    height: 38px;
  }

  .hero-text,
  .project-hero,
  .legal {
    padding: 18px;
  }

  .policy-content p,
  .policy-content li {
    font-size: 0.93rem;
    line-height: 1.68;
  }

  #games {
    padding: 52px 18px 50px;
  }

  .lightbox-prev {
    left: 12px;
  }

  .lightbox-next {
    right: 12px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }
}

@media (min-width: 940px) {
  .hero-title {
    max-width: none;
  }

  .hero-text .lede {
    max-width: 860px;
  }

  #games .section-subtitle {
    max-width: 920px;
  }

  .project-top-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr);
    gap: 28px;
  }
}
