/* TechRiver Games — shared stylesheet for every page.
   Palette from Marketing dept/Brand_Review_2026-11-16.md; fonts: Rye (wordmark), Cinzel (text), Inter (long paragraphs). */
:root {
  --char: #15110E;        /* page background */
  --deep-teak: #2B1D14;   /* header, footer, menus */
  --teak-dark: #4A2E17;   /* plank edges, dark text on wood */
  --teak: #8A5A2B;        /* borders and dividers */
  --teak-light: #D9A262;  /* plank wood, warm accents */
  --sapwood: #F3C98C;     /* highlights */
  --ivory: #F8F4EC;       /* text */
  --ivory-muted: #CDBFAE; /* secondary text */
  --river: #1A938A;
  --shallows: #2EC4B6;    /* links and focus */

  --tile-green: #5CB84F;
  --tile-blue: #4AA3DF;
  --tile-yellow: #E9B44C;
  --tile-red: #F97066;

  --font-brand: 'Rye', Georgia, serif;
  --font-text: 'Cinzel', Georgia, serif;
  --font-long: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --page-width: 1120px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  font-family: var(--font-text);
  background: var(--char);
  color: var(--ivory);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--shallows);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--sapwood);
  color: var(--char);
  padding: 8px 14px;
  border-radius: 4px;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Header (same on every page, stays at the top) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--deep-teak);
  border-bottom: 2px solid var(--teak);
  box-shadow: 0 3px 0 var(--river);
}

.header-inner {
  max-width: var(--page-width);
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-brand);
  font-size: 1.45rem;
  color: var(--ivory);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
}

.site-nav > ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a,
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--sapwood);
  background: none;
  border: 0;
  cursor: pointer;
}

.site-nav a:hover,
.dropdown-toggle:hover,
.site-nav a[aria-current="page"] {
  color: var(--ivory);
  background: rgba(217, 162, 98, 0.12);
  text-decoration: none;
}

.chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.has-dropdown {
  position: relative;
}

.has-dropdown.open .chevron {
  transform: rotate(180deg);
}

.dropdown {
  list-style: none;
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 210px;
  padding: 6px;
  background: var(--deep-teak);
  border: 1px solid var(--teak);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.has-dropdown.open .dropdown {
  display: block;
}

.dropdown a {
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--teak);
  border-radius: 4px;
  color: var(--sapwood);
  width: 42px;
  height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

main {
  flex: 1;
}

/* ---------- Home ---------- */
.splash {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 72px 24px 48px;
  text-align: center;
}

.splash-title {
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.15;
  margin-bottom: 14px;
}

.splash-subtitle {
  font-size: 1.3rem;
  font-weight: 600;
  min-height: 2.4em;
}

.splash-subtitle .q {
  color: var(--sapwood);
  font-size: 1.45em;
  font-weight: 700;
}

/* Wide teak dividers above and below the game row */
.divider {
  border: 0;
  height: 3px;
  max-width: var(--page-width);
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--teak) 12%, var(--teak) 88%, transparent);
}

.games {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.game-tiles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

/* Teak plank: the outer element casts the plank's edge, the inner one is the cut board */
.game-tile {
  --tile: var(--tile-green);
  filter: drop-shadow(0 5px 0 var(--teak-dark));
  transition: transform 0.2s ease;
}

.game-tile:hover {
  transform: translateY(-4px);
}

.plank {
  height: 100%;
  min-height: 210px;
  padding: 28px 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* tag at the same height on every plank */
  gap: 12px;
  text-align: center;
  color: var(--deep-teak);
  border-top: 7px solid var(--tile);
  background:
    repeating-linear-gradient(180deg,
      transparent 0 11px, rgba(74, 46, 23, 0.10) 11px 12px,
      transparent 12px 27px, rgba(74, 46, 23, 0.07) 27px 28px),
    linear-gradient(180deg, #E0AD6E 0%, var(--teak-light) 55%, #C8904F 100%);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px),
                     calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}

.tile-green { --tile: var(--tile-green); }
.tile-blue { --tile: var(--tile-blue); }
.tile-yellow { --tile: var(--tile-yellow); }
.tile-red { --tile: var(--tile-red); }

.tile-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--char);
  background: var(--tile);
  padding: 3px 10px;
  border-radius: 3px;
}

.tile-title {
  flex: 1;              /* title fills the middle, so every date sits on the same bottom line */
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.tile-date {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teak-dark);
}

.contact {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 24px 72px;
  text-align: center;
}

.river-divider {
  width: 120px;
  height: 30px;
  margin: 0 auto 18px;
}

.contact h2 {
  font-size: 1.5rem;
  color: var(--teak-light);
  margin-bottom: 6px;
}

/* ---------- Simple pages (legal, 404, future pages) ---------- */
.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.page-header {
  border-bottom: 2px solid var(--teak);
  padding-bottom: 22px;
  margin-bottom: 34px;
}

.page-header h1 {
  font-size: 2.3rem;
  line-height: 1.2;
  color: var(--sapwood);
  margin-bottom: 8px;
}

.page-meta {
  color: var(--ivory-muted);
  font-size: 0.9rem;
}

.page section {
  margin-bottom: 32px;
}

.page h2 {
  font-size: 1.25rem;
  color: var(--teak-light);
  margin-bottom: 12px;
}

.page p,
.page li {
  font-family: var(--font-long);
  line-height: 1.7;
}

.page p {
  margin-bottom: 12px;
}

.page ul {
  padding-left: 24px;
  margin-bottom: 12px;
}

.page li {
  margin-bottom: 6px;
}

.contact-box {
  background: var(--deep-teak);
  border: 1px solid var(--teak);
  border-radius: 6px;
  padding: 18px 20px;
}

.contact-box p {
  margin-bottom: 4px;
}

.button {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: 4px;
  background: var(--teak-light);
  color: var(--char);
  font-weight: 700;
}

.button:hover {
  background: var(--sapwood);
  text-decoration: none;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep-teak);
  border-top: 2px solid var(--teak);
  box-shadow: 0 -3px 0 var(--river);
}

.footer-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--ivory-muted);
  font-size: 0.9rem;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--ivory-muted);
}

.footer-links a:hover {
  color: var(--ivory);
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1000px) {
  .game-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--deep-teak);
    border-bottom: 2px solid var(--teak);
    padding: 8px 16px 14px;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .dropdown {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 14px;
    background: none;
  }

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

@media (max-width: 560px) {
  .game-tiles {
    grid-template-columns: 1fr;
  }

  .plank {
    min-height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .game-tile,
  .chevron {
    transition: none;
  }
}
