/* =====================================================
   CRICTAKKAR DESIGN SYSTEM — SHARED TOKENS
   Direction picked Day 63: keep the existing navy+gold
   brand, but move shape/typography toward "Powerplay"
   (chunky, rounded, game-app) and keep motion restrained
   like "Floodlight" (smooth, no bounce/overshoot).
   Every page should read from these variables instead of
   hardcoding a new color/radius/shadow value.
   ===================================================== */
:root {
  /* --- Color --- */
  --color-bg: #0a0e1a;
  --color-surface: #141b30;
  --color-surface-2: #1a2035;
  --color-line: rgba(255, 255, 255, 0.1);
  --color-ink: #f4f1e8;
  --color-ink-soft: rgba(244, 241, 232, 0.65);
  --color-ink-faint: rgba(244, 241, 232, 0.45);
  --gold-1: #f4a900;
  --gold-2: #e07b00;
  --gold-shadow: #8a5400;
  --color-pop: #39d98a;
  --color-wrong: #ff5d6f;

  /* --- Type --- */
  --font-display: 'Baloo 2', sans-serif;
  --font-body: 'Nunito', sans-serif;

  /* --- Shape --- */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* --- Shadow --- */
  --shadow-press: 0 4px 0 var(--gold-shadow);
  --shadow-press-active: 0 2px 0 var(--gold-shadow);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-gold-glow: 0 10px 26px rgba(244, 169, 0, 0.35);

  /* --- Motion: smooth and restrained, no spring/bounce --- */
  --ease-standard: cubic-bezier(.2, .8, .2, 1);
  --ease-out-soft: cubic-bezier(.16, 1, .3, 1);
  --motion-fast: 150ms;
  --motion-base: 250ms;
  --motion-slow: 450ms;

  /* --- Spacing scale --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
}

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body), sans-serif;
  background-color: var(--color-bg);
  color: var(--color-ink);
  min-height: 100vh;
}

h1, h2, h3, .btn-primary, .btn-secondary, .card-btn {
  font-family: var(--font-display), sans-serif;
}

/* ===== NAVIGATION BAR ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-display), sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-1);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 54px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--color-ink-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: color var(--motion-fast) var(--ease-standard);
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-1);
}

/* Narrow phones: keep nav links on one row, scrollable within the navbar
   itself, instead of letting them push the whole page wider than the screen. */
@media (max-width: 480px) {
  .navbar { padding: 14px 16px; }
  .nav-logo { font-size: 1.15rem; }
  .nav-logo-img { height: 42px; }
  .nav-links {
    gap: 14px;
    overflow-x: auto;
    max-width: 62vw;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { font-size: 0.78rem; white-space: nowrap; flex-shrink: 0; }
}

/* ===== HERO SECTION ===== */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 80px 32px 60px;
  max-width: 1100px;
  margin: 0 auto;
  gap: 40px;
}

.hero-content {
  flex: 1;
}

.tagline-small {
  font-size: 0.85rem;
  color: var(--gold-1);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--color-ink) 0%, var(--gold-1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-ink-soft);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-graphic {
  font-size: 8rem;
  opacity: 0.15;
  user-select: none;
}

/* ===== BUTTONS =====
   Shape language: chunky pills with a solid "pressable" bottom
   shadow (Powerplay). Motion stays smooth/eased, no squash-bounce
   (Floodlight) — the shape reads playful, the movement stays calm. */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  color: var(--color-bg);
  border: none;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-press);
  transition: transform var(--motion-base) var(--ease-standard),
              box-shadow var(--motion-base) var(--ease-standard);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(244, 169, 0, 0.35), var(--shadow-press);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-press-active);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-ink);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--motion-base) var(--ease-standard),
              transform var(--motion-base) var(--ease-standard);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* ===== STATS STRIP ===== */
.stats-strip {
  display: flex;
  justify-content: center;
  gap: 0;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  padding: 24px 32px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 40px;
  border-right: 1px solid rgba(0, 0, 0, 0.15);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-display), sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-bg);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.65);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== ON THIS DAY ===== */
.otd-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 32px 0;
}

.otd-heading {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0 0 16px;
}

.otd-subtext {
  font-size: 0.78rem;
  color: var(--color-ink-faint);
  margin-bottom: 12px;
}

.otd-card {
  background: linear-gradient(135deg, rgba(244, 169, 0, 0.12), rgba(224, 123, 0, 0.06));
  border: 1px solid rgba(244, 169, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  text-align: center;
}

.otd-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-1);
  margin-bottom: 10px;
}

.otd-title {
  font-family: var(--font-display), sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: 10px;
}

.otd-fact {
  font-size: 0.95rem;
  color: var(--color-ink-soft);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}

/* ===== FEATURE CARDS ===== */
.features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 32px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--color-ink);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform var(--motion-base) var(--ease-out-soft),
              border-color var(--motion-base) var(--ease-standard);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 169, 0, 0.4);
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-display), sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-ink);
}

.card-desc {
  font-size: 0.88rem;
  color: var(--color-ink-soft);
  line-height: 1.6;
  margin-bottom: 20px;
}

.card-btn {
  background: transparent;
  border: 1.5px solid rgba(244, 169, 0, 0.5);
  color: var(--gold-1);
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--motion-base) var(--ease-standard),
              color var(--motion-base) var(--ease-standard),
              transform var(--motion-base) var(--ease-standard);
}

.card-btn:hover {
  background: var(--gold-1);
  color: var(--color-bg);
  transform: translateY(-1px);
}

/* ===== POPUP ===== */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.popup-overlay.active {
  display: flex;
}

.popup-box {
  background: var(--color-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  max-width: 360px;
  width: 90%;
}

.popup-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.popup-box h3 {
  font-family: var(--font-display), sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.popup-box p {
  color: var(--color-ink-soft);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer {
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  padding: 32px;
  color: var(--color-ink-faint);
  font-size: 0.85rem;
  line-height: 2;
}

.footer a {
  color: var(--gold-1);
  text-decoration: none;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 600px) {
  .navbar {
    padding: 14px 18px;
  }
  .nav-links {
    gap: 14px;
  }
  .hero {
    padding: 48px 18px 40px;
    flex-direction: column;
  }
  .hero-graphic {
    display: none;
  }
  .stats-strip {
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 16px;
  }
  .stat-item {
    border-right: none;
    padding: 8px 20px;
  }
  .features {
    padding: 40px 18px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== PUSH NOTIFICATION TOAST (foreground messages) ===== */
.ct-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 320px;
  background: var(--color-surface-2);
  border: 1px solid #2e3a5c;
  border-left: 4px solid var(--color-pop);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--color-ink);
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  animation: ctToastIn var(--motion-slow) var(--ease-out-soft);
}

@keyframes ctToastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .ct-toast {
    left: 16px;
    right: 16px;
    max-width: none;
  }
}

/* ===== PWA INSTALL BUTTON ===== */
.ct-install-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  color: var(--color-bg);
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  font-family: var(--font-display), sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow-gold-glow);
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: ctToastIn var(--motion-slow) var(--ease-out-soft);
}

.ct-install-close {
  font-size: 0.8rem;
  opacity: 0.6;
  padding: 2px 4px;
}

.ct-install-close:hover {
  opacity: 1;
}

@media (max-width: 480px) {
  .ct-install-btn {
    left: 16px;
    bottom: 16px;
  }
}
