/* Feature #5 — Categorized icon-tile launcher.
   All styles scoped under .guide-launcher so this file is safe to load
   alongside app.css / public.css without clobbering anything.

   Brand: green #0b4f55, gold #c5a059 (light) / #d7b56d (night).
   Works on default palettes and on .guide-palette-night (the article
   carries that class, so .guide-palette-night .guide-launcher matches). */

.guide-launcher {
  --gl-green: #0b4f55;
  --gl-gold: #c5a059;
  --gl-surface: #ffffff;
  --gl-border: rgba(11, 79, 85, 0.12);
  --gl-shadow: 0 1px 2px rgba(11, 79, 85, 0.06), 0 8px 24px rgba(11, 79, 85, 0.06);
  --gl-shadow-hover: 0 4px 10px rgba(11, 79, 85, 0.10), 0 14px 34px rgba(11, 79, 85, 0.12);
  --gl-ink: #16323a;
  --gl-muted: #5e7177;
  --gl-icon-bg: rgba(11, 79, 85, 0.06);
  --gl-icon-fg: var(--gl-green);

  display: block;
  margin: 1.5rem 0 2.5rem;
}

.guide-launcher__group {
  margin: 0 0 2rem;
}
.guide-launcher__group:last-child {
  margin-bottom: 0;
}

.guide-launcher__group-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gl-gold);
}

.guide-launcher__group-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--gl-ink);
}

/* responsive grid: 3 cols desktop, 2 cols mobile */
.guide-launcher__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 720px) {
  .guide-launcher__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }
}

.guide-launcher__tile-wrap {
  margin: 0;
  display: flex;
}

.guide-launcher__tile {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 1.1rem 1rem;
  border: 1px solid var(--gl-border);
  border-radius: 18px;
  background: var(--gl-surface);
  box-shadow: var(--gl-shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
              border-color 0.16s ease, background 0.16s ease;
}

.guide-launcher__tile:hover,
.guide-launcher__tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--gl-shadow-hover);
  border-color: rgba(11, 79, 85, 0.28);
  outline: none;
}

.guide-launcher__tile:focus-visible {
  outline: 2px solid var(--gl-gold);
  outline-offset: 2px;
}

.guide-launcher__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gl-icon-bg);
  color: var(--gl-icon-fg);
  transition: background 0.16s ease, color 0.16s ease;
}

.guide-launcher__icon svg {
  display: block;
}

.guide-launcher__tile:hover .guide-launcher__icon,
.guide-launcher__tile:focus-visible .guide-launcher__icon {
  background: var(--gl-green);
  color: #fff;
}

.guide-launcher__label {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--gl-ink);
}

.guide-launcher__sublabel {
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--gl-muted);
}

/* ---------------------- night palette ---------------------- */
.guide-palette-night .guide-launcher {
  --gl-gold: #d7b56d;
  --gl-surface: rgba(255, 255, 255, 0.04);
  --gl-border: rgba(255, 255, 255, 0.12);
  --gl-shadow: 0 1px 2px rgba(0, 0, 0, 0.30), 0 8px 24px rgba(0, 0, 0, 0.28);
  --gl-shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.34), 0 14px 34px rgba(0, 0, 0, 0.40);
  --gl-ink: #f3f5f4;
  --gl-muted: #b3c0c2;
  --gl-icon-bg: rgba(255, 255, 255, 0.08);
  --gl-icon-fg: #d7b56d;
}

.guide-palette-night .guide-launcher__tile:hover,
.guide-palette-night .guide-launcher__tile:focus-visible {
  border-color: rgba(215, 181, 109, 0.5);
}

.guide-palette-night .guide-launcher__tile:hover .guide-launcher__icon,
.guide-palette-night .guide-launcher__tile:focus-visible .guide-launcher__icon {
  background: var(--gl-gold);
  color: #16323a;
}

@media (prefers-reduced-motion: reduce) {
  .guide-launcher__tile,
  .guide-launcher__icon {
    transition: none;
  }
  .guide-launcher__tile:hover,
  .guide-launcher__tile:focus-visible {
    transform: none;
  }
}
