/* === Tokens === */
:root {
  --color-bg: #F1CAAC;
  --color-card: #FBE8D8;
  --color-text: #2C1A0E;
  --color-accent: #8B4A28;
  --color-footer-bg: #1C1410;
  --color-footer-text: #9E8070;
  --color-soon: #C0352A;
  --color-icon-bg: #e0b898;
  --color-footer-studio: #c4a090;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-ui: system-ui, -apple-system, sans-serif;
  --radius-card: 16px;
  --radius-icon: 14px;
  --grid-gap: 2rem;
}

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

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

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

a {
  color: var(--color-accent);
}

/* === Header === */
.site-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 3rem;
  gap: 1rem;
}

.logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 18px;
}

.studio-name {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

/* === Games section === */
main {
  flex: 1;
}

.games-section {
  padding: 2rem 4rem 4rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 2rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.6;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  max-width: 1100px;
  margin: 0 auto;
}

/* === Game tile === */
.game-tile {
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 2px 12px rgba(44, 26, 14, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.game-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(44, 26, 14, 0.15);
}

/* === Icon wrapper === */
.game-icon-wrapper {
  position: relative;
  border-radius: 18.5%;
  overflow: hidden;
}

.game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background-color: var(--color-icon-bg);
}

/* === SOON badge === */
.soon-badge {
  position: absolute;
  top: 14px;
  right: -14px;
  background: var(--color-soon);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 5px 22px;
  transform: rotate(30deg);
  transform-origin: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 1;
}

/* === Game info === */
.game-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.meta-sep {
  color: var(--color-accent);
  opacity: 0.45;
  font-size: 0.85rem;
  line-height: 1;
}

.game-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.game-genre {
  font-size: 0.75rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* === Platform links === */
.platform-links {
  display: flex;
  gap: 0.4rem;
}

.platform-link {
  display: inline-flex;
  align-items: center;
  color: var(--color-text);
  opacity: 0.65;
  transition: opacity 0.15s, color 0.15s;
  text-decoration: none;
}

.platform-link:hover {
  opacity: 1;
  color: var(--color-accent);
}

.platform-link svg,
.platform-link img {
  width: 26px;
  height: 26px;
}

.platform-link--disabled {
  pointer-events: none;
  opacity: 0.25;
}

/* === Description === */
.game-description {
  font-size: 0.85rem;
  line-height: 1.55;
  opacity: 0.75;
  margin-top: 0.2rem;
}

/* === Legal pages === */
.home-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: inherit;
  text-decoration: none;
}

.home-link .studio-name {
  font-weight: 700;
}

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 2.5rem 3rem;
  background: var(--color-card);
  border-radius: var(--radius-card);
  box-shadow: 0 2px 12px rgba(44, 26, 14, 0.08);
  line-height: 1.65;
  font-size: 0.95rem;
}

main:has(.legal) {
  padding: 1rem 1rem 4rem;
}

.legal-title {
  font-family: var(--font-serif);
  font-size: 2rem;
}

.legal-updated {
  font-size: 0.8rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.legal h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 1.75rem 0 0.5rem;
}

.legal p + p,
.legal ul + p {
  margin-top: 0.75rem;
}

.legal ul {
  margin: 0.5rem 0 0 1.25rem;
}

.legal li + li {
  margin-top: 0.35rem;
}

/* === Footer === */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  text-align: center;
  padding: 2.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: auto;
}

.footer-studio {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-footer-studio);
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.footer-sep {
  opacity: 0.5;
}

.footer-link {
  position: relative;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--color-footer-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.15s;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--color-footer-studio);
}

/* === Copied bubble === */
.copy-bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 4px);
  background: var(--color-card);
  color: var(--color-text);
  font-size: 0.75rem;
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}

.copy-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--color-card);
}

.copy-bubble.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.footer-copy {
  font-size: 0.72rem;
  color: #5A4838;
}

/* === Responsive === */
@media (max-width: 900px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .games-section {
    padding: 2rem 2rem 4rem;
  }

  .site-header {
    padding: 1.25rem 2rem;
  }
}

@media (max-width: 540px) {
  .games-grid {
    grid-template-columns: 1fr;
  }

  .games-section {
    padding: 2rem 1rem 3rem;
  }

  .studio-name {
    font-size: 2rem;
  }

  .logo {
    width: 56px;
    height: 56px;
  }

  .legal {
    padding: 1.5rem 1.25rem 2rem;
  }
}
