/**
 * BMAD Training — Homepage chooser
 * Two big cards (BMAD / ACA) + Full deck card. Theme-aware.
 */

/* Deloitte brand palette. The legacy var names (--home-accent-teal,
   --home-accent-orange) are retained for backward compatibility,
   but their values now follow Deloitte standards. */
:root {
  --home-bg: #0a0e14;
  --home-bg-2: #0f1419;
  --home-card-bg: rgba(255, 255, 255, 0.04);
  --home-card-border: rgba(255, 255, 255, 0.10);
  --home-card-border-hover: rgba(134, 188, 37, 0.55);
  --home-text: #ffffff;
  --home-text-secondary: #bbbcbc;   /* Cool Gray 4 */
  --home-text-muted: #97999b;       /* Cool Gray 7 */
  --home-accent-teal: #86bc25;      /* DELOITTE GREEN — BMAD card */
  --home-accent-orange: #00abab;    /* Deloitte Teal 6 — ACA card (cloud-platform feel) */
  --home-accent-blue: #62b5e5;      /* Deloitte Blue 2 — Full Deck card */
}

[data-theme="light"] {
  --home-bg: #f4f7eb;              /* Pale Green tint */
  --home-bg-2: #ffffff;
  --home-card-bg: #ffffff;
  --home-card-border: #e6e6e6;     /* Deloitte Light Gray */
  --home-card-border-hover: #86bc25;
  --home-text: #222222;            /* Deloitte Dark Gray */
  --home-text-secondary: #53565a;  /* Cool Gray 11 */
  --home-text-muted: #75787b;      /* Cool Gray 9 */
  --home-accent-teal: #046a38;     /* Deep Green — BMAD */
  --home-accent-orange: #0097a9;   /* Deloitte Teal 5 — ACA (more saturated for clearer visual contrast vs Deep Green) */
  --home-accent-blue: #0076a8;     /* Blue 7 — Full Deck */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  /* Aptos = Microsoft 365 corporate font (Deloitte standard); Inter is the visually-near-identical web fallback. */
  font-family: 'Aptos', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  color: var(--home-text);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(134, 188, 37, 0.07), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(196, 214, 0, 0.05), transparent 50%),
    linear-gradient(165deg, var(--home-bg) 0%, var(--home-bg-2) 100%);
  transition: background 0.25s, color 0.25s;
}

.home-theme-btn {
  position: fixed;
  top: 1.2rem;
  right: 1.4rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--home-card-bg);
  border: 1px solid var(--home-card-border);
  color: var(--home-text);
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.12s;
}

.home-theme-btn:hover {
  border-color: var(--home-accent-teal);
  transform: translateY(-1px);
}

.home-theme-icon {
  font-size: 1rem;
  line-height: 1;
}

.home-shell {
  max-width: 84rem;
  margin: 0 auto;
  padding: 3rem 2.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}

.home-hero {
  text-align: center;
  max-width: 52rem;
  margin: 0 auto;
}

.home-kicker {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--home-text-secondary);
  font-weight: 600;
}

.home-title {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.home-accent {
  color: var(--home-accent-teal);
}

.home-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--home-text-secondary);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.home-card--full {
  grid-column: 1 / -1;
}

.home-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--home-card-bg);
  border: 1px solid var(--home-card-border);
  border-radius: 18px;
  padding: 1.25rem;
  color: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s, background 0.18s;
  cursor: pointer;
}

.home-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--home-accent-teal);
  opacity: 0.5;
  transition: opacity 0.18s, height 0.18s;
}

.home-card--bmad::before { background: var(--home-accent-teal); }
.home-card--aca::before { background: var(--home-accent-orange); }
.home-card--full::before { background: linear-gradient(90deg, var(--home-accent-teal) 0%, var(--home-accent-orange) 100%); }

.home-card:hover {
  border-color: var(--home-card-border-hover);
  transform: translateY(-3px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.home-card:hover::before {
  opacity: 1;
  height: 4px;
}

.home-card-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--home-text-secondary);
  font-weight: 700;
}

.home-card--bmad .home-card-kicker { color: var(--home-accent-teal); }
.home-card--aca .home-card-kicker { color: var(--home-accent-orange); }
.home-card--full .home-card-kicker { color: var(--home-accent-blue); }

.home-card-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--home-text);
}

.home-card-desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--home-text-secondary);
}

.home-card-bullets {
  margin: 0;
  padding-left: 1.05rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.home-card-bullets li {
  position: relative;
  font-size: 0.85rem;
  color: var(--home-text-secondary);
  line-height: 1.45;
}

.home-card-bullets li::before {
  content: '→';
  position: absolute;
  left: -1.05rem;
  color: var(--home-accent-teal);
  font-weight: 700;
}

.home-card--aca .home-card-bullets li::before { color: var(--home-accent-orange); }
.home-card--full .home-card-bullets li::before { color: var(--home-accent-blue); }

.home-card-cta {
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--home-accent-teal);
  transition: gap 0.18s;
}

.home-card--aca .home-card-cta { color: var(--home-accent-orange); }
.home-card--full .home-card-cta { color: var(--home-accent-blue); }

.home-card:hover .home-card-cta { gap: 0.7rem; }

.home-footer {
  margin-top: 0.6rem;
  padding: 1.1rem 1.4rem;
  background: var(--home-card-bg);
  border: 1px solid var(--home-card-border);
  border-radius: 14px;
  text-align: center;
}

.home-footer p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--home-text-secondary);
  line-height: 1.55;
}

.home-footer p + p {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--home-text-muted);
}

.home-footer kbd {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  margin: 0 0.15rem;
  font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', Menlo, monospace;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--home-card-border);
  border-radius: 4px;
  color: var(--home-text);
}

[data-theme="light"] .home-footer kbd {
  background: #e6e6e6;
}

.home-card:focus-visible {
  outline: 2px solid var(--home-accent-teal);
  outline-offset: 3px;
  border-color: var(--home-card-border-hover);
}

.home-theme-btn:focus-visible {
  outline: 2px solid var(--home-accent-teal);
  outline-offset: 2px;
}

@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-card--full { grid-column: 1; }
  .home-shell { padding: 2rem 1.4rem 3rem; }
}

@media (max-width: 768px) {
  .home-card { padding: 1rem; }
}

/* Fix 1: theme button / hero heading collision at 320px */
@media (max-width: 480px) {
  .home-theme-btn {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.72rem;
  }
  .home-shell {
    padding-top: 4rem;
  }
}

/* Fix 2: card typography on narrow widths */
@media (max-width: 480px) {
  .home-card {
    padding: 1rem;
    border-radius: 12px;
  }
  .home-card-title {
    font-size: 1.35rem;
  }
  .home-card-desc {
    font-size: 0.88rem;
  }
  .home-shell {
    gap: 1.6rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Fix 3: footer kbd wrapping on narrow widths */
@media (max-width: 600px) {
  .home-footer {
    padding: 0.85rem 0.9rem;
    text-align: left;
  }
  .home-footer p {
    font-size: 0.78rem;
    line-height: 1.65;
  }
  .home-footer kbd {
    font-size: 0.7rem;
    padding: 0.05rem 0.25rem;
  }
}
