/* ==========================================================================
   Robusta Games — static site styles
   ========================================================================== */

:root {
  --color-brand: #28170b;
  --color-brand-hover: #28170b;
  --color-body-text: #1c1007;
  --color-cream: #f9f9f9;
  --color-page-bg: var(--color-cream);

  --font-body: "Lato", sans-serif;
  --font-heading: "Monoton", sans-serif;
  --font-heading-alt: "Red Hat Display", sans-serif;

  --font-size-base: 16px;
  --font-size-h1: 64px;
  --font-size-h2: 24px;

  --transition-duration: 300ms;

  --column-gap: 32px;
  --section-width: 1120px;
  --section-padding-y: 100px;
  --section-padding-x: 20px;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--color-page-bg);
  color: var(--color-body-text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
}

img {
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

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

a:hover {
  color: var(--color-brand-hover);
}

h1,
h2 {
  margin: 0;
  color: var(--color-brand);
  font-family: var(--font-heading);
  font-weight: 500;
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  font-family: var(--font-heading-alt);
  font-size: var(--font-size-h2);
  font-weight: 900;
  text-transform: none;
}

@media (max-width: 1119px) {
  h1 { font-size: 54px; }
}
@media (max-width: 1023px) {
  h1 { font-size: 42px; }
}
@media (max-width: 767px) {
  h1 { font-size: 40px; }
}
@media (max-width: 479px) {
  h1 { font-size: 36px; }
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.section {
  position: relative;
  width: 100%;
  background-position: center center;
  background-size: cover;
}

.section-container {
  max-width: var(--section-width);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  margin: 0 auto;
  padding: var(--section-padding-y) var(--section-padding-x);
}

.heading,
.text,
.image,
.rich-text {
  max-width: 100%;
  margin: 0;
}

.text,
.rich-text {
  color: inherit;
}

.columns {
  max-width: 100%;
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: var(--column-gap);
}

.column {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  position: relative;
  width: calc(var(--column-width) - var(--column-gap) * ((var(--column-count) - 1) / var(--column-count)));
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-items-per-row, 3), minmax(0, 1fr));
  gap: var(--grid-gap, var(--column-gap));
  max-width: 100%;
  width: 100%;
  text-align: left;
}

.grid > * {
  width: auto !important;
  height: auto !important;
}

.rich-text > *:first-child { margin-top: 0; }
.rich-text > *:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Image element
   -------------------------------------------------------------------------- */

.site-image {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  margin: 0;
  border: none;
}

.site-image-clip {
  overflow: hidden;
}

.site-image-object {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-image-link {
  display: block;
}

.image-hover-zoom:hover {
  transform: scale(1.2);
  transition-duration: 1.5s;
}

.zoom-in-on-load {
  animation: zoom-out 0.75s linear;
}

@keyframes zoom-out {
  0% { transform: scale(2, 2); }
  50% { transform: scale(1.5, 1.5); }
  100% { transform: scale(1, 1); }
}

/* --------------------------------------------------------------------------
   Text link
   -------------------------------------------------------------------------- */

.text-link {
  display: flex;
  margin: 0;
  color: currentColor;
}

/* --------------------------------------------------------------------------
   Video embed (lite-youtube)
   -------------------------------------------------------------------------- */

.video {
  width: 100%;
  max-width: 100%;
  position: relative;
  line-height: 0;
  background: #000;
  overflow: hidden;
}

.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.video-container lite-youtube {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}

/* lite-youtube-embed (github.com/paulirish/lite-youtube-embed) */
lite-youtube {
  background-color: #000;
  position: relative;
  display: block;
  contain: content;
  background-position: center center;
  background-size: cover;
  cursor: pointer;
}

lite-youtube::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
  height: 100px;
  width: 100%;
  transition: all 0.2s cubic-bezier(0, 0, 0.2, 1);
}

lite-youtube .lyt-top-wrapper {
  padding-top: 12px;
  padding-left: 10px;
  position: relative;
  text-align: left;
}

lite-youtube .lyt-title-text {
  font-family: "Red Hat Display", Roboto, Arial, Helvetica, sans-serif;
  color: hsla(0, 0%, 100%, 0.9);
  line-height: 1.3;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  font-size: 18px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 14px 10px 10px 5px;
}

lite-youtube:hover .lyt-title-text {
  color: #fff;
}

lite-youtube.lyt-activated > .lyt-title-text {
  opacity: 0;
  pointer-events: none;
}

lite-youtube::after {
  content: "";
  display: block;
  padding-bottom: calc(100% / (16 / 9));
}

lite-youtube > iframe {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
}

lite-youtube > .lty-playbtn {
  display: block;
  width: 68px;
  height: 48px;
  position: absolute;
  cursor: pointer;
  transform: translate3d(-50%, -50%, 0);
  top: 50%;
  left: 50%;
  z-index: 1;
  background-color: transparent;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
  transition: filter 0.1s cubic-bezier(0, 0, 0.2, 1);
  border: none;
}

lite-youtube.lyt-activated {
  cursor: unset;
}

lite-youtube.lyt-activated::before,
lite-youtube.lyt-activated > .lty-playbtn {
  opacity: 0;
  pointer-events: none;
}

.lyt-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

/* --------------------------------------------------------------------------
   Scroll-in entrance animation (vanilla JS, see main.js)
   -------------------------------------------------------------------------- */

[data-entrance] {
  opacity: 0;
  transform: translateY(100px);
  backface-visibility: hidden;
  transition: opacity 1000ms ease, transform 1000ms ease;
}

[data-entrance].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-entrance] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Page sections
   ========================================================================== */

/* Hero — logo */
.section-hero {
  background-color: var(--color-brand);
  background: linear-gradient(0deg, rgba(249, 249, 249, 1) 49.74%, rgba(40, 23, 11, 1) 50.26%);
}
.section-hero .section-container {
  align-items: center;
  text-align: center;
  padding-top: 125px;
  padding-bottom: 125px;
}

/* Intro — "A Game Maker Collective" */
.section-intro {
  background-color: var(--color-cream);
}
.section-intro .section-container {
  gap: 30px;
  justify-content: center;
  padding-top: 50px;
  padding-bottom: 150px;
}
@media (max-width: 1119px) { .section-intro .section-container { --section-width: 80vw; } }
@media (max-width: 1023px) {
  .section-intro .section-container { --section-width: 85vw; padding-top: 35px; }
}
@media (max-width: 767px) { .section-intro .section-container { padding-top: 0; } }
@media (max-width: 479px) {
  .section-intro .section-container { --section-width: 92vw; padding-top: 0; }
}

/* Games intro */
.section-games-intro {
  background-color: var(--color-brand);
}
.section-games-intro .section-container {
  gap: 30px;
  justify-content: center;
  padding-top: 150px;
  padding-bottom: 35px;
}
.section-games-intro h1,
.section-games-intro .text {
  color: var(--color-cream);
}
@media (max-width: 1119px) { .section-games-intro .section-container { --section-width: 80vw; } }
@media (max-width: 1023px) { .section-games-intro .section-container { --section-width: 85vw; } }
@media (max-width: 479px) { .section-games-intro .section-container { --section-width: 90vw; } }

/* Games showcase — two columns */
.section-games {
  background-color: var(--color-brand);
}
.section-games .section-container {
  gap: 30px;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 150px;
}
@media (max-width: 1119px) { .section-games .section-container { --section-width: 80vw; } }
@media (max-width: 1023px) { .section-games .section-container { --section-width: 85vw; } }
@media (max-width: 479px) { .section-games .section-container { --section-width: 90vw; } }

.game-columns { --column-count: 2; }
@media (max-width: 1119px) { .game-columns { width: 100%; --column-gap: 15px; } }
@media (max-width: 767px) {
  .game-columns.columns { flex-direction: column; flex-wrap: nowrap; }
  .game-columns.columns > .column { width: 100%; }
}

.game-column { --column-width: 50%; gap: 15px; }
@media (max-width: 767px) {
  .game-column--redbird { padding-top: 50px; }
}

.game-column h2,
.game-column .text,
.game-column .text-link,
.game-column .text-link > * {
  color: var(--color-cream);
}

.game-column .site-image .site-image-container,
.game-column .video {
  box-shadow: 10px 10px 20px 0 var(--color-body-text);
}

.game-column .video .video-container {
  padding-top: 56.25%;
}

.text-link {
  margin-top: 15px;
}
.text-link:hover,
.text-link:hover > * {
  color: var(--color-cream);
}

/* Team */
.section-team {
  background-color: var(--color-cream);
}
.section-team .section-container {
  gap: 30px;
  justify-content: center;
  padding-top: 150px;
  padding-bottom: 150px;
}
@media (max-width: 1119px) { .section-team .section-container { --section-width: 80vw; } }
@media (max-width: 1023px) { .section-team .section-container { --section-width: 85vw; } }
@media (max-width: 479px) { .section-team .section-container { --section-width: 90vw; } }

.team-grid {
  --grid-items-per-row: 3;
  --grid-gap: 30px;
}
@media (max-width: 1023px) { .team-grid { --grid-items-per-row: 2; } }
@media (max-width: 767px) { .team-grid { --grid-items-per-row: 1; --grid-gap: 50px; } }

/* Contact */
.section-contact {
  background-color: var(--color-brand);
}
.section-contact .section-container {
  gap: 30px;
  justify-content: center;
  padding-top: 150px;
  padding-bottom: 150px;
}
.section-contact h1,
.section-contact .text,
.section-contact .text a {
  color: var(--color-cream);
}
.section-contact .text {
  max-width: 920px;
}
@media (max-width: 1119px) { .section-contact .section-container { --section-width: 80vw; } }
@media (max-width: 1023px) { .section-contact .section-container { --section-width: 85vw; } }
@media (max-width: 479px) { .section-contact .section-container { --section-width: 90vw; } }

/* Footer logo mark */
.section-footer-mark {
  background-color: var(--color-brand);
}
.section-footer-mark .section-container {
  gap: 30px;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 150px;
}
@media (max-width: 1119px) { .section-footer-mark .section-container { --section-width: 80vw; } }
@media (max-width: 1023px) { .section-footer-mark .section-container { --section-width: 85vw; } }
@media (max-width: 479px) { .section-footer-mark .section-container { --section-width: 90vw; } }

.footer-mark-image {
  width: 100px;
  transition: var(--transition-duration);
}
.footer-mark-image .site-image-object {
  width: 100%;
  height: 100px;
}

/* Footer */
.section-footer {
  background-color: var(--color-brand);
}
.section-footer .section-container {
  gap: 15px;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 10px;
}
.footer-copyright {
  color: var(--color-cream);
  font-size: 14px;
  font-weight: 300;
}
.footer-credit {
  color: var(--color-cream);
  font-size: 0.7rem;
  font-weight: 300;
}
.footer-credit a {
  color: var(--color-cream);
}
