/* =========================================================
   Tepuy App Launcher – Tepuy Launch Console (Fixed & Styled)
   Palette redesign (2026-08): was a --stone/--ink dark radial fill with
   white text throughout — this full-viewport modal fires from every
   page via app-launcher-global.js, so it was one of the largest
   remaining near-black surfaces site-wide. Rebuilt on --bone with a
   soft --sky glow; every text/card color below is updated to match.
   ========================================================= */

.app-launcher {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding: 6rem 1rem 6rem;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--sky) 20%, var(--bone)) 0%, var(--bone) 100%);
  backdrop-filter: blur(32px) saturate(160%);
  color: var(--text);
  z-index: 99999;
  overflow-y: auto;
}

.app-launcher.active {
  display: flex;
  animation: fadeIn 0.45s ease-out both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

/* --- layout & centering --- */
.app-launcher__inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.app-launcher__title {
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 800;
  letter-spacing: 0.3px;
  margin-bottom: 0.5rem;
  /* fit-content + auto margins so the gradient's own box matches the
     visible glyphs — previously this stretched to the full centered
     1200px .app-launcher__inner, so only the clay/moss midpoint (a
     muddy brown) ever fell within the centered text; the true
     endpoints were painted onto invisible space either side of it. */
  width: fit-content;
  margin-inline: auto;
  background: linear-gradient(90deg, var(--clay), var(--moss));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-launcher__subtitle {
  color: color-mix(in srgb, var(--text) 65%, transparent);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* --- grid --- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  justify-items: center;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* --- cards --- */
.app-card {
  position: relative;
  background: color-mix(in srgb, white 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--clay) 25%, transparent);
  border-radius: 18px;
  padding: 2.2rem 1.4rem;
  width: 100%;
  max-width: 260px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px color-mix(in srgb, var(--text) 8%, transparent);
  overflow: hidden;
}

.app-card:hover {
  background: color-mix(in srgb, white 88%, transparent);
  border-color: var(--clay);
  transform: translateY(-6px);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--clay) 18%, transparent);
}

.app-card h3 {
  /* Darkened from raw --clay (3.5:1 on white/bone — fails AA normal
     text) to comfortably clear 4.5:1 at this heading's size/weight. */
  color: color-mix(in srgb, var(--clay) 85%, black);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.app-card p {
  color: color-mix(in srgb, var(--text) 75%, transparent);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* --- icon placeholders --- */
.app-card .emoji,
.app-card img.app-icon {
  display: block;
  font-size: 2.5rem;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--clay) 12%, transparent));
  transition: transform 0.4s ease, filter 0.4s ease;
}

.app-card:hover .emoji,
.app-card:hover img.app-icon {
  transform: scale(1.08);
  filter: drop-shadow(0 0 25px color-mix(in srgb, var(--clay) 20%, transparent));
}

/* --- reflection sweep ---
   Was a white shine sweep, tuned for a dark card — invisible on the new
   white/light card. A faint clay-tinted sweep keeps the same effect and
   reads as a shine only over the darker header/icon area of the card. */
.app-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, color-mix(in srgb, var(--clay) 30%, transparent), transparent);
  transform: skewX(-20deg);
  transition: left 0.8s ease;
  opacity: 0.2;
  pointer-events: none;
}
.app-card:hover::after {
  left: 125%;
}

/* --- close button --- */
.app-launcher__close {
  position: fixed;
  top: 1.4rem;
  right: 1.8rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  z-index: 100000;
}
.app-launcher__close:hover { opacity: 1; }

/* --- footer --- */
.app-launcher__footer {
  margin-top: 3.5rem;
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--text) 55%, transparent);
}
.app-launcher__footer a {
  /* Same darkened clay as .app-card h3, for the same AA reason. */
  color: color-mix(in srgb, var(--clay) 85%, black);
  text-decoration: underline;
}
.app-launcher__footer a:hover { color: var(--text); }

/* --- mobile --- */
@media (max-width: 600px) {
  .app-launcher { padding: 4rem 1rem; align-items: flex-start; }
  .app-launcher__title { font-size: 1.8rem; }
  .app-card { padding: 1.5rem; max-width: 100%; }
}

/* === Tepuy app icons ===
   brightness(1.2/1.4) was tuned to make icon artwork pop out of the dark
   card — on the new light card that boost overexposes them instead, so
   it's dropped; a touch of contrast is kept. */
.app-icon {
  width: 90px;
  height: 90px;
  margin-bottom: 1rem;
  object-fit: contain;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--clay) 12%, transparent))
          contrast(1.05);
  transition: transform 0.4s ease, filter 0.4s ease;
}

.app-card:hover .app-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 25px color-mix(in srgb, var(--clay) 20%, transparent))
          contrast(1.08);
}
/* === Overrides below were three successive attempts to fight the same
   dark background re-appearing (each with rising !important weight) —
   left in place rather than restructured, but all three now repoint to
   the same --bone/--sky treatment above so they agree with each other
   instead of re-introducing the near-black fill they were fighting. === */
body.app-launcher-open {
  overflow: hidden !important;
}

.app-launcher {
  background: radial-gradient(circle at 50% 25%, color-mix(in srgb, var(--sky) 20%, var(--bone)) 0%, var(--bone) 100%) !important;
  backdrop-filter: blur(32px) saturate(160%) !important;
  z-index: 999999 !important;
}

/* Faint clay glow, kept from the original intent */
.app-launcher::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--clay) 8%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

/* Ensure grid never collapses narrow */
.app-launcher__inner {
  max-width: 1200px !important;
  margin: 0 auto !important;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Strengthen card separation */
.app-card {
  background: color-mix(in srgb, white 75%, transparent) !important;
  border-color: color-mix(in srgb, var(--clay) 22%, transparent) !important;
  backdrop-filter: blur(14px);
}


