/* MapleVale Arcade - Roberts MapleVale Retail LLC */
:root {
  --maple: #c8442b;
  --maple-dark: #9b2f1c;
  --amber: #f2a541;
  --cream: #fff8ee;
  --sand: #f6e7d2;
  --bark: #3b2a20;
  --muted: #7a6656;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(59, 42, 32, 0.12);
  --max: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Nunito", "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  color: var(--bark);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--maple); text-decoration: none; }
a:hover { color: var(--maple-dark); text-decoration: underline; }
img, svg { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 238, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #ecd9bf;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: var(--bark); }
.brand:hover { text-decoration: none; color: var(--bark); }
.brand-mark { width: 38px; height: 38px; }
.brand small { display: block; font-size: 0.68rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; margin-top: -4px; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: var(--bark); font-weight: 700; }
.nav-links a:hover, .nav-links a.active { color: var(--maple); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 3px; margin: 5px 0; background: var(--bark); border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 999px; font-weight: 800;
  border: 2px solid transparent; cursor: pointer; font-size: 1rem; transition: transform .15s, background .15s;
  font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--maple); color: var(--white); }
.btn-primary:hover { background: var(--maple-dark); color: var(--white); }
.btn-outline { border-color: var(--maple); color: var(--maple); background: transparent; }
.btn-outline:hover { background: var(--maple); color: var(--white); }

/* Hero */
.hero { padding: 80px 0 70px; background: radial-gradient(circle at 85% 20%, #ffe2b8 0, transparent 45%), linear-gradient(180deg, var(--cream), var(--sand)); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.eyebrow { display: inline-block; background: #ffe5cc; color: var(--maple-dark); font-weight: 800; font-size: .85rem; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.12; margin-bottom: 18px; }
.hero h1 em { color: var(--maple); font-style: normal; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); margin-bottom: 30px; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art { background: var(--white); border-radius: 28px; box-shadow: var(--shadow); padding: 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hero-art div { aspect-ratio: 1; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.4rem; color: var(--white); }

/* Sections */
section { padding: 76px 0; }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-title h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 10px; }
.section-title p { color: var(--muted); }

.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.game-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s; }
.game-card:hover { transform: translateY(-6px); }
.game-thumb { height: 180px; display: flex; align-items: center; justify-content: center; font-size: 4rem; }
.game-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.game-body h3 { font-size: 1.3rem; margin-bottom: 6px; }
.game-body p { color: var(--muted); flex: 1; margin-bottom: 18px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 800; color: var(--maple-dark); background: #fde8dc; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }

.features { background: var(--white); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature { padding: 26px; border-radius: var(--radius); background: var(--cream); }
.feature .icon { font-size: 2rem; margin-bottom: 12px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .95rem; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-grid h2 { font-size: 2.1rem; margin-bottom: 16px; }
.about-grid p { color: var(--muted); margin-bottom: 14px; }
.info-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.info-card h3 { margin-bottom: 14px; }
.info-card dl { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; }
.info-card dt { font-weight: 800; }
.info-card dd { color: var(--muted); }

.cta { background: linear-gradient(120deg, var(--maple), var(--amber)); color: var(--white); text-align: center; border-radius: 28px; padding: 56px 30px; }
.cta h2 { font-size: 2rem; margin-bottom: 10px; }
.cta p { opacity: .95; margin-bottom: 24px; }
.cta .btn { background: var(--white); color: var(--maple); }

/* Page header */
.page-hero { padding: 60px 0 40px; background: var(--sand); text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-hero p { color: var(--muted); }

/* Legal */
.legal { padding: 56px 0 80px; }
.legal-body { max-width: 860px; margin: 0 auto; background: var(--white); padding: 46px; border-radius: var(--radius); box-shadow: var(--shadow); }
.legal-body h2 { font-size: 1.35rem; margin: 32px 0 10px; color: var(--maple-dark); }
.legal-body h2:first-of-type { margin-top: 0; }
.legal-body h3 { font-size: 1.05rem; margin: 18px 0 8px; }
.legal-body p, .legal-body li { color: #4d3b30; margin-bottom: 10px; }
.legal-body ul { padding-left: 22px; margin-bottom: 12px; }
.company-box { background: var(--cream); border-left: 4px solid var(--maple); padding: 18px 22px; border-radius: 10px; margin: 14px 0 20px; }
.company-box p { margin-bottom: 4px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 34px; }
.contact-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.contact-card h2 { margin-bottom: 16px; font-size: 1.4rem; }
.contact-item { display: flex; gap: 14px; margin-bottom: 18px; }
.contact-item .ci-icon { font-size: 1.4rem; width: 32px; flex-shrink: 0; }
.contact-item strong { display: block; }
.contact-item span, .contact-item a { color: var(--muted); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 800; margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #e4cfb3; font: inherit; background: var(--cream);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--maple); }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 10px; }

/* Game page */
.game-page { padding: 40px 0 70px; }
.game-layout { display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: start; }
.game-stage { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; align-items: center; }
.game-hud { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; justify-content: center; }
.hud-box { background: var(--sand); border-radius: 12px; padding: 8px 18px; text-align: center; min-width: 100px; }
.hud-box small { display: block; font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.hud-box b { font-size: 1.4rem; }
.game-side .info-card { margin-bottom: 20px; }
.game-side ul { padding-left: 18px; color: var(--muted); }
.game-msg { margin-top: 14px; font-weight: 800; min-height: 1.6em; text-align: center; color: var(--maple-dark); }
.touch-pad { display: none; margin-top: 16px; grid-template-columns: repeat(3, 60px); gap: 8px; justify-content: center; }
.touch-pad button { height: 54px; border-radius: 12px; border: 0; background: var(--sand); font-size: 1.4rem; cursor: pointer; }
.touch-pad .empty { visibility: hidden; }

/* 2048 */
.board-2048 { position: relative; width: min(420px, 86vw); aspect-ratio: 1; background: #bfa48a; border-radius: 14px; padding: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; touch-action: none; user-select: none; }
.cell-2048 { border-radius: 8px; background: #d9c3aa; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: clamp(1.1rem, 5vw, 2rem); color: var(--bark); transition: background .1s; }

/* Memory */
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; width: min(440px, 88vw); }
.mem-card { aspect-ratio: 1; border-radius: 14px; border: 0; cursor: pointer; font-size: clamp(1.6rem, 7vw, 2.4rem); font-weight: 900; background: linear-gradient(135deg, var(--maple), var(--amber)); color: rgba(255,255,255,.8); transition: transform .2s, background .2s; font-family: inherit; }
.mem-card:hover { transform: scale(1.04); }
.mem-card.flipped, .mem-card.matched { background: var(--sand); color: var(--bark); }
.mem-card.matched { opacity: .55; cursor: default; }

/* Snake */
#snakeCanvas { width: min(440px, 88vw); aspect-ratio: 1; border-radius: 14px; background: #f4e6cf; touch-action: none; }

/* Footer */
.site-footer { background: var(--bark); color: #e9dccd; padding: 60px 0 26px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.site-footer h4 { color: var(--white); margin-bottom: 14px; font-size: 1.05rem; }
.site-footer p, .site-footer li { font-size: .95rem; margin-bottom: 6px; color: #d8c8b6; }
.site-footer ul { list-style: none; }
.site-footer a { color: #ffd4a8; }
.site-footer a:hover { color: var(--white); }
.footer-legal-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.footer-legal-links a { display: inline-block; padding: 8px 18px; border: 1.5px solid #ffd4a8; border-radius: 999px; font-weight: 800; font-size: .9rem; }
.footer-legal-links a:hover { background: #ffd4a8; color: var(--bark); text-decoration: none; }
.footer-bottom { border-top: 1px solid #5a4536; padding-top: 22px; text-align: center; font-size: .9rem; color: #c9b7a3; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .about-grid, .contact-grid, .game-layout { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--cream); border-bottom: 1px solid #ecd9bf; }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 14px 22px; }
  .games-grid, .feature-grid, .footer-grid { grid-template-columns: 1fr; }
  .legal-body { padding: 28px 20px; }
  .touch-pad { display: grid; }
  section { padding: 56px 0; }
}
