/* Academy Deck Shell - Brand-aligned token consolidation per DESIGN.md */
/* Scope: deck page layout and shell-level styling */

/* Page-level layout - scoped to deck page only */
html:has(body.page-academy-deck),
body.page-academy-deck {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Brand-aligned CSS custom properties */
body.page-academy-deck {
  /* Core brand colors per DESIGN.md */
  --primary: #1C6DFF;
  --primary-dark: #0B4CC0;
  --accent: #FF6B35;
  --ink: #0A0F1E;
  --ink-soft: #101629;
  --cyan-support: #6EE7F3;
  
  /* Semantic colors */
  --purple: #7C3AED;
  --gold: #F59E0B;
  --red: #EF4444;
  --green: #10B981;
  
  /* Surfaces & text */
  --text: #E8ECF5;
  --muted: rgba(232, 236, 245, 0.7);
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.1);
  
  /* Background - brand ink gradient */
  background:
    radial-gradient(ellipse 70% 45% at 20% 0%, rgba(28, 109, 255, 0.12), transparent 60%),
    linear-gradient(180deg, #0A0F1E 0%, #101629 100%);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

/* Transparent backgrounds for deck page structure */
body.page-academy-deck,
body.page-academy-deck main,
body.page-academy-deck .section,
body.page-academy-deck .deck-intro,
body.page-academy-deck .deck-stage-section,
body.page-academy-deck .site-footer {
  background: transparent;
}

/* Typography - brand-aligned per DESIGN.md */
body.page-academy-deck h1,
body.page-academy-deck h2,
body.page-academy-deck h3,
body.page-academy-deck h4,
body.page-academy-deck .section-title,
body.page-academy-deck .logo-text,
body.page-academy-deck .tool-main-name,
body.page-academy-deck .why-title,
body.page-academy-deck .alt-title,
body.page-academy-deck .hud-brand,
body.page-academy-deck .hero-logo {
  font-family: "Poppins", sans-serif;
}

/* UI/Labels - Inter with letter-spacing per DESIGN.md */
body.page-academy-deck .tool-tagline,
body.page-academy-deck .tool-badge,
body.page-academy-deck .section-label,
body.page-academy-deck .hero-sub,
body.page-academy-deck .hud-slide,
body.page-academy-deck .hud-live,
body.page-academy-deck #clock,
body.page-academy-deck .h-tag,
body.page-academy-deck .nav-btn,
body.page-academy-deck .tk {
  font-family: "Inter", sans-serif;
  letter-spacing: 0.1em;
}

/* Logo sizing */
body.page-academy-deck .logo-text {
  font-size: 1.08rem;
}

/* Deck page layout - scoped container */
body.page-academy-deck .deck-page {
  display: block;
  padding-top: 4.75rem;
}

/* Intro section */
body.page-academy-deck .deck-intro .container {
  width: min(1320px, 100% - 2rem);
}

body.page-academy-deck .deck-intro {
  padding: 1.5rem 0 0.75rem;
}

body.page-academy-deck .deck-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) auto;
  gap: 1.5rem;
  align-items: end;
}

body.page-academy-deck .deck-intro h1 {
  font-size: clamp(2.5rem, 4.4vw, 4rem);
  line-height: 0.98;
  margin: 0.7rem 0 0.9rem;
}

body.page-academy-deck .deck-intro p {
  max-width: 48rem;
  color: rgba(232, 236, 245, 0.72);
  font-size: 1.02rem;
  line-height: 1.75;
}

body.page-academy-deck .deck-intro-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

body.page-academy-deck .deck-intro-pills .pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(232, 236, 245, 0.9);
}

body.page-academy-deck .deck-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  align-self: center;
}

body.page-academy-deck .deck-intro-actions .btn,
body.page-academy-deck .deck-intro-actions a {
  min-width: 0;
}

/* Stage section - where the deck lives */
body.page-academy-deck .deck-stage-section {
  padding: 0.75rem 0 0;
}

body.page-academy-deck .deck-stage-section .container {
  width: min(1520px, 100% - 1.5rem);
}

/* Deck shell - constrained to deck container per PLAN.md */
body.page-academy-deck .deck-shell {
  position: relative;
  min-height: clamp(680px, calc(100vh - 11.5rem), 920px);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10, 15, 30, 0.94), rgba(16, 22, 41, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(8, 13, 27, 0.34);
}

/* Canvas positioning within deck shell */
body.page-academy-deck .deck-shell #bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body.page-academy-deck .deck-shell .grid-overlay {
  position: absolute;
  inset: 0;
}

/* HUD positioning - scoped to deck shell */
body.page-academy-deck .deck-shell .hud-top {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  top: 1rem;
  z-index: 15;
}

body.page-academy-deck .deck-shell .progress-bar {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  top: 5.25rem;
  z-index: 15;
}

body.page-academy-deck .deck-shell .deck {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

body.page-academy-deck .deck-shell .slide {
  width: 100%;
  height: 100%;
}

/* Nav positioning - scoped to deck shell */
body.page-academy-deck .deck-shell .nav {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 15;
}

body.page-academy-deck .deck-shell .nav-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

body.page-academy-deck .deck-shell .nav-btn:hover {
  background: rgba(255, 107, 53, 0.15);
  border-color: rgba(255, 107, 53, 0.35);
}

/* Hero logo - brand gradient (blue to orange) */
body.page-academy-deck .hero-logo {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Tag styling - alternating accent and primary */
body.page-academy-deck .h-tag:nth-child(2),
body.page-academy-deck .h-tag:nth-child(4) {
  color: var(--accent);
  border-color: rgba(255, 107, 53, 0.28);
}

body.page-academy-deck .h-tag:nth-child(3),
body.page-academy-deck .h-tag:nth-child(5) {
  color: rgba(232, 236, 245, 0.86);
  border-color: rgba(255, 255, 255, 0.16);
}

/* Footer styling */
body.page-academy-deck .footer-grid {
  color: rgba(255, 255, 255, 0.85);
}

body.page-academy-deck .site-footer {
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  body.page-academy-deck .deck-intro-grid {
    grid-template-columns: 1fr;
  }

  body.page-academy-deck .deck-intro-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  body.page-academy-deck .deck-page {
    padding-top: 4.25rem;
  }

  body.page-academy-deck .deck-stage-section .container {
    width: min(100%, 100% - 1rem);
  }

  body.page-academy-deck .deck-shell {
    min-height: 540px;
    border-radius: 22px;
  }

  body.page-academy-deck .deck-intro {
    padding-top: 1.1rem;
  }
}
