/* ---------------------------------------------------------------------------
   Ludogram — base styles. Single hand-written stylesheet, no preprocessor.
   Orange/white brand: orange page, white text, translucent panels.
--------------------------------------------------------------------------- */

:root {
  /* Ludogram brand palette (from the original site) */
  --bg: #ff7945;            /* brand orange — page background */
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, .85);
  --panel: rgba(255, 255, 255, .1);     /* translucent "glass" card on orange */
  --panel-hover: rgba(255, 255, 255, .16);
  --panel-border: rgba(255, 255, 255, .22);
  --line: rgba(255, 255, 255, .28);
  --orange: #ff7945;        /* button text / icons on white */
  --orange-deep: #e85f2b;
  --max-width: 1520px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; font-weight: 700; }

a { color: #fff; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 2.5rem;
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: #20242b;
  color: #fff;
  padding: .5rem .75rem;
  border-radius: 6px;
}

/* ----- Header / nav (white logo + nav on the orange page) ----- */
.site-header { background: var(--bg); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 30px; width: auto; display: block; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  padding: .4rem .9rem;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 999px;
}
.back-link:hover { background: rgba(255, 255, 255, .14); color: #fff; text-decoration: none; }
.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  color: rgba(255, 255, 255, .92);
  font-weight: 600;
  font-size: .95rem;
}
.site-nav a:hover { color: #fff; text-decoration: none; }
.site-nav a.is-active { color: #fff; }
.site-nav a.is-active::after {
  content: "";
  display: block;
  height: 2px;
  background: #fff;
  margin-top: 3px;
}

/* ----- Buttons (white pill, orange text — like "Play Now!") ----- */
.btn {
  display: inline-block;
  background: #fff;
  color: var(--orange);
  font-weight: 700;
  padding: .7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; color: var(--orange-deep); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, .6);
  color: #fff;
}
.btn-secondary:hover { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
/* On white (odd) bands flip the white pill to a filled-orange one so it stays visible */
.section:nth-of-type(odd) .btn { background: var(--orange); color: #fff; }
.section:nth-of-type(odd) .btn:hover { background: var(--orange-deep); color: #fff; }

/* ----- Generic section ----- */
.section { padding-block: 2.75rem; scroll-margin-top: 1.5rem; }
.section .container > p { max-width: 90ch; margin-inline: auto; text-align: center; }
.section-title { font-size: 2rem; margin: 0 0 1.5rem; color: var(--text); text-align: center; }
.section-title::after {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  background: #fff;
  border-radius: 2px;
  margin: .65rem auto 0;
}

/* Alternating bands: odd sections flip to orange-on-white (so the page starts on white) */
.section:nth-of-type(odd) { background: #fff; color: var(--orange); }
.section:nth-of-type(odd) .section-title,
.section:nth-of-type(odd) .team-title,
.section:nth-of-type(odd) .team-heading,
.section:nth-of-type(odd) .about-join,
.section:nth-of-type(odd) .page-intro,
.section:nth-of-type(odd) a { color: var(--orange); }
.section:nth-of-type(odd) .about-join a { color: var(--orange); }
.section:nth-of-type(odd) .section-title::after { background: var(--orange); }
.section:nth-of-type(odd) .team-list li,
.section:nth-of-type(odd) .contact-card {
  background: #fff;
  border-color: rgba(255, 121, 69, .3);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  color: var(--orange);
}
.section:nth-of-type(odd) .member-name,
.section:nth-of-type(odd) .member-role,
.section:nth-of-type(odd) .contact-card h3 { color: var(--orange); }

/* Visually hidden but available to screen readers (the page's h1). */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ----- Game grid + cards (portrait posters with overlay footer) ----- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* 3 big posters per row */
  gap: 1.75rem;
}
@media (max-width: 900px) { .game-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .game-grid { grid-template-columns: 1fr; } }
.game-card {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  color: #fff;
  border: 2px solid var(--orange);
  transition: transform .15s ease, box-shadow .15s ease;
}
.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .3);
  text-decoration: none;
  color: #fff;
}
.game-card-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-card-footer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.2rem 1.35rem 1.35rem;
  background: rgba(0, 0, 0, .6);      /* translucent black behind the text */
}
.game-card-footer::before {          /* soft fade above the panel, no hard edge */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 100%;
  height: 4.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.game-card-genre {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: .72rem;
  color: rgba(255, 255, 255, .85);
  font-weight: 700;
  margin: 0 0 .3rem;
}
.game-card-title { margin: 0 0 .35rem; font-size: 1.5rem; line-height: 1.15; color: #fff; }
.game-card-tagline {
  margin: 0;
  font-size: .92rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, .85);
  display: -webkit-box;
  -webkit-line-clamp: 2;     /* keep footers tidy */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----- Legal / generic content page ----- */
.page {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-block: 3rem;
}
.page-title { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0 0 1.5rem; color: var(--text); }
.page-intro { font-size: 1.15rem; color: var(--text-muted); max-width: 60ch; }
.page p { max-width: 65ch; }
.contact-card p { max-width: none; }
.page h2 { margin-top: 2.5rem; }
.page a { text-decoration: underline; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.5rem; }
.prose a { text-decoration: underline; }

/* ----- About / team ----- */
.team-title { margin: 2.5rem 0 0.5rem; color: var(--text); }
.team-heading { font-size: 1.05rem; margin: 1.75rem 0 .75rem; color: var(--text); }
.about-join { margin-top: 2.5rem; color: var(--text); }
.about-join a { color: #fff; text-decoration: underline; }

/* ----- Community ----- */
.community-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: center;
  justify-content: center;
  max-width: 820px;
  margin: 1.5rem auto 0;
}
.community-text > p:first-child { margin-top: 0; }
.community-widget iframe {
  display: block;
  width: 350px;
  max-width: 100%;
  height: 420px;
  border: 0;
  border-radius: 12px;
}
@media (max-width: 680px) {
  .community-grid { grid-template-columns: 1fr; }
  .community-widget iframe { width: 100%; }
}
.community-perks {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.75rem;
  text-align: left;
}
.community-perks li {
  position: relative;
  padding-left: 1.6rem;
  margin: .5rem 0;
}
.community-perks li::before {
  content: "◆";
  position: absolute;
  left: 0;
  font-size: .8em;
  top: .1em;
  color: inherit;
  opacity: .85;
}
.team-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem 1.5rem;
}
.team-list li {
  padding: .75rem 1rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
}
.team-list .member-name { display: block; font-weight: 600; color: var(--text); }
.team-list .member-role { display: block; color: var(--text-muted); font-size: .9rem; }

/* ----- Contact ----- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.contact-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.contact-card h3 { margin-top: 0; font-size: 1.1rem; color: var(--text); }
.contact-card p + p { margin-top: 0.75rem; }
.contact-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
.contact-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.c-ico {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: none;
  opacity: 0.85;
}

/* ----- Game detail ----- */
.game-hero {
  background-color: #20242b;
  background-size: cover;
  background-position: center;
}
.game-hero-inner { padding-block: 6rem 3rem; }
.game-genre {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, .9);
  font-weight: 700;
  font-size: .85rem;
  margin: 0 0 .5rem;
}
.game-title { font-size: clamp(2.5rem, 7vw, 4.5rem); margin: 0 0 .5rem; color: var(--text); }
.game-tagline { font-size: 1.3rem; color: var(--text); margin: 0; max-width: 50ch; }

.game-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding-block: 3rem;
  align-items: start;
}
.game-content {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
}
.game-content h2 { margin-top: 2.5rem; }

/* Steam embed: trailer above, official store widget below */
.game-steam { margin-bottom: 2rem; }
.game-trailer {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
}
.game-steam-widget {
  display: block;
  width: 100%;
  max-width: 646px;
  height: 190px;
  margin-top: 1rem;
  border: 0;
  border-radius: 8px;
}

.fact-sheet {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 1.5rem;
}
.fact-sheet h2 { margin-top: 0; font-size: 1.15rem; color: var(--text); }
.fact-sheet dl { margin: 0 0 1.5rem; }
.fact-sheet dt {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: 1rem;
}
.fact-sheet dd { margin: .15rem 0 0; font-weight: 500; color: var(--text); }
.game-links { display: flex; flex-direction: column; gap: .6rem; }

/* ----- Screenshot gallery ----- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.gallery-item { border-radius: 8px; overflow: hidden; border: 1px solid var(--panel-border); }
.gallery-item img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform .2s ease; }
.gallery-item:hover img { transform: scale(1.05); }

.game-back { padding-bottom: 3rem; }
.game-back a { color: #fff; text-decoration: underline; }

/* ----- Footer (slightly deeper orange band) ----- */
.site-footer {
  margin-top: 4rem;
  background: #000;
  color: #fff;
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
}
.footer-logo { height: 22px; width: auto; }
.social-list, .legal-list { list-style: none; padding: 0; margin: 0; }
.social-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.social-list li { margin: 0; }
.social-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  transition: background .15s ease, transform .15s ease;
}
.social-badge:hover {
  background: var(--orange-deep);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}
.social-badge svg { width: 21px; height: 21px; fill: currentColor; display: block; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: .9rem;
}
.footer-bottom p { margin: 0; }
.legal-list { display: flex; gap: 1.5rem; }

/* ----- Responsive ----- */
@media (max-width: 760px) {
  .game-body { grid-template-columns: 1fr; }
  .fact-sheet { position: static; }
  .header-inner { flex-direction: column; gap: .75rem; align-items: flex-start; }
}
