/* G14 Studio — shared visual system
   Editorial, manifesto-led, dark hero, calm catalogue.
   Fonts: index.html loads Space Grotesk + Inter via one Google Fonts <link>. */

:root {
  --ink: #10192E;
  --paper: #F4F6FA;
  --cobalt: #3157D5;
  --mist: #DCE2EF;
  --slate: #5F6C86;
  --white: #FFFFFF;
  /* blue-biased derived tints */
  --ink-soft: #1B2742;
  --cobalt-tint: #8FA6EC;
  --shadow: 0 12px 32px rgba(16, 25, 46, 0.12);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  overflow-wrap: anywhere;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
  overflow-wrap: anywhere;
}

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

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 2px;
}

.site-header :focus-visible,
.hero :focus-visible,
.player-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--cobalt-tint);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  color: var(--white);
  border-bottom: 1px solid var(--ink-soft);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  min-height: var(--header-h);
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-left: auto;
}

.site-nav a {
  color: var(--mist);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 2px;
}

.site-nav a:hover {
  color: var(--white);
  text-decoration: none;
}

.mail-link {
  color: var(--cobalt-tint);
  font-weight: 600;
  font-size: 0.9rem;
}

.mail-link:hover {
  color: var(--white);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  padding-block: clamp(64px, 12vw, 140px) clamp(40px, 7vw, 80px);
}

.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -12%;
  width: clamp(320px, 45vw, 640px);
  aspect-ratio: 1;
  border: 2px solid var(--cobalt);
  border-radius: 50%;
  opacity: 0.18;
  pointer-events: none;
}

.hero .container {
  position: relative;
}

.hero-title {
  font-size: clamp(2.4rem, 7.5vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0 0 0.4em;
}

.hero-lead {
  color: var(--mist);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 42em;
  text-wrap: balance;
}

.hero-cta {
  display: inline-block;
  background: var(--cobalt);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border: 0;
  border-radius: 8px;
  margin-top: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero-cta:hover {
  background: #2747B5;
  text-decoration: none;
  transform: translateY(-2px);
}

.hero-strip {
  display: flex;
  gap: 12px;
  margin-top: clamp(40px, 7vw, 72px);
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 4px;
}

.hero-strip img {
  height: 72px;
  width: auto;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--ink-soft);
}

@media (min-width: 720px) {
  .hero-strip {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(56px, 9vw, 104px);
}

.section-label {
  display: block;
  color: var(--cobalt);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: 0.9em;
}

/* ---------- Studio ---------- */

.studio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 820px) {
  .studio-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
  }
}

.fact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--mist);
}

.fact {
  padding: 16px 0;
  border-bottom: 1px solid var(--mist);
}

.fact dt,
.fact-term {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--slate);
  margin-bottom: 4px;
}

.fact dd,
.fact-desc {
  margin: 0;
  color: var(--ink);
}

/* ---------- Game catalogue ---------- */

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

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover,
.game-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

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

.game-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  padding: 16px 18px 18px;
}

.game-index {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 0.08em;
}

.game-genre {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--slate);
}

.game-title {
  font-size: 1.15rem;
  margin: 0;
}

.game-desc {
  color: var(--slate);
  font-size: 0.92rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-play {
  margin-top: auto;
  padding-top: 10px;
  color: var(--cobalt);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Player ---------- */

.player-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  min-height: var(--header-h);
  padding: 10px 20px;
  background: var(--ink);
  color: var(--white);
}

.player-header a {
  color: var(--cobalt-tint);
  font-weight: 600;
  font-size: 0.9rem;
}

.player-header h1,
.player-title {
  font-size: 1.05rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.player-frame {
  display: block;
  width: 100%;
  height: calc(100vh - var(--header-h));
  border: 0;
  background: var(--white);
}

.player-empty {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 40px 20px;
}

.player-empty p {
  color: var(--slate);
  max-width: 36em;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--mist);
  font-size: 0.85rem;
  padding-block: 28px;
  margin-top: clamp(40px, 7vw, 80px);
}

.site-footer a {
  color: var(--cobalt-tint);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  .game-card:hover,
  .game-card:focus-within,
  .hero-cta:hover {
    transform: none;
  }
}
