/* ===== Color Block Jam — theme tokens ===== */
:root{
  --bg-deep: #14161f;
  --bg-panel: #1c1f2c;
  --bg-panel-2: #232738;
  --board: #2a2e40;
  --ink: #eef0f7;
  --ink-soft: #a8adc2;
  --red: #ff5a52;
  --blue: #3e8ef7;
  --yellow: #ffcc33;
  --green: #4fd67a;
  --purple: #b06bf2;
  --cyan: #38d7d0;
  --radius: 14px;
  --shadow-hard: 0 6px 0 rgba(0,0,0,0.35);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background: var(--bg-deep);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

a{ color: var(--cyan); text-decoration: none; }
a:hover{ text-decoration: underline; }

h1,h2{
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

/* ===== color helper classes used on swatches/blocks ===== */
.c-red{ background: var(--red); }
.c-blue{ background: var(--blue); }
.c-yellow{ background: var(--yellow); }
.c-green{ background: var(--green); }
.c-purple{ background: var(--purple); }
.c-cyan{ background: var(--cyan); }

/* ===== HEADER ===== */
.site-header{
  background: var(--bg-panel);
  border-bottom: 3px solid #000;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
}
.brand:hover{ text-decoration: none; }
.brand-blocks{
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  width: 22px;
  height: 22px;
}
.brand-blocks .b{ border-radius: 3px; }
.brand-blocks .b1{ background: var(--red); }
.brand-blocks .b2{ background: var(--yellow); }
.brand-blocks .b3{ background: var(--blue); }
.brand-blocks .b4{ background: var(--green); }

.main-nav{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.main-nav a{
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 8px;
}
.main-nav a:hover{
  background: var(--bg-panel-2);
  color: var(--ink);
  text-decoration: none;
}

/* ===== HERO ===== */
.hero{
  position: relative;
  overflow: hidden;
  padding: 56px 20px 64px;
  background: linear-gradient(180deg, #181b27 0%, #14161f 100%);
}
.hero-grid{
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 10px;
  padding: 20px;
  opacity: 0.12;
  pointer-events: none;
}
.hero-grid .cell{ border-radius: 10px; }

.hero-content{
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.hero h1{
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--ink);
  text-shadow: 0 4px 0 rgba(0,0,0,0.4);
}
.hero-lede{
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 36px;
}

/* ===== PLAY PANEL ===== */
.play-panel{
  display: flex;
  justify-content: center;
}
.play-cover{
  position: relative;
  width: min(420px, 90vw);
  aspect-ratio: 4 / 5;
  background: var(--board);
  border-radius: 22px;
  border: 4px solid #000;
  box-shadow: var(--shadow-hard), 0 20px 50px rgba(0,0,0,0.5);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.cover-timer{
  align-self: flex-start;
  background: var(--bg-panel-2);
  border: 2px solid #000;
  border-radius: 10px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--yellow);
}
.clock-icon{ margin-right: 4px; }

.cover-board{
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  background: #1a1d28;
  border-radius: 14px;
  border: 2px solid #000;
}
.pc{
  border-radius: 8px;
  border: 2px solid rgba(0,0,0,0.4);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.25);
}
.pc.r{ border-radius: 8px 8px 8px 24px; }

.door{
  position: absolute;
  border-radius: 6px;
  border: 2px solid #000;
}
.door-top{ top: -4px; left: 50%; transform: translateX(-50%); width: 56px; height: 10px; border-radius: 0 0 8px 8px; }
.door-left{ left: -4px; top: 50%; transform: translateY(-50%); width: 10px; height: 56px; border-radius: 0 8px 8px 0; }
.door-right{ right: -4px; top: 35%; transform: translateY(-50%); width: 10px; height: 56px; border-radius: 8px 0 0 8px; }

.play-btn{
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, var(--green), #2fae59);
  color: #07240f;
  font-weight: 800;
  font-size: 1.1rem;
  border: 3px solid #000;
  border-radius: 999px;
  padding: 14px 34px;
  cursor: pointer;
  box-shadow: 0 6px 0 #1b6b38, 0 14px 30px rgba(0,0,0,0.45);
}
.play-btn:hover{ filter: brightness(1.05); }
.play-triangle{
  width: 0; height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #07240f;
}
.fullscreen-btn{
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-panel-2);
  color: var(--ink);
  border: 2px solid #000;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
}

/* ===== SECTIONS ===== */
.section{
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 20px;
}
.section.alt{
  max-width: 100%;
  background: var(--bg-panel);
  border-top: 3px solid #000;
  border-bottom: 3px solid #000;
}
.section.alt > *{
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.section h2{
  font-size: 1.6rem;
  color: var(--ink);
  position: relative;
  padding-left: 18px;
}
.section h2::before{
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 8px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--red), var(--yellow), var(--blue));
}
.section p{ color: var(--ink-soft); }
.section p a{ color: var(--cyan); font-weight: 600; }

/* ===== LEVEL GRID ===== */
.level-grid{
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.level-grid li a{
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-panel-2);
  border: 2px solid #000;
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}
.level-grid li a:hover{
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0,0,0,0.35);
}
.level-swatch{
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #000;
  flex-shrink: 0;
}

/* ===== FAQ ===== */
.faq-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.faq-list details{
  background: var(--bg-panel-2);
  border: 2px solid #000;
  border-radius: 10px;
  padding: 14px 18px;
}
.faq-list summary{
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
}
.faq-list summary::-webkit-details-marker{ display: none; }
.faq-list summary::before{
  content: "+";
  display: inline-block;
  width: 18px;
  color: var(--yellow);
  font-weight: 900;
}
.faq-list details[open] summary::before{ content: "–"; }
.faq-list p{ margin: 10px 0 0 18px; color: var(--ink-soft); }

/* ===== FOOTER ===== */
.site-footer{
  background: #0e0f16;
  border-top: 3px solid #000;
  padding: 28px 20px;
}
.footer-inner{
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}
.footer-nav{
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.footer-nav a{
  color: var(--ink-soft);
  font-weight: 600;
}
.footer-disclaimer{
  color: #656a7d;
  font-size: 0.85rem;
  max-width: 640px;
  margin: 0 auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px){
  .header-inner{ flex-direction: column; align-items: flex-start; }
  .main-nav{ width: 100%; }
  .hero{ padding: 40px 16px 56px; }
  .section{ padding: 36px 16px; }
}

/* loaded game iframe fills the cover panel */
.play-cover iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 18px;
  background: #000;
}
.play-cover.playing{
  width: min(720px, 94vw);
  aspect-ratio: 4 / 3;
}
.play-cover.playing > :not(iframe):not(.fullscreen-btn){ display: none; }
.play-cover.playing .fullscreen-btn{ z-index: 2; }
.footer-updated{
  margin-top: 8px;
  font-size: 0.8rem;
  opacity: 0.55;
}

/* solution video embeds */
.video-wrap{
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  margin: 12px 0;
  border: 3px solid #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-hard);
}
.video-wrap iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
