/* carbon-thin.css — house brand overlay on top of nes.css
 *
 * Lightweight DArnTech brand layer that sits over nes.css's NES aesthetic.
 * "Carbon-thin" per operator phrasing 2026-05-25: dark-themed minimal chrome
 * applied THINLY, not as a competing visual system. nes.css does the heavy
 * retro lifting; this file just tints + spaces + adds the wordmark treatment.
 *
 * Per [[frontend_stack_nes_css_retro_calendar]] — study the proxmox-homelab
 * retro frontend (~/projects/proxmox-homelab/frontend/) as reference for
 * idiom, build fresh here.
 */

:root {
  --gc-carbon-bg: #161616;       /* IBM Carbon $background */
  --gc-carbon-bg-2: #262626;     /* $layer-01 */
  --gc-carbon-bg-3: #393939;     /* $layer-02 */
  --gc-carbon-text: #f4f4f4;     /* $text-primary */
  --gc-carbon-text-dim: #c6c6c6; /* $text-secondary */
  --gc-accent: #ff851b;          /* DArnTech orange-ish; tweak to brand */
  --gc-ship-glow: #92cc41;       /* nes.css success green */
  --gc-today-glow: #f7d51d;      /* nes.css warning yellow */
  --gc-archive-tint: #8c8c8c;
}

html, body {
  background: var(--gc-carbon-bg);
  color: var(--gc-carbon-text);
  font-family: 'Press Start 2P', monospace;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  image-rendering: pixelated;
}

.gc-header {
  padding: 2rem 1rem 1rem;
  text-align: center;
  border-bottom: 4px solid var(--gc-carbon-bg-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.gc-brand-mark {
  width: 96px;
  height: 96px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

@media (max-width: 640px) {
  .gc-brand-mark { width: 72px; height: 72px; }
}

.gc-wordmark {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  letter-spacing: -1px;
  color: var(--gc-carbon-text);
}

.gc-wordmark .gc-da {
  color: var(--gc-accent);
  text-shadow: 2px 2px 0 var(--gc-carbon-bg);
}

.gc-tagline {
  font-size: 0.7rem;
  color: var(--gc-carbon-text-dim);
  margin: 0;
}

.gc-main {
  max-width: 920px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  gap: 1.5rem;
}

/* nes.css containers default to light bg; keep the dark-with-title variant */
.gc-calendar-section,
.gc-about-section {
  font-size: 0.7rem;
  line-height: 1.7;
}

.gc-calendar-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.gc-month-label {
  font-size: 0.9rem;
  min-width: 12ch;
  text-align: center;
}

.gc-weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.7rem;
  color: var(--gc-carbon-text-dim);
  margin-bottom: 0.5rem;
}

.gc-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.gc-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gc-carbon-bg-2);
  border: 2px solid var(--gc-carbon-bg-3);
  font-size: 0.7rem;
  color: var(--gc-carbon-text);
  text-decoration: none;
  transition: transform 0.06s steps(2);
}

.gc-cell.gc-cell-empty {
  background: transparent;
  border-color: transparent;
}

.gc-cell.gc-cell-other-month {
  color: #555;
  background: var(--gc-carbon-bg);
}

.gc-cell.gc-cell-today {
  border-color: var(--gc-today-glow);
  box-shadow: 0 0 0 2px var(--gc-today-glow) inset;
}

.gc-cell.gc-cell-ship {
  background: var(--gc-ship-glow);
  color: var(--gc-carbon-bg);
  border-color: var(--gc-ship-glow);
  cursor: pointer;
  font-weight: bold;
}

.gc-cell.gc-cell-ship:hover,
.gc-cell.gc-cell-ship:focus {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--gc-carbon-bg);
  outline: none;
}

.gc-cell.gc-cell-archive {
  background: var(--gc-archive-tint);
  color: var(--gc-carbon-bg);
  cursor: pointer;
}

.gc-cell.gc-cell-archive:hover,
.gc-cell.gc-cell-archive:focus {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--gc-carbon-bg);
  outline: none;
}

.gc-cell-label {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 0.5rem;
  opacity: 0.7;
}

.gc-cell-title {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 0.5rem;
  text-transform: uppercase;
  max-width: calc(100% - 8px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gc-calendar-legend {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--gc-carbon-text-dim);
}

.gc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.gc-cell-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--gc-carbon-bg-3);
}
.gc-cell-swatch.gc-cell-ship { background: var(--gc-ship-glow); border-color: var(--gc-ship-glow); }
.gc-cell-swatch.gc-cell-today { background: transparent; border-color: var(--gc-today-glow); box-shadow: 0 0 0 2px var(--gc-today-glow) inset; }
.gc-cell-swatch.gc-cell-archive { background: var(--gc-archive-tint); border-color: var(--gc-archive-tint); }

.gc-about-section {
  background: var(--gc-carbon-bg-2);
  color: var(--gc-carbon-text);
}

/* Godot iframe wrapper (used on per-week game pages /wNN/index.html) */
.gc-game-section {
  /* Override the dark theme padding so the iframe fills the container */
  padding: 1rem;
}

.gc-game-frame-wrap {
  position: relative;
  width: 100%;
  /* Most Godot HTML5 exports render at the project's viewport (1280x720
   * by default per cycle-2 html5_export defaults). Keep aspect-ratio
   * locked + scale-to-fit. */
  aspect-ratio: 16 / 9;
  background: var(--gc-carbon-bg);
  border: 4px solid var(--gc-carbon-bg-3);
  overflow: hidden;
}

.gc-game-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--gc-carbon-bg);
}

.gc-game-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  text-align: center;
  background: var(--gc-carbon-bg);
  color: var(--gc-carbon-text-dim);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.gc-loading-blink {
  font-size: 1.4rem;
  color: var(--gc-ship-glow);
  animation: gc-blink 1.2s steps(2) infinite;
}

@keyframes gc-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.gc-fineprint {
  font-size: 0.55rem;
  color: var(--gc-carbon-text-dim);
}

.gc-footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 4px solid var(--gc-carbon-bg-3);
  margin-top: 2rem;
  font-size: 0.6rem;
}

.gc-footer a {
  color: var(--gc-accent);
  text-decoration: none;
}

.gc-footer a:hover {
  text-decoration: underline;
}

/* Mobile: stack tighter, smaller cells */
@media (max-width: 640px) {
  .gc-wordmark { font-size: 1.4rem; }
  .gc-tagline { font-size: 0.55rem; }
  .gc-calendar-grid { gap: 2px; }
  .gc-cell { font-size: 0.55rem; }
  .gc-cell-title { font-size: 0.4rem; }
  .gc-cell-label { font-size: 0.4rem; }
  .gc-main { padding: 0 0.5rem; }
}
