/* ============================================================
   Playdeck — light, professional game-portal theme
   ============================================================ */

:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --ink: #122E2B;
  --muted: #4B5A57;
  --teal: #0F5257;
  --teal-dark: #0B3E42;
  --coral: #FF6B4A;
  --border: #E4E7E3;

  --font-display: 'Baloo 2', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--teal); }
a:hover, a:focus-visible { color: var(--teal-dark); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

p { margin: 0 0 1rem; color: var(--muted); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.6em 1em; z-index: 100;
}
.skip-link:focus { left: 0.5em; top: 0.5em; }

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

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------------- header / nav ---------------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.brand .mark {
  display: inline-block;
  width: 30px; height: 30px;
  background: var(--teal);
  border-radius: 8px;
  position: relative;
}
.brand .mark::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent #fff;
  transform: translate(-40%, -50%);
}

.main-nav { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a:focus-visible, .main-nav a[aria-current="page"] {
  color: var(--teal);
  border-bottom-color: var(--coral);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 0.9rem; padding-top: 0.8rem; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
}

/* ---------------- hero / featured strip ---------------- */

.hero {
  padding: 2.2rem 0 0.5rem;
}
.hero .eyebrow {
  font-family: var(--font-display);
  color: var(--coral);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 20ch; }
.hero p { max-width: 56ch; }

.featured-strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0 1.5rem;
  scroll-snap-type: x proximity;
}
.featured-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 140ms ease, transform 140ms ease;
}
.featured-card:hover, .featured-card:focus-visible {
  box-shadow: 0 8px 20px rgba(15,82,87,0.14);
  transform: translateY(-2px);
}
.thumb {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #fff;
}
.featured-card .body { padding: 0.7rem 0.8rem 0.9rem; }
.featured-card h3 { font-size: 1.02rem; margin-bottom: 0.15rem; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
  background: rgba(15,82,87,0.09);
  padding: 0.15em 0.6em;
  border-radius: 999px;
  margin-top: 0.3rem;
}

/* ---------------- content layout with ad rail ---------------- */

.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 1rem 0 3rem;
  align-items: start;
}
@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.1rem;
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 140ms ease, transform 140ms ease;
}
.game-card:hover, .game-card:focus-visible {
  box-shadow: 0 8px 20px rgba(15,82,87,0.14);
  transform: translateY(-2px);
}
.game-card .body { padding: 0.7rem 0.85rem 0.9rem; }
.game-card h3 { font-size: 1rem; margin-bottom: 0.1rem; }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 1.6rem 0 1rem;
}
.section-heading h2 { font-size: 1.4rem; }

/* ---------------- ad rail / slots ---------------- */

.ad-rail { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 1.2rem; }
.ad-slot {
  border: 1px dashed var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 0.9rem;
  border-radius: 8px;
}
.ad-slot.banner { max-width: 728px; margin: 1.6rem auto; }
.ad-slot.rail { min-height: 250px; display: flex; align-items: center; justify-content: center; }

/* ---------------- game embed page ---------------- */

.game-page-head {
  padding: 2rem 0 0.5rem;
}
.embed-frame {
  background: #0B1F1D;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-width: 900px;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.embed-frame iframe { width: 100%; height: 100%; border: 0; }
.game-meta {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.btn {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  padding: 0.6em 1.2em;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn:hover, .btn:focus-visible { background: var(--teal-dark); color: #fff; }
.btn.outline { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }

/* ---------------- static content pages ---------------- */

.page-content {
  max-width: 760px;
  padding: 2.2rem 0 3rem;
}
.page-content h2 { font-size: 1.25rem; margin-top: 2rem; }
.page-content ul { color: var(--muted); }

.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 480px;
  margin-top: 1rem;
}
.contact-form label { font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 0.3rem; }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 0.65em 0.8em;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.contact-form textarea { min-height: 120px; resize: vertical; }

/* ---------------- footer ---------------- */

.site-footer {
  background: var(--teal-dark);
  color: #E7F2F0;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.6rem;
  padding: 2.4rem 0;
}
.footer-grid h4 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.7rem;
}
.footer-grid a {
  display: block;
  color: #BFE0DB;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.footer-grid a:hover, .footer-grid a:focus-visible { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 1rem 1.5rem;
  font-size: 0.82rem;
  color: #9FC7C1;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
