/* =========================================================
   A Quick One - Fresh Static Frontend
   ---------------------------------------------------------
   Design goals:
   - Landing page may scroll.
   - Play page must NOT scroll.
   - Game frame is designed around a 1366x768 GameMaker canvas.
   - Avoid CSS transforms on the iframe/canvas.
   - Keep browser selection/drag behavior away from gameplay.
   ========================================================= */

:root {
  --bg: #10170f;
  --bg-2: #172316;
  --panel: #20351d;
  --panel-2: #294523;
  --text: #f4efd8;
  --muted: #c6c09e;
  --accent: #e4c95b;
  --accent-dark: #8b6f24;
  --border: rgba(244, 239, 216, 0.18);

  --game-width: 1366px;
  --game-height: 768px;

  --play-header-height: 52px;
  --play-footer-height: 44px;
  --play-gap: 8px;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(228, 201, 91, 0.12), transparent 28rem),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

/* =========================================================
   Shared header/footer
   ========================================================= */

.site-header,
.play-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(16, 23, 15, 0.92);
}

.site-header {
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.play-header {
  height: var(--play-header-height);
  flex: 0 0 var(--play-header-height);
}

.brand {
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.92rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-footer,
.play-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: rgba(16, 23, 15, 0.92);
}

/* =========================================================
   Landing page
   ========================================================= */

.landing-page {
  overflow-x: hidden;
}

.landing-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

.hero {
  min-height: 460px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(rgba(16, 23, 15, 0.28), rgba(16, 23, 15, 0.7)),
    repeating-linear-gradient(
      135deg,
      rgba(228, 201, 91, 0.12) 0,
      rgba(228, 201, 91, 0.12) 2px,
      transparent 2px,
      transparent 14px
    ),
    linear-gradient(135deg, #264b23, #132611);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.hero-card {
  text-align: center;
  padding: 32px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.hero-copy {
  margin: 22px 0 28px;
  color: var(--muted);
  font-size: 1.35rem;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--accent-dark);
  border-radius: 999px;
  color: #151205;
  background: var(--accent);
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 6px 0 var(--accent-dark);
}

.button-primary:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 var(--accent-dark);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(32, 53, 29, 0.88);
}

.panel h2 {
  margin: 0 0 14px;
}

.panel p,
.panel li {
  color: var(--muted);
  line-height: 1.5;
}

.panel ul {
  padding-left: 20px;
}

.stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* =========================================================
   Play page
   ========================================================= */

.play-page {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  flex-direction: column;
}

.play-main {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: var(--play-gap);
}

.game-shell {
  width: min(
    var(--game-width),
    calc(100vw - 16px),
    calc((100vh - var(--play-header-height) - var(--play-footer-height) - (var(--play-gap) * 2)) * 1.7786458333)
  );

  height: min(
    var(--game-height),
    calc(100vh - var(--play-header-height) - var(--play-footer-height) - (var(--play-gap) * 2)),
    calc((100vw - 16px) / 1.7786458333)
  );

  border: 2px solid rgba(244, 239, 216, 0.24);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.45);
}

.game-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  touch-action: none;
}

.play-footer {
  height: var(--play-footer-height);
  flex: 0 0 var(--play-footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 18px;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* =========================================================
   Smaller screens
   ========================================================= */

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .site-header,
  .play-header {
    padding: 0 14px;
  }

  .site-nav {
    gap: 10px;
    font-size: 0.85rem;
  }

  .play-footer {
    font-size: 0.75rem;
    gap: 10px;
  }
}

@media (max-width: 720px) {
  .play-page::before {
    content: "A Quick One is currently designed for desktop play.";
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    padding: 28px;
    text-align: center;
    color: var(--text);
    background: var(--bg);
    font-size: 1.25rem;
    font-weight: 800;
  }
}
