/* 
   Hiirilabyrintti – Puuhöylä Studios
   CSS tyylitiedosto, rakenne seuraa TOMIN (muunneltua) onepager mallia.
   */

@font-face {
  font-family: 'Pixelify Sans';
  src: url('../fonts/PixelifySans-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* Reset */

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

/* Tokens */

:root {
  --bg:        #1e2552;
  --bg-alt:    #2b3160;
  --border:    #465096;
  --text:      #b3ccff;
  --text-dim:  rgba(179, 204, 255, 0.55);
  --accent:    #465096;
  --accent-hover: #5e7d98;

  --font: 'Pixelify Sans', Arial, sans-serif;

  --max-w: 70rem;
  --section-pad: 5rem 2rem;
}

/* Base */

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
}

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

ul {
  list-style: none;
}

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

h1 { font-size: 2.75rem; font-weight: 700; line-height: 1.15; margin-bottom: 1.25rem; }
h2 { font-size: 2rem;    font-weight: 700; line-height: 1.2;  margin-bottom: 1rem; }
.about-title { font-size: 2.75rem; line-height: 1.15; margin-bottom: 1.25rem; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3;  margin-bottom: 0.5rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* Layout */

.container {
  max-width: var(--max-w);
  margin-inline: auto;
/*  padding-inline: 2rem; */ 
}

.section {
  padding: var(--section-pad);
}

.section--alt {
  background-color: var(--bg-alt);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--bg-alt);
  padding: 1rem 2rem;
}

.nav-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  margin-inline: auto;
}

.nav-links a {
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.15s;
}

.nav-links a:hover {
  background-color: var(--bg-alt);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.lang-switcher span {
  color: var(--border);
  user-select: none;
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  opacity: 0.45;
  transition: opacity 0.15s;
}

.lang-btn.active {
  opacity: 1;
  border-bottom: 2px solid var(--text);
}

.lang-btn:hover {
  opacity: 0.75;
}

/* Hero */

.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: var(--section-pad);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.game-logo {
  max-width: 400px;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.hero-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin: 0;
}

.tagline {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.7;
  margin: 0;
}

.manifesto {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-dim);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin-bottom: 3rem;
}

.btn {
  display: inline-block;
  background-color: var(--accent);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.7rem 2rem;
  border-radius: 6px;
  transition: background-color 0.15s;
}

.btn:hover {
  background-color: var(--accent-hover);
}

.hero-gif {
  flex-shrink: 0;
  width: 300px;
  image-rendering: pixelated;
}

/* About */

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
}

.labrat-img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  justify-self: end;
  image-rendering: pixelated;
}

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background-color: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-icon {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Trailer */

.trailer-embed {
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
}

.trailer-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background-color: #000;
}

/* Team */

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
}

.member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.member-photo {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid var(--border);
  border-radius: 8px;
  background-color: var(--bg-alt);
  overflow: hidden;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.member-name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.member-role {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 0;
}

/* Partners */

.partners-row {
  display: grid;
  grid-template-columns: repeat(2, 320px);
  gap: 2rem;
  width: fit-content;
  margin: 0 auto;
}

.partner-logo {
  width: 320px;
  height: 160px;
  padding: 1rem;
  border-radius: 8px;
  background-color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Footer */

.footer {
  border-top: 1px solid var(--bg-alt);
  padding: 2.5rem 2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-inner p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

/* Responsive */

@media (max-width: 991px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1, .about-title { font-size: 2rem; }

  .nav-inner {
    justify-content: space-between;
  }

  .nav-links { display: none; }

  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    align-items: center;
  }

  .game-logo { max-width: 280px; }
  .hero-gif  { width: 200px; }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
  }

  .labrat-img {
    max-height: 340px;
    justify-self: center;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 5rem 0;
  }

  .section-title {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }
    .partners-row {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .partner-logo {
    width: 100%;
  }

  .container  {
    padding-inline: 1rem;
  }
}

@media (max-width: 479px) {
  .team-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .partners-row {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .partner-logo {
    width: 100%;
  }
}
